用户身份会话类 discuz_session
class discuz_session {var $sid = null;
var $var;
var $isnew = false;
//初始化session数组
var $newguest = array('sid' => 0, 'ip1' => 0, 'ip2' => 0, 'ip3' => 0, 'ip4' => 0,
'uid' => 0, 'username' => '', 'groupid' => 7, 'invisible' => 0, 'action' => 0,
'lastactivity' => 0, 'fid' => 0, 'tid' => 0, 'lastolupdate' => 0);
var $old =array('sid' =>'', 'ip' =>'', 'uid' =>0);
function discuz_session($sid = '', $ip = '', $uid = 0) {
......
}
//设置
function set($key, $value) {
......
}
//获取
function get($key) {
......
}
//初始化
function init($sid, $ip, $uid) {
......
}
//创建
function create($ip, $uid) {
......
}
//删除
function delete() {
......
}
//更新数据
function update() {
......
}
/**
* 取在线用户数量
*
* @param int $type 0=全部 1=会员 2=游客
* @return int
*/
function onlinecount($type = 0) {
......
}
}
页:
[1]