当前位置: 首页>>代码示例>>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;未经允许,请勿转载。