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


PHP System::setTitle方法代码示例

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


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

示例1: index

 public function index()
 {
     Cache::loadPage('', 30);
     $inputData = array();
     $postid = 0;
     Model::loadWithPath('page', System::getThemePath() . 'model/');
     if (!($match = Uri::match('page\\/(.*?)\\.html$'))) {
         Redirect::to('404page');
     }
     $friendly_url = addslashes($match[1]);
     $loadData = Pages::get(array('cacheTime' => 30, 'where' => "where friendly_url='{$friendly_url}'"));
     if (!isset($loadData[0]['pageid'])) {
         Redirect::to('404page');
     }
     $inputData = $loadData[0];
     $postid = $loadData[0]['pageid'];
     if (Uri::isNull()) {
         System::setTitle(ucfirst($loadData[0]['title']));
     }
     $keywords = isset($loadData[0]['keywords'][4]) ? $loadData[0]['keywords'] : System::getKeywords();
     System::setKeywords($keywords);
     if ($loadData[0]['page_type'] == 'fullwidth') {
         self::makeContent('pageFullWidth', $inputData);
     } else {
         self::makeContent('page', $inputData);
     }
     Cache::savePage();
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:28,代码来源:themePage.php

示例2: index

 public function index()
 {
     Cache::loadPage('', 30);
     $inputData = array();
     $postid = 0;
     $curPage = 0;
     // Model::loadWithPath('home',System::getThemePath().'model/');
     if (!($match = Uri::match('tag\\/(\\w+)\\/?'))) {
         Redirect::to('404page');
     }
     $friendly_url = addslashes($match[1]);
     if ($match = Uri::match('page\\/(\\d+)')) {
         $curPage = (int) $match[1];
     }
     $loadData = Post::get(array('limitShow' => 10, 'limitPage' => $curPage, 'cacheTime' => 30, 'where' => "where postid IN (select postid from post_tags where title='{$friendly_url}')", 'orderby' => "order by postid desc"));
     if (!isset($loadData[0]['postid'])) {
         Redirect::to('404page');
     }
     $inputData['newPost'] = $loadData;
     $inputData['keywords'] = $friendly_url;
     $inputData['listPage'] = Misc::genPage('tag/' . $friendly_url, $curPage);
     System::setTitle('Tag "' . $friendly_url . '" results:');
     self::makeContent('tag', $inputData);
     Cache::savePage();
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:25,代码来源:themeTag.php

示例3: plugin

 public function plugin()
 {
     System::setTitle('Plugin list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('pluginsStore', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:7,代码来源:controlDBStore.php

示例4: index

 public function index()
 {
     Cache::loadPage('', 30);
     $inputData = array();
     $postid = 0;
     Model::loadWithPath('post', System::getThemePath() . 'model/');
     if (!($match = Uri::match('post\\/(.*?)\\.html$'))) {
         Redirect::to('404page');
     }
     $friendly_url = addslashes($match[1]);
     $loadData = Post::get(array('cacheTime' => 30, 'where' => "where friendly_url='{$friendly_url}'"));
     if (!isset($loadData[0]['postid'])) {
         Redirect::to('404page');
     }
     $inputData = $loadData[0];
     if (Request::has('btnComment')) {
         try {
             sendComment($loadData[0]['postid']);
             $inputData['commentAlert'] = '<div class="alert alert-success">Send comment success.</div>';
         } catch (Exception $e) {
             $inputData['commentAlert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     $postid = $loadData[0]['postid'];
     $listTag = PostTags::renderToLink($postid);
     $inputData['listTag'] = $listTag;
     $inputData['listComments'] = Comments::get(array('where' => "where postid='{$postid}' AND status='1'", 'orderby' => "order by postid desc"));
     Post::upView($postid);
     System::setTitle(ucfirst($loadData[0]['title']));
     $keywords = isset($loadData[0]['keywords'][4]) ? $loadData[0]['keywords'] : System::getKeywords();
     System::setKeywords($keywords);
     self::makeContent('post', $inputData);
     Cache::savePage();
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:34,代码来源:themePost.php

示例5: index

 public function index()
 {
     Cache::loadPage('', 30);
     $inputData = array();
     $postid = 0;
     $curPage = 0;
     // Model::loadWithPath('home',System::getThemePath().'model/');
     if ($match = Uri::match('page\\/(\\d+)')) {
         $curPage = (int) $match[1];
     }
     $txtKeywords = addslashes(Request::get('txtKeywords', ''));
     if ($match = Uri::match('\\/keyword\\/(.*?)\\/page')) {
         $txtKeywords = base64_decode($match[1]);
     }
     $loadData = Post::get(array('limitShow' => 10, 'limitPage' => $curPage, 'cacheTime' => 30, 'where' => "where title LIKE '%{$txtKeywords}%'", 'orderby' => "order by postid desc"));
     if (!isset($loadData[0]['postid'])) {
         Redirect::to('404page');
     }
     $inputData['newPost'] = $loadData;
     $inputData['keywords'] = $txtKeywords;
     $inputData['listPage'] = Misc::genPage('search/keyword/' . base64_encode($txtKeywords), $curPage);
     System::setTitle('Search result with keyword "' . $txtKeywords . '" results:');
     self::makeContent('search', $inputData);
     Cache::savePage();
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:25,代码来源:themeSearch.php

示例6: index

 public function index()
 {
     $post = array('alert' => '');
     // Model::load('admincp/setting');
     if ($match = Uri::match('\\/setting\\/(\\w+)')) {
         if (method_exists("controlSetting", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     if (Request::has('btnSave')) {
         System::saveSetting(Request::get('general'));
     }
     $data = array();
     if (!($data = Cache::loadKey('systemSetting', -1))) {
         $data = System::makeSetting();
     } else {
         $data = unserialize($data);
     }
     $post = $data;
     $post['usergroups'] = UserGroups::get();
     System::setTitle('Setting System - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('settingGeneral', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:27,代码来源:controlSetting.php

示例7: index

 public function index()
 {
     Model::load('admincp/dashboard');
     $post = countStats();
     // $headData=array('title'=>'Dashboard - '.ADMINCP_TITLE);
     System::setTitle('Dashboard - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('dashboard', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:10,代码来源:controlDashboard.php

示例8: index

 public function index()
 {
     $post = array('alert' => '');
     // Model::load('admincp/dbstore');
     $post['theList'] = PluginStoreApi::getHtml();
     System::setTitle('Plugin list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('pluginsStore', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:10,代码来源:controlPluginstore.php

示例9: index

 public function index()
 {
     if ($match = Uri::match('\\/jsonCategory')) {
         $keyword = String::encode(Request::get('keyword', ''));
         $loadData = Categories::get(array('where' => "where title LIKE '%{$keyword}%'", 'orderby' => 'order by title asc'));
         $total = count($loadData);
         $li = '';
         for ($i = 0; $i < $total; $i++) {
             $li .= '<li><span data-method="category" data-id="' . $loadData[$i]['catid'] . '" >' . $loadData[$i]['title'] . '</span></li>';
         }
         echo $li;
         die;
     }
     $post = array('alert' => '');
     Model::load('admincp/categories');
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnAdd')) {
         try {
             insertProcess();
             $post['alert'] = '<div class="alert alert-success">Add new category success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSave')) {
         $match = Uri::match('\\/edit\\/(\\d+)');
         try {
             updateProcess($match[1]);
             $post['alert'] = '<div class="alert alert-success">Update category success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/categories', $curPage);
         $post['theList'] = Categories::get(array('limitShow' => 20, 'limitPage' => $curPage, 'orderby' => 'order by catid desc', 'cache' => 'no'));
     }
     if ($match = Uri::match('\\/edit\\/(\\d+)')) {
         $loadData = Categories::get(array('where' => "where catid='" . $match[1] . "'", 'cache' => 'no'));
         $post['edit'] = $loadData[0];
     }
     System::setTitle('Categories list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('categoriesList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:54,代码来源:controlCategories.php

示例10: view

 public function view()
 {
     if (!($match = Uri::match('\\/view\\/(\\d+)'))) {
         Redirect::to(ADMINCP_URL . 'comments/');
     }
     $commentid = $match[1];
     $loadData = Comments::get(array('query' => "select p.title,c.* from " . Database::getPrefix() . "post p," . Database::getPrefix() . "comments c where p.postid=c.postid AND c.commentid='{$commentid}'"));
     $post['edit'] = $loadData[0];
     System::setTitle('View comment - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('commentView', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:13,代码来源:controlComments.php

示例11: view

 public function view()
 {
     if (!($match = Uri::match('\\/view\\/(\\d+)'))) {
         Redirect::to(ADMINCP_URL . 'contacts/');
     }
     $postid = $match[1];
     $post = array('alert' => '');
     $loadData = Contactus::get(array('where' => "where contactid='{$postid}'"));
     $post = $loadData[0];
     System::setTitle('View contact - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('contactView', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:14,代码来源:controlContacts.php

示例12: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/taxrate');
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnAdd')) {
         try {
             insertProcess();
             $post['alert'] = '<div class="alert alert-success">Add new category success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSave')) {
         $match = Uri::match('\\/edit\\/(\\d+)');
         try {
             updateProcess($match[1]);
             $post['alert'] = '<div class="alert alert-success">Update category success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genPage('admincp/taxrate', $curPage);
         $post['theList'] = Taxrates::get(array('limitShow' => 20, 'limitPage' => $curPage, 'orderby' => 'order by taxid desc', 'cacheTime' => 1));
     }
     if ($match = Uri::match('\\/edit\\/(\\d+)')) {
         $loadData = Taxrates::get(array('where' => "where taxid='" . $match[1] . "'"));
         $post['edit'] = $loadData[0];
         if (strlen($loadData[0]['country_short']) > 0) {
             $post['edit']['countries'] = explode(',', $loadData[0]['country_short']);
         }
         // print_r($post['countries']);die();
     }
     $post['listCountries'] = Country::get();
     System::setTitle('Taxrate list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('taxrateList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:48,代码来源:controlTaxrate.php

示例13: addnew

 public function addnew()
 {
     $post = array('alert' => '');
     if (Request::has('btnAdd')) {
         try {
             insertProcess();
             $post['alert'] = '<div class="alert alert-success">Add new page success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     System::setTitle('Add new page - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('pagesAdd', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:16,代码来源:controlPages.php

示例14: index

 public function index()
 {
     // Cache::loadPage(30);
     $inputData = array('alert' => '');
     Model::loadWithPath('contactus', System::getThemePath() . 'model/');
     if (Request::has('btnSend')) {
         try {
             contactProcess();
             $inputData['alert'] = '<div class="alert alert-success">Send contact success.</div>';
         } catch (Exception $e) {
             $inputData['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     System::setTitle('Contact us');
     self::makeContent('contactus', $inputData);
     // Cache::savePage();
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:17,代码来源:themeContactus.php

示例15: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/links');
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnAdd')) {
         try {
             insertProcess();
             $post['alert'] = '<div class="alert alert-success">Add new link success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSave')) {
         $match = Uri::match('\\/edit\\/(\\d+)');
         try {
             updateProcess($match[1]);
             $post['alert'] = '<div class="alert alert-success">Update link success.</div>';
         } catch (Exception $e) {
             $post['alert'] = '<div class="alert alert-warning">' . $e->getMessage() . '</div>';
         }
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/links', $curPage);
         $post['theList'] = Links::get(array('limitShow' => 20, 'limitPage' => $curPage, 'orderby' => 'order by sort_order asc', 'cache' => 'no'));
     }
     if ($match = Uri::match('\\/edit\\/(\\d+)')) {
         $loadData = Links::get(array('where' => "where id='" . $match[1] . "'", 'cache' => 'no'));
         $post['edit'] = $loadData[0];
     }
     $post['listLinks'] = Links::get(array('orderby' => 'order by sort_order asc', 'cache' => 'no'));
     System::setTitle('Links list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('linksList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:44,代码来源:controlLinks.php


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