Example #1
0
 function __construct()
 {
     $this->appid = iCMS_APP_TAG;
     $this->id = (int) $_GET['id'];
     $this->tagcategory = iACP::app('tagcategory');
     $this->categoryApp = iACP::app('category', 'all');
 }
Example #2
0
 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");
 }
Example #3
0
 function do_article()
 {
     $this->categoryApp = iACP::app('category', iCMS_APP_ARTICLE);
     include iACP::view("html.article");
 }
Example #4
0
 function __construct()
 {
     $this->uid = (int) $_GET['id'];
     $this->groupApp = iACP::app('groups', 1);
 }
Example #5
0
 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");
 }
Example #6
0
 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);
 }
Example #7
0
<?php

/**
* iCMS - i Content Management System
* Copyright (c) 2007-2012 idreamsoft.com iiimon Inc. All rights reserved.
*
* @author coolmoo <*****@*****.**>
* @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 = '';
    }
}
Example #8
0
 function __construct()
 {
     $this->id = (int) $_GET['id'];
     $this->categoryApp = iACP::app('pushcategory');
     $this->category = $this->categoryApp->category;
 }
Example #9
0
 function __construct()
 {
     $this->categoryApp = iACP::app('category', 'all');
     $this->category = $this->categoryApp->category;
     $this->pid = (int) $_GET['pid'];
 }
Example #10
0
  </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>

Example #11
0
 function __construct()
 {
     $this->setting = iACP::app('setting');
 }
Example #12
0
 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;
     }
 }
Example #13
0
 function do_artCount($dialog = true)
 {
     $app = iACP::app('category');
     $app->recount();
     $dialog && iPHP::success('更新完成');
 }
Example #14
0
 function __construct()
 {
     $this->appid = iCMS_APP_USER;
     $this->uid = (int) $_GET['id'];
     $this->groupApp = iACP::app('groups', 0);
 }