예제 #1
0
 function domanage()
 {
     member::MP("menu_plugin_manage");
     $plugins = $this->iCMS->getCache('system/plugins');
     $rs = plugin::doList();
     include admincp::tpl();
 }
예제 #2
0
 function dofpower()
 {
     $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__members` WHERE `uid`='" . intval($_GET['uid']) . "'");
     $forum = new forum();
     $forum->allArray();
     include admincp::tpl("account.fpower");
 }
예제 #3
0
 function doDefault()
 {
     //数据统计
     $rs = iCMS_DB::getArray("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE table_type = 'BASE TABLE';");
     foreach ($rs as $k => $val) {
         if (strstr(DB_PREFIX, $val['Tables_in_' . DB_NAME]) === false) {
             $iCMSTable[] = $val['Tables_in_' . DB_NAME];
         } else {
             $oTable[] = $val['Tables_in_' . DB_NAME];
         }
     }
     $content_datasize = 0;
     $tables = iCMS_DB::getArray("SHOW TABLE STATUS");
     $_count = count($tables);
     $tableStr = strtoupper(implode(",", $iCMSTable));
     for ($i = 0; $i < $_count; $i++) {
         $tableName = strtoupper($tables[$i]['Name']);
         if (stristr($tableStr, $tableName)) {
             $datasize += $tables[$i]['Data_length'];
             $indexsize += $tables[$i]['Index_length'];
             if (stristr(strtoupper(DB_PREFIX . "article," . DB_PREFIX . "forum," . DB_PREFIX . "comment," . DB_PREFIX . "article_data"), $tableName)) {
                 $content_datasize += $tables[$i]['Data_length'] + $tables[$i]['Index_length'];
             }
         }
     }
     $c = iCMS_DB::getValue("SELECT count(*) FROM #iCMS@__forum");
     $a = iCMS_DB::getValue("SELECT count(*) FROM #iCMS@__article");
     file_exists(iPATH . 'license.php') && ($license = (include iPATH . 'license.php'));
     include admincp::tpl("home");
 }
예제 #4
0
 function dofpower()
 {
     include_once iPATH . 'include/forum.class.php';
     $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__admin` WHERE `uid`='" . intval($_GET['uid']) . "'");
     $forum = new forum();
     $forum->allArray();
     include admincp::tpl("account.fpower");
 }
예제 #5
0
 function doDefault()
 {
     $_configRs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__config`");
     foreach ($_configRs as $_C) {
         $configRs[$_C['name']] = $_C['value'];
     }
     include admincp::tpl("setting");
 }
예제 #6
0
 function doedit()
 {
     $path = trim($_GET["path"]);
     $FileData = FS::read(iPATH . "templates" . $path);
     $strpos = strpos(__REF__, '?');
     $REFERER = $strpos === false ? '' : substr(__REF__, $strpos);
     include admincp::tpl();
 }
예제 #7
0
 function dofpower()
 {
     $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__group` WHERE `gid`='" . intval($_GET['groupid']) . "'");
     admincp::head();
     $forum = new forum();
     $forum->allArray();
     include admincp::tpl();
 }
예제 #8
0
 function doDefault()
 {
     member::MP("menu_filter");
     $cache = $this->iCMS->getCache(array('system/word.filter', 'system/word.disable'));
     foreach ((array) $cache['system/word.filter'] as $k => $val) {
         $filterArray[$k] = implode("=", (array) $val);
     }
     include admincp::tpl('filter');
 }
예제 #9
0
 function dodefault()
 {
     member::MP("menu_search");
     $maxperpage = 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__search`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个关键字");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__search` order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('search');
 }
예제 #10
0
 function dodefault()
 {
     member::MP(array("menu_index_advertise", "menu_advertise"));
     $maxperpage = 30;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__advertise`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个广告");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__advertise` order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl("advertise");
 }
예제 #11
0
 function dodefault()
 {
     Admin::MP(array("menu_index_link", "menu_link"));
     $maxperpage = 60;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__links`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, '个链接');
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__links` ORDER BY `logo`, `orderNum` ASC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('link');
 }
