當前位置: 首頁>>代碼示例>>PHP>>正文


PHP system::HTTPGet方法代碼示例

本文整理匯總了PHP中system::HTTPGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP system::HTTPGet方法的具體用法?PHP system::HTTPGet怎麽用?PHP system::HTTPGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在system的用法示例。


在下文中一共展示了system::HTTPGet方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: login

 function login()
 {
     system::setParam("page", "auth");
     $authRes = false;
     //print_r($this->get);
     $through = system::HTTPGet("through");
     if ($through) {
         $up = user::socialLogin($through);
         if ($up) {
             $userID = user::socialRegister($through, $up);
         }
         if (isset($userID)) {
             $authRes = user::userLogin($userID, '-', $through);
         }
     }
     if (isset($_POST["email"])) {
         system::checkFields(array("email" => "E-mail", "password" => "Пароль"));
         if (!system::checkErrors()) {
             $authRes = user::userLogin();
         }
         if (!$authRes) {
             return system::redirect("/user/passwordRestore");
         }
     }
     if ($authRes) {
         if (isset($_GET["to"]) && $_GET["to"]) {
             system::redirect(urldecode($_GET["to"]), 5, "Вы вошли как <strong>{$_SESSION["user"]["nick"]}</strong>.");
         } else {
             system::redirect("/", 5, "Вы вошли как <strong>{$_SESSION["user"]["nick"]}</strong>.");
         }
     }
 }
開發者ID:ygres,項目名稱:sblog,代碼行數:32,代碼來源:user.php

示例2: posts

 function posts()
 {
     switch (system::HTTPGet("posts")) {
         case "edit":
             $this->editPost();
             break;
         case "write":
             $this->writePost();
             break;
         default:
             system::setParam("page", "posts");
             blog::buildList("content", "blog");
             break;
     }
 }
開發者ID:ygres,項目名稱:sblog,代碼行數:15,代碼來源:blog.php

示例3: pagination

 public static function pagination($allCount, $offset = 1)
 {
     $offset = intval(system::HTTPGet("offset"));
     if ($offset == 0) {
         $offset = 1;
     }
     $smarty = array();
     $smarty["itemsOnPage"] = intval(system::param("itemsOnPage"));
     $smarty["offset"] = $offset;
     $smarty["allCount"] = $allCount;
     $pageCompose = new pagination($allCount);
     $pageCompose->setPerPage($smarty["itemsOnPage"]);
     $pageCompose->readInputData($offset);
     $mysqlLimits = $pageCompose->calculateOffset();
     $smarty["pages"] = $pageCompose->genPages();
     $smarty["pagesTotal"] = count($smarty["pages"]);
     system::$core->smarty->assign("pagination", $smarty);
     return $mysqlLimits;
 }
開發者ID:ygres,項目名稱:sblog,代碼行數:19,代碼來源:class.core.php

示例4: offset

 function offset()
 {
     $offset = system::HTTPGet("offset");
     if (!$offset) {
         return system::redirect('/');
     }
     $cacheID = "MAINPAGE|offset_{$offset}";
     $this->smarty->setCacheID($cacheID);
     if (!$this->smarty->isCached($cacheID)) {
         $sqlData = index::mainPage();
         $this->smarty->assign("posts", $sqlData);
     }
 }
開發者ID:ygres,項目名稱:sblog,代碼行數:13,代碼來源:blog.php


注:本文中的system::HTTPGet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。