$lang[username]
SEARCH; $perpage = 30; $start = ($page-1)*$perpage; showformheader($pluginurl); showtableheader(lang('plugin/'.$plugin['identifier'], 'report_list')); showsubtitle(array('del', 'uid', 'username', lang('plugin/'.$plugin['identifier'], 'report_reply'), lang('plugin/'.$plugin['identifier'], 'report_message'), 'ip', lang('plugin/'.$plugin['identifier'], 'report_createtime'), lang('plugin/'.$plugin['identifier'], 'report_status'), 'operation')); //$wheresql = !empty($wherearr) && is_array($wherearr) ? ' WHERE '.implode(' AND ', $wherearr) : ''; //$count = DB::result_first("SELECT COUNT(*) FROM %t v inner join %t t on v.`tid`= t.`tid` $wheresql", array('plugin_replyfloor_report', 'forum_thread')); //$list = DB::fetch_all("SELECT v.* FROM %t v inner join %t t on v.`tid`= t.`tid` $wheresql order by v.createtime desc ".DB::limit($start, $perpage), array('plugin_replyfloor_report', 'forum_thread')); $count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_report')->count_by_search_where($wherearr); $list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_report')->fetch_all_by_search_where($wherearr,'order by createtime desc', $start, $perpage); $sortoptionarray = array(); foreach ($list as $value) { $reply = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_by_id($value['msgid']); if($reply){ $reply['message'] = replyfloor_discuzcode($reply['message']); if($setconfig['show_br']) { $reply['message'] = nl2br($reply['message']); } } $attachhtml = ''; if($reply['attachment']) { $attachhtml = '
'; $attachlist = explode("\t", $reply['attachment']); foreach ($attachlist as $attach) { $attachhtml .= '
'; } $attachhtml .= '
'; } $value['images'] = $value['images'] ? unserialize($value['images']) : array(); $images = ''; if($value['images']) { $images = '
'; foreach ($value['images'] as $val) { $imageurl = $_G['setting']['attachurl'].$plugin['identifier'].'/'.$val['image'].'?'.random(6); $images .= '
'; } $images .= '
'; } $value['createtime'] = dgmdate($value['createtime'], 'Y-n-j H:i'); showtablerow('', array('class="td25"', 'class="td32"', 'class="td24"', '', '', 'class="td24"', 'class="td24"', 'class="td25"', 'class="td24"'), array( "", $value['uid'], $value['username'], $reply ? '
'.$reply['message'].'
'.($attachhtml ? $attachhtml : '') : '/', '
'.$value['message'].'
'.($images ? $images : ''), $value['postip'], $value['createtime'], "".($value['status'] ? "" : "").lang('plugin/'.$plugin['identifier'], 'report_status_'.$value['status']).($value['status'] ? "" : "")."", $reply ? "".lang('plugin/'.$plugin['identifier'], 'report_reply_manage')."" : "" )); } $multipage = multi($count, $perpage, $page, $mpurl); showsubmit('submit', 'submit', 'select_all', '', $multipage, false); showtablefooter(); showformfooter(); } else { if(is_array($_GET['delete'])) { replyfloor_deletereport($_GET['delete']); } cpmsg(lang('plugin/'.$plugin['identifier'], 'report_updatesucceed'), "action=$pluginurl", 'succeed'); } } elseif($_GET['op'] == 'status') { $report = C::t('#'.$plugin['identifier'].'#replyfloor_report')->fetch_by_id($_GET['id']); if(!$report) { cpmsg(lang('plugin/'.$plugin['identifier'], 'report_nonexistence'), '', 'error'); } $report['status'] = $report['status'] ? 0 : 1; C::t('#'.$plugin['identifier'].'#replyfloor_report')->update_by_id($_GET['id'], array('status' => $report['status'])); ajaxshowheader(); echo ($report['status'] ? "" : "").lang('plugin/'.$plugin['identifier'], 'report_status_'.$report['status']).($report['status'] ? "" : ""); ajaxshowfooter(); //cpmsg(lang('plugin/'.$plugin['identifier'], 'report_updatesucceed'), 'action=plugins&operation=config&do='.$pluginid.'&identifier='.$plugin['identifier'].'&pmod=report', 'succeed'); } ?>