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


PHP request::getParam方法代码示例

本文整理汇总了PHP中request::getParam方法的典型用法代码示例。如果您正苦于以下问题:PHP request::getParam方法的具体用法?PHP request::getParam怎么用?PHP request::getParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在request的用法示例。


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

示例1: top

 public function top()
 {
     $id = request::getParam('menuid', 0);
     $menuList = $this->adminMenuObj->getChildMenuByIdCache($id);
     $adminUserObj = new adminUserModel();
     $adminId = utils::getSessionVal('user');
     $adminUserInfo = $adminUserObj->find($adminId);
     $adminGroup = $adminUserObj->group;
     $nowTime = time();
     $data = array('menuList' => $menuList, 'nowTime' => $nowTime, 'adminUser' => $adminUserInfo, 'adminGroup' => $adminGroup);
     $this->setView($data);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:12,代码来源:indexController.php

示例2: grid

 public function grid()
 {
     $this->actionMenu = array(array('name' => '添加社区', 'url' => utils::getUrl('admin/home/add/' . base64_encode($this->url))));
     $this->menuTitle = '社区管理列表';
     $page = request::getParam('page', 1);
     $pageSize = request::getParam('pageSize', 10);
     $tableParam = array('page' => $page, 'pageSize' => $pageSize, 'isCount' => true);
     $homeList = $this->homeModel->select($tableParam);
     $pageObj = new page();
     $pageStr = $pageObj->showpage($homeList['count'], $page, $pageSize);
     $data = array('homeList' => $homeList, 'pageStr' => $pageStr);
     $this->setView($data);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:13,代码来源:homeController.php

示例3: grid

 public function grid()
 {
     $this->menuTitle = '店铺列表';
     $page = request::getParam('page', 1);
     $pageSize = request::getParam('pagesize', 20);
     $shopParam = array('page' => $page, 'pageSize' => $pageSize, 'isCount' => true);
     $shopList = $this->shopObj->select($shopParam);
     //获取店铺类型
     $shopTypeObj = new shopTypeModel();
     $shopTypeList = $shopTypeObj->getAllShopType();
     $pageObj = new page();
     $pageStr = $pageObj->showpage($shopList['count'], $page, $pageSize);
     $data = array('shopList' => $shopList, 'shopTypeList' => $shopTypeList, 'pageStr' => $pageStr);
     $this->setView($data);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:15,代码来源:shopController.php

示例4: detail

 public function detail()
 {
     $this->menuTitle = '用户详情';
     $backurl = request::getParam('backurl');
     $this->actionMenu = array(array('name' => '返回', 'url' => base64_decode($backurl)));
     $userId = request::getParam('id');
     $userService = utils::getService('user');
     $userInfo = $userService->getUserInfoById($userId);
     $userExtService = utils::getService('userExt');
     $userExtInfo = $userExtService->getUserExtInfoByUserId($userId);
     $userAllType = $userService->utype;
     $userAllStatus = $userService->pstatus;
     $data = array('userInfo' => $userInfo, 'userExtInfo' => $userExtInfo, 'userAllType' => $userAllType, 'userAllStatus' => $userAllStatus, 'backurl' => $backurl);
     $this->setView($data);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:15,代码来源:userController.php

示例5: grid

 public function grid()
 {
     $this->actionMenu = array(array('name' => '所有订单', 'url' => utils::getUrl('admin/order/grid/')));
     $this->menuTitle = '订单管理';
     $page = request::getParam('page', 1);
     $pageSize = request::getParam('pageSize', 20);
     $tableParam = array('page' => $page, 'pageSize' => $pageSize, 'isCount' => true);
     $orderResult = $this->orderObj->select($tableParam);
     $pageObj = new page();
     $pageStr = $pageObj->showpage($orderResult['count'], $page, $pageSize);
     $payStatusArr = orderService::$orderPayStatus;
     $orderStatusArr = orderService::$orderStatus;
     $data = array('orderResult' => $orderResult, 'payStatusArr' => $payStatusArr, 'orderStatusArr' => $orderStatusArr, 'pageStr' => $pageStr);
     $this->setView($data);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:15,代码来源:orderController.php

示例6: grid

 public function grid()
 {
     $page = request::getParam('page', 1);
     $pageSize = request::getParam('pagesize', 20);
     $pageObj = new page();
     $whereParam = array('page' => $page, 'pageSize' => $pageSize, 'isCount' => true);
     $applicationList = $this->userApplicationObj->select($whereParam);
     if ($applicationList) {
         $userObj = new userModel();
         foreach ($applicationList['resultList'] as &$appUser) {
             $userInfo = $userObj->find($appUser['user_id']);
             $appUser['userInfo'] = $userInfo;
         }
     }
     $pageStr = $pageObj->showpage($applicationList['count'], $page, $pageSize);
     $businessAppService = utils::getService('businessApp');
     $pstatusList = $businessAppService->status;
     $data = array('pageStr' => $pageStr, 'applicationList' => $applicationList['resultList'], 'pstatusList' => $pstatusList);
     $this->setView($data);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:20,代码来源:businessApplicationController.php

示例7: ajaxGetChild

 public function ajaxGetChild()
 {
     $id = request::getParam('id');
     $addressList = $this->addressObj->getChildAddressByIdCache($id);
     utils::resposeJson(array('code' => 200, 'mobileaddress' => $addressList));
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:6,代码来源:categoryControllers.php

示例8: _create

 /**
  * Store new paste or comment
  *
  * POST contains one or both:
  * data = json encoded SJCL encrypted text (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  * attachment = json encoded SJCL encrypted text (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  *
  * All optional data will go to meta information:
  * expire (optional) = expiration delay (never,5min,10min,1hour,1day,1week,1month,1year,burn) (default:never)
  * formatter (optional) = format to display the paste as (plaintext,syntaxhighlighting,markdown) (default:syntaxhighlighting)
  * burnafterreading (optional) = if this paste may only viewed once ? (0/1) (default:0)
  * opendiscusssion (optional) = is the discussion allowed on this paste ? (0/1) (default:0)
  * attachmentname = json encoded SJCL encrypted text (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  * nickname (optional) = in discussion, encoded SJCL encrypted text nickname of author of comment (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  * parentid (optional) = in discussion, which comment this comment replies to.
  * pasteid (optional) = in discussion, which paste this comment belongs to.
  *
  * @access private
  * @return string
  */
 private function _create()
 {
     $error = false;
     // Ensure last paste from visitors IP address was more than configured amount of seconds ago.
     trafficlimiter::setConfiguration($this->_conf);
     if (!trafficlimiter::canPass()) {
         return $this->_return_message(1, i18n::_('Please wait %d seconds between each post.', $this->_conf->getKey('limit', 'traffic')));
     }
     $data = $this->_request->getParam('data');
     $attachment = $this->_request->getParam('attachment');
     $attachmentname = $this->_request->getParam('attachmentname');
     // Ensure content is not too big.
     $sizelimit = $this->_conf->getKey('sizelimit');
     if (strlen($data) + strlen($attachment) + strlen($attachmentname) > $sizelimit) {
         return $this->_return_message(1, i18n::_('Paste is limited to %s of encrypted data.', filter::size_humanreadable($sizelimit)));
     }
     // The user posts a comment.
     $pasteid = $this->_request->getParam('pasteid');
     $parentid = $this->_request->getParam('parentid');
     if (!empty($pasteid) && !empty($parentid)) {
         $paste = $this->_model->getPaste($pasteid);
         if ($paste->exists()) {
             try {
                 $comment = $paste->getComment($parentid);
                 $nickname = $this->_request->getParam('nickname');
                 if (!empty($nickname)) {
                     $comment->setNickname($nickname);
                 }
                 $comment->setData($data);
                 $comment->store();
             } catch (Exception $e) {
                 return $this->_return_message(1, $e->getMessage());
             }
             $this->_return_message(0, $comment->getId());
         } else {
             $this->_return_message(1, 'Invalid data.');
         }
     } else {
         $paste = $this->_model->getPaste();
         try {
             $paste->setData($data);
             if (!empty($attachment)) {
                 $paste->setAttachment($attachment);
                 if (!empty($attachmentname)) {
                     $paste->setAttachmentName($attachmentname);
                 }
             }
             $expire = $this->_request->getParam('expire');
             if (!empty($expire)) {
                 $paste->setExpiration($expire);
             }
             $burnafterreading = $this->_request->getParam('burnafterreading');
             if (!empty($burnafterreading)) {
                 $paste->setBurnafterreading($burnafterreading);
             }
             $opendiscussion = $this->_request->getParam('opendiscussion');
             if (!empty($opendiscussion)) {
                 $paste->setOpendiscussion($opendiscussion);
             }
             $formatter = $this->_request->getParam('formatter');
             if (!empty($formatter)) {
                 $paste->setFormatter($formatter);
             }
             $paste->store();
         } catch (Exception $e) {
             return $this->_return_message(1, $e->getMessage());
         }
         $this->_return_message(0, $paste->getId(), array('deletetoken' => $paste->getDeleteToken()));
     }
 }
开发者ID:squarefractal,项目名称:ZeroBin,代码行数:90,代码来源:zerobin.php

示例9: testApiDelete

 public function testApiDelete()
 {
     $this->reset();
     $_SERVER['REQUEST_METHOD'] = 'POST';
     $_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
     $_SERVER['QUERY_STRING'] = 'foo';
     $_POST['deletetoken'] = 'bar';
     $request = new request();
     $this->assertTrue($request->isJsonApiCall(), 'is JSON Api call');
     $this->assertEquals('delete', $request->getOperation());
     $this->assertEquals('foo', $request->getParam('pasteid'));
     $this->assertEquals('bar', $request->getParam('deletetoken'));
 }
开发者ID:danesjenovdan,项目名称:DJNBin,代码行数:13,代码来源:request.php

示例10: _create

 /**
  * Store new paste or comment
  *
  * POST contains one or both:
  * data = json encoded SJCL encrypted text (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  * attachment = json encoded SJCL encrypted text (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  *
  * All optional data will go to meta information:
  * expire (optional) = expiration delay (never,5min,10min,1hour,1day,1week,1month,1year,burn) (default:never)
  * formatter (optional) = format to display the paste as (plaintext,syntaxhighlighting,markdown) (default:syntaxhighlighting)
  * burnafterreading (optional) = if this paste may only viewed once ? (0/1) (default:0)
  * opendiscusssion (optional) = is the discussion allowed on this paste ? (0/1) (default:0)
  * attachmentname = json encoded SJCL encrypted text (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  * nickname (optional) = in discussion, encoded SJCL encrypted text nickname of author of comment (containing keys: iv,v,iter,ks,ts,mode,adata,cipher,salt,ct)
  * parentid (optional) = in discussion, which comment this comment replies to.
  * pasteid (optional) = in discussion, which paste this comment belongs to.
  *
  * @access private
  * @return string
  */
 private function _create()
 {
     // Ensure last paste from visitors IP address was more than configured amount of seconds ago.
     TrafficLimiter::setConfiguration($this->_conf);
     if (!TrafficLimiter::canPass()) {
         return $this->_return_message(1, I18n::_('Please wait %d seconds between each post.', $this->_conf->getKey('limit', 'traffic')));
     }
     $data = $this->_request->getParam('data');
     $attachment = $this->_request->getParam('attachment');
     $attachmentname = $this->_request->getParam('attachmentname');
     // Ensure content is not too big.
     $sizelimit = $this->_conf->getKey('sizelimit');
     if (strlen($data) + strlen($attachment) + strlen($attachmentname) > $sizelimit) {
         return $this->_return_message(1, I18n::_('Paste is limited to %s of encrypted data.', Filter::formatHumanReadableSize($sizelimit)));
     }
     // Ensure attachment did not get lost due to webserver limits or Suhosin
     if (strlen($attachmentname) > 0 && strlen($attachment) == 0) {
         return $this->_return_message(1, 'Attachment missing in data received by server. Please check your webserver or suhosin configuration for maximum POST parameter limitations.');
     }
     // The user posts a comment.
     $pasteid = $this->_request->getParam('pasteid');
     $parentid = $this->_request->getParam('parentid');
     if (!empty($pasteid) && !empty($parentid)) {
         $paste = $this->_model->getPaste($pasteid);
         if ($paste->exists()) {
             try {
                 $comment = $paste->getComment($parentid);
                 $nickname = $this->_request->getParam('nickname');
                 if (!empty($nickname)) {
                     $comment->setNickname($nickname);
                 }
                 $comment->setData($data);
                 $comment->store();
             } catch (Exception $e) {
                 return $this->_return_message(1, $e->getMessage());
             }
             $this->_return_message(0, $comment->getId());
         } else {
             $this->_return_message(1, 'Invalid data.');
         }
     } else {
         $this->_model->purge();
         $paste = $this->_model->getPaste();
         try {
             $paste->setData($data);
             if (!empty($attachment)) {
                 $paste->setAttachment($attachment);
                 if (!empty($attachmentname)) {
                     $paste->setAttachmentName($attachmentname);
                 }
             }
             $expire = $this->_request->getParam('expire');
             if (!empty($expire)) {
                 $paste->setExpiration($expire);
             }
             $burnafterreading = $this->_request->getParam('burnafterreading');
             if (!empty($burnafterreading)) {
                 $paste->setBurnafterreading($burnafterreading);
             }
             $opendiscussion = $this->_request->getParam('opendiscussion');
             if (!empty($opendiscussion)) {
                 $paste->setOpendiscussion($opendiscussion);
             }
             $formatter = $this->_request->getParam('formatter');
             if (!empty($formatter)) {
                 $paste->setFormatter($formatter);
             }
             $paste->store();
         } catch (Exception $e) {
             return $this->_return_message(1, $e->getMessage());
         }
         $this->_return_message(0, $paste->getId(), array('deletetoken' => $paste->getDeleteToken()));
     }
 }
开发者ID:privatebin,项目名称:privatebin,代码行数:94,代码来源:PrivateBin.php


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