<?php
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
namespace app\index\controller;
use think\Controller;
use app\common\lib\redisQueue;
class Info extends Controller{

	function index(){

	$a = \think\Cache::init();
	$allUser = $a->handler()->keys("staffInfo_*");
		$user = '';
$i = 0;
$j = 0;
	foreach($allUser as $staff){
$j++;
		$info = cache($staff);
		if(time() - $info['active'] > 120){
	continue;
}
		$user .= $info['staff_id'].":".$info['ip'].":".$info['id'].":".$info['staffname'].":".date("Y-m-d H:i:s",$info['active'])."<br/>\r\n";

$i++;
	}
echo "==============系统在线用户".$i.'/'.$j."：=================<br/>\r\n";
echo $user;
}


}
