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


PHP getRequestParam函数代码示例

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


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

示例1: authenticate

 /**
  * 验证用户的有效性,如果用户是阿里平台用户,则返回用户的Id,否则返回false。
  *
  * @return mixed 如果验证成功,返回用户的Id(string),否则返回false。
  */
 public function authenticate()
 {
     $user_id = getRequestParam('user_id');
     $app_instance_id = getRequestParam('app_instance_id');
     $token = getRequestParam('token');
     // validate user by REST service
     $ret_code = AlisoftValidateUserService::validateUser($user_id, $app_instance_id, $token);
     // 该用户是应用的订购者,返回用户的Id
     if ($ret_code == '1') {
         return $user_id;
     } else {
         return false;
     }
 }
开发者ID:GameCrusherTechnology,项目名称:HeroTowerServer,代码行数:19,代码来源:Auth.class.php

示例2: authenticate

 /**
  * 验证群用户的有效性,如果用户是阿里平台用户,则返回用户的Id,否则返回false。
  *
  * @return mixed 如果验证成功,返回群的Id(string),否则返回false。
  */
 public function authenticate()
 {
     $user_id = getRequestParam('user_id');
     $app_instance_id = getRequestParam('app_instance_id');
     $token = getRequestParam('token');
     // validate user by REST service
     $ret = AliTribeService::validateUser($user_id, $app_instance_id, $token);
     if ($ret['result'] >= '0') {
         $tribInfo['group_id'] = $ret['tribeId'];
         $tribInfo['user_id'] = $user_id;
         $tribInfo['role'] = $this->getUserRole($ret['result']);
         return $tribInfo;
     } else {
         return false;
     }
 }
开发者ID:GameCrusherTechnology,项目名称:HeroTowerServer,代码行数:21,代码来源:TribAuth.class.php

示例3: controllerAction

function controllerAction()
{
    global $data;
    $template = getRequestParam('tmpl');
    if ($template == 'auctionlistinfo') {
        return updateListAuction();
    }
    $auctionId = getRequestParam('id');
    try {
        $lastBidInfo = getLastBidInfo($auctionId);
        if (!$lastBidInfo) {
            if (getRequestParam('current_bid_id')) {
                echo '<div id="result_auction_reset"></div>';
            }
            return;
        }
        if (isset($lastBidInfo['auctionbid_id'])) {
            $currentBid = getRequestParam('current_bid_id');
            if ($currentBid != $lastBidInfo['auctionbid_id']) {
                echo $lastBidInfo['auctioninfo'];
            }
        }
    } catch (Exception $e) {
        return;
    }
}
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:26,代码来源:auction.php

示例4: getRequestParam

<?php

require_once "header.inc";
$apiKey = getRequestParam('api_key');
if ($apiKey == null) {
    RingsideWebUtils::redirect('index.php');
}
$props = array('application_name', 'secret_key', 'api_key');
$resp = $client->api_client->admin_getAppProperties($props, null, null, $apiKey);
$secret = $resp['secret_key'];
$appName = $resp['application_name'];
include 'ringside/apps/developer/templates/new_app_success.tpl';
开发者ID:jkinner,项目名称:ringside,代码行数:12,代码来源:new_app_success.php

示例5: renderPage

    if (!$fileFilterA->accept($toFile)) {
        $data['errorMsg'] = $config['filesystem.invalid_file_name_msg'];
        renderPage("createdoc.tpl.php", $data);
    }
    // Setup second filter
    $fileFilterB =& new BasicFileFilter();
    $fileFilterB->setIncludeFilePattern($config['createdoc.include_file_pattern']);
    $fileFilterB->setExcludeFilePattern($config['createdoc.exclude_file_pattern']);
    if (!$fileFilterB->accept($toFile)) {
        $data['errorMsg'] = $config['createdoc.invalid_file_name_msg'];
        renderPage("createdoc.tpl.php", $data);
    }
    // File exists
    if ($toFile->exists()) {
        $data['errorMsg'] = "error_exists";
        renderPage("createdoc.tpl.php", $data);
    }
    $templateFile->copyTo($toFile, true);
    // Replace title
    $fileData = file_get_contents($toFile->getAbsolutePath());
    // Replace all fields
    for ($i = 0; $i < count($fields); $i += 2) {
        $fileData = str_replace('${' . $fields[$i] . '}', htmlentities(getRequestParam("field_" . $fields[$i], "")), $fileData);
    }
    if (($fp = fopen($toFile->getAbsolutePath(), "w")) != null) {
        fwrite($fp, $fileData);
        fclose($fp);
    }
}
// Render output
renderPage("createdoc.tpl.php", $data);
开发者ID:sonvq,项目名称:2015_freelance6,代码行数:31,代码来源:createdoc.php

