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


PHP Posts::title方法代碼示例

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


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

示例1:

         default:
             # code...
             //System::inc('posts_form', $data);
             break;
     }
     $id = Typo::int($_GET['id']);
     $data['post'] = Db::result("SELECT * FROM `posts` AS A \n            LEFT JOIN `posts_param` AS B\n            ON A.`id` = B.`post_id` \n            WHERE A.`id` = '{$id}' ");
     Theme::admin('header', $data);
     System::inc('pages_form', $data);
     Theme::admin('footer');
     break;
 default:
     # code...
     if (isset($_GET['act']) && $_GET['act'] == 'del') {
         if (isset($_GET['id'])) {
             $title = Posts::title(Typo::int($_GET['id']));
             if (!isset($_GET['token']) || !Token::isExist($_GET['token'])) {
                 // VALIDATE ALL
                 $alertred[] = TOKEN_NOT_EXIST;
             }
             if (isset($alertred)) {
                 $data['alertred'] = $alertred;
             } else {
                 $del = Posts::delete($_GET['id']);
             }
             //echo $title['error'];
             if (isset($del['error'])) {
                 $data['alertred'][] = $del['error'];
             } else {
                 $data['alertgreen'][] = PAGE . " {$title} " . MSG_PAGE_REMOVED;
             }
開發者ID:vdanelia,項目名稱:GeniXCMS,代碼行數:31,代碼來源:pages.control.php

示例2:

     System::inc('posts_form', $data);
     Theme::admin('footer');
     break;
 default:
     # code...
     if (isset($_GET['act']) && $_GET['act'] == 'del') {
         if (isset($_GET['id'])) {
             if (!isset($_GET['token']) || !Token::isExist($_GET['token'])) {
                 // VALIDATE ALL
                 $alertred[] = TOKEN_NOT_EXIST;
             }
             if (isset($alertred)) {
                 # code...
                 $data['alertred'] = $alertred;
             } else {
                 $title = Posts::title($_GET['id']);
                 $del = Posts::delete($_GET['id']);
                 //echo $title['error'];
                 if (isset($del['error'])) {
                     $data['alertred'][] = $del['error'];
                 } else {
                     $data['alertgreen'][] = POST . " {$title} " . MSG_PAGE_REMOVED;
                     Hooks::run('post_delete_action', $_GET);
                 }
             }
             if (isset($_GET['token'])) {
                 Token::remove($_GET['token']);
             }
         } else {
             $data['alertred'][] = MSG_USER_NO_ID_SELECTED;
         }
開發者ID:vdanelia,項目名稱:GeniXCMS,代碼行數:31,代碼來源:posts.control.php


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