• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getPost函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getPost函数的典型用法代码示例。如果您正苦于以下问题:PHP getPost函数的具体用法?PHP getPost怎么用?PHP getPost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getPost函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getValorPost

/**
 * Devuelve el valor del campo pedido de POST en el formato de valor.
 * @param unknown $field
 */
function getValorPost($field)
{
    $post_temp = getPost($field);
    if ($post_temp) {
        return 'value="' . $post_temp . '"';
    }
}
开发者ID:alexpowerup,项目名称:DWES_Practica_1,代码行数:11,代码来源:post_tools.php


示例2: __construct

 public function __construct($app)
 {
     $this->app = $app;
     $app->group('/group', function () use($app) {
         $restService = new \Core\Service\RestService($app);
         $groupService = new \Core\Service\GroupService();
         $restService->get('/check', function () use($groupService) {
             return $groupService->check($_GET['name'], isset($_GET['cid']) ? intval($_GET['cid']) : null);
         });
         $restService->get('/validation', function () use($groupService) {
             return $groupService->getForValidation($_GET['cid']);
         });
         $restService->get('/autocomplete', function () use($groupService) {
             return $groupService->getAutocomplete($_GET['s']);
         });
         $restService->get('/list', function () use($groupService) {
             return $groupService->getList($_GET['type'], intval($_GET['page']));
         });
         $restService->get('/:id', function ($id) use($groupService) {
             return $groupService->get($id);
         });
         $restService->post('/', function () use($groupService) {
             $data = getPost();
             return $groupService->save($data);
         });
         $restService->delete('/:id', function ($id) use($groupService) {
             return $groupService->delete($id);
         });
     });
 }
开发者ID:Covert-Inferno,项目名称:EVE-Composition-Planer,代码行数:30,代码来源:group.php


示例3: __construct

 public function __construct($app)
 {
     $this->app = $app;
     $app->group('/fitting-rule', function () use($app) {
         $restService = new \Core\Service\RestService($app);
         $fittingRuleService = new \Core\Service\FittingRuleService();
         $restService->get('/calculate', function () use($fittingRuleService) {
             return $fittingRuleService->calculateNewItemFilterTypes();
         });
         $restService->get('/check', function () use($fittingRuleService) {
             return $fittingRuleService->check($_GET['name'], isset($_GET['cid']) ? intval($_GET['cid']) : null);
         });
         $restService->get('/autocomplete', function () use($fittingRuleService) {
             return $fittingRuleService->getAutocomplete($_GET['s']);
         });
         $restService->get('/list', function () use($fittingRuleService) {
             return $fittingRuleService->getList($_GET['type'], intval($_GET['page']));
         });
         $restService->get('/:id', function ($id) use($fittingRuleService) {
             return $fittingRuleService->get($id);
         });
         $restService->post('/', function () use($fittingRuleService) {
             $data = getPost();
             return $fittingRuleService->save($data);
         });
         $restService->delete('/:id', function ($id) use($fittingRuleService) {
             return $fittingRuleService->delete($id);
         });
         $restService->post('/fork', function () use($fittingRuleService) {
             $data = getPost();
             return $fittingRuleService->fork($data);
         });
     });
 }
开发者ID:Covert-Inferno,项目名称:EVE-Composition-Planer,代码行数:34,代码来源:fittingRule.php


示例4: GenerarSelect

/**
 * Genera un control select para HTML con el nombre dado y el conjunto de opciones dadas en el array valores,
 * siendo valoropcion el índice que indica el valor de cada opción y nombreopcion el índice que tiene el texto a mostrar
 * en cada opción
 * @param unknown $nombre
 * @param unknown $valores
 * @param unknown $valoropcion
 * @param unknown $nombreopcion
 * @return string
 */
function GenerarSelect($nombre, $valores, $valoropcion, $nombreopcion)
{
    $ret = "";
    $ret .= '<select name="' . $nombre . '">' . "\n";
    foreach ($valores as $valor) {
        $ret .= '<option value="' . $valor[$valoropcion] . '"' . (getPost($nombre) == $valor[$valoropcion] ? " selected" : "") . '>' . $valor[$nombreopcion] . '</option>' . "\n";
    }
    $ret .= '</select>' . "\n";
    return $ret;
}
开发者ID:alexpowerup,项目名称:DWES_Practica_1,代码行数:20,代码来源:formularios.php


