ignorelist.php

来自「flashget43的源代码 一个比较常用的下载程序」· PHP 代码 · 共 50 行

PHP
50
字号
<?php

include_once('init.php');

if(!inSession()) {
	include('login.php');
	exit;
}

if(!isset($_REQUEST['sort']) || isset($_REQUEST['clear'])) $_REQUEST['sort'] = 'none';

$req = array_merge($_GET, $_POST);

if(isset($_REQUEST['unignoreid'])) {
	$stmt = new Statement("DELETE FROM {$GLOBALS['fc_config']['db']['pref']}ignors WHERE ignoreduserid=?");
	$stmt->process($_REQUEST['unignoreid']);
	$notice = 'ignore removed';}

$stmt = new Statement("SELECT * FROM {$GLOBALS['fc_config']['db']['pref']}ignors ORDER BY userid");
$rs = $stmt->process();

$ignores = array();

while($rec = $rs->next()) {
	$ignores_temp = array();

	$user  = ChatServer::getUser($rec['userid']);
	$iuser = ChatServer::getUser($rec['ignoreduserid']);

	$ignores_temp['user'] = $user['login'];
	$ignores_temp['userid'] = $rec['userid'];
	$ignores_temp['iuser'] = $iuser['login'];
	$ignores_temp['iuserid'] = $rec['ignoreduserid'];
	$ignores_temp['created'] = $rec['created'];

	array_push($ignores, $ignores_temp);
}

if ($_REQUEST['sort'] != 'none') {
	sort_table($_REQUEST['sort'], $ignores);
}

//Assign Smarty variables and load the admin template
$smarty->assign('notice',$notice);
$smarty->assign('error',$error);
$smarty->assign('ignores',$ignores);
$smarty->display('ignorelist.tpl');

?>

⌨️ 快捷键说明

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