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


PHP system::setParam方法代码示例

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


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

示例1: processSection

 private function processSection($keyName, $sectionArray)
 {
     $test = "";
     foreach ($sectionArray as $sectionName => $value) {
         $test = isset($this->core->{$keyName}) ? $this->core->{$keyName} : "";
         if (is_array($value)) {
             $this->processSection($sectionName, $value);
             continue;
         }
         if (method_exists($test, $sectionName)) {
             $test->{$sectionName}($value);
             continue;
         }
         if (isset($this->core->config["{$keyName}Config"])) {
             $this->core->config["{$keyName}Config"][$sectionName] = $value;
             continue;
         }
         $test = isset($this->core->{$keyName}->{$sectionName}) ? $this->core->{$keyName}->{$sectionName} : null;
         if ($test) {
             $this->core->{$keyName}->{$sectionName} = $value;
         } else {
             system::setParam($sectionName, $value);
         }
     }
     //print_r ($conf);
 }
开发者ID:ygres,项目名称:sblog,代码行数:26,代码来源:class.config.php

示例2: index

 function index()
 {
     system::setParam("page", "globalSearch");
     if (!empty($_GET["text"])) {
         $words = htmlspecialchars(addslashes($_GET["text"]));
         $offset = 0;
         if (isset($this->get["offset"])) {
             $offset = intval($this->get["offset"]);
         }
         $cacheID = "SEARCH_RES|{$words}|blogsearchoffset_{$offset}";
         $this->smarty->assign("searchWord", $words);
         if (mb_strlen($words) <= 2) {
             $this->smarty->assign("smallWord", true);
             return false;
         }
         $this->smarty->setCacheID($cacheID);
         if (!$this->smarty->isCached()) {
             $res = search::searchWithType($words, "blog");
             if ($res->getNumRows() > 0) {
                 $posts = $res->fetchAll();
                 $this->smarty->assign("searchRes", $posts);
             }
         }
     } else {
         system::redirect('/');
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:27,代码来源:search.php

示例3: criticalError

 public function criticalError()
 {
     if (!empty($this->coreErrors)) {
         system::setParam("page", "coreErrorPage");
         return $this->coreErrors;
     }
     return false;
 }
开发者ID:ygres,项目名称:sblog,代码行数:8,代码来源:class._Exception.php

示例4: index

 function index()
 {
     if ($this->args[0] != 'index') {
         system::setParam("page", "showPage");
         video::getPostBySlug($this->args[0]);
         //$this->smarty->addCacheID(); // @Mgenry что ты несёшь блять ???
     } else {
         system::setParam("page", "listPage");
         $fill = video::getPosts()->fetchAll();
         $this->smarty->assign("fill", $fill);
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:12,代码来源:index.php

示例5: add

 function add()
 {
     system::setParam("page", "addUser");
     $doRedirect = false;
     if (isset($_POST["savePost"])) {
         $data = $_POST;
         unset($data["savePost"]);
         $this->db->query("INSERT INTO `users` SET `nick`='?', `email`='?', `password`=md5(md5('?')), \n\t\t\t\t`source`='?', `profileURL`='?'", $data["nick"], $data["email"], $data["password"], $data["source"], $data["profileURL"]);
         $doRedirect = true;
     }
     if ($doRedirect) {
         system::redirect(system::param("urlBase") . "users");
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:14,代码来源:users.php

示例6: add

 function add()
 {
     system::setParam("page", "addPage");
     $fill = array();
     $doRedirect = false;
     if (isset($_POST) && $_POST) {
         $url = $_POST["URL"];
         $code = redirect::generateRandomString(10);
         if ($this->db->query("INSERT INTO `redirect` (`URL`,`code`) VALUES ('?','?')", $url, $code)) {
             $doRedirect = true;
         }
     }
     $this->smarty->assign("fill", $fill);
     if ($doRedirect) {
         system::redirect("/adm/redirect/listPage");
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:17,代码来源:index.php

示例7: editItem

 function editItem()
 {
     $id = intval($_GET["id"]);
     $doRedirect = false;
     if (isset($_POST["savePost"])) {
         blog::updatePost($id, $_POST);
         $doRedirect = true;
     }
     if (isset($_POST["uploadPicture"])) {
         $uploadedPics = blog::uploadOnePicture($_POST["slug"]);
     }
     system::setParam("page", "editPortfolioItem");
     $sqlData = blog::buildForm("portfolio", "AND `id`={$id}");
     blog::showAttachedPics($sqlData, "portfolioPics");
     if ($doRedirect) {
         system::redirect(system::param("urlBase") . "items");
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:18,代码来源:portfolio.php

示例8: index

 function index()
 {
     system::setParam("page", "server-status");
     $this->smarty->setCacheID("SERVER_STATUS");
     if (!$this->smarty->isCached("server-status.tpl", "SERVER_STATUS")) {
         $this->smarty->assign("cpu", server_status::cpuInfo());
         $this->smarty->assign("totalMemory", server_status::totalMemory());
         $this->smarty->assign("uptime", server_status::uptime());
         $this->smarty->assign("load", server_status::getLoad());
         $this->smarty->assign("kernelVersion", server_status::kernel());
         $cpuLoad = server_status::cpuLoad();
         $memory = server_status::memory();
         $this->smarty->assign("cpuLoad", $cpuLoad);
         $this->smarty->assign("memory", $memory);
         $this->smarty->assign("memoryScale", server_status::scaleData(round($memory)));
         $this->smarty->assign("cpuScale", server_status::scaleData(round($cpuLoad)));
         $this->smarty->assign("programms", server_status::installedSoft());
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:19,代码来源:server_status.php

示例9: readConfig

 public function readConfig()
 {
     if ($this->configIsReaded) {
         return true;
     }
     $this->params = array();
     if (!file_exists(ROOT_PATH . "/config.php")) {
         throw new exception("configReadError");
     }
     include ROOT_PATH . "/config.php";
     if (!isset($configuration)) {
         throw new exception("configIsEmpty");
     }
     $configParser = new config($this);
     $configParser->processArray($configuration);
     system::setParam("page", "main");
     $this->configIsReaded = true;
     return true;
 }
开发者ID:ygres,项目名称:sblog,代码行数:19,代码来源:class.core.php

示例10: addPageAjax

 function addPageAjax()
 {
     system::setParam("page", "ajax");
     if ($_POST) {
         $fill = array();
         $slug = "";
         $fill = $_POST;
         if (!empty($_POST["slug"])) {
             $slug = core::generateSlug($_POST["slug"]);
         } else {
             if (!empty($_POST["title"])) {
                 $slug = core::generateSlug($_POST["title"]);
             }
         }
         $fill["slug"] = $slug;
         $savedPost = video::writePost($fill);
         // $this->smarty->assign ("fill", $fill);
         return true;
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:20,代码来源:index.php

示例11: date

 function date()
 {
     system::setParam("page", "blogByDate");
     $offset = 1;
     if (isset($this->get["offset"])) {
         $offset = intval($this->get["offset"]);
     }
     $cacheID = "DTSELECT|ARTICLE|dateoffset_{$offset}";
     if (isset($this->args[1])) {
         $date = preg_replace("/[^0-9.]/uims", '', $this->args[1]);
         $cacheID = $date . "|" . $cacheID;
     }
     $this->smarty->setCacheID($cacheID);
     if (!$this->smarty->isCached()) {
         $allCount = $this->db->query("SELECT COUNT(*) as cnt FROM `content` as c, `content_category` as cc, `categories` as cts WHERE \n            cc.`contentID`=c.`contentID` AND c.`type`='article' AND cts.`categoryID`=cc.`catID` AND c.`showOnSite`='Y' AND c.`dt` >= \n            STR_TO_DATE ('?', '%d.%m.%Y')", $date)->fetch();
         $posts = news::getPostsByDate($date, core::pagination($allCount["cnt"], $offset), "article")->fetchAll();
         $this->smarty->assign("posts", $posts);
         $this->smarty->assign("date", $date);
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:20,代码来源:index.php

示例12: registration

 function registration()
 {
     system::setParam("page", "userRegistration");
 }
开发者ID:ygres,项目名称:sblog,代码行数:4,代码来源:index.php

示例13: profile

 function profile()
 {
     if (!isset($this->get["profile"]) || !$this->get["profile"]) {
         return system::redirect('/');
     }
     $userID = intval($this->get["profile"]);
     $systemUserID = 0;
     system::setParam("page", "userProfileOpen");
     $cacheID = "USERPROFILE|USERPANEL|user_" . $userID;
     if (!empty($_SESSION["user"])) {
         $systemUserID = intval($_SESSION["user"]["userID"]);
         $cacheID .= "|logined";
     } else {
         $cacheID .= "|notlogined";
     }
     $this->smarty->setCacheID($cacheID);
     if (!$this->smarty->isCached()) {
         if (!empty($_SESSION["user"])) {
             $user = $this->db->query("SELECT * FROM `users` as u LEFT JOIN `friends` as f ON f.`u2`=u.`userID`" . " WHERE u.`userID`=?", $userID)->fetch();
         } else {
             $user = $this->db->query("SELECT *, 0 as friendshipID FROM `users` WHERE `userID`=?", $userID)->fetch();
         }
         $this->smarty->assign("user", $user);
     }
     $this->smarty->assign("userID", $userID);
 }
开发者ID:ygres,项目名称:sblog,代码行数:26,代码来源:user.php

示例14: addCat

 function addCat()
 {
     system::setParam("page", "addCat");
     if (!empty($_POST)) {
         if (blog::addCat($_POST)) {
             system::redirect("/adm/blog/categories");
         }
     }
 }
开发者ID:ygres,项目名称:sblog,代码行数:9,代码来源:blog.php

示例15: addPage

 function addPage()
 {
     system::setParam("page", "addPage");
     $fill = array();
     $doRedirect = false;
     $slug = "";
     if (isset($_POST) && $_POST) {
         $fill = $_POST;
         $this->add($fill);
         if ($savedPost) {
             $doRedirect = true;
         }
         if ($doRedirect) {
             system::redirect(system::param("urlBase") . "listPage");
         }
     }
     $this->smarty->assign("fill", $fill);
 }
开发者ID:ygres,项目名称:sblog,代码行数:18,代码来源:index.php


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