本文整理汇总了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}();
}
}
示例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");
}
示例3:
function do_iCMS()
{
iACP::$app_do = "manage";
$this->do_manage();
}