mt);
$stmtc = ociparse($conn, "insert into tb_onlineusercount (n_onlineid,n_onlineuserid,d_logindate,d_logintime) values ($intonlineid,$intonlineuserid,$datlogindate,$datlogintime)");
ociexecute($stmtc);
header("location:index.php"); //成功登陆!
}//whileover
}//end if
}//while_over
}//end if
}//while_over
?>
<?ob_end_flush();?>
/*-------checksession-----检查刷新程序---*/
<?
/*30分钟刷新程序
先统计出在线的用户数,如果没有在线用户,系统要保证一个系统指定用户。该系统用户时时在线的原因是保证该刷新程序的执行
如果该登陆用户session不存在了,表示用该用户离线。统计出时间。
*/
session_start();
require('oracle8conn.php');
print $objsnickname;
?>
<html><head><meta http-equiv=refresh content='1800;url="checksession.php"'>
<?
$nowdate = date("y-m-d");
$nowdate = "to_date('".$nowdate."','yy/mm/dd')";
$nowtime = time();
//统计在线人数。30分钟更新一次
$stmtcount = ociparse($conn,"select count(*) from tb_onlineuser");
ociexecute($stmtcount);
while(ocifetchinto($stmtcount,&$arrcountuser)){
$countuser=$arrcountuser[0];
}
print "目前在线人数为:".$countuser."<br>";
//判断在线否?
if ($countuser==0){
print "没有人在线!特殊处理!";
}else{
$stmtonlineuser = ociparse($conn,"select n_onlineuserid,d_logintime,n_onlineid from tb_onlineuser");
ociexecute($stmtonlineuser);
$stmtc = ociparse($conn, "insert into tb_onlineusercount (n_onlineid,n_onlineuserid,d_logindate,d_logintime) values ($intonlineid,$intonlineuserid,$datlogindate,$datlogintime)");
ociexecute($stmtc);
header("location:index.php"); //成功登陆!
}//whileover
}//end if
}//while_over
}//end if
}//while_over
?>
<?ob_end_flush();?>
/*-------checksession-----检查刷新程序---*/
<?
/*30分钟刷新程序
先统计出在线的用户数,如果没有在线用户,系统要保证一个系统指定用户。该系统用户时时在线的原因是保证该刷新程序的执行
如果该登陆用户session不存在了,表示用该用户离线。统计出时间。
*/
session_start();
require('oracle8conn.php');
print $objsnickname;
?>
<html><head><meta http-equiv=refresh content='1800;url="checksession.php"'>
<?
$nowdate = date("y-m-d");
$nowdate = "to_date('".$nowdate."','yy/mm/dd')";
$nowtime = time();
//统计在线人数。30分钟更新一次
$stmtcount = ociparse($conn,"select count(*) from tb_onlineuser");
ociexecute($stmtcount);
while(ocifetchinto($stmtcount,&$arrcountuser)){
$countuser=$arrcountuser[0];
}
print "目前在线人数为:".$countuser."<br>";
//判断在线否?
if ($countuser==0){
print "没有人在线!特殊处理!";
}else{
$stmtonlineuser = ociparse($conn,"select n_onlineuserid,d_logintime,n_onlineid from tb_onlineuser");
ociexecute($stmtonlineuser);
| 对此文章发表了评论 |