示例6: getRequestParam

     if (strlen($name) == 0) {
         $errorMessage = 'Please specify a network name.';
     }
     $authUrl = getRequestParam('auth_url', '');
     if (strlen($authUrl) == 0) {
         $errorMessage = 'Please specify an authorization URL.';
     }
     $loginUrl = getRequestParam('login_url', '');
     if (strlen($loginUrl) == 0) {
         $errorMessage = 'Please specify an login URL.';
     }
     $canvasUrl = getRequestParam('canvas_url', '');
     if (strlen($canvasUrl) == 0) {
         $errorMessage = 'Please specify an canvas URL.';
     }
     $webUrl = getRequestParam('web_url', '');
     if (strlen($webUrl) == 0) {
         $errorMessage = 'Please specify an web URL.';
     }
     if ($errorMessage == null) {
         try {
             $resp = $client->api_client->admin_createNetwork($name, $authUrl, $loginUrl, $canvasUrl, $webUrl);
             $key = $resp['network']['key'];
         } catch (Exception $e) {
             $errorMessage = "Error creating app: " . $e->getMessage();
         }
     }
     if ($errorMessage == null) {
         RingsideWebUtils::redirect("edit_network.php?key={$key}&created=true&form_action=edit");
     }
 } else {
开发者ID:jkinner,项目名称:ringside,代码行数:31,代码来源:_properties.php

示例7: PDO

<?php

// vim: set et sw=4 ts=4 sts=4 ft=php fdm=marker ff=unix fenc=utf8 nobomb:
/**
 * @author mingcheng<lucky#gracecode.com>
 * @date   2013-03-22
 */
require_once "common.inc.php";
require_once "config.inc.php";
$Database = new PDO("sqlite:" . AQI_DATABASE);
$sql = 'select value, recordDate as date, areaName from aqi where division = %d order by recordDate';
$sql = sprintf($sql, getRequestParam("division", 330100, "get"));
$stmt = $Database->prepare($sql);
$stmt->execute();
$items = array();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
//var_dump($result);
if (empty($result)) {
    $result[0]['areaName'] = "";
} else {
    foreach ($result as $item) {
        array_push($items, sprintf("[new Date(%s), %d]", date("Y, n, j", $item['date']), $item['value']));
    }
}
header("Content-type: text/javascript;charset=utf-8");
printf('var data = [%s], areaName = "%s";', implode($items, ", "), $result[0]['areaName']);
$Database = null;
开发者ID:keenmisty,项目名称:AQI,代码行数:27,代码来源:data.php

示例8: renderPage

    $fileFilterA->setIncludeFilePattern($config['filesystem.include_file_pattern']);
    $fileFilterA->setExcludeFilePattern($config['filesystem.exclude_file_pattern']);
    if (!$fileFilterA->accept($targetFile)) {
        $data['errorMsg'] = $config['filesystem.invalid_file_name_msg'];
        renderPage("zip.tpl.php", $data);
    }
    /*
    // Setup second filter
    $fileFilterB =& new BasicFileFilter();
    $fileFilterB->setIncludeFilePattern($config['zip.include_file_pattern']);
    $fileFilterB->setExcludeFilePattern($config['zip.exclude_file_pattern']);
    if (!$fileFilterB->accept($targetFile)) {
    	$data['errorMsg'] = $config['zip.invalid_file_name_msg'];
    	renderPage("zip.tpl.php", $data);
    }
    */
    $archive = new PclZip($targetFile->getAbsolutePath());
    $files = array();
    for ($i = 0; $absPath = getRequestParam("file" . $i, false); $i++) {
        $file =& $fileFactory->getFile($absPath);
        $files[] = $file->getAbsolutePath();
    }
    $list = $archive->create(implode(',', $files), PCLZIP_OPT_REMOVE_PATH, $targetFile->getParent());
    if ($list == 0) {
        $data['errorMsg'] = $archive->errorInfo(true);
    } else {
        $targetFile->importFile();
    }
}
// Render output
renderPage("zip.tpl.php", $data);
开发者ID:sonvq,项目名称:2015_freelance6,代码行数:31,代码来源:zip.php

