⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connlist.php

📁 flashget43的源代码 一个比较常用的下载程序
💻 PHP
字号:
<?php

include_once('init.php');

if(!inSession()) {
	include('login.php');
	exit;
}
if(!isset($_REQUEST['sort']) || isset($_REQUEST['clear'])) $_REQUEST['sort'] = 'none';	

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

if($rs->hasNext()) {
	$connections = array();
	while($rec = $rs->next()) {
		$temp_connection = array();
		$temp_connection['updated'] = substr($rec['updated'], 8, 2) . ':' . substr($rec['updated'], 10, 2);
		$temp_connection['created'] = substr($rec['created'], 8, 2) . ':' . substr($rec['created'], 10, 2);
		$temp_connection['id'] = $rec['id'];
		$temp_connection['userid'] = $rec['userid'];
		if(isset($rec['userid'])){
			$user = ChatServer::getUser($rec['userid']);
			$temp_connection['login'] = $user['login'];
		}
		$temp_connection['roomid'] = $rec['roomid'];
		$temp_connection['state'] = $rec['state'];
		$temp_connection['color'] = $rec['color'];
		$temp_connection['start'] = $rec['start'];
		$temp_connection['lang'] = $rec['lang'];
		$temp_connection['ip'] = $rec['ip'];
		$temp_connection['tzoffset'] = $rec['tzoffset'];
		$temp_connection['host'] = @gethostbyaddr($rec['ip']);

		array_push($connections, $temp_connection);
	}
}

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

//Assign Smarty variables and load the admin template
$smarty->assign('connections',$connections);
$smarty->display('connlist.tpl');

?>

⌨️ 快捷键说明

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