示例5: buildTile

 function buildTile()
 {
     $output = "<div class='BlogTile'>";
     $x = 0;
     while ($x != count($this->feed->posts)) {
         $output .= getPost();
         $x++;
     }
     $output .= "</div>";
     return $output;
 }
开发者ID:rhutton,项目名称:Moodle-LiveTile,代码行数:11,代码来源:tile.php


示例6: lastPost

function lastPost($board, &$db)
{
    if (boardPosts($board, $db) == 0) {
        return 0;
    } else {
        $query = $db->execute("select `id`, `player`, `name`, `msg`, `time`, `parent` from `forum_posts` where `board`=? order by `time` desc limit 1", array($board));
        $post = $query->fetchrow();
        if (empty($post['name'])) {
            $post2 = getPost($post['parent'], $db);
            $post['name'] = "Re: " . $post2['name'];
        }
        return $post;
    }
}
开发者ID:BGCX067,项目名称:ezrpg-svn-to-git,代码行数:14,代码来源:function_forum.php


示例7: __construct

 public function __construct($app)
 {
     $this->app = $app;
     $app->group('/account-settings', function () use($app) {
         $restService = new \Core\Service\RestService($app);
         $accountSettingsService = new \Core\Service\AccountSettingsService();
         $restService->get('/', function () use($accountSettingsService) {
             return $accountSettingsService->get(0);
         });
         $restService->post('/', function () use($accountSettingsService) {
             $data = getPost();
             return $accountSettingsService->save($data);
         });
     });
 }
开发者ID:Covert-Inferno,项目名称:EVE-Composition-Planer,代码行数:15,代码来源:accountSettings.php


示例8: getSimilarQuestions

/**
 *相关问题
 *返回嵌套数组
 */
function getSimilarQuestions($postid, $num = 3)
{
    $post = getPost($postid);
    $title = $post['title'];
    //文章标题
    $city = $post['city'];
    //城市分类
    $query = qa_db_query_sub("SELECT * from ^posts where (`title` like '%{$title}%' or `areaclass`=\$)\n\t\t\t\t\t\tand postid != \$ order by `updated` desc, `created` DESC limit 0,#", $city, $postid, $num);
    $result = qa_db_read_all_assoc($query);
    if (count($result)) {
        return $result;
    } else {
        return null;
    }
}
开发者ID:GitFuture,项目名称:bmf,代码行数:19,代码来源:qa_base.php


示例9: loggin

function loggin()
{
    $_SESSION['username'] = getPost("pseudo");
    $pass = getPost("password");
    $datas = Bdd::sql_fetch_array_assoc("SELECT *\n                                            FROM LOL_user\n                                            WHERE pseudo=?", array($this->get_pseudo()));
    if ($data[0] == 0) {
        return false;
    }
    $_SESSION['id_user'] = $datas[1]['id'];
    $_SESSION['nom'] = $datas[1]['nom'];
    $_SESSION['prenom'] = $datas[1]['prenom'];
    $_SESSION['pseudo'] = $datas[1]['pseudo'];
    $_SESSION['mail'] = $datas[1]['mail'];
    $_SESSION['pass'] = $datas[1]['password'];
    return true;
}
开发者ID:skapin,项目名称:lol-team-manager,代码行数:16,代码来源:auth.php


示例10: login

 public function login()
 {
     $this->show->message = '';
     if (getPost('enter') != '') {
         if (Auth::getInstance()->login($this->post['Login'], $this->post['Password'], true)) {
             if (strlen($this->post['Redirect'])) {
                 //					redirect($this->post['Redirect']);
                 redirect('/admin');
             } else {
                 redirect('/admin');
             }
         } else {
             $this->show->message = 'Неверный логин или пароль';
         }
     }
     $this->template->action = 'index';
 }
开发者ID:kizz66,项目名称:meat,代码行数:17,代码来源:Profile.php


示例11: getUser

