EOT; showtagheader('div', 'searchposts', !$searchsubmit && empty($newlist)); showformheader("doing".(!empty($_GET['search']) ? '&search=true' : ''), '', 'doingforum'); showhiddenfields(array('page' => $page, 'pp' => $_GET['pp'] ? $_GET['pp'] : $_GET['perpage'])); showtableheader(); showsetting('doing_search_detail', 'detail', $detail, 'radio'); showsetting('doing_search_perpage', '', $_GET['perpage'], ""); showsetting('doing_search_user', 'users', $users, 'text'); showsetting('doing_search_ip', 'userip', $userip, 'text'); showsetting('doing_search_keyword', 'keywords', $keywords, 'text'); showsetting('doing_search_lengthlimit', 'lengthlimit', $lengthlimit, 'text'); showsetting('doing_search_time', array('starttime', 'endtime'), array($starttime, $endtime), 'daterange'); echo ''; showsubmit('searchsubmit'); showtablefooter(); showformfooter(); showtagfooter('div'); } else { $doids = authcode($doids, 'DECODE'); $doidsadd = $doids ? explode(',', $doids) : $_GET['delete']; include_once libfile('function/delete'); $deletecount = count(deletedoings($doidsadd)); $cpmsg = cplang('doing_succeed', array('deletecount' => $deletecount)); ?> fetch_all_uid_by_username(array_map('trim', explode(',', $users))); if(!$uids) { $uids = array(-1); } } if(($_G['adminid'] == 2 && $endtime - $starttime > 86400 * 16) || ($_G['adminid'] == 3 && $endtime - $starttime > 86400 * 8)) { $error = 'prune_mod_range_illegal'; } if(!($_G['adminid'] == 1 && $endtime != dgmdate(TIMESTAMP, 'Y-n-j'))) { $endtime = TIMESTAMP; } if(!$error) { if($detail) { $_GET['perpage'] = intval($_GET['perpage']) < 1 ? 20 : intval($_GET['perpage']); $perpage = $_GET['pp'] ? $_GET['pp'] : $_GET['perpage']; $query = C::t('home_doing')->fetch_all_search((($page - 1) * $perpage), $perpage, 1, $uids, $userip, $keywords, $lengthlimit, $starttime, $endtime); $doings = ''; foreach ($query as $doing) { $doing['dateline'] = dgmdate($doing['dateline']); $doings .= showtablerow('', '', array( "", "$doing[username]", $doing['message'], $doing['ip'], $doing['dateline'] ), TRUE); } $doingcount = C::t('home_doing')->fetch_all_search((($page - 1) * $perpage), $perpage, 3, $uids, $userip, $keywords, $lengthlimit, $starttime, $endtime); $multi = multi($doingcount, $perpage, $page, ADMINSCRIPT."?action=doing"); $multi = preg_replace("/href=\"".ADMINSCRIPT."\?action=doing&page=(\d+)\"/", "href=\"javascript:page(\\1)\"", $multi); $multi = str_replace("window.location='".ADMINSCRIPT."?action=doing&page='+this.value", "page(this.value)", $multi); } else { $doingcount = 0; $query = C::t('home_doing')->fetch_all_search((($page - 1) * $perpage), $perpage, 2, $uids, $userip, $keywords, $lengthlimit, $starttime, $endtime); foreach ($query as $doing) { $doids .= ','.$doing['doid']; $doingcount++; } $multi = ''; } if(!$doingcount) { $error = 'doing_post_nonexistence'; } } showtagheader('div', 'postlist', $searchsubmit || $newlist); showformheader('doing&frame=no', 'target="doingframe"'); showhiddenfields(array('doids' => authcode($doids, 'ENCODE'))); if(!$search_tips) { showtableheader(cplang('doing_new_result').' '.$doingcount, 'fixpadding'); } else { showtableheader(cplang('doing_result').' '.$doingcount.(empty($newlist) ? ' '.cplang('research').'' : ''), 'fixpadding'); } if($error) { echo "