当前位置: 首页>>代码示例>>PHP>>正文


PHP getPost函数代码示例

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


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


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