本文整理汇总了PHP中getRequest函数的典型用法代码示例。如果您正苦于以下问题:PHP getRequest函数的具体用法?PHP getRequest怎么用?PHP getRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getRequest函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Start
/**
* Старт сессии
*
*/
protected function Start()
{
session_name(Config::Get('sys.session.name'));
session_set_cookie_params(Config::Get('sys.session.timeout'), Config::Get('sys.session.path'), Config::Get('sys.session.host'));
if (!session_id()) {
/**
* Попытка подменить идентификатор имени сессии через куку
*/
if (isset($_COOKIE[Config::Get('sys.session.name')]) and !is_string($_COOKIE[Config::Get('sys.session.name')])) {
die("Hacking attemp! Please check cookie PHP session name.");
}
/**
* Попытка подменить идентификатор имени сессии в реквесте
*/
$aRequest = array_merge($_GET, $_POST);
// Исключаем попадаение $_COOKIE в реквест
if (@ini_get('session.use_only_cookies') === "0" and isset($aRequest[Config::Get('sys.session.name')]) and !is_string($aRequest[Config::Get('sys.session.name')])) {
die("Hacking attemp! Please check cookie PHP session name.");
}
/**
* Даем возможность флешу задавать id сессии
*/
$sUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
if ($sUserAgent and (in_array($sUserAgent, $this->aFlashUserAgent) or strpos($sUserAgent, "Adobe Flash Player") === 0) and is_string(getRequest('SSID')) and preg_match("/^[\\w\\d]{5,40}\$/", getRequest('SSID'))) {
session_id(getRequest('SSID'));
} else {
session_regenerate_id();
}
session_start();
}
}
开发者ID:vgrish,项目名称:livestreet-framework,代码行数:35,代码来源:Session.class.php
示例2: _network_settings
public function _network_settings($network) {
$this->setHeaderLabel(getLabel("header-social_networks-settings") . $network->getName());
$mode = getRequest("param0");
$cmsController = cmsController::getInstance();
$type = $network->getCodeName();
$module = $cmsController->getCurrentModule();
$method = $cmsController->getCurrentMethod();
$config = mainConfiguration::getInstance();
$templateId = $config->get("templates", "{$module}.{$method}");
$inputData = array(
'object' => $network->getObject(),
'type' => $type
);
if($mode == "do") {
$config->set("templates", "{$module}.{$method}", getRequest('template-id'));
$object = $this->saveEditedObjectData($inputData);
$this->chooseRedirect($this->pre_lang . '/admin/social_networks/' . $type . '/');
}
$this->setDataType("form");
$this->setActionType("modify");
$data = $this->prepareData($inputData, "object");
$data['template-id'] = array('@id' => $templateId);
$this->setData($data);
return $this->doData();
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:33,代码来源:__admin.php
示例3: onModifyObject
public function onModifyObject(iUmiEventPoint $event) {
static $modifiedCache = array();
$object = $event->getRef("object");
$typeId = umiObjectTypesCollection::getInstance()->getBaseType('emarket', 'order');
if($object->getTypeId() != $typeId) return;
if($event->getMode() == "before") {
$data = getRequest("data");
$id = $object->getId();
$newOrderStatus = getArrayKey($data[$id], 'status_id');
$newPaymentStatus = getArrayKey($data[$id], 'payment_status_id');
$newDeliveryStatus = getArrayKey($data[$id], 'delivery_status_id');
switch(true) {
case ($newOrderStatus != $object->getValue("status_id") ) : $modifiedCache[$object->getId()] = "status_id"; break;
case ($newDeliveryStatus != $object->getValue("delivery_status_id")) : $modifiedCache[$object->getId()] = "delivery_status_id"; break;
case ($newPaymentStatus != $object->getValue("payment_status_id") ) : $modifiedCache[$object->getId()] = "payment_status_id"; break;
}
} else {
if(isset($modifiedCache[$object->getId()])) {
if ($modifiedCache[$object->getId()] == 'payment_status_id' && $object->getValue("payment_status_id") == order::getStatusByCode('accepted', 'order_payment_status')) {
self::addBonus($object->getId());
}
if ($modifiedCache[$object->getId()] == 'status_id' && ($object->getValue("status_id") == order::getStatusByCode('canceled') || $object->getValue("status_id") == order::getStatusByCode('rejected'))) {
self::returnBonus($object->getId());
}
$this->notifyOrderStatusChange(order::get($object->getId()), $modifiedCache[$object->getId()]);
}
}
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:28,代码来源:__events.php
示例4: reportList
public function reportList()
{
if ($this->isLogin()) {
if (!$this->isPost()) {
import('ORG.Util.Page');
//导入分页类
$count = $this->model->where()->count();
$Page = new Page($count, 5);
$show = $Page->show();
$list = $this->model->where()->order('createtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
$this->assign('list', $list);
$this->assign('page', $show);
$this->display();
} else {
import('ORG.Util.Page');
//导入分页类
$account = getRequest('account');
$count = $this->model->where(array('account' => $account))->count();
$Page = new Page($count, 5);
$show = $Page->show();
if (!$account) {
$this->error('请填写查询条件');
}
$list = $this->model->where(array('account' => $account))->order('createtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
$this->assign('page', $show);
$this->assign('list', $list);
$this->display();
}
} else {
$this->error('请先登录', U('/Manager/login'));
}
}
开发者ID:noikiy,项目名称:yisheji,代码行数:32,代码来源:ReportAction.class.php
示例5: service
/**
* @desc Отображение сервисной информации
* @return string
*/
public function service()
{
$event = strtoupper(getRequest('param0'));
$autoupdates_disabled = (bool) regedit::getInstance()->getVal("//modules/autoupdate/autoupdates_disabled");
if ($autoupdates_disabled) {
$this->flush('DISABLED', "text/plain");
}
$this->checkIsValidSender();
switch ($event) {
case "STATUS":
$result = $this->returnStatus();
break;
case "VERSION":
$result = $this->returnVersions();
break;
case "LAST_UPDATED":
$result = $this->returnLastUpdated();
break;
case "MODULES":
$result = $this->getModules();
break;
case "DOMAINS":
$result = $this->getDomains();
break;
default:
$result = "UNHANDLED_EVENT";
break;
}
$this->flush($result, "text/plain");
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:34,代码来源:class.php
示例6: poll
public function poll() {
$buffer = outputBuffer::current();
$buffer->clear();
$buffer->contentType('text/plain');
$buffer->push('Sorry, but this payment system doesn\'t support server polling.' . getRequest('param0'));
$buffer->end();
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:7,代码来源:courier.php
示例7: edit
public function edit()
{
if ($this->isLogin()) {
$id = getRequest('id');
$cont = $this->model->getById($id);
if (empty($cont)) {
$this->error('没有该菜单!');
}
$cont['text'] = stripslashes($cont['text']);
if (!$this->isPost()) {
$pid = $cont['parentid'] ? $cont['parentid'] : $id;
$parent_menus = $this->model->getParentMenus($pid);
$menus = $this->model->getChildrenMenus($pid, $id);
$this->assign('addhref', U('/Richtext/add/pid/' . $pid));
$this->assign('cont', $cont);
$this->assign('parent_menus', $parent_menus);
$this->assign('menus', $menus);
$this->display();
die;
}
$data = array('title' => getRequest('title'), 'text' => getRequest('text'));
if ($this->model->checkData($data, false)) {
$ret = $this->model->where(array('id' => $id))->data($data)->save();
if ($ret) {
$this->success('修改成功!', $_SERVER['HTTP_REFERER']);
} else {
$this->error('内容没有更改或保存数据库失败!');
}
} else {
$this->error($this->model->getError());
}
} else {
$this->error('请先登录', U('/Manager/login'));
}
}
开发者ID:noikiy,项目名称:yisheji,代码行数:35,代码来源:RichtextAction.class.php
示例8: partialReindex
public function partialReindex() {
$this->setDataType("settings");
$this->setActionType("view");
$lastId = (int) getRequest("lastId");
$search = searchModel::getInstance();
$total = (int) $search->getAllIndexablePages();
$limit = regedit::getInstance()->getVal("//modules/search/one_iteration_index");
if ($limit==0) {
$limit = 5;
}
$result = $search->index_all($limit, $lastId);
$data = Array(
'index-status' => Array(
'attribute:current' => $result['current'],
'attribute:total' => $total,
'attribute:lastId' => $result['lastId']
)
);
$this->setData($data);
return $this->doData();
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:25,代码来源:__admin.php
示例9: rss_list
public function rss_list() {
$typesCollection = umiObjectTypesCollection::getInstance();
$objectsCollection = umiObjectsCollection::getInstance();
$type_id = $typesCollection->getTypeIdByGUID('12c6fc06c99a462375eeb3f43dfd832b08ca9e17');
$result = $objectsCollection->getGuidedItems($type_id);
$mode = (string) getRequest('param0');
if($mode == "do") {
$params = Array(
"type_id" => $type_id
);
$this->saveEditedList("objects", $params);
try {
$this->import_feeds();
}catch(publicException $e) {}
$this->chooseRedirect();
}
// $type_id = 21;
$result = array_keys($result);
$total = sizeof($result);
$this->setDataType("list");
$this->setActionType("modify");
$this->setDataRange($total, 0);
$data = $this->prepareData($result, "objects");
$this->setData($data, $total);
return $this->doData();
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:35,代码来源:__rss_import.php
示例10: EventIndex
protected function EventIndex()
{
/**
* Обработка удаления плагинов
*/
if (isPost('submit_plugins_del')) {
$this->Security_ValidateSendForm();
$aPluginsDelete = getRequest('plugins_del');
if (is_array($aPluginsDelete)) {
$this->Plugin_Delete(array_keys($aPluginsDelete));
}
}
if ($sPlugin = getRequest('plugin', null, 'get') and $sAction = getRequest('action', null, 'get')) {
return $this->SubmitManagePlugin($sPlugin, $sAction);
}
/**
* Передан ли номер страницы
*/
$iPage = preg_match("/^\\d+\$/i", $this->GetEventMatch(2)) ? $this->GetEventMatch(2) : 1;
/**
* Получаем список блогов
*/
$aPlugins = $this->Plugin_GetList();
/**
* Загружаем переменные в шаблон
*/
$this->Viewer_Assign("aPlugins", $aPlugins);
$this->Viewer_AddHtmlTitle($this->Lang_Get('plugins_administartion_title'));
/**
* Устанавливаем шаблон вывода
*/
$this->SetTemplateAction('index');
}
开发者ID:lifecom,项目名称:test,代码行数:33,代码来源:ActionPlugins.class.php
示例11: getChildren
public function getChildren()
{
$upid = getRequest('upid');
$level = getRequest('level');
$html = $this->model->getChildren($upid, $level);
echo $html;
}
开发者ID:omusico,项目名称:jianli,代码行数:7,代码来源:DistrictAction.class.php
示例12: json_get_referer_pages
public function json_get_referer_pages() {
$this->updateFilter();
$requestId = (int) $_REQUEST['requestId'];
if($host = getRequest('host')) {
$_SERVER['HTTP_HOST'] = $host;
}
$domain_url = "http://" . $_SERVER['HTTP_HOST'];
$referer_uri = str_replace($domain_url, "", $_SERVER['HTTP_REFERER']);
$factory = new statisticFactory(dirname(__FILE__) . '/classes');
$factory->isValid('pageNext');
$report = $factory->get('pageNext');
$report->setStart(time() - 3600*24*7); //TODO: Fix to real dates
$report->setFinish(time() + 3600*24); //TODO: Fix to real dates
if(!$referer_uri) $referer_uri = "/";
$report->setParams( Array("page_uri" => $referer_uri) );
$result = $report->get();
$res = <<<END
var response = new lLibResponse({$requestId});
response.links = new Array();
END;
$total = 0;
foreach($result as $r_item) {
$total += (int) $r_item['abs'];
$res .= <<<END
response.links[response.links.length] = {"uri": "{$r_item['uri']}", "abs": "{$r_item['abs']}"};
END;
}
$res .= <<<END
response.total = '{$total}';
END;
$res .= <<<END
lLib.getInstance().makeResponse(response);
END;
$this->flush($res);
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:60,代码来源:__json.php
示例13: readDataBlock
protected function readDataBlock()
{
$v9a09b4dfda82e3e665e31092d1c3ec8d = parent::readDataBlock();
if ($v9a09b4dfda82e3e665e31092d1c3ec8d->getElementsByTagName('domains')->length) {
$ve4e46deb7f9cc58c7abfb32e5570b6f3 = $v9a09b4dfda82e3e665e31092d1c3ec8d->getElementsByTagName('domains')->item(0);
if ($ve4e46deb7f9cc58c7abfb32e5570b6f3->getElementsByTagName('domain')->length) {
$vad5f82e879a9c5d6b5b442eb37e50551 = $ve4e46deb7f9cc58c7abfb32e5570b6f3->getElementsByTagName('domain')->item(0);
$vfc4dd24e8dcaab0826b9ab09db0da5bf = false;
$v72ee76c5c29383b7c9f9225c1fa4d10b = false;
$v495a73fe6d3367859f634a689771d209 = getRequest('param0');
if ($v495a73fe6d3367859f634a689771d209) {
$v6a7f245843454cf4f28ad7c5e2572aa2 = umiObjectsCollection::getInstance()->getObject($v495a73fe6d3367859f634a689771d209)->elements;
if (is_array($v6a7f245843454cf4f28ad7c5e2572aa2) && count($v6a7f245843454cf4f28ad7c5e2572aa2)) {
$v72ee76c5c29383b7c9f9225c1fa4d10b = $v6a7f245843454cf4f28ad7c5e2572aa2[0]->getDomainId();
}
}
if ($v72ee76c5c29383b7c9f9225c1fa4d10b) {
$vfc4dd24e8dcaab0826b9ab09db0da5bf = domainsCollection::getInstance()->getDomain($v72ee76c5c29383b7c9f9225c1fa4d10b);
} else {
$vfc4dd24e8dcaab0826b9ab09db0da5bf = domainsCollection::getInstance()->getDefaultDomain();
}
if ($vfc4dd24e8dcaab0826b9ab09db0da5bf instanceof domain) {
$v9b98b21540033f68b145fb236bd91a73 = $vfc4dd24e8dcaab0826b9ab09db0da5bf->getHost();
$vad5f82e879a9c5d6b5b442eb37e50551->setAttribute('host', $v9b98b21540033f68b145fb236bd91a73);
}
}
}
return $v9a09b4dfda82e3e665e31092d1c3ec8d;
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:29,代码来源:transferSplitter.php
示例14: AddValuesToObject
public function AddValuesToObject($data)
{
$data['oTopic']->setFixedStatus(0);
if ($this->checkUserRights($data['oBlog'])) {
$data['oTopic']->setFixedStatus(getRequest('topic_fixed') ? 1 : 0);
}
}
开发者ID:lifecom,项目名称:test,代码行数:7,代码来源:HookTopicfix.class.php
示例15: onAddTopicToDispatch
public function onAddTopicToDispatch(iUmiEventPoint $oEvent)
{
$iDispatchId = regedit::getInstance()->getVal("//modules/forum/dispatch_id");
if (!$iDispatchId) {
return false;
}
$dispatches_module = cmsController::getInstance()->getModule('dispatches');
if (!$dispatches_module) {
return false;
}
$iTopicId = (int) $oEvent->getParam('topic_id');
$oTopicElement = umiHierarchy::getInstance()->getElement($iTopicId);
if ($oTopicElement instanceof umiHierarchyElement) {
$sTitle = (string) getRequest('title');
$sMessage = (string) getRequest('body');
$iHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "message")->getId();
$iMsgTypeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iHierarchyTypeId);
$oMsgType = umiObjectTypesCollection::getInstance()->getType($iMsgTypeId);
$iMsgObjId = umiObjectsCollection::getInstance()->addObject($sTitle, $iMsgTypeId);
$oMsgObj = umiObjectsCollection::getInstance()->getObject($iMsgObjId);
if ($oMsgObj instanceof umiObject) {
$iReleaseId = $dispatches_module->getNewReleaseInstanceId($iDispatchId);
$oMsgObj->setValue('release_reference', $iReleaseId);
$oMsgObj->setValue('header', $sTitle);
$oMsgObj->setValue('body', $sMessage);
$oMsgObj->commit();
return true;
} else {
return false;
}
} else {
return false;
}
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:34,代码来源:__sysevents.php
示例16: config
public function config()
{
// // получить экземпляр для работы с реестром
// $regedit = regedit::getInstance();
// // создать массив
// $params = array('config' => array('int:per_page' => NULL));
// получить первый параметр строки запроса
$mode = getRequest("param0");
// Если режим Do
if ($mode == "do") {
//$params = $this->expectParams($params);
//$regedit->setVar("//modules/modulelements/per_page", $params['config']['int:per_page']);
$this->chooseRedirect();
}
// // запишем в массив значение из реестра
// $params['config']['int:per_page'] = (int) $regedit->getVal("//modules/modulelements/per_page");
$params = array('config' => array('string:message' => NULL));
$params['config']['string:message'] = 'Здеся будет конфиг';
// установить тип данных и режим
$this->setDataType("settings");
$this->setActionType("modify");
// подготовка данных и вывод
$data = $this->prepareData($params, "settings");
$this->setData($data);
return $this->doData();
}
开发者ID:tomoonshine,项目名称:postsms,代码行数:26,代码来源:__admin.php
示例17: houseList
public function houseList()
{
if ($this->isLogin()) {
import('ORG.Util.Page');
//导入分页类
if (!$this->ispost()) {
$count = $this->model->where(array(status => 0))->count();
$Page = new Page($count, 5);
$show = $Page->show();
$data = $this->model->where(array(status => 0))->order('createtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
$this->assign('page', $show);
$this->assign('data', $data);
$this->display();
} else {
$decoration = getRequest("decoration");
$style = getRequest("style");
$map = array('decoration_style' => $decoration, 'style' => $style);
if (!$map) {
$this->error('请填写查询条件');
} else {
$count = $this->model->where($map)->count();
$Page = new Page($count, 5);
$show = $Page->show();
$data = $this->model->where($map)->order('createtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
if ($data) {
$this->assign('page', $show);
$this->assign('data', $data);
$this->display();
} else {
$this->error('没有查到符合内容!', $_SERVER['HTTP_REFERER']);
}
}
}
}
}
开发者ID:noikiy,项目名称:yisheji,代码行数:35,代码来源:HouseAction.class.php
示例18: closeUmiMessage
/**
* Закрывает одно сообщение и сохраняет информацию об этом в профиле пользователя
*
*/
public function closeUmiMessage()
{
$this->flushAsXML("closeUmiMessage");
$permissions = permissionsCollection::getInstance();
$objects = umiObjectsCollection::getInstance();
$user_id = $permissions->getUserId();
$user = $objects->getObject($user_id);
if ($user instanceof umiObject == false) {
throw new coreException("Can't get current user with id #{$user_id}");
}
$settings_data = $user->getValue("user_settings_data");
$settings_data = unserialize($settings_data);
if (!is_array($settings_data)) {
$settings_data = array();
}
$value = (int) getRequest('value');
if (isset($settings_data['umiMessages']['closed']) && $settings_data['umiMessages']['closed'] != '') {
$closed = explode(';', $settings_data['umiMessages']['closed']);
$closed[] = $value;
$closed = array_unique($closed);
$settings_data['umiMessages']['closed'] = implode(';', $closed);
} else {
$settings_data['umiMessages']['closed'] = $value;
}
$user->setValue("user_settings_data", serialize($settings_data));
$user->commit();
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:31,代码来源:__messages.php
示例19: ValidateSessionKey
/**
* Проверяет наличие security-ключа в сессии
*
* @return bool
*/
public function ValidateSessionKey($sCode = null)
{
if (!$sCode) {
$sCode = getRequest('security_ls_key');
}
return $sCode == $this->GenerateSessionKey();
}
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:12,代码来源:Security.class.php
示例20: reply
public function reply()
{
$id = getRequest('id');
$data = $this->model->getById($id);
$this->checkPurviewData($data);
if ($this->isPost()) {
$newdata = array();
if ($data['reply'] == '') {
$newdata['reply'] = getRequest('reply');
}
if ($data['additional_reply'] == '') {
$newdata['additional_reply'] = getRequest('additional_reply');
}
if ($data['comment'] && !$newdata['reply'] || $data['additional'] && !$newdata['additional_reply']) {
$newdata['isreply'] = 0;
} else {
$newdata['isreply'] = 1;
}
$returl = U('index');
if ($this->model->where(array('id' => $id))->data($newdata)->save() !== false) {
$this->success('回复成功!', $returl);
} else {
$this->error('操作失败!', $returl);
}
} else {
$this->assign('data', $data);
$reply_disable = $data['comment'] && !$data['reply'] ? 0 : 1;
$additional_disable = $data['additional'] && !$data['additional_reply'] ? 0 : 1;
$this->assign('reply_disable', $reply_disable);
$this->assign('additional_disable', $additional_disable);
$this->display();
}
}
开发者ID:omusico,项目名称:jianli,代码行数:33,代码来源:ScoreAction.class.php
注:本文中的getRequest函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论