示例9: switch

            <img src="static/birthday.png" class="not_selected"/>
            <img src="static/birthday_selected.png" class="selected"/>
        </a>
        <a class="btn" href="?page=partner">
            <img src="static/partner.png" class="not_selected"/>
            <img src="static/partner_selected.png" class="selected"/>
        </a>
        <a class="btn" href="?page=contacts">
            <img src="static/contacts.png" class="not_selected"/>
            <img src="static/contacts_selected.png" class="selected"/>
        </a>
    </div>

    <div align="center" style="width:700px; min-height: 500px; margin-left: auto; margin-right: auto">
        <?php 
switch (getRequestParam("page", null)) {
    case "news":
        require_once "news.php";
        break;
    case "places":
        require_once "places.php";
        break;
    case "birthday":
        require_once "birthday.php";
        break;
    case "partner":
        require_once "partner.php";
        break;
    case "contacts":
        require_once "contacts.php";
        break;
开发者ID:avdim,项目名称:heroku-multipack-nodejs-php-example,代码行数:31,代码来源:index2.php

示例10: getRequestParam

 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 ******************************************************************************/
require_once 'header.inc';
$statusMessage = null;
$errorMessage = null;
$formAction = getRequestParam('form_action');
$appId = getRequestParam('app_id');
if ($formAction == 'delete') {
    if ($appId == null) {
        $errorMessage = 'No app ID specified.';
    }
    if ($errorMessage == null) {
        try {
            DeveloperAppUtils::deleteApp($appId, $uid);
        } catch (Exception $e) {
            $errorMessage = 'Could not delete app: ' . $e->getMessage();
        }
    }
    if ($errorMessage == null) {
        RingsideWebUtils::redirect('index.php');
    }
} else {
开发者ID:jkinner,项目名称:ringside,代码行数:31,代码来源:delete_app.php

示例11: getRequestParam

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Columbus</title>
</head>
<body style="text-align: center">
<a href='index.php?page=places&place=<?php 
echo getRequestParam("place", "");
?>
#photos'>
    <img style="width: 100%" src='static/new/<?php 
echo getRequestParam("place", "");
?>
/<?php 
echo getRequestParam("photo", "");
?>
'/>
    <br/>
    <h1>Назад ко всем фотографиям</h1>
    <br/>
    <img src='static/<?php 
echo getRequestParam("place", "");
?>
1.png' style="width: 30%"/>
</a>

</body>
</html>
开发者ID:avdim,项目名称:heroku-multipack-nodejs-php-example,代码行数:30,代码来源:photos.php

示例12: die

 * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
 */
// Use install
if (file_exists("../install")) {
    die('{"result":null,"id":null,"error":{"errstr":"You need to run the installer or rename/remove the \\"install\\" directory.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
}
error_reporting(E_ALL ^ E_NOTICE);
require_once "../classes/Utils/JSON.php";
require_once "../classes/Utils/Error.php";
@set_time_limit(5 * 60);
// 5 minutes execution time
$MCErrorHandler = new Moxiecode_Error(false);
set_error_handler("StreamErrorHandler");
require_once "../includes/general.php";
require_once "../classes/ManagerEngine.php";
$cmd = getRequestParam("cmd", "");
if ($cmd == "") {
    die("No command.");
}
$chunks = explode('.', $cmd);
$type = $chunks[0];
$method = $cmd = $chunks[1];
// Clean up type, only a-z stuff.
$type = preg_replace("/[^a-z]/i", "", $type);
if ($type == "") {
    die("No type set.");
}
// Include Base and Core and Config.
$man = new Moxiecode_ManagerEngine($type);
require_once $basepath . "CorePlugin.php";
require_once "../config.php";
开发者ID:oaki,项目名称:demoshop,代码行数:31,代码来源:stream.php

示例13: verifyAccess

 *
 * @package MCFileManager.pages
 * @author Moxiecode
 * @copyright Copyright © 2005, Moxiecode Systems AB, All rights reserved.
 */
require_once "includes/general.php";
require_once "includes/stream.php";
require_once "classes/FileSystems/FileFactory.php";
require_once "classes/FileSystems/LocalFileImpl.php";
verifyAccess($mcFileManagerConfig);
$path = getRequestParam("path");
$rootpath = getRequestParam("rootpath", toUnixPath(getRealPath($mcFileManagerConfig, 'filesystem.rootpath')));
$fileFactory =& new FileFactory($mcFileManagerConfig, $rootpath);
$targetFile =& $fileFactory->getFile($path);
$config = $targetFile->getConfig();
$mode = getRequestParam("mode", "stream");
$mimeType = mapMimeTypeFromUrl($path, $config['stream.mimefile']);
$file =& $fileFactory->getFile($path);
// Setup first filter
$fileFilterA =& new BasicFileFilter();
$fileFilterA->setIncludeFilePattern($config['filesystem.include_file_pattern']);
$fileFilterA->setExcludeFilePattern($config['filesystem.exclude_file_pattern']);
$fileFilterA->setIncludeExtensions($config['filesystem.extensions']);
// Setup second filter
$fileFilterB =& new BasicFileFilter();
$fileFilterB->setIncludeFilePattern($config['download.include_file_pattern']);
$fileFilterB->setExcludeFilePattern($config['download.exclude_file_pattern']);
$fileFilterB->setIncludeExtensions($config['download.extensions']);
if (!$fileFilterA->accept($targetFile) || !$fileFilterB->accept($targetFile)) {
    trigger_error("Error: Requested file is not valid for download, check your config.", ERROR);
}
开发者ID:sonvq,项目名称:2015_freelance6,代码行数:31,代码来源:stream.php

示例14: getRequestParam

$orgHeight = getRequestParam("orgheight");
$newWidth = getRequestParam("newwidth");
$newHeight = getRequestParam("newheight");
$left = getRequestParam("left");
$top = getRequestParam("top");
$action = getRequestParam("action");
$path = getRequestParam("path");
$orgpath = getRequestParam("orgpath", "");
$filename = getRequestParam("filename", "");
$msg = "";
if ($orgpath == "") {
    $orgpath = $path;
}
$temp_image = "mcic_" . session_id() . "";
verifyAccess($mcImageManagerConfig);
$rootpath = removeTrailingSlash(getRequestParam("rootpath", toUnixPath(getRealPath($mcImageManagerConfig, 'filesystem.rootpath'))));
$fileFactory =& new FileFactory($mcImageManagerConfig, $rootPath);
addFileEventListeners($fileFactory);
$file =& $fileFactory->getFile($path);
$config = $file->getConfig();
$demo = checkBool($config['general.demo']) ? "true" : "false";
$imageutils = new $config['thumbnail']();
$tools = explode(',', $config['thumbnail.image_tools']);
if (!in_array("edit", $tools)) {
    trigger_error("The thumbnail.image_tools needs to include edit.", WARNING);
}
// File info
$fileInfo = getFileType($file->getAbsolutePath());
$file_icon = $fileInfo['icon'];
$file_type = $fileInfo['type'];
$file_ext = $fileInfo['ext'];
开发者ID:stormlab,项目名称:Stormlab,代码行数:31,代码来源:process_image.php

示例15: urldecode

$defaultMode = $spellCheckerConfig['default.mode'];
// Normaly not required to configure
$defaultSpelling = $spellCheckerConfig['default.spelling'];
$defaultJargon = $spellCheckerConfig['default.jargon'];
$defaultEncoding = $spellCheckerConfig['default.encoding'];
$outputType = "xml";
// Do not change
// Get input parameters.
$check = urldecode(getRequestParam('check'));
$cmd = sanitize(getRequestParam('cmd'));
$lang = sanitize(getRequestParam('lang'), "strict");
$mode = sanitize(getRequestParam('mode'), "strict");
$spelling = sanitize(getRequestParam('spelling'), "strict");
$jargon = sanitize(getRequestParam('jargon'), "strict");
$encoding = sanitize(getRequestParam('encoding'), "strict");
$sg = sanitize(getRequestParam('sg'), "bool");
$words = array();
$validRequest = true;
if (empty($check)) {
    $validRequest = false;
}
if (empty($lang)) {
    $lang = $defaultLanguage;
}
if (empty($mode)) {
    $mode = $defaultMode;
}
if (empty($spelling)) {
    $spelling = $defaultSpelling;
}
if (empty($jargon)) {
开发者ID:nurpax,项目名称:saastafi,代码行数:31,代码来源:tinyspell.php


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