20"; $tpp = !empty($_GET['tpp']) ? $_GET['tpp'] : '20'; $start_limit = ($page - 1) * $ppp; $dateline = $_GET['dateline'] ? $_GET['dateline'] : '604800'; $dateline_options = ''; foreach(array('all', '604800', '2592000', '7776000') as $v) { $selected = ''; if($dateline == $v) { $selected = "selected='selected'"; } $dateline_options .= "'; loadcache('portalcategory'); foreach($_G['cache']['portalcategory'] as $cat) { $selected = ''; if($cat['catid'] == $_GET['catid']) { $selected = 'selected="selected"'; } $cat_select .= ""; } $article_status = 1; if($_GET['filter'] == 'ignore') { $article_status = 2; } showformheader("moderate&operation=articles"); showtableheader('search'); showtablerow('', array('width="60"', 'width="160"', 'width="60"'), array( cplang('username'), "", cplang('moderate_article_category'), "", ) ); showtablerow('', array('width="60"', 'width="160"', 'width="60"'), array( "$lang[perpage]", "", "$lang[moderate_bound]", " " ) ); showtablefooter(); $pagetmp = $page; $sqlwhere = ""; $modcount = C::t('common_moderate')->fetch_all_for_article($moderatestatus, $_GET['catid'], $_GET['username'], $dateline, 1); do { $start_limit = ($pagetmp - 1) * $tpp; $query = C::t('common_moderate')->fetch_all_for_article($moderatestatus, $_GET['catid'], $_GET['username'], $dateline, 0, $start_limit, $tpp); $pagetmp = $pagetmp - 1; } while($pagetmp > 0 && count($query) == 0); $page = $pagetmp + 1; $multipage = multi($modcount, $tpp, $page, ADMINSCRIPT."?action=moderate&operation=articles&filter=$filter&catid={$_GET['catid']}&dateline={$_GET['dateline']}&username={$_GET['username']}&keyword={$_GET['keyword']}&tpp=$tpp&showcensor=$showcensor"); echo '

'.cplang('moderate_all_expand').' '.cplang('moderate_all_fold').'

'; showtableheader(); $censor = & discuz_censor::instance(); $censor->highlight = '#FF0000'; require_once libfile('function/misc'); foreach($query as $article) { $article['dateline'] = dgmdate($article['dateline']); if($showcensor) { $censor->check($article['title']); $censor->check($article['summary']); } $article_censor_words = $censor->words_found; if(count($article_censor_words) > 3) { $article_censor_words = array_slice($article_censor_words, 0, 3); } $article['censorwords'] = implode(', ', $article_censor_words); $article['modarticlekey'] = modauthkey($article['aid']); if(count($article_censor_words)) { $article_censor_text = "({$article['censorwords']})"; } else { $article_censor_text = ''; } showtagheader('tbody', '', true, 'hover'); showtablerow("id=\"mod_$article[aid]_row1\"", array("id=\"mod_$article[aid]_row1_op\" rowspan=\"3\" class=\"rowform threadopt\" style=\"width:80px;\"", '', 'width="120"', 'width="55"'), array( "", "

$article[title] $article_censor_text

", "

$article[username]

$article[dateline]

", "$lang[view] $lang[edit]", )); showtablerow("id=\"mod_$article[aid]_row2\"", 'colspan="4" style="padding: 10px; line-height: 180%;"', '
'.$article['summary'].'
'); showtablerow("id=\"mod_$article[aid]_row3\"", 'class="threadopt threadtitle" colspan="4"', "$lang[validate] | $lang[delete] | $lang[ignore]"); showtagfooter('tbody'); } showsubmit('modsubmit', 'submit', '', ''.cplang('moderate_all_validate').'  '.cplang('moderate_all_delete').'  '.cplang('moderate_all_ignore').'  '.cplang('moderate_all_cancel').'', $multipage, false); showtablefooter(); showformfooter(); } else { $moderation = array('validate' => array(), 'delete' => array(), 'ignore' => array()); $validates = $deletes = $ignores = 0; if(is_array($moderate)) { foreach($moderate as $aid => $act) { $moderation[$act][] = $aid; } } if($validate_aids = dimplode($moderation['validate'])) { $validates = C::t('portal_article_title')->update($moderation['validate'], array('status' => '0')); updatemoderate('aid', $moderation['validate'], 2); } if(!empty($moderation['delete'])) { require_once libfile('function/delete'); $articles = deletearticle($moderation['delete']); $deletes = count($articles); updatemoderate('aid', $moderation['delete'], 2); } if($ignore_aids = dimplode($moderation['ignore'])) { $ignores = C::t('portal_article_title')->update($moderation['ignore'], array('status' => '2')); updatemoderate('aid', $moderation['ignore'], 1); } if($_GET['fast']) { echo callback_js($_GET['aid']); exit; } else { cpmsg('moderate_articles_succeed', "action=moderate&operation=articles&page=$page&filter=$filter&catid={$_GET['catid']}&dateline={$_GET['dateline']}&username={$_GET['username']}&keyword={$_GET['keyword']}&idtype={$_GET['idtype']}&tpp={$_GET['tpp']}&showcensor=$showcensor", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'deletes' => $deletes)); } } ?>