예제 #12
0
 function dodefault()
 {
     member::MP("menu_keywords");
     $_GET['keywords'] && ($sql[] = " `keyword` REGEXP '{$_GET['keywords']}'");
     $_GET['replace'] && ($sql[] = " `replace` REGEXP '{$_GET['replace']}'");
     isset($_GET['status']) && $_GET['status'] != '-1' && ($sql[] = " `status`='" . $_GET['status'] . "'");
     $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : '';
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__keywords` {$where}") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个关键字");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__keywords` {$where} order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('keywords');
 }
예제 #13
0
 function doinstall($download = false)
 {
     $a = patch::init(isset($_GET['force']) ? true : false);
     if (empty($a)) {
         echo "iCMS版本目前是最新版本:iCMS " . iCMS_VER . " [" . iCMS_RELEASE . "]";
         return;
     }
     $msg = '';
     if ($download) {
         $msg .= patch::download($a[1]);
     }
     //下载
     $msg .= patch::update($a[1]);
     //更新
     if ($a[2]) {
         $msg .= patch::run($a[2]);
     }
     //执行升级程序
     include admincp::tpl("ipatch");
 }
예제 #14
0
 function doextract()
 {
     include iPATH . 'include/forum.class.php';
     $forum = new forum();
     include admincp::tpl();
 }
