本文整理汇总了PHP中iACP::app方法的典型用法代码示例。如果您正苦于以下问题:PHP iACP::app方法的具体用法?PHP iACP::app怎么用?PHP iACP::app使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iACP
的用法示例。
在下文中一共展示了iACP::app方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$this->appid = iCMS_APP_TAG;
$this->id = (int) $_GET['id'];
$this->tagcategory = iACP::app('tagcategory');
$this->categoryApp = iACP::app('category', 'all');
}
示例2: do_iCMS
function do_iCMS($appid = 0)
{
iPHP::import(iPHP_APP_CORE . '/iAPP.class.php');
$this->categoryApp = iACP::app('category', 'all');
$this->category = $this->categoryApp->category;
$sql = "WHERE 1=1";
if ($appid || $_GET['appid']) {
$_GET['appid'] && ($appid = (int) $_GET['appid']);
$sql .= " AND `appid`='{$appid}'";
}
$_GET['iid'] && ($sql .= " AND `iid`='" . (int) $_GET['iid'] . "'");
isset($_GET['status']) && ($sql .= " AND `status`='" . $_GET['status'] . "'");
if ($_GET['cid']) {
$cid = (int) $_GET['cid'];
if (isset($_GET['sub'])) {
$cids = $this->categoryApp->get_ids($cid, true);
array_push($cids, $cid);
$sql .= " AND cid IN(" . implode(',', $cids) . ")";
} else {
$sql .= " AND cid ='{$cid}'";
}
}
$_GET['userid'] && ($sql .= " AND `userid`='" . (int) $_GET['userid'] . "'");
$_GET['ip'] && ($sql .= " AND `ip`='" . $_GET['ip'] . "'");
if ($_GET['keywords']) {
$sql .= " AND CONCAT(username,title) REGEXP '{$_GET['keywords']}'";
}
$maxperpage = $_GET['perpage'] > 0 ? (int) $_GET['perpage'] : 20;
$total = iPHP::total(false, "SELECT count(*) FROM `#iCMS@__comment` {$sql}", "G");
iPHP::pagenav($total, $maxperpage, "条评论");
$rs = iDB::all("SELECT * FROM `#iCMS@__comment` {$sql} order by id DESC LIMIT " . iPHP::$offset . " , {$maxperpage}");
$_count = count($rs);
include iACP::view("comment.manage");
}
示例3: do_article
function do_article()
{
$this->categoryApp = iACP::app('category', iCMS_APP_ARTICLE);
include iACP::view("html.article");
}
示例4: __construct
function __construct()
{
$this->uid = (int) $_GET['id'];
$this->groupApp = iACP::app('groups', 1);
}
示例5: do_addproject
function do_addproject()
{
$rs = array();
$this->pid && ($rs = spider::project($this->pid));
$cid = empty($rs['cid']) ? $this->cid : $rs['cid'];
$categoryApp = iACP::app('category', iCMS_APP_ARTICLE);
$cata_option = $categoryApp->select(false, $cid);
$rule_option = $this->rule_opt($rs['rid']);
$post_option = $this->post_opt($rs['poid']);
//$rs['sleep'] OR $rs['sleep'] = 30;
include iACP::view("spider.addproject");
}
示例6: files_modal_btn
public static function files_modal_btn($title = '', $click = 'file', $target = 'template_index', $callback = '', $do = 'seltpl', $from = 'modal')
{
$filesApp = iACP::app('files');
$filesApp->modal_btn($title, $click, $target, $callback, $do, $from);
}
示例7: defined
<?php
/**
* iCMS - i Content Management System
* Copyright (c) 2007-2012 idreamsoft.com iiimon Inc. All rights reserved.
*
* @author coolmoo <idreamsoft@qq.com>
* @site http://www.idreamsoft.com
* @licence http://www.idreamsoft.com/license.php
* @version 6.0.0
* @$Id: pushcategory.app.php 2374 2014-03-17 11:46:13Z coolmoo $
*/
defined('iPHP') or exit('What are you doing?');
iACP::app('category', 'import');
class pushcategoryApp extends categoryApp
{
function __construct()
{
parent::__construct(iCMS_APP_PUSH);
$this->category_name = "版块";
$this->_app = 'push';
$this->_app_name = '推送';
$this->_app_table = 'push';
$this->_app_cid = 'cid';
// $this->_app_indexTPL = '';
// $this->_app_listTPL = '';
// $this->_app_contentTPL = '';
}
}
示例8: __construct
function __construct()
{
$this->id = (int) $_GET['id'];
$this->categoryApp = iACP::app('pushcategory');
$this->category = $this->categoryApp->category;
}
示例9: __construct
function __construct()
{
$this->categoryApp = iACP::app('category', 'all');
$this->category = $this->categoryApp->category;
$this->pid = (int) $_GET['pid'];
}
示例10:
</ul>
</div>
<div id="<?php
echo iACP::$app_name;
?>
-cpower" class="tab-pane hide">
<div class="input-prepend input-append"><span class="add-on">全选</span><span class="add-on">
<input type="checkbox" class="checkAll checkbox" data-target="#<?php
echo iACP::$app_name;
?>
-cpower"/>
</span><button class="btn btn-primary" type="submit"><i class="fa fa-check"></i> 提交</button>
</div>
<div class="clearfloat mb10"></div>
<div class="input-prepend input-append">
<span class="add-on"><i class="fa fa-cog"></i> 全局权限</span>
<span class="add-on">::</span>
<span class="add-on">允许添加顶级栏目</span>
<span class="add-on"><input type="checkbox" name="cpower[]" value="0:a" /></span>
</div>
<div class="clearfloat mb10"></div>
<span class="label label-important">注:只有文章类型的栏目才有内容权限</span>
<div id="cpower_treecontrol"> <a style="display:none;"></a> <a style="display:none;"></a> <a class="btn btn-mini btn-info" href="javascript:;">展开/收缩</a></div>
<ul id="cpower_tree">
<?php
echo iACP::app('category', 'all')->power_tree();
?>
</ul>
</div>
示例11: __construct
function __construct()
{
$this->setting = iACP::app('setting');
}
示例12: publish
public static function publish($work = null)
{
$_POST = spiderData::crawl();
if (spider::$work == 'shell') {
if (empty($_POST['title'])) {
echo "标题不能为空\n";
return false;
}
if (empty($_POST['body'])) {
echo "内容不能为空\n";
return false;
}
}
$checker = spider::checker($work, spider::$pid, $_POST['reurl'], $_POST['title']);
if ($checker !== true) {
return $checker;
}
$project = spider::project(spider::$pid);
if (!isset($_POST['cid'])) {
$_POST['cid'] = $project['cid'];
}
$postArgs = spider::postArgs($project['poid']);
if ($_GET['indexid']) {
$aid = (int) $_GET['indexid'];
$_POST['aid'] = $aid;
$_POST['adid'] = iDB::value("SELECT `id` FROM `#iCMS@__article_data` WHERE aid='{$aid}'");
}
$title = iS::escapeStr($_POST['title']);
$url = iS::escapeStr($_POST['reurl']);
$hash = md5($url);
if (empty(spider::$sid)) {
$spider_url = iDB::row("SELECT `id`,`publish`,`indexid` FROM `#iCMS@__spider_url` where `url`='{$url}'", ARRAY_A);
if (empty($spider_url)) {
$spider_url_data = array('cid' => $project['cid'], 'rid' => spider::$rid, 'pid' => spider::$pid, 'title' => addslashes($title), 'url' => $url, 'hash' => $hash, 'status' => '1', 'addtime' => time(), 'publish' => '0', 'indexid' => '0', 'pubdate' => '');
$suid = iDB::insert('spider_url', $spider_url_data);
} else {
if ($spider_url['indexid']) {
$_POST['aid'] = $spider_url['indexid'];
$_POST['adid'] = iDB::value("SELECT `id` FROM `#iCMS@__article_data` WHERE aid='" . $spider_url['indexid'] . "'");
}
$suid = $spider_url['id'];
}
} else {
$suid = spider::$sid;
}
if (spider::$callback['post'] && is_callable(spider::$callback['post'])) {
$_POST = call_user_func_array(spider::$callback['post'], array($_POST));
}
iS::slashes($_POST);
$app = iACP::app($postArgs->app);
$fun = $postArgs->fun;
$app->callback['code'] = '1001';
/**
* 主表 回调 更新关联ID
*/
$app->callback['primary'] = array(array('spider', 'update_spider_url_indexid'), array('suid' => $suid));
/**
* 数据表 回调 成功发布
*/
$app->callback['data'] = array(array('spider', 'update_spider_url_publish'), array('suid' => $suid));
$callback = $app->{$fun}();
if ($callback['code'] == $app->callback['code']) {
if (spider::$sid) {
$work === NULL && iPHP::success("发布成功!", 'js:1');
} else {
$work === NULL && iPHP::success("发布成功!", 'js:parent.$("#' . $hash . '").remove();');
}
}
if ($work == "shell" || $work == "WEB@AUTO") {
$callback['work'] = $work;
return $callback;
}
}
示例13: do_artCount
function do_artCount($dialog = true)
{
$app = iACP::app('category');
$app->recount();
$dialog && iPHP::success('更新完成');
}
示例14: __construct
function __construct()
{
$this->appid = iCMS_APP_USER;
$this->uid = (int) $_GET['id'];
$this->groupApp = iACP::app('groups', 0);
}