if ($result === false) { adminmsg('search_keyword_empty'); } $count = $result[0]; $query = $db->query("SELECT fid,pid,tid,author,authorid,content,postdate,userip FROM {$pw_posts} WHERE pid in (" . $result[1] . ") ORDER BY postdate DESC "); } else { $rt = $db->get_one("SELECT COUNT(*) AS sum FROM {$pw_posts} WHERE {$sql}"); $count = $rt['sum']; $page < 1 && ($page = 1); $limit = S::sqlLimit(($page - 1) * $nums, $nums); $sql .= ' ORDER BY postdate DESC '; $sql .= $_POST['direct'] ? " LIMIT {$nums}" : $limit; $query = $db->query("SELECT fid,pid,tid,author,authorid,content,postdate,userip FROM {$pw_posts} {$forceIndex} WHERE {$sql}"); } //$pages = numofpage_t($count,$page,ceil($count/$nums),"$admin_file?adminjob=superdel&admintype=article&action=$action&fid=$fid&tid=$tid&pstart=$pstart&pend=$pend&author=".rawurlencode($author)."&keyword=".rawurlencode($keyword)."&userip=$userip&tcounts=$tcounts&counts=$counts&nums=$nums&ptable=$ptable&sphinx=$sphinx&"); $pages = pagerforjs($count, $page, ceil($count / $nums), "onclick=\"manageclass.superdel(this,'del_rpl_form','')\""); $delid = $postdb = array(); while ($post = $db->fetch_array($query)) { if ($_POST['direct']) { $delid[$post['pid']] = $post['fid'] . '_' . $post['tid']; } else { $post['delid'] = $post['fid'] . '_' . $post['tid']; $post['forumname'] = $forum[$post['fid']]['name']; $post['postdate'] = get_date($post['postdate']); $post['content'] = substrs($post['content'], 30); $postdb[] = $post; } } if (!$_POST['direct']) { include PrintEot('superdel'); exit;
break; } $order = "ORDER BY " . $orderway; $asc == 'DESC' && ($order .= " {$asc}"); } $rs = $db->get_one("SELECT COUNT(*) AS count FROM pw_members m LEFT JOIN pw_memberdata md ON md.uid=m.uid WHERE {$sql}"); $count = $rs['count']; if (!is_numeric($lines)) { $lines = 100; } $page < 1 && ($page = 1); $numofpage = ceil($count / $lines); if ($numofpage && $page > $numofpage) { $page = $numofpage; } $pages = pagerforjs($count, $page, $numofpage, "onclick=\"manageclass.superdel(this,'superdel_member','')\""); $start = ($page - 1) * $lines; $limit = "LIMIT {$start},{$lines}"; $delid = $schdb = array(); $query = $db->query("SELECT m.uid,m.username,m.email,m.groupid,m.regdate,md.lastvisit,md.postnum,md.onlineip FROM pw_members m LEFT JOIN pw_memberdata md ON md.uid=m.uid WHERE {$sql} {$order} {$limit}"); while ($sch = $db->fetch_array($query)) { if ($_POST['direct']) { $delid[] = $sch['uid']; } else { strpos($sch['onlineip'], '|') && ($sch['onlineip'] = substr($sch['onlineip'], 0, strpos($sch['onlineip'], '|'))); if ($sch['groupid'] == '-1') { $sch['group'] = getLangInfo('all', 'reg_member'); } else { $sch['group'] = $ltitle[$sch['groupid']]; } $sch['regdate'] = get_date($sch['regdate']);
$v['state'] = $states[$v['state']]; $v['type'] = $types[$v['type']]; if ($v['attach1']) { list($v['attach1'], ) = geturl($v['attach1'], 'lf'); $v['attach1'] = $v['attach1'] . '?' . $timestamp; } if ($v['attach2']) { list($v['attach2'], ) = geturl($v['attach2'], 'lf'); $v['attach2'] = $v['attach2'] . '?' . $timestamp; } $v['username'] = $userNames[$v['uid']]; $certificateInfo[$k] = $v; } $stateHtml = ''; } $pagination = pagerforjs($total, $page, $pages, "onclick=\"manageclass.certificateinfo(this,'certificate_form','')\""); } foreach ($states as $k => $v) { $checked = $state == $k ? ' selected="1"' : ''; $stateHtml .= "<option value=\"{$k}\"{$checked}>{$v}</option>"; } } elseif ($step == 2) { S::gp(array('selid', 'dostate')); $url = "{$basename}&action=certificateauth&state={$state}&page={$page}"; empty($selid) && adminmsg('operate_error', $url); $dostate = intval($dostate); if ($dostate == -1) { $return = $authService->deleteCertificateByIds($selid); if ($return !== true) { adminmsg($return, $url); }