예제 #15
0
 function doAddfield()
 {
     $mid = (int) $_GET['id'];
     $fid = (int) $_GET['fid'];
     if ($fid) {
         $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__field` where `id`='{$fid}'", ARRAY_A);
         $rs['option'] = unserialize($rs['option']);
     } else {
         $rs['show'] = 0;
     }
     include admincp::tpl();
 }
예제 #16
0
 function doedit()
 {
     $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__members` WHERE `uid`='" . (int) $_GET['userid'] . "'");
     $rs->info = unserialize($rs->info);
     include admincp::tpl('user.add');
 }
예제 #17
0
 function doDefault()
 {
     Admin::MP("menu_defaults");
     $defArray = $this->iCMS->getCache('system/default');
     include admincp::tpl('default');
 }
예제 #18
0
 function doDefault()
 {
     Admin::MP("menu_forums_manage");
     $forum = new forum();
     $do && set_cookie('selectopt', $do);
     $do = get_cookie('selectopt');
     empty($do) && ($do = 'fold');
     include admincp::tpl("forums.manage");
 }
예제 #19
0
 function doPage()
 {
     Admin::MP(array("menu_html_all", "menu_html_page"));
     $forum = new forum();
     include admincp::tpl();
 }
예제 #20
0
<?php

/**
 * @package iCMS
 * @copyright 2007-2010, iDreamSoft
 * @license http://www.idreamsoft.com iDreamSoft
 * @author coolmoo <*****@*****.**>
 */
!defined('iPATH') && exit('What are you doing?');
admincp::head($this->module != 'dialog');
?>
<style type="text/css">
#explorer {width:<?php 
echo $this->module == 'dialog' ? '740px' : '100%';
?>
; border-collapse:collapse; word-break:break-all; border:solid 1px #ECE9D8; border-bottom:solid 1px #959385; background-color:#ECE9D8; font:12px Verdana, Arial, Helvetica, sans-serif; color: #333;}
#explorer #m { background-color:#ECE9D8; width:5px; }
#explorer #tddir { background-color: #FFF; width:220px !important; height:350px; border-right:solid 1px #7F9DB9; border-top:solid 1px #ACA899; }
#explorer #tdfile { background-color: #FFF; width:<?php 
echo $this->module == 'dialog' ? '600px' : 'auto';
?>
; border-left:solid 1px #7F9DB9; border-top:solid 1px #7F9DB9; }
.dirlist { width:220px; height:350px; overflow-x:auto; overflow-y:scroll; clear: both; list-style:none; margin: 0px; display: block; padding: 0px 0px 0px 4px; }
.dirlist li { clear: both; height: 16px; margin-top: 1px; text-align: left; }
.dirlist li span { margin-left:36px; display: block; cursor:pointer;}
.dirlist ul { clear: both; list-style:none; margin: 0px; display: block; padding: 0px 0px 0px 16px; }
/*缩略图*/
#filelist { width:100%; height:375px; overflow-y:scroll; clear: both; list-style:none; margin: 0px 0px; padding: 0px; display: block; margin-top: 4px; }
#filelist li { float:left; width:96px; height:96px; border:solid 1px #ECE9D8; margin-left:8px; }
/*缩略图 end*/
#fList {clear:both;width:100%;margin: 0px; padding: 0px;height:350px;overflow-y: scroll; overflow-x: visible; }
예제 #21
0
 function domanage()
 {
     Admin::MP("menu_tag_manage");
     $forum = new forum();
     $_GET['sortid'] && ($sql[] = " `sortid` = '{$_GET['sortid']}'");
     $_GET['type'] && ($sql[] = " `sortid` = '{$_GET['type']}'");
     $_GET['keywords'] && ($sql[] = " `name` REGEXP '{$_GET['keywords']}'");
     isset($_GET['status']) && $_GET['status'] != '-1' && ($sql[] = " `status`='" . $_GET['status'] . "'");
     $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : '';
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__tags` {$where}") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个TAG");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__tags` {$where} order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl("tag.manage");
 }
예제 #22
0
 function doDefault()
 {
     Admin::MP(array("menu_index_comment", "menu_comment"));
     include_once iPATH . 'include/model.class.php';
     if ($_GET['st'] == "title") {
         $_GET['keywords'] && ($sql[] = " `title` REGEXP '{$_GET['keywords']}'");
     } else {
         if ($_GET['st'] == "contents") {
             $_GET['keywords'] && ($sql[] = " `contents` REGEXP '{$_GET['keywords']}'");
         }
     }
     $_GET['starttime'] && ($sql[] = " `addtime`>='" . strtotime($_GET['starttime']) . "'");
     $_GET['endtime'] && ($sql[] = " `addtime`<='" . strtotime($_GET['endtime']) . "'");
     $_GET['mid'] && ($sql[] = " `mid`='" . strtotime($_GET['mid']) . "'");
     isset($_GET['status']) && $_GET['status'] != '-1' && ($sql[] = " `status`='" . $_GET['status'] . "'");
     $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : '';
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__comment` {$where}") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "条评论");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__comment` {$where} order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('comment');
 }
예제 #23
0
 function doManage()
 {
     $mtime = microtime();
     $mtime = explode(' ', $mtime);
     $time_start = $mtime[1] + $mtime[0];
     Admin::MP(array("menu_article_manage", "menu_article_draft", "menu_article_user_manage", "menu_article_user_draft"));
     $forum = new forum();
     $fid = (int) $_GET['fid'];
     $type = $_GET['type'];
     $sql = " where ";
     switch ($type) {
         //postype: [0:用户][1:管理员][2:回收] status:[0:隐藏][1:正常]
         case 'draft':
             //草稿
             $sql .= "`status` ='0' AND `postype`='1'";
             $_ptxt = array(0 => '发布', 1 => '转成草稿');
             $position = UI::lang("menu_article_draft");
             break;
         case 'trash':
             //回收站
             $sql .= "`status` ='0' AND `postype`='2'";
             $_ptxt = array(0 => '还原', 1 => '放入回收站');
             $position = UI::lang("menu_article_trash");
             break;
         case 'user':
             //用户
             if ($_GET['act'] == "draft") {
                 $sql .= "`status` ='0'";
                 //用户审核
                 $position = UI::lang("menu_article_user_draft");
             } else {
                 $sql .= "`status` ='1'";
                 $position = UI::lang("menu_article_user_manage");
             }
             $sql .= " AND `postype`='0'";
             $_ptxt = array(0 => '通过审核', 1 => '取消审核');
             break;
         default:
             $sql .= " `status` ='1' AND `postype`='1'";
             $position = '';
             $fid && ($position = $forum->forum[$fid]['name']);
     }
     $position && ($position = "&nbsp;&raquo;&nbsp;" . $position);
     if ($_GET['keywords']) {
         if ($_GET['st'] == "title") {
             $sql .= " AND `title` REGEXP '{$_GET['keywords']}'";
         } else {
             if ($_GET['st'] == "top") {
                 $sql .= " AND `top`='{$_GET['keywords']}'";
             } else {
                 if ($_GET['st'] == "id") {
                     $sql .= " AND `id` REGEXP '{$_GET['keywords']}'";
                 } else {
                     if ($_GET['st'] == "tkd") {
                         $sql .= " AND CONCAT(title,keywords,description) REGEXP '{$_GET['keywords']}'";
                     }
                 }
             }
         }
     }
     $_GET['title'] && ($sql .= " AND `title` like '%{$_GET['title']}%'");
     $_GET['tag'] && ($sql .= " AND `tags` REGEXP '[[:<:]]" . preg_quote(rawurldecode($_GET['tag']), '/') . "[[:>:]]'");
     isset($_GET['at']) && $_GET['at'] != '-1' && ($sql .= " AND `type` ='" . $_GET['at'] . "'");
     isset($_GET['userid']) && ($sql .= " AND `userid`='" . (int) $_GET['userid'] . "'");
     $fid = Admin::CP($fid) ? $fid : "0";
     if ($fid) {
         $fidIN = $forum->fid($fid) . $fid;
         if (isset($_GET['sub']) && strstr($fidIN, ',')) {
             $sql .= " AND fid IN(" . $fidIN . ")";
         } else {
             $sql .= " AND fid ='{$fid}'";
         }
         //$sql.=" OR `vlink` REGEXP '[[:<:]]".preg_quote($fid, '/')."[[:>:]]')";
     } else {
         Admin::$cpower && ($sql .= " AND fid IN(" . implode(',', (array) Admin::$cpower) . ")");
     }
     isset($_GET['nopic']) && ($sql .= " AND `isPic` ='0'");
     $_GET['starttime'] && ($sql .= " and `pubdate`>='" . strtotime($_GET['starttime']) . "'");
     $_GET['endtime'] && ($sql .= " and `pubdate`<='" . strtotime($_GET['endtime']) . "'");
     $act == 'user' && ($uri .= '&act=user');
     $_GET['type'] == 'draft' && ($uri .= '&type=draft');
     isset($_GET['userid']) && ($uri .= '&userid=' . (int) $_GET['userid']);
     isset($_GET['keyword']) && ($uri .= '&keyword=' . $_GET['keyword']);
     isset($_GET['tag']) && ($uri .= '&tag=' . $_GET['tag']);
     $orderby = $_GET['orderby'] ? $_GET['orderby'] : "id DESC";
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__article` {$sql}") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "篇文章");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__article` {$sql} order by {$orderby} LIMIT {$this->firstcount} , {$maxperpage}");
     //echo iCMS_DB::$last_query;
     //iCMS_DB::last_query='explain '.iCMS_DB::$last_query;
     //$explain=iCMS_DB::getRow(iCMS_DB::last_query);
     //var_dump($explain);
     $_count = count($rs);
     include admincp::tpl("article.manage");
     //		$mtime = microtime();
     //		$mtime = explode(' ', $mtime);
     //		$time_end = $mtime[1] + $mtime[0];
     //		echo  "<h1>".($time_end - $time_start);
 }
예제 #24
0
 function doarticle()
 {
     $forum = new forum();
     $callback = $_GET['callback'];
     $fid = (int) $_GET['fid'];
     $sql = " where ";
     $sql .= $_GET['type'] == 'draft' ? "`status` ='0'" : "`status` ='1'";
     $sql .= $act == 'user' ? " AND `postype`='0'" : " AND `postype`='1'";
     $_GET['keywords'] && ($sql .= " AND CONCAT(title,keywords,description) REGEXP '{$_GET['keywords']}'");
     $fid = member::CP($fid) ? $fid : "0";
     if ($fid) {
         if (isset($_GET['sub'])) {
             $sql .= " AND ( fid IN(" . $forum->fid($fid) . $fid . ")";
         } else {
             $sql .= " AND ( fid ='{$fid}'";
         }
         $sql .= " OR `vlink` REGEXP '[[:<:]]" . preg_quote($fid, '/') . "[[:>:]]')";
     } else {
         member::$cpower && ($sql .= " AND fid IN(" . implode(',', member::$cpower) . ")");
     }
     isset($_GET['keyword']) && ($uri .= '&keyword=' . $_GET['keyword']);
     $maxperpage = 8;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__article` {$sql}") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "篇文章");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__article`{$sql} order by id DESC LIMIT {$this->firstcount} , {$maxperpage}");
     $_count = count($rs);
     include admincp::tpl();
 }
예제 #25
0
 function doadd()
 {
     include iPATH . 'include/from.fun.php';
     $mid = $_GET['mid'];
     $table = model::tbn($_GET['table']);
     $model = model::data($mid);
     $fArray = explode(',', $model['field']);
     $_count = count($fArray);
     $rs = array();
     $id = $_GET['id'];
     $id && ($rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__{$table}` where `id`='{$id}'", ARRAY_A));
     $rs['mName'] = $_GET['table'];
     $rs['mid'] = $mid;
     $rs['fid'] = empty($rs['fid']) ? intval($_GET['fid']) : $rs['fid'];
     $rs['pubdate'] = empty($id) ? get_date('', "Y-m-d H:i:s") : get_date($rs['pubdate'], 'Y-m-d H:i:s');
     empty($rs['editor']) && ($rs['editor'] = empty(member::$Rs->name) ? member::$Rs->username : member::$Rs->name);
     empty($rs['userid']) && ($rs['userid'] = member::$uId);
     $rs['orderNum'] = _int($rs['orderNum']);
     $rs['top'] = _int($rs['top']);
     $formArray = FormArray($mid, $fArray, $rs);
     $strpos = strpos(__REF__, '?');
     $REFERER = $strpos === false ? '' : substr(__REF__, $strpos);
     include admincp::tpl();
 }
예제 #26
0
 function doDefault()
 {
     member::MP("menu_cache");
     include admincp::tpl("cache");
 }
예제 #27
0
 function doRecover()
 {
     Admin::MP("menu_database_recover");
     //        include(iPATH.'admin/table.array.php');
     $filedb = array();
     $handle = opendir(iPATH . 'admin/backup');
     while ($file = readdir($handle)) {
         if (eregi("^iCMS_", $file) && eregi("\\.sql\$", $file)) {
             $strlen = eregi("^iCMS_", $file) ? 16 + strlen("iCMS_") : 19;
             $fp = fopen(iPATH . "admin/backup/{$file}", 'rb');
             $bakinfo = fread($fp, 200);
             fclose($fp);
             $detail = explode("\n", $bakinfo);
             $bk['name'] = $file;
             $bk['version'] = substr($detail[1], 10);
             $bk['time'] = substr($detail[2], 8);
             $bk['pre'] = substr($file, 0, $strlen);
             $bk['num'] = substr($file, $strlen, strrpos($file, '.') - $strlen);
             $filedb[] = $bk;
         }
     }
     include admincp::tpl();
 }
예제 #28
0
 function doDefault()
 {
     $this->init();
     Admin::MP("menu_contentype");
     include admincp::tpl('contentype');
 }
예제 #29
0
<?php

/**
 * @package iCMS
 * @copyright 2007-2010, iDreamSoft
 * @license http://www.idreamsoft.com iDreamSoft
 * @author coolmoo <*****@*****.**>
 */
!defined('iPATH') && exit('What are you doing?');
admincp::head();
?>
<div class="position">当前位置:管理中心&nbsp;&raquo;&nbsp;管理员管理&nbsp;&raquo;&nbsp;设置[<?php 
echo $rs->username;
?>
]栏目管理权限</div>
  <form action="<?php 
echo __ADMINCP__;
?>
=account" method="post" target="iCMS_FRAME">
    <input type="hidden" name="do" value="setfpower" />
    <input type="hidden" name="uid" value="<?php 
echo $rs->uid;
?>
" />
    <table class="adminlist"><thead>
      <tr>
        <th>设置栏目管理权限</th>
      </tr></thead>
      <tr>
        <td class="rowform" style="width:auto;"><dl>
    		<?php 
예제 #30
0
 function doAddfield()
 {
     $id = (int) $_GET['id'];
     include admincp::tpl();
 }