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


PHP WebRequest::get方法代码示例

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


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

示例1: send

 public function send($message, $list)
 {
     $webRequest = new WebRequest();
     $params = array("profileId" => $this->profileId, "user" => $this->user, "pwd" => $this->pwd, "senderId" => $this->senderId, "mobileno" => implode(",", $list), "msgtext" => "this is a test message");
     $result = $webRequest->get("http://bulksmsindia.mobi/sendurlcomma.aspx?", $params);
     return $result;
 }
开发者ID:pradeepck,项目名称:vagrant,代码行数:7,代码来源:testsms.php

示例2: getErrorDisplay

 public static function getErrorDisplay($arguments)
 {
     $smarty = $arguments[1];
     $error = WebRequest::get("lgerror") or "";
     $smarty->assign("lgerror", $error);
     return true;
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:7,代码来源:PageLogin.php

示例3: runPage

 protected function runPage()
 {
     if (WebRequest::get("showall") === "yes") {
         $phpinfo_parts = INFO_ALL;
         $linktarget = "?showall=no";
     } else {
         $phpinfo_parts = INFO_VARIABLES;
         $linktarget = "?showall=yes";
     }
     ob_clean();
     phpinfo($phpinfo_parts);
     $pinfo = ob_get_contents();
     ob_clean();
     if (WebRequest::get("showall") === "yes") {
         $pinfo1 = explode("<table", $pinfo, 2);
         $pinfo = "<table" . $pinfo1[1];
         $pinfo1 = explode("<h2>PHP License</h2>", $pinfo);
         $pinfo = $pinfo1[0];
     } else {
         $pinfo1 = explode("<h2>", $pinfo);
         $pinfo = "<h2>" . $pinfo1[1];
         $pinfo1 = explode("<br />", $pinfo);
         $pinfo = $pinfo1[0];
     }
     $pinfo = str_replace('class="e"', 'style="background-color: #ccccff; font-weight: bold; color: #000000;border: 1px solid #000000; font-size: 75%; vertical-align: baseline;"', $pinfo);
     $pinfo = str_replace('class="v"', 'style="background-color: #cccccc; color: #000000;border: 1px solid #000000; font-size: 75%; vertical-align: baseline;"', $pinfo);
     $pinfo = str_replace('<table ', '<table style="border-collapse: collapse;font-family: sans-serif;" ', $pinfo);
     $this->mSmarty->assign("content", "<a href=\"{$linktarget}\">Toggle all/variables</a>" . $pinfo);
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:29,代码来源:MPagePhpInfo.php

示例4: runPage

 protected function runPage()
 {
     $action = WebRequest::get("action");
     switch ($action) {
         case "view":
             self::checkAccess("view-bill");
             $this->showViewBillPage();
             break;
         case "edit":
             self::checkAccess("edit-bill");
             $this->showEditBillItemPage();
             break;
         case "add":
             self::checkAccess("append-bill");
             $this->showAddBillItemPage();
             break;
         case "pay":
             self::checkAccess("pay-bill");
             $this->doPayBillAction();
             break;
         case "del":
             self::checkAccess("remove-bill-item");
             $this->doRemoveBillItemAction();
             break;
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:26,代码来源:MPageBilling.php

示例5: runPage

 protected function runPage()
 {
     $this->mSubMenu = array("MPageSystemUserList" => array("title" => "mpage-user-list", "link" => "/SystemUsers?action=list"), "MPageCreateUser" => array("title" => "mpage-user-create", "link" => "/SystemUsers?action=create"));
     $action = WebRequest::get("action");
     switch ($action) {
         case "changepw":
             self::checkAccess("edit-systemuser-password");
             $this->showChangePasswordPage();
             break;
         case "del":
             self::checkAccess("delete-systemuser");
             $this->doDeleteUserAction();
             break;
         case "create":
             self::checkAccess("create-systemuser");
             $this->showCreateUserPage();
             break;
         case "changeaccess":
             self::checkAccess("edit-systemuser-access");
             $this->showChangeAccessPage();
             break;
         case "list":
         default:
             $this->showListUserPage();
             break;
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:27,代码来源:MPageSystemUsers.php

示例6: runPage

 protected function runPage()
 {
     $this->mSubMenu = array("MPageCustomersList" => array("title" => "mpage-customers-list", "link" => "/Customers?action=list"), "MPageCustomersCreate" => array("title" => "mpage-customers-create", "link" => "/Customers?action=create"));
     $action = WebRequest::get("action");
     switch ($action) {
         case "del":
             self::checkAccess("delete-customer");
             $this->doDeleteCustomerAction();
             break;
         case "rsconfirm":
             $this->doResendCustomerAction();
             break;
         case "edit":
             self::checkAccess("edit-customer");
             $this->showEditCustomerPage();
             break;
         case "create":
             self::checkAccess("create-customer");
             $this->showCreateCustomerPage();
             break;
         case "list":
         default:
             $this->showListCustomerPage();
             break;
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:26,代码来源:MPageCustomers.php

示例7: runPage

 protected function runPage()
 {
     global $cWebPath;
     $this->mStyles[] = $cWebPath . '/style/jsDatePick_ltr.min.css';
     $this->mScripts[] = $cWebPath . '/scripts/jsDatePick.full.1.3.js';
     $this->mSubMenu = array("MPageBookingsList" => array("title" => "mpage-bookings-list", "link" => "/Bookings?action=list"), "MPageBookingsCreate" => array("title" => "mpage-bookings-create", "link" => "/Bookings?action=create"));
     $action = WebRequest::get("action");
     switch ($action) {
         case "del":
             self::checkAccess("delete-booking");
             $this->doDeleteBookingAction();
             break;
         case "edit":
             self::checkAccess("edit-booking");
             $this->showEditBookingPage();
             break;
         case "create":
             self::checkAccess("create-booking");
             $this->showCreateBookingPage();
             break;
         case "list":
         default:
             $this->showListBookingsPage();
             break;
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:26,代码来源:MPageBookings.php

示例8: runPage

 protected function runPage()
 {
     try {
         $id = WebRequest::getInt("id");
         $hash = WebRequest::get("hash");
         // data validation
         $customer = Customer::getById($id);
         if ($customer == null) {
             throw new NonexistantObjectException();
         }
         $customer->confirmEmail($hash);
         // save
         $customer->save();
         Session::setLoggedInCustomer($id);
         $this->mSmarty->assign("content", Message::getMessage("mail-confirmed"));
     } catch (NonexistantObjectException $ex) {
         global $cScriptPath;
         $this->mHeaders[] = "Location: {$cScriptPath}";
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:20,代码来源:PageConfirm.php

示例9: runPage

 protected function runPage()
 {
     $this->mSubMenu = array("MPageRoomsList" => array("title" => "mpage-rooms-list", "link" => "/Rooms?action=list"), "MPageRoomsCreate" => array("title" => "mpage-rooms-create", "link" => "/Rooms?action=create"));
     $action = WebRequest::get("action");
     switch ($action) {
         case "del":
             self::checkAccess("delete-room");
             $this->doDeleteRoomAction();
             break;
         case "edit":
             self::checkAccess("edit-room");
             $this->showEditRoomPage();
             break;
         case "create":
             self::checkAccess("create-room");
             $this->showCreateRoomPage();
             break;
         case "list":
         default:
             $this->showListRoomPage();
             break;
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:23,代码来源:MPageRooms.php

示例10: runPage

 protected function runPage()
 {
     if (Session::isCustomerLoggedIn()) {
         global $cWebPath;
         // redirect to main page
         $this->mHeaders[] = "HTTP/1.1 303 See Other";
         $this->mHeaders[] = "Location: " . $cWebPath . "/index.php";
         return;
     }
     if (WebRequest::wasPosted()) {
         if (WebRequest::get("id") && WebRequest::get("hash")) {
             // setting password
             $id = WebRequest::get("id");
             $hash = WebRequest::get("hash");
             $customer = Customer::getById($id);
             try {
                 if ($customer->getMailChecksum() != $hash) {
                     throw new InvalidChecksumException();
                 }
                 $suPassword = WebRequest::post("suPassword");
                 $suConfirm = WebRequest::post("suConfirm");
                 // validation
                 if ($suPassword == "") {
                     throw new CreateCustomerException("Password not specified");
                 }
                 if ($suConfirm == "") {
                     throw new CreateCustomerException("Confirmed password not specified");
                 }
                 if ($suPassword != $suConfirm) {
                     throw new CreateCustomerException("Password mismatch");
                 }
                 // validation
                 if ($suPassword != "" && $suPassword == $suConfirm) {
                     $customer->setPassword($suPassword);
                 }
                 $customer->save();
                 // log them in
                 Session::setLoggedInCustomer($id);
                 // redirect to main page
                 global $cWebPath;
                 $this->mHeaders[] = "HTTP/1.1 303 See Other";
                 $this->mHeaders[] = "Location: " . $cWebPath . "/index.php";
             } catch (CreateCustomerException $ex) {
                 $this->mBasePage = "changePassword.tpl";
                 $this->error($ex->getMessage());
             } catch (InvalidChecksumException $ex) {
                 $this->mBasePage = "changePassword.tpl";
                 $this->error($ex->getMessage());
             }
         } else {
             // requesting
             try {
                 $suEmail = WebRequest::post("suEmail");
                 // validation
                 if ($suEmail == "") {
                     throw new CreateCustomerException("Email not specified");
                 }
                 $customer = Customer::getByEmail($suEmail);
                 if ($customer == null) {
                     throw new NonexistantObjectException();
                 }
                 $customer->sendPasswordReset();
                 $this->mBasePage = "forgotpassword.tpl";
                 // TODO: show some confirmation, check email, etc
             } catch (CreateCustomerException $ex) {
                 $this->mBasePage = "forgottenpassword.tpl";
                 $this->error($ex->getMessage());
             } catch (NonexistantObjectException $ex) {
                 $this->mBasePage = "forgottenpassword.tpl";
                 $this->error("nonexistant object");
             }
         }
     } else {
         if (WebRequest::get("id") && WebRequest::get("hash")) {
             // show reset password form
             try {
                 $id = WebRequest::get("id");
                 $hash = WebRequest::get("hash");
                 $customer = Customer::getById($id);
                 if ($customer->getMailChecksum() != $hash) {
                     throw new InvalidChecksumException();
                 }
                 $this->mBasePage = "changePassword.tpl";
                 $this->mSmarty->assign("cpid", $id);
                 $this->mSmarty->assign("cphash", $hash);
             } catch (InvalidChecksumException $ex) {
                 $this->mBasePage = "forgottenpassword.tpl";
                 $this->error("invalid checksum");
             }
         } else {
             // show request form
             $this->mBasePage = "forgottenpassword.tpl";
             return;
         }
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:96,代码来源:PageForgotPassword.php

示例11: getActiveLanguage

 public static function getActiveLanguage()
 {
     global $cAvailableLanguages;
     // look in the order of most volatile first - if we find something, use it.
     // request cache
     if (self::$requestLanguage != "") {
         return self::$requestLanguage;
     }
     // get parameter
     $getParam = WebRequest::get("lang");
     if ($getParam != false) {
         // check value is in list of allowed values
         if (array_key_exists($getParam, $cAvailableLanguages)) {
             // save local cache for other messages this request
             self::$requestLanguage = $getParam;
             // set a cookie to persist that option for this session (do we want
             // this option to set the preferences too?)
             WebRequest::setCookie("lang", $getParam);
             // use this value.
             return $getParam;
         }
     }
     // cookie
     $cookie = WebRequest::getCookie("lang");
     if ($cookie != false) {
         // check value is in list of allowed values
         if (array_key_exists($cookie, $cAvailableLanguages)) {
             // save local cache for other messages this request
             self::$requestLanguage = $cookie;
             // use this value.
             return $cookie;
         }
     }
     // user preference
     // site default
     return "en-GB";
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:37,代码来源:Message.php

示例12: testCurlException

 /**
  * @covers ByJG\Util\WebRequest::curlInit
  */
 public function testCurlException()
 {
     $this->object = new WebRequest('http://laloiuyakkkall.iiiuqq/');
     $this->setExpectedException('\\ByJG\\Util\\CurlException');
     $this->object->get();
 }
开发者ID:byjg,项目名称:webrequest,代码行数:9,代码来源:WebRequestTest.php

示例13: runPage

 protected function runPage()
 {
     // try to get more access than we may have.
     try {
         self::checkAccess('edit-language-messages');
         $this->mSmarty->assign("readonly", '');
     } catch (AccessDeniedException $ex) {
         // caution: if you're copying this, this is a hack to make sure
         //			users know they don't have the access to do this, not
         // 			to actually stop them from doing it, though it will have
         // 			that effect to the non-tech-savvy.
         $this->mSmarty->assign("readonly", 'disabled="disabled"');
     }
     global $cWebPath;
     $this->mStyles[] = $cWebPath . "/style/pager.css";
     if (WebRequest::wasPosted()) {
         self::checkAccess("edit-language-messages");
         $this->save();
         global $cWebPath;
         $this->mHeaders[] = "HTTP/1.1 303 See Other";
         $this->mHeaders[] = "Location: " . $cWebPath . "/management.php/Languages";
         return;
     }
     $this->mBasePage = "mgmt/lang.tpl";
     $keys = array();
     $filterUnset = false;
     if (WebRequest::get("showall")) {
         if (WebRequest::get("showall") == "unset") {
             $filterUnset = true;
         }
         $keys = Message::getMessageKeys();
     } else {
         if (WebRequest::get("prefix")) {
             $keys = Message::getMessageKeys();
             $keys = array_filter($keys, function ($value) {
                 $prefix = WebRequest::get("prefix");
                 return substr($value, 0, strlen($prefix)) == $prefix;
             });
         }
     }
     if (count($keys) > 0) {
         $this->mSmarty->assign("showtable", 1);
         global $cAvailableLanguages;
         // retrieve the message table as an array (of message keys) of arrays
         // (of languages) of arrays (of id/current content)
         $messagetable = array();
         foreach ($keys as $mkey) {
             $completelySet = true;
             $messagetable[$mkey] = array();
             foreach ($cAvailableLanguages as $lang => $langname) {
                 $message = Message::getByName($mkey, $lang);
                 if ($message->getContent() == "&lt;{$lang}:{$mkey}&gt;") {
                     if ($lang == Message::getActiveLanguage()) {
                         $completelySet = false;
                     }
                 }
                 $messagetable[$mkey][$lang] = array("id" => $message->getId(), "content" => $message->getContent());
             }
             if ($filterUnset && $completelySet) {
                 unset($messagetable[$mkey]);
             }
         }
         $this->mSmarty->assign("languagetable", $messagetable);
         $this->mSmarty->assign("languages", $cAvailableLanguages);
     } else {
         $this->mSmarty->assign("showtable", 0);
     }
 }
开发者ID:vulnerabilityCode,项目名称:hotel-system,代码行数:68,代码来源:MPageLanguages.php


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