function getUser()
{
    $userID = "";
    $userID = getPost('userID');
    if (empty($userID)) {
        $userID = getQString('u');
        if (empty($userID)) {
            $userID = getQString('');
        }
        echo "<p class='debug'>User By Query: {$userID}</p>";
    } else {
        echo "<p class='debug'>User By Post: {$userID}</p>";
    }
    if (strlen($userID) > 3) {
        $userID = null;
    }
    return $userID;
}
开发者ID:katiesenger,项目名称:DSHome,代码行数:18,代码来源:getVariables.php


示例12: RightColumnContent

 public function RightColumnContent()
 {
     if (in_array($this->Action, array('add', 'view', 'edit'))) {
         $languages = Db_Language::getLanguageWithKey();
         $this->TPL->assign('languages', $languages);
         $options = Db_Options::getFulLDetails();
         $product_options = Db_ProductOptions::getOptionsByProductId($this->Id);
         $this->TPL->assign('options', $options);
         $this->TPL->assign('product_options', $product_options);
     }
     if (in_array($this->Action, array('view', 'edit'))) {
         $product = Db_Products::getDetailsById($this->Id);
         $product_trans = Db_ProductTrans::getDetailsById($this->Id);
         $this->TPL->assign('product', $product);
         $this->TPL->assign('product_trans', $product_trans);
     }
     switch ($this->Action) {
         case 'delete':
             if ($this->Id == 0) {
                 break;
             }
             Db_Products::deleteByField('id', $this->Id);
             Db_ProductTrans::deleteAllByField('pt_product_id', $this->Id);
             Db_ProductOptions::deleteAllByField('po_product_id', $this->Id);
             Upload::rrmdir(BASE_PATH . 'files/' . $this->img_path . $this->Id, true);
             $this->Msg->SetMsg($this->_T('success_item_deleted'));
             $this->Redirect($this->PageUrl);
             break;
         case 'save':
             $p_model = getPost('p_model');
             $p_url = getPost('p_url');
             $p_published = isset($_POST['p_published']) ? 1 : 0;
             $p_price = getPost('p_price');
             $p_discount = getPost('p_discount');
             $p_discount_status = isset($_POST['p_discount_status']) ? 1 : 0;
             $pt_title = getPost('pt_title');
             $pt_description = getPost('pt_description');
             $options = getPost('options');
             $product = new Db_Products($this->DB, $this->Id, 'id');
             $product->p_model = $p_model;
             $product->p_url = $p_url;
             $product->p_published = $p_published;
             $product->p_price = $p_price;
             $product->p_discount = $p_discount;
             $product->p_discount_status = $p_discount_status;
             $product->p_type = $this->productType;
             $product->save();
             foreach ($pt_title as $lang => $item) {
                 $product_trans = new Db_ProductTrans();
                 $product_trans->findByFields(array('pt_product_id' => $product->id, 'pt_lang_id' => $lang));
                 $product_trans->pt_title = $pt_title[$lang];
                 $product_trans->pt_description = $pt_description[$lang];
                 $product_trans->pt_lang_id = $lang;
                 $product_trans->pt_product_id = $product->id;
                 $product_trans->save();
             }
             if (!empty($_FILES['p_image']) && $_FILES['p_image']['error'] == 0) {
                 $image = Db_Products::getImageById($product->id);
                 $path = BASE_PATH . 'files' . $this->img_path . $product->id . '/';
                 if (is_dir($path)) {
                     Upload::deleteImage($path, $image, $this->img_sizes);
                 }
                 if ($filename = Upload::uploadImage($path, $_FILES['p_image'], 'product', $this->img_sizes, 'crop')) {
                     $product->p_image = $filename;
                     $product->save();
                 }
             }
             if (!empty($options)) {
                 foreach ($options as $option_id => $option_value) {
                     if (empty($option_value) || empty($option_id)) {
                         continue;
                     }
                     $product_option = new Db_ProductOptions();
                     $product_option->findByFields(array('po_option_id' => $option_id, 'po_product_id' => $product->id));
                     $product_option->po_option_id = $option_id;
                     $product_option->po_product_id = $product->id;
                     $product_option->po_value = $option_value;
                     $product_option->save();
                 }
             }
             $this->Msg->SetMsg($this->_T('success_item_saved'));
             $this->Redirect($this->PageUrl . '?action=view&id=' . $product->id);
             break;
         default:
             $Objects = Db_Products::getObjects($this->productType);
             $ListGrid = false;
             if ($Objects) {
                 $ListGrid = new TGrid();
                 $ListGrid->Spacing = 0;
                 $ListGrid->Width = '100%';
                 $ListGrid->SetClass('table table-bordered table-highlight-head');
                 $ListGrid->AddHeaderRow($this->_T('id'), $this->_T('Title'), $this->_T('Url'), $this->_T('Enabled'), $this->_T('actions'));
                 $ListGrid->BeginBody();
                 foreach ($Objects as $Object) {
                     $Grid_TR = new TGrid_TTR();
                     $Grid_TD = new TGrid_TTD($Object['id'] . getButton('view', $this->PageUrl, 'view', $Object['id']));
                     $Grid_TR->Add($Grid_TD);
                     $Grid_TD = new TGrid_TTD($Object['title']);
                     $Grid_TR->Add($Grid_TD);
                     $Grid_TD = new TGrid_TTD($Object['url']);
//.........这里部分代码省略.........
开发者ID:alexchitoraga,项目名称:tunet,代码行数:101,代码来源:Products.class.php


示例13: getPost

        <tr>
            <td style='padding:10px;'>
                <textarea style='width:280px;height:60px' id='reasons' name='reason'></textarea>
            </td>
        </tr>
        <tr>
            <td style='padding:10px;text-align:center' id='reject_btn'>
            </td>
        </tr>
    </table>
</div>
<?php 
$status_type = getPost('status', 'Choose');
$requestor_id = getPost('requestor_id', 'Choose');
$date_from = getPost('date_from', '');
$date_to = getPost('date_to', '');
$type = "With PO";
if (!empty($_REQUEST['type'])) {
    $type = $_REQUEST['type'];
}
//echo $type;
$limit = 10;
$start = 0;
$page = 1;
if (!empty($_POST['page'])) {
    $page = $_POST['page'];
    $start = ($_POST['page'] - 1) * $limit;
}
$filter = "where status  in ('Request Release','Ready for pick up','Receive Cash Request' ,'Received')";
$filter = whereMaker($filter, 'status', $status_type);
$filter = whereMaker($filter, 'requestor', $requestor_id);
开发者ID:sayniki,项目名称:finance,代码行数:31,代码来源:view_for_approve.php


示例14: isset

isset($_GET['postid']) ? $postid = $_GET['postid'] : ($postid = '');
isset($_GET['action']) ? $action = $_GET['action'] : ($action = '');
isset($_GET['type']) ? $type = $_GET['type'] : ($type = 'ques');
//type为bk则为添加或修改百科详情
$ques = null;
$quesuser = qa_get_logged_in_userid();
$update = false;
//是否在更改帖子
if ($postid && $type == 'ques') {
    $ques = qa_post_get_full($postid);
}
if ($ques['userid'] == $quesuser) {
    $update = true;
}
if ($postid && $type == 'baike') {
    $ques = getPost($postid);
    $update = true;
}
// $update=true;
?>
    <?php 
require 'header.php';
?>
   
    <!--side fixed end-->
    <div class="content">
		<script>
			var b=document.getElementsByTagName('body')[0];
			b.className=b.className.replace('qa-body-js-off', 'qa-body-js-on');
		</script>
		
开发者ID:GitFuture,项目名称:bmf,代码行数:30,代码来源:makequestion.php


示例15: getPost

$UseCaseID = $UseCaseTitle = $UseCaseDescription = $PrimaryActor = $AlternateActors = $PreRequisits = $PostConditions = $MainPathSteps = $AlternatePathSteps = $SuccessCriteria = $PotentialFailures = $FrequencyOfUse = $OwnerUserID = $PriorityID = $CaseStatusID = "";
$UseCaseID = getPost('UseCaseID');
$UseCaseTitle = getPost('UseCaseTitle');
$UseCaseDescription = getPost('UseCaseDescription');
$PrimaryActor = getPost('PrimaryActor');
$AlternateActors = getPost('AlternateActors');
$PreRequisits = getPost('PreRequisits');
$PostConditions = getPost('PostConditions');
$MainPathSteps = getPost('MainPathSteps');
$AlternatePathSteps = getPost('AlternatePathSteps');
$SuccessCriteria = getPost('SuccessCriteria');
$PotentialFailures = getPost('PotentialFailures');
$FrequencyOfUse = getPost('FrequencyOfUse');
$OwnerUserID = getPost('OwnerUserID');
$PriorityID = getPost('PriorityID');
$CaseStatusID = getPost('CaseStatusID');
$fields = "UseCaseTitle, UseCaseDescription, PrimaryActor, AlternateActors, PreRequisits, PostConditions, MainPathSteps, AlternatePathSteps, SuccessCriteria, PotentialFailures, FrequencyOfUse, OwnerUserID, PriorityID, CaseStatusID";
$qString = $action = $value = $id = $filterBy = $orderBy = "";
$qString = $_SERVER['QUERY_STRING'];
if ($qString != "") {
    $action = getQString('action');
    //list, select, sort, add, edit, delete, filter, like
    $value = getQString('v');
    $id = getQString('i');
}
if (empty($UseCaseID) and !empty($id)) {
    $UseCaseID = $id;
}
function addUseCaseItem($UseCaseTitle, $UseCaseDescription, $PrimaryActor, $AlternateActors, $PreRequisits, $PostConditions, $MainPathSteps, $AlternatePathSteps, $SuccessCriteria, $PotentialFailures, $FrequencyOfUse, $OwnerUserID, $PriorityID, $CaseStatusID)
{
    try {
开发者ID:katiesenger,项目名称:DSHome,代码行数:31,代码来源:useCases.php


示例16: getPost

<?php

require_once "_main2.php";
$post = getPost($_GET["id_post"]);
header("Content-type: " . $post["type_image"]);
echo $post["post_image"];
开发者ID:KINOTO,项目名称:apymeco-web,代码行数:6,代码来源:_post_image.php


示例17: RightColumnContent

    public function RightColumnContent()
    {
        switch ($this->Action) {
            case 'view':
                $this->CheckIdExist();
                $Object = Db_Type::getObjectById($this->Id);
                $this->TPL->assign('Object', $Object);
                $ObjectTrans = Db_TypeTrans::getTransByObjectId($this->Id);
                $this->TPL->assign('ObjectTrans', $ObjectTrans);
                $LanguageModel = Db_Language::getLanguageWithKey();
                $this->TPL->assign('LanguageModel', $LanguageModel);
                break;
            case 'edit':
                $this->CheckIdExist();
                $Object = Db_Type::getObjectById($this->Id);
                $this->TPL->assign('Object', $Object);
                $ObjectTrans = Db_TypeTrans::getTransByObjectId($this->Id);
                $this->TPL->assign('ObjectTrans', $ObjectTrans);
                $LanguageModel = Db_Language::getLanguageWithKey();
                $this->TPL->assign('LanguageModel', $LanguageModel);
                break;
            case 'delete':
                if ($this->Id != 0) {
                    Db_Type::deleteByField('id', $this->Id);
                    Db_TypeTrans::deleteByField('tt_type_id', $this->Id, 0);
                    $this->rrmdir(BASE_PATH . 'files/' . $this->object_path . $this->Id, true);
                    $this->Msg->SetMsg($this->_T('success_item_deleted'));
                    $this->Redirect($this->PageUrl);
                }
                break;
            case 'add':
                $LanguageModel = Db_Language::getLanguageWithKey();
                $this->TPL->assign('LanguageModel', $LanguageModel);
                break;
            case 'save':
                if ($this->Id != 0) {
                    $this->CheckIdExist();
                }
                $tt_title = getPost('tt_title');
                $t_priority = getPost('t_priority');
                $t_url = getPost('t_url');
                $t_published = isset($_POST['t_published']) ? 1 : 0;
                //                Save data into OBJECT
                $Object = new Db_Type($this->DB, $this->Id, 'id');
                $Object->t_priority = $t_priority;
                $Object->t_published = $t_published;
                $Object->t_url = $t_url;
                $Object->save();
                //                Take id of $Object
                $id = $Object->id;
                //                Save trans values into $ObjectTrans
                foreach ($tt_title as $lang => $title) {
                    $ObjectTrans = new Db_TypeTrans();
                    $ObjectTrans->findByFields(array('tt_type_id' => $id, 'tt_lang_id' => $lang));
                    $ObjectTrans->tt_title = $title;
                    $ObjectTrans->tt_type_id = $id;
                    $ObjectTrans->tt_lang_id = $lang;
                    $ObjectTrans->save();
                }
                $this->Msg->SetMsg($this->_T('success_item_saved'));
                $this->Redirect($this->PageUrl . '?action=view&id=' . $id);
                break;
            default:
                $Objects = Db_Type::getObjects();
                $ObjectsTrans = Db_TypeTrans::getTransByLang($this->LangId);
                $ListGrid = false;
                if ($Objects) {
                    $ListGrid = new TGrid();
                    $ListGrid->Spacing = 0;
                    $ListGrid->Width = '100%';
                    $ListGrid->SetClass('table table-bordered table-highlight-head');
                    $ListGrid->AddHeaderRow($this->_T('id'), $this->_T('Title'), $this->_T('Url'), $this->_T('Priority'), $this->_T('Published'), $this->_T('actions'));
                    $ListGrid->BeginBody();
                    foreach ($Objects as $Object) {
                        $Grid_TR = new TGrid_TTR();
                        $Grid_TD = new TGrid_TTD($Object['id'] . ' (&nbsp;<a href="' . $this->PageUrl . '?action=view&id=' . $Object['id'] . '">' . $this->_T('see') . '</a>&nbsp;)');
                        $Grid_TR->Add($Grid_TD);
                        $Grid_TD = new TGrid_TTD($ObjectsTrans[$Object['id']]['tt_title']);
                        $Grid_TR->Add($Grid_TD);
                        $Grid_TD = new TGrid_TTD($Object['t_url']);
                        $Grid_TR->Add($Grid_TD);
                        $Grid_TD = new TGrid_TTD($Object['t_priority']);
                        $Grid_TR->Add($Grid_TD);
                        $Grid_TD = new TGrid_TTD($Object['t_published'] == 1 ? $this->_T('yes') : $this->_T('no'));
                        $Grid_TR->Add($Grid_TD);
                        $Grid_TD = new TGrid_TTD('
								<a class="bs-tooltip" title="" href="' . $this->PageUrl . '?action=edit&id=' . $Object['id'] . '" data-original-title="' . $this->_T('edit') . '"><i class="icon-pencil"></i></a>
								<a class="bs-tooltip confirm-dialog" data-text="' . _T('sure_you_want_to_delete') . '" title="" href="' . $this->PageUrl . '?action=delete&id=' . $Object['id'] . '" data-original-title="' . $this->_T('delete') . '"><i class="icon-trash"></i></a>
							');
                        $Grid_TD->AddAttr(new TAttr('class', 'align-center'));
                        $Grid_TR->Add($Grid_TD);
                        $ListGrid->AddTR($Grid_TR);
                    }
                    $ListGrid->EndBody();
                    $ListGrid = $ListGrid->Html();
                }
                $this->TPL->assign('ListGrid', $ListGrid);
                break;
        }
        $msg = $this->Msg->Html();
//.........这里部分代码省略.........
开发者ID:alexchitoraga,项目名称:tunet,代码行数:101,代码来源:Type.class.php


示例18: getPost

<?php

/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2015 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
********************************************************************************************************/
echo "+-------------------------------------------------------------------------------+\n";
echo "| Kajona Debug Subsystem                                                        |\n";
echo "|                                                                               |\n";
echo "| DB Query Panel                                                                |\n";
echo "|                                                                               |\n";
echo "+-------------------------------------------------------------------------------+\n";
if (issetPost("doquery")) {
    $strQuery = getPost("dbquery");
    if (get_magic_quotes_gpc() == 1) {
        $strQuery = stripslashes($strQuery);
    }
    $objDb = class_carrier::getInstance()->getObjDB();
    echo "query to run " . $strQuery . "\n";
    if ($objDb->_query($strQuery)) {
        echo "\n\nquery successfull.\n";
    } else {
        echo "\n\nquery failed.\n";
    }
} else {
    echo "Provide the query to execute.\nPlease be aware of the consequences!\n\n";
    echo "<form method=\"post\">";
    echo "<textarea name=\"dbquery\" cols=\"75\" rows=\"10\">";
    echo "</textarea><br />";
    echo "<input type=\"hidden\" name=\"doquery\" value=\"1\" />";
开发者ID:jinshana,项目名称:kajonacms,代码行数:31,代码来源:dbquery.php


示例19: printTemplate


//.........这里部分代码省略.........
			</style>
			
			<?php 
    if (file_exists("style1.css") && file_exists("style2.css")) {
        ?>
				<link rel="stylesheet" href="style1.css" type="text/css" />
				<link rel="stylesheet" href="style2.css" type="text/css" />
			<?php 
    }
    ?>
		</head>
		<body>
			<form id="firefile-form" method="POST">
				<div id="login-panel">
					<div class="logo-float">
						<a href="http://firefile.strebitzer.at/?hasversion=<?php 
    echo $version;
    ?>
" target="_blank"><img src="http://www.strebitzer.at/projects/firefile/firefile_update_icon.php?version=<?php 
    echo $version;
    ?>
" width="32" height="32" alt="FireFile" title="FireFile" /></a>
						<span class="logo-fire">Fire</span>
						<span class="logo-file">File</span>
						<span class="logo-version">0.5.0</span>
					</div>
					<?php 
    if ($data["user_set"] || $data["pass_set"]) {
        ?>
						<input id="cmd_submit" type="submit" value="APPLY" />
						<div class="login-control">
							<label for="password">PASS:</label>
							<input type="password" tabindex="2" autocomplete="off" value="<?php 
        echo getPost("password");
        ?>
" id="password" name="password" />
						</div>
						<div class="login-control">
							<label for="username">USER:</label>
							<input type="text" tabindex="1" autocomplete="off" value="<?php 
        echo getPost("username");
        ?>
" id="username" name="username" />
						</div>
					<?php 
    }
    ?>
				</div>
				<?php 
    foreach ($data["success"] as $msg) {
        ?>
					<div class="config-pane success">
						<h1><?php 
        echo $msg;
        ?>
</h1>
					</div>
				<?php 
    }
    ?>
				
				<?php 
    foreach ($data["error"] as $msg) {
        ?>
					<div class="config-pane error">
						<h1><?php 
开发者ID:NKjoep,项目名称:FireFile-Server,代码行数:67,代码来源:firefile.php


示例20: array

$login_pass = '';
// エラー保持用配列
$errors = array();
// DBコネクトオブジェクト取得
try {
    $db = get_db_connect();
} catch (PDOException $e) {
    $errors[] = entity_str($e->getMessage());
}
if (!isPost()) {
    include_once '../include/view/login.php';
} else {
    if (getPost('action_id') === 'login') {
        // ユーザIDとパスワードの組み合わせでチェック
        $login_id = entity_str(getPost('login_id'));
        $login_pass = entity_str(getPost('login_pass'));
        //  todo ユーザID入力チェック
        if (!isExist($login_id)) {
            $errors[] = 'ユーザIDを入力してください';
        }
        // todo パスワード入力チェック
        if (!isExist($login_pass)) {
            $errors[] = 'パスワードを入力してください';
        }
        // 入力エラーがない場合DB認証チェック
        if (count($errors) === 0) {
            $login = new user_login_model();
            if ($login->loginCheck($db, $login_id, $login_pass)) {
                // ログインIDを記録
                $_SESSION['login_id'] = $login_id;
                setcookie('login_id', $login_id, time() + 60 * 60 * 24 * 30);
开发者ID:morota-k,项目名称:utwitter,代码行数:31,代码来源:login_controller.php



注:本文中的getPost函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPostData函数代码示例发布时间:2022-05-15
下一篇:
PHP getPluginFiles函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap