SEARCH;
$start = ($page-1)*$perpage;
$mpurl .= '&perpage='.$perpage;
$perpages = array($perpage => ' selected');
$maketopichtml = !empty($_G['setting']['makehtml']['flag']) && !empty($_G['setting']['makehtml']['topichtmldir']);
$subtitle = array('', 'topic_title', 'topic_domain', 'topic_name', 'topic_creator', 'topic_dateline');
if($maketopichtml) {
$subtitle[] = 'HTML';
}
$subtitle[] = 'operation';
showformheader('topic');
showtableheader('topic_list');
showsubtitle($subtitle);
$multipage = '';
$count = C::t('portal_topic')->count_by_search_where($wherearr);
if($count) {
require_once libfile('function/portal');
$repairs = array();
foreach(C::t('portal_topic')->fetch_all_by_search_where($wherearr, $ordersql, $start, $perpage) as $topicid => $value) {
if($maketopichtml && $value['htmlmade'] && ($htmlname = fetch_topic_url($value)) && !file_exists(DISCUZ_ROOT.'./'.$htmlname)) {
$value['htmlmade'] = 0;
$repairs[$topicid] = $topicid;
}
$tablerow = array(
"