$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'v.'); foreach ($likekeys as $k) { $_GET[$k] = dhtmlspecialchars($_GET[$k]); } $mpurl .= '&' . implode('&', $results['urls']); $wherearr = $results['wherearr']; if ($_GET['dateline1']) { $wherearr[] = "v.dateline >= '" . strtotime($_GET['dateline1']) . "'"; $mpurl .= '&dateline1=' . $_GET['dateline1']; } if ($_GET['dateline2']) { $wherearr[] = "v.dateline <= '" . strtotime($_GET['dateline2']) . "'"; $mpurl .= '&dateline2=' . $_GET['dateline2']; } $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $orders = getorders(array('dateline', 'uid'), 'dateline', 'v.'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $orders = in_array($_G['orderby'], array('dateline', 'uid')) ? $_G['orderby'] : 'dateline'; $ordersc = in_array(strtolower($_GET['ordersc']), array('asc', 'desc')) ? $_GET['ordersc'] : 'desc'; $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 10; } $perpages = array($perpage => ' selected'); $mpurl .= '&perpage=' . $perpage; $page = empty($_GET['page']) ? 1 : intval($_GET['page']);
} else { //处理搜索 if ($_GET['expiration']) { $val = $_GET['expiration'] == 1 ? 1 : 2; $_GET['expiration' . $val] = $_SGLOBAL['timestamp']; } $intkeys = array('uid', 'noreply', 'pid', 'sex'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'voternum'), array('intval', 'replynum'), array('intval', 'percredit'), array('intval', 'expiration'), array('intval', 'hot')); $likekeys = array('subject'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, ''); $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); //排序 $orders = getorders(array('dateline', 'viewnum', 'replynum', 'percredit', 'hot'), 'pid', ''); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
} else { cpmessage('choose_to_delete_events', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=doing'; //处理搜索 $intkeys = array('uid'); $strkeys = array('ip', 'username'); $randkeys = array(array('sstrtotime', 'dateline')); $likekeys = array('message'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'lastpost'), 'doid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
} else { cpmessage('please_delete_the_correct_choice_to_share', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=share'; //处理搜索 $intkeys = array('uid', 'sid'); $strkeys = array('username', 'type'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'hot'), 'sid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
} } } if (empty($_GET['op'])) { $mpurl = 'admincp.php?ac=mtag'; //处理搜索 $intkeys = array('close', 'fieldid', 'joinperm', 'viewperm', 'tagid'); $strkeys = array(); $randkeys = array(array('intval', 'membernum')); $likekeys = array('tagname'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('membernum'), 'tagid DESC'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $joinperms = array($_GET['joinperm'] => ' selected'); $viewperms = array($_GET['viewperm'] => ' selected'); //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100))) { $perpage = 20; } $mpurl .= '&perpage=' . $perpage; $perpages = array($perpage => ' selected');
$member['flagstr'] = empty($member['flag']) ? '<a href="' . CPURL . '?action=member&op=delete&uid=' . $member['uid'] . '" onclick="return confirm(\'' . $alang['confirm_the_deletion_user_date'] . '\');">' . $alang['delete_user_date'] . '</a>' : $alang['users_protection_was_not_deleted']; } $member['flagcheck'] = empty($member['flag']) ? array(' checked', '') : array('', ' checked'); } else { $mpurl = CPURL . '?action=' . $action; //处理搜索 $intkeys = array('uid', 'groupid'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline'), array('sstrtotime', 'updatetime')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 's.'); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'updatetime'), '', 's.'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100))) { $perpage = 20; } $mpurl .= '&perpage=' . $perpage; $perpages = array($perpage => ' selected'); $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) {
$intkeys = array('topicid', 'uid', 'closed'); $strkeys = array(); $randkeys = array(); $likekeys = array('title', 'username'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); foreach ($likekeys as $k) { $_GET[$k] = htmlspecialchars(stripslashes($_GET[$k])); } $wherearr = $results['wherearr']; $mpurl = ADMINSCRIPT . '?action=topic'; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); if (strlen($_GET['closed'])) { $statusarr[$_GET['closed']] = ' selected'; } $orders = getorders(array('dateline'), 'topicid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 10; } $searchlang = array(); $keys = array('search', 'likesupport', 'resultsort', 'defaultsort', 'orderdesc', 'orderasc', 'perpage_10', 'perpage_20', 'perpage_50', 'perpage_100', 'topic_dateline', 'topic_id', 'topic_title', 'topic_uid', 'topic_username', 'topic_closed', 'nolimit', 'no', 'yes'); foreach ($keys as $key) { $searchlang[$key] = cplang($key); }
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, $pre); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); if (isset($_GET['namestatus']) && $_GET['namestatus'] == '0') { $wheresql .= " AND s.name!=''"; } //激活 $actives = array($_GET['tab'] => ' class="active"'); if (!isset($_GET['tab'])) { $actives = array('all' => ' class="active"'); } else { $mpurl .= '&tab=' . $_GET['tab']; } //排序 $orders = getorders(array('dateline', 'updatetime', 'friendnum', 'credit', 'viewnum', 'experience'), 'uid', $pre); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //用户组 $usergroups = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('usergroup')); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $usergroups[$value['gid']] = $value; } //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100))) {
//激活 if (strlen($_GET['grade']) && $_GET['grade'] == 0) { $actives = array('grade0' => ' class="active"'); } elseif ($_GET['grade'] == -1) { $actives = array('grade_1' => ' class="active"'); } elseif ($_GET['grade'] == 1) { $actives = array('grade1' => ' class="active"'); } elseif ($_GET['grade'] == -2) { $actives = array('grade_2' => ' class="active"'); } elseif ($_GET['grade'] == 2) { $actives = array('grade2' => ' class="active"'); } else { $actives = array('all' => ' class="active"'); } //排序 $orders = getorders(array('dateline', 'starttime', 'membernum', 'hot'), 'eventid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $mpurl .= '&perpage=' . $perpage; $perpages = array($perpage => ' selected'); $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) {
$likekeys = array('subject'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'b.'); $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); //限制条件2 $intkeys = array(); $strkeys = array('postip'); $randkeys = array(); $likekeys = array('message'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'bf.'); $wherearr2 = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $wheresql2 = empty($wherearr2) ? '' : implode(' AND ', $wherearr2); //排序 $orders = getorders(array('dateline', 'viewnum', 'replynum'), 'blogid DESC', 'b.'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
if(empty($_GET['op'])) { $mpurl = 'admincp.php?ac=mtag'; //处理搜索 $intkeys = array('close', 'recommend', 'fieldid', 'joinperm', 'viewperm', 'threadperm', 'postperm', 'tagid'); $strkeys = array(); $randkeys = array(array('intval','membernum'), array('intval','threadnum'), array('intval','postnum')); $likekeys = array('tagname'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr)?'1':implode(' AND ', $wherearr); $mpurl .= '&'.implode('&', $results['urls']); //排序 $orders = getorders(array('membernum','threadnum','postnum'), 'tagid'); $ordersql = $orders['sql']; if($orders['urls']) $mpurl .= '&'.implode('&', $orders['urls']); $orderby = array($_GET['orderby']=>' selected'); $ordersc = array($_GET['ordersc']=>' selected'); $joinperms = array($_GET['joinperm']=>' selected'); $viewperms = array($_GET['viewperm']=>' selected'); $threadperms = array($_GET['threadperm']=>' selected'); $postperms = array($_GET['postperm']=>' selected'); //显示分页 $perpage = empty($_GET['perpage'])?0:intval($_GET['perpage']); if(!in_array($perpage, array(20,50,100))) $perpage = 20; $mpurl .= '&perpage='.$perpage; $perpages = array($perpage => ' selected');
} $mpurl = 'admincp.php?ac=' . $ac; //处理搜索 $intkeys = array('uid', 'groupid', 'namestatus', 'avatar'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline'), array('sstrtotime', 'updatetime'), array('intval', 'credit')); $likekeys = array('name'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 's.'); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); if (isset($_GET['namestatus']) && $_GET['namestatus'] == '0') { $wheresql .= " AND s.name!=''"; } //排序 $orders = getorders(array('dateline', 'updatetime', 'friendnum', 'credit', 'viewnum'), '', 's.'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100))) { $perpage = 20; } $mpurl .= '&perpage=' . $perpage; $perpages = array($perpage => ' selected'); $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) {
$_GET = $_GET + $_POST; $searchctrl = '<span style="float: right; padding-right: 40px;">' . '<a href="javascript:;" onclick="$(\'tb_search\').style.display=\'\';$(\'a_search_show\').style.display=\'none\';$(\'a_search_hide\').style.display=\'\';" id="a_search_show">' . cplang('show_search') . '</a>' . '<a href="javascript:;" onclick="$(\'tb_search\').style.display=\'none\';$(\'a_search_show\').style.display=\'\';$(\'a_search_hide\').style.display=\'none\';" id="a_search_hide" style="display:none">' . cplang('hide_search') . '</a>' . '</span>'; showsubmenu('blockstyle', array(array('list', 'blockstyle', 1), array('add', 'blockstyle&operation=add', 0)), $searchctrl); $mpurl = ADMINSCRIPT . '?action=blockstyle'; $intkeys = array('styleid'); $strkeys = array('blockclass'); $randkeys = array(); $likekeys = array('name', 'template'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); foreach ($likekeys as $k) { $_GET[$k] = htmlspecialchars(stripslashes($_GET[$k])); } $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $orders = getorders(array('blockclass'), 'styleid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 20; } $perpages = array($perpage => ' selected'); $mpurl .= '&perpage=' . $perpage; $searchlang = array(); $keys = array('search', 'likesupport', 'resultsort', 'defaultsort', 'orderdesc', 'orderasc', 'perpage_10', 'perpage_20', 'perpage_50', 'perpage_100', 'blockstyle_id', 'blockstyle_name', 'blockstyle_blockclass', 'blockstyle_template'); foreach ($keys as $key) {
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'b.'); $wherearr = $results['wherearr']; $selectfid = array($_GET['fid'] => 'selected="selected"'); $mpurl .= '&' . implode('&', $results['urls']); //限制条件2 $intkeys = array(); $strkeys = array('useip'); $randkeys = array(); $likekeys = array('message'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'bf.'); $wherearr2 = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $wheresql2 = empty($wherearr2) ? '' : implode(' AND ', $wherearr2); //排序 $orders = getorders(array('dateline', 'views', 'replies'), 'tid DESC', 'b.'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => 'selected="selected"'); $ordersc = array($_GET['ordersc'] => 'selected="selected"'); $perpage = empty($_GET['perpage']) ? 20 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
if (!empty($_GET['catid'])) { $catid = intval($_GET['catid']); $mpurl .= '&catid=' . $catid; $catids = category_get_childids('portal', $_GET['catid']); $catids[] = $_GET['catid']; $wherearr[] = 'catid IN (' . dimplode($catids) . ')'; } if (!empty($_GET['tag'])) { $tag = article_make_tag($_GET['tag']); $wherearr[] = "(tag & '{$tag}' = '{$tag}')"; foreach ($_GET['tag'] as $k => $v) { $mpurl .= "&tag[{$k}]={$v}"; } } $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $orders = getorders(array('dateline'), 'aid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 10; } $categoryselect = category_showselect('portal', 'catid', true, $_GET['catid']); $searchlang = array(); $keys = array('search', 'likesupport', 'resultsort', 'defaultsort', 'orderdesc', 'orderasc', 'perpage_10', 'perpage_20', 'perpage_50', 'perpage_100', 'article_dateline', 'article_id', 'article_title', 'article_uid', 'article_username', 'article_category', 'article_tag'); foreach ($keys as $key) { $searchlang[$key] = cplang($key);
if ($uid) { $query = DB::query('SELECT targettplname FROM ' . DB::table('common_template_permission') . " WHERE uid='{$uid}' GROUP BY targettplname"); while ($v = DB::fetch($query)) { $tpls[] = $v['targettplname']; } $tpls = dimplode($tpls); } if ($tpls) { $wherearr[] = 'targettplname IN (' . $tpls . ')'; } else { cpmsg_error(stripslashes($_GET['permname']) . cplang('diytemplate_the_username_has_not_template')); } $mpurl .= '&permname=' . $_GET['permname']; } $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $orders = getorders(array('dateline', 'targettplname'), 'dateline'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 20; } $perpages = array($perpage => ' selected'); $searchlang = array(); $keys = array('search', 'likesupport', 'resultsort', 'defaultsort', 'orderdesc', 'orderasc', 'perpage_10', 'perpage_20', 'perpage_50', 'perpage_100', 'diytemplate_name', 'diytemplate_dateline', 'diytemplate_targettplname', 'diytemplate_primaltplname', 'diytemplate_uid', 'diytemplate_username', 'nolimit', 'no', 'yes', 'diytemplate_permname', 'diytemplate_permname_tips'); foreach ($keys as $key) { $searchlang[$key] = cplang($key);
cpmessage('choose_to_operate_tag', $_POST['mpurl']); } } } $mpurl = 'admincp.php?ac=tag'; // Search Processing $intkeys = array('close'); $strkeys = array(); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'blognum')); $likekeys = array('tagname'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); // sort $orders = getorders(array('dateline', 'blognum'), 'tagid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //page displayed $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100))) { $perpage = 20; } $mpurl .= '&perpage=' . $perpage; $perpages = array($perpage => ' selected'); $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) {
// For Admin Only $_GET['username'] = ''; $allowdt = 0; } $mpurl = 'admincp.php?ac=thread'; // Search Processing $intkeys = array('uid', 'tagid', 'digest', 'tid'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'viewnum'), array('intval', 'replynum'), array('intval', 'hot')); $likekeys = array('subject'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); // sort $orders = getorders(array('dateline', 'lastpost', 'viewnum', 'replynum', 'hot'), 'tid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //page displayed $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; }
$likekeys = array('subject'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'b.'); $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); //限制条件2 $intkeys = array(); $strkeys = array('postip'); $randkeys = array(); $likekeys = array('message'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'bf.'); $wherearr2 = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $wheresql2 = empty($wherearr2) ? '' : implode(' AND ', $wherearr2); //排序 $orders = getorders(array('dateline', 'viewnum', 'replynum', 'hot'), 'bwztid', 'b.'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
if (!isset($_GET['status']) || $_GET['status'] == 1) { $_GET['num1'] = 1; $_GET['status'] = 1; } elseif ($_GET['status'] == 0) { $_GET['num'] = 0; $intkeys = array('num'); } $strkeys = array('idtype'); $randkeys = array(array('intval', 'num')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'num'), 'new,num DESC'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $scstr = $_GET['ordersc'] == 'asc' ? 'desc' : 'asc'; //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1;
} else { cpmessage('please_delete_the_correct_choice_to_share', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=share'; //处理搜索 $intkeys = array('uid', 'sid'); $strkeys = array('username', 'type'); $randkeys = array(array('sstrtotime', 'dateline')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline'), 'sid DESC'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage;
} else { cpmessage('at_least_one_option_to_delete_albums', $_POST['mpurl']); } } $mpurl = 'admincp.php?ac=album'; // Search Processing $intkeys = array('uid', 'friend', 'albumid'); $strkeys = array('username'); $randkeys = array(array('sstrtotime', 'dateline')); $likekeys = array('albumname'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); // Order $orders = getorders(array('dateline', 'updatetime', 'picnum'), 'albumid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //Show pages $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; }
$query = DB::query('SELECT bid FROM ' . DB::table('common_block_permission') . " WHERE uid='{$uid}' GROUP BY bid"); while ($v = DB::fetch($query)) { $bids[] = $v['bid']; } $bids = dimplode($bids); } if ($bids) { $wherearr[] = 'bid IN (' . $bids . ')'; } else { cpmsg_error(stripslashes($_GET['permname']) . cplang('block_the_username_has_not_block')); } $mpurl .= '&permname=' . $_GET['permname']; } $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $wheresql = str_replace(array('bid', 'blockclass', ' name', 'blocktype', 'targettplname'), array('b.bid', 'b.blockclass', ' b.name', 'b.blocktype', 'tb.targettplname'), $wheresql); $orders = getorders(array('bid', 'dateline'), 'bid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 20; } $perpages = array($perpage => ' selected'); $mpurl .= '&perpage=' . $perpage; $searchlang = array(); $keys = array('search', 'likesupport', 'resultsort', 'defaultsort', 'orderdesc', 'orderasc', 'perpage_10', 'perpage_20', 'perpage_50', 'perpage_100', 'block_dateline', 'block_id', 'block_name', 'block_blockclass', 'block_add_jscall', 'block_choose_blockclass_to_add_jscall', 'block_diytemplate', 'block_permname', 'block_permname_tips'); foreach ($keys as $key) {
$query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('space') . " WHERE username='******'username']}'"); if ($value = $_SGLOBAL['db']->fetch_array($query)) { $_GET['uid'] = $value['uid']; } } //处理搜索 $intkeys = array('albumid', 'uid', 'picid'); $strkeys = array('postip'); $randkeys = array(array('sstrtotime', 'dateline')); $likekeys = array('filename', 'title'); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']); //排序 $orders = getorders(array('dateline', 'size'), 'picid DESC'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); //显示分页 $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(20, 50, 100, 1000))) { $perpage = 20; } $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; }