function domanage() { member::MP("menu_template_manage"); $dir = trim($_GET["dir"]); $L = FS::folder($dir, "templates", ""); include admincp::tpl(); }
function domanage() { member::MP("menu_plugin_manage"); $plugins = $this->iCMS->getCache('system/plugins'); $rs = plugin::doList(); include admincp::tpl(); }
function domanage() { member::MP("menu_models_manage"); $rs = model::data(); $_count = count($rs); include admincp::tpl(); }
function domanage() { member::MP("menu_group_manage"); include iPATH . 'include/group.class.php'; $group = new group(); $type = $_GET['type']; include admincp::tpl(); }
function doedit() { member::MP("menu_account_edit"); include iPATH . 'include/group.class.php'; $group = new group('a'); $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__members` WHERE `uid`='" . intval($_GET['uid']) . "'"); $info = unserialize($rs->info); include admincp::tpl("account.edit"); }
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'); }
function domanage() { member::MP("menu_user_manage"); $maxperpage = 20; $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__members`") : (int) $_GET['rowNum']; page($total, $maxperpage, "位会员"); $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__members` where `type`='0' order by uid DESC LIMIT {$this->firstcount},{$maxperpage}"); $_count = count($rs); include admincp::tpl('user.manage'); }
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"); }
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'); }
function dodefault() { member::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'); }
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'); }
function dodefault() { global $firstcount, $pagenav; member::MP("menu_message"); $_GET['keywords'] && ($sql[] = " CONCAT(author,email,url,ip) REGEXP '{$_GET['keywords']}'"); isset($_GET['status']) && ($sql[] = " `status`='" . $_GET['status'] . "'"); $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : ''; $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20; $total = iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__plugins_message` {$where} order by id DESC"); page($total, $maxperpage, "条留言"); $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__plugins_message` {$where} order by id DESC LIMIT {$firstcount},{$maxperpage}"); $_count = count($rs); include plugin::acptpl(); }
function doRecover() { member::MP("menu_database_recover"); // include(iPATH.'admin/table.array.php'); $filedb = array(); $handle = opendir(iPATH . 'admin/backup'); while ($file = readdir($handle)) { if (preg_match("/^iCMS_/", $file) && preg_match("/\\.sql\$/", $file)) { $strlen = preg_match("/^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(); }
function doDefault() { member::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']) . "'"); $mid = (int) $_GET['mid']; $mid && ($sql[] = " `mId`='" . $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'); }
echo $configRs['watercolor']; ?> " size="10" maxlength="7" class="txt"/></td> </tr> <tr> <td class="td120">水印透明度:</td> <td colspan="3" class="rowform"><input type="text" name="waterpct" value="<?php echo $configRs['waterpct']; ?> " size="10" maxlength="3" class="txt"/></td> </tr> </tbody> <?php } if (in_array($this->action, array('default', 'patch'))) { member::MP(array("menu_setting_all", "menu_setting_patch")); ?> <thead> <tr> <th colspan="4">手动更新</th> </tr> </thead> <tbody> <tr> <td colspan="4">iCMS版本目前版本:iCMS <?php echo iCMS_VER; ?> <?php echo iCMS_RELEASE; ?> <br />你可以立即检查更新,升级到最新版本.查看更多信息请访问 <a href="http://www.idreamsoft.com" target="_blank">www.idreamsoft.com</a> <input type="button" value="在线升级" onClick="location.href='<?php
function li($T, $A) { if (is_array($A)) { $i = 0; foreach ($A as $k => $v) { if (member::MP($k, 'F')) { $href = strstr($v, 'http://') === false ? __SELF__ . '?mo=' . $v : $v; $onClick = 'main_frame_src(\'' . $href . '\')'; if ($i % 2) { echo '<li class="menu_title sub_right" onclick="' . $onClick . '"><b class="border"></b><span><a href="' . $href . '" target="main" hidefocus=true>' . UI::lang($k) . '</a></span></li>'; } else { echo '<li class="menu_title sub_left" onclick="' . $onClick . '"><span><a href="' . $href . '" target="main" hidefocus=true>' . UI::lang($k) . '</a></span></li>'; } $i++; } } } else { if (member::MP($T, 'F')) { list($type, $url) = explode(':', $A); if ($type == "javascript") { $onClick = $url; $href = 'javascript:' . $onClick; echo '<li class="menu_title" onclick="' . $onClick . '"><span>' . UI::lang($T) . '</span></li>'; } else { $href = strstr($A, 'http://') === false ? __SELF__ . '?mo=' . $A : $A; $onClick = 'main_frame_src(\'' . $href . '\')'; echo '<li class="menu_title" onclick="' . $onClick . '"><span><a href="' . $href . '" target="main" hidefocus=true>' . UI::lang($T) . '</a></span></li>'; } } } }
function doDefault() { $this->init(); member::MP("menu_contentype"); include admincp::tpl('contentype'); }
function doDefault() { member::MP("menu_cache"); include admincp::tpl("cache"); }
function doManage() { $mtime = microtime(); $mtime = explode(' ', $mtime); $time_start = $mtime[1] + $mtime[0]; member::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:管理员] status:[0:草稿][1:正常][2:回收] case 'draft': //草稿 $sql .= "`status` ='0' AND `postype`='1'"; $_ptxt = array(0 => '发布', 1 => '转成草稿'); $position = UI::lang("menu_article_draft"); break; case 'trash': //回收站 $sql .= "`status` ='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"); } elseif ($_GET['act'] == "trash") { $sql .= "`status` ='2'"; //用户回收站 $position = UI::lang("menu_article_user_trash"); } 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 = " » " . $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 = member::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 { member::$cpower && ($sql .= " AND fid IN(" . implode(',', (array) member::$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); }
<?php /** * @package iCMS * @copyright 2007-2010, iDreamSoft * @license http://www.idreamsoft.com iDreamSoft * @author coolmoo <*****@*****.**> */ require_once dirname(__FILE__) . '/../global.php'; define('__ADMINCP__', __SELF__ . '?mo'); error_reporting(E_ALL ^ E_NOTICE); iCMS_DB::$show_errors = true; require_once iPATH . 'include/member.class.php'; require_once iPATH . 'include/forum.class.php'; require_once iPATH . 'admin/function.php'; require_once iPATH . 'admin/admincp.lang.php'; require_once iPATH . 'include/UI.class.php'; require_once iPATH . 'admin/menu.class.php'; require_once iPATH . 'admin/admincp.class.php'; //admincp_log(); if ($_POST['action'] == "login") { ckseccode($_POST['seccode'], 'B') && javascript::alert("验证码错误!", 'js:parent.$("#seccodeimg").click();'); } member::$isAdmin = true; member::checklogin(); member::MP("ADMINCP", "ADMINCP_Permission_Denied");
function doPage() { member::MP(array("menu_html_all", "menu_html_page")); $forum = new forum(); include admincp::tpl(); }
function doDefault() { member::MP("menu_defaults"); $defArray = $this->iCMS->getCache('system/default'); include admincp::tpl('default'); }
function doDefault() { member::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"); }
function doextractpic() { member::MP("menu_extract_pic"); set_time_limit(0); $speed = 100; //提取速度 $action = $this->PG('action'); $fids = $this->PG('fid'); $startid = (int) $this->PG('startid'); $endid = (int) $this->PG('endid'); $starttime = $this->PG('starttime'); $endtime = $this->PG('endtime'); $totle = isset($_GET['totle']) ? $_GET['totle'] : 0; $loop = isset($_GET['loop']) ? $_GET['loop'] : 1; $i = isset($_GET['i']) ? $_GET['i'] : 0; empty($action) && javascript::alert("请选择操作项"); if ($fids) { empty($fids) && javascript::alert("请选择版块"); is_array($fids) && ($fids = implode(",", $fids)); if (strstr($fids, 'all')) { $forum = new forum(); $fids = substr($forum->fid(), 0, -1); if (empty($fids)) { javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract'); } else { _header(__SELF__ . '?mo=files&do=extractpic&fid=' . $fids . '&action=' . $action); } } else { $cArray = explode(',', $fids); $_Ccount = count($cArray); $k = isset($_GET['k']) ? $_GET['k'] : 0; $rs = iCMS_DB::getArray("SELECT id FROM #iCMS@__article WHERE fid in ({$fids}) and `status`='1'"); empty($totle) && ($totle = count($rs)); $tloop = ceil($totle / $speed); if ($loop <= $tloop) { $max = $i + $speed > $totle ? $totle : $i + $speed; for ($j = $i; $j < $max; $j++) { if ($action == "thumb") { if ($this->extractThumb($rs[$j]['id'])) { $msg .= "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />"; } } elseif ($action == "into") { $intoMsg = $this->into($rs[$j]['id']); if ($intoMsg) { $msg .= $intoMsg . "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />"; } } } javascript::dialog($msg ? $msg : "暂无提取信息!", 'src:' . __SELF__ . '?mo=files&do=extractpic&fid=' . $fids . '&totle=' . $totle . '&loop=' . ($loop + 1) . '&i=' . $j . '&action=' . $action); } else { javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract'); } } } elseif ($startid && $endid) { $startid > $endid && !isset($_GET['g']) && javascript::alert("开始ID不能大于结束ID"); empty($totle) && ($totle = $endid - $startid + 1); empty($i) && ($i = $startid); $tloop = ceil($totle / $speed); if ($loop <= $tloop) { $max = $i + $speed > $endid ? $endid : $i + $speed; for ($j = $i; $j <= $max; $j++) { if ($action == "thumb") { if ($this->extractThumb($j)) { $msg .= "文章ID:" . $j . "提取…<span style='color:green;'>√</span><br />"; } } elseif ($action == "into") { $intoMsg = $this->into($j); if ($intoMsg) { $msg .= $intoMsg . "文章ID:" . $j . "提取…<span style='color:green;'>√</span><br />"; } } } javascript::dialog($msg ? $msg : "暂无提取信息!", 'src:' . __SELF__ . '?mo=files&do=extractpic&startid=' . $startid . '&endid=' . $endid . '&g&loop=' . ($loop + 1) . '&i=' . $j . '&action=' . $action); } else { javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract'); } } elseif ($starttime) { $s = strtotime($starttime); $e = empty($endtime) ? time() + 86400 : strtotime($endtime); $rs = iCMS_DB::getArray("SELECT id FROM #iCMS@__article WHERE `pubdate`>='{$s}' and `pubdate`<='{$e}' and `status`='1'"); empty($totle) && ($totle = count($rs)); $tloop = ceil($totle / $speed); if ($loop <= $tloop) { $max = $i + $speed > $totle ? $totle : $i + $speed; for ($j = $i; $j < $max; $j++) { if ($action == "thumb") { if ($this->extractThumb($rs[$j]['id'])) { $msg .= "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />"; } } elseif ($action == "into") { $intoMsg = $this->into($rs[$j]['id']); if ($intoMsg) { $msg .= $intoMsg . "文章ID:" . $rs[$j]['id'] . "提取…<span style='color:green;'>√</span><br />"; } } } javascript::dialog($msg ? $msg : "暂无提取信息!", 'src:' . __SELF__ . '?mo=files&do=extractpic&starttime=' . $starttime . '&endtime=' . $endtime . '&totle=' . $totle . '&loop=' . ($loop + 1) . '&i=' . $j . '&action=' . $action); } else { javascript::dialog("提取完毕", 'url:' . __SELF__ . '?mo=files&do=extract'); } } else { javascript::alert("请选择方式"); } }