comment.inc.php

来自「Phpcms2008 是一款基于 PHP+Mysql 架构的网站内容管理系统」· PHP 代码 · 共 31 行

PHP
31
字号
<?php
defined('IN_PHPCMS') or exit('Access Denied');
$submenu = array(
	array($LANG['all_comment'],'?mod=phpcms&file=setting&tab=5'),
	);
$menu = admin_menu($LANG['comment_content_manage'],$submenu);
require_once MOD_ROOT.'admin/include/comment.class.php';
$comment = new comment();
$forward = $forward ? $forward : HTTP_REFERER;
$action = $action ? $action : 'manage';
$filearray = array('delete', 'manage', 'pass');
in_array($action,$filearray) or showmessage($LANG['illegal_action'],$referer);
switch ($action)
{
	case 'manage':
		$condition = array();
        if (!empty($userid))         {$userid = intval($userid);$condition[] = " `userid` = '$userid' ";}
		if (isset($keyid))  		$condition[] = " `keyid` = '$keyid' ";
		if ($status == '0' || $status == '1')  		$condition[] = " `status` = '$status' ";
		if(isset($ip)) 				$condition[] = " `ip` = '$ip'";
        if($srchfrom)               {$time = TIME; $timeid = TIME - $timeid*24*60*60; $condition[] = " `addtime` >= '$timeid' AND `addtime` <= '$time'";}
		if(!empty($keywords)) 		{$keywords = trim($keywords);$condition [] = " `username` LIKE '%$keywords%' OR `content` LIKE '%$keywords%' " ;}
		$pagesize	= $PHPCMS['pagesize'] ? $PHPCMS['pagesize'] : 20;
		$page		= isset($page) ? intval($page) : '1' ;
		$comments = $comment->get_list($condition, $page, $pagesize);
		$pages = $comments['pages'];
		include admin_tpl('comment_manage');
	break;
	case 'pass':
		if( empty( $cid ) ){
			showmessage('璇烽

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?