Exemple #1
0
 $__MODEL__ = $iCMS->cache('model.id', 'include/syscache', 0, true);
 $model = $__MODEL__[$mid];
 $catalog = new catalog();
 $cid = (int) $_GET['cid'];
 $act = $_GET['act'];
 $sql = " where ";
 $sql .= $_GET['type'] == 'draft' ? "`visible` ='0'" : "`visible` ='1'";
 $sql .= $act == 'user' ? " AND `postype`='0'" : " AND `postype`='1'";
 $_GET['title'] && ($sql .= " AND `title` like '%{$_GET['title']}%'");
 $_GET['tag'] && ($sql .= " AND `tags` REGEXP '[[:<:]]" . preg_quote(rawurldecode($_GET['tag']), '/') . "[[:>:]]'");
 isset($_GET['at']) && ($sql .= " AND `type` REGEXP '[[:<:]]" . preg_quote($_GET['at'], '/') . "[[:>:]]'");
 isset($_GET['userid']) && ($sql .= " AND `userid`='" . (int) $_GET['userid'] . "'");
 $cid = $Admin->CP($cid) ? $cid : "0";
 if ($cid) {
     if (isset($_GET['sub'])) {
         $sql .= " AND ( cid IN(" . $catalog->id($cid) . $cid . ")";
     } else {
         $sql .= " AND ( cid ='{$cid}'";
     }
     $sql .= " OR `vlink` REGEXP '[[:<:]]" . preg_quote($cid, '/') . "[[:>:]]')";
 } else {
     $Admin->cpower && ($sql .= " AND cid IN(" . implode(',', $Admin->cpower) . ")");
 }
 //	isset($_GET['nopic'])&&$sql.=" AND `pic` =''";
 $_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']);
Exemple #2
0
     updateConfig($_GET['indexname'], 'indexname');
     CreateConfigFile();
     MakeIndexHtm($_GET['indexTPL'], $_GET['indexname']);
     if (isset($_GET['all'])) {
         redirect("全站更新完成!", __SELF__ . '?do=html&operation=all');
     } else {
         redirect("网站首页更新完成!", __SELF__ . '?do=html&operation=index');
     }
 }
 if ($action == 'catalog') {
     $cids = $_GET['cid'];
     $cpageNum = $_GET['cpn'];
     empty($cids) && alert("请选择栏目");
     is_array($cids) && ($cids = implode(",", $cids));
     if (strstr($cids, 'all')) {
         $cids = substr($catalog->id(), 0, -1);
         if (empty($cids)) {
             _redirect("生成独立页面", "栏目更新完成", 'create&action=page&cid=all', 'catalog');
         } else {
             _header(__SELF__ . '?do=html&operation=create&action=catalog&time=' . $cTime . '&cpn=' . $cpageNum . '&cid=' . $cids . $QUERY_STRING);
         }
     } else {
         $cArray = explode(',', $cids);
         $cCount = count($cArray);
         $cpage = isset($_GET['cpage']) ? $_GET['cpage'] : 1;
         $k = isset($_GET['k']) ? $_GET['k'] : 0;
         $loop = isset($_GET['loop']) ? $_GET['loop'] : 0;
         $c = MakeCatalogHtm($cArray[$k], $cpage, $loop, $cpageNum);
         //Array ( [name] => 栏目6 [page] => 51 [loop] => 3 [pagesize] => 101 )
         //var_dump($c);
         $text = empty($cpageNum) ? '' : "指定生成" . $cpageNum . "页,";
Exemple #3
0
 //提取速度
 $cids = $_GET['cid'];
 $startid = (int) $_GET['startid'];
 $endid = (int) $_GET['endid'];
 $starttime = $_GET['starttime'];
 $endtime = $_GET['endtime'];
 $totle = isset($_GET['totle']) ? $_GET['totle'] : 0;
 $loop = isset($_GET['loop']) ? $_GET['loop'] : 1;
 $i = isset($_GET['i']) ? $_GET['i'] : 0;
 empty($action) && alert("请选择操作");
 if ($cids) {
     empty($cids) && alert("请选择栏目");
     is_array($cids) && ($cids = implode(",", $cids));
     if (strstr($cids, 'all')) {
         $catalog = new catalog();
         $cids = substr($catalog->id(), 0, -1);
         if (empty($cids)) {
             redirect("提取完毕", __SELF__ . '?do=file&operation=extract');
         } else {
             _header(__SELF__ . '?do=file&operation=extract&cid=' . $cids . $QUERY_STRING);
         }
     } else {
         $cArray = explode(',', $cids);
         $_Ccount = count($cArray);
         $k = isset($_GET['k']) ? $_GET['k'] : 0;
         $rs = $iCMS->db->getArray("SELECT id FROM #iCMS@__article WHERE cid in ({$cids}) and `visible`='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++) {