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


PHP iACP::app_do方法代碼示例

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


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

示例1: run

 public static function run($args = NULL, $prefix = "do_")
 {
     self::init();
     $app = $_GET['app'];
     $app or $app = 'home';
     //in_array($app, self::$apps) OR iPHP::throwException('運行出錯!找不到應用程序:' . $app, 1001);
     $do or $do = $_GET['do'] ? (string) $_GET['do'] : 'iCMS';
     if ($_POST['action']) {
         $do = $_POST['action'];
         $prefix = 'ACTION_';
     }
     self::$app_name = $app;
     self::$app_do = $do;
     self::$app_method = $prefix . $do;
     self::$app_path = ACP_PATH;
     self::$app_tpl = ACP_PATH . '/template';
     self::$app_file = ACP_PATH . '/' . $app . '.app.php';
     define('APP_URI', __ADMINCP__ . '=' . $app);
     define('APP_FURI', APP_URI . '&frame=iPHP');
     define('APP_DOURI', APP_URI . ($do != 'iCMS' ? '&do=' . $do : ''));
     define('APP_BOXID', self::$app_name . '-box');
     define('APP_FORMID', 'iCMS-' . APP_BOXID);
     is_file(self::$app_file) or iPHP::throwException('運行出錯!找不到文件: <b>' . self::$app_name . '.app.php</b>', 1002);
     iPHP::import(self::$app_file);
     $appName = self::$app_name . 'App';
     self::$app = new $appName();
     $app_methods = get_class_methods($appName);
     in_array(self::$app_method, $app_methods) or iPHP::throwException('運行出錯! <b>' . self::$app_name . '</b> 類中找不到方法定義: <b>' . self::$app_method . '</b>', 1003);
     $method = self::$app_method;
     $args === null && ($args = self::$app_args);
     if ($args) {
         if ($args === 'object') {
             return self::$app;
         }
         return self::$app->{$method}($args);
     } else {
         return self::$app->{$method}();
     }
 }
開發者ID:World3D,項目名稱:iCMS,代碼行數:39,代碼來源:iACP.class.php

示例2: CONCAT

 function do_list()
 {
     iACP::$app_do = 'list';
     $sql = " where `appid`='{$this->appid}'";
     $cids = iACP::CP('__CID__');
     $sql .= iPHP::where($cids, 'cid');
     if ($_GET['keywords']) {
         if ($_GET['st'] == "name") {
             $sql .= " AND `name` REGEXP '{$_GET['keywords']}'";
         } else {
             if ($_GET['st'] == "cid") {
                 $sql .= " AND `cid` REGEXP '{$_GET['keywords']}'";
             } else {
                 if ($_GET['st'] == "tkd") {
                     $sql .= " AND CONCAT(name,title,keywords,description) REGEXP '{$_GET['keywords']}'";
                 }
             }
         }
     }
     if (isset($_GET['rootid']) && $_GET['rootid'] != '-1') {
         $sql .= " AND `rootid`='{$_GET['rootid']}'";
     }
     $orderby = $_GET['orderby'] ? $_GET['orderby'] : "cid DESC";
     $maxperpage = $_GET['perpage'] > 0 ? (int) $_GET['perpage'] : 20;
     $total = iPHP::total(false, "SELECT count(*) FROM `#iCMS@__category` {$sql}", "G");
     iPHP::pagenav($total, $maxperpage);
     $rs = iDB::all("SELECT * FROM `#iCMS@__category` {$sql} order by {$orderby} LIMIT " . iPHP::$offset . " , {$maxperpage}");
     $_count = count($rs);
     include iACP::view("category.manage");
 }
開發者ID:World3D,項目名稱:iCMS,代碼行數:30,代碼來源:category.app.php

示例3:

 function do_iCMS()
 {
     iACP::$app_do = "manage";
     $this->do_manage();
 }
開發者ID:World3D,項目名稱:iCMS,代碼行數:5,代碼來源:article.app.php


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