ciexecute($stmtnick);
while(ocifetchinto($stmtnick,&$arrn)){
if ($arrn[0]==0){
header("location:logintest.php?msg=1");
}else{
//用户名通过
unset($arrnickname); //撤消临时数组
$stmtpwd = ociparse($conn,"select count(*) countpwd from tb_user where v_pwd='$pwd' and v_nickname='$name'");
ociexecute($stmtpwd);
while(ocifetchinto($stmtpwd,&$arrp,oci_num)){
if ($arrp[0]==0){
header("location:logintest.php?msg=2");
}else{//密码通过
//取出用户的id号
$stmtuid = ociparse($conn,"select n_userid from tb_user where v_nickname='$name'");
ociexecute($stmtuid);
while(ocifetchinto($stmtuid,&$arru,oci_num)){
$intonlineuserid=$arru[0];
}//while_over
//如果该用户通过另一个浏览器重复登陆,解决如下
$stmonlineflag=ociparse($conn,"select count(*) from tb_onlineuser where n_onlineuserid='$intonlineuserid'");
ociexecute($stmonlineflag);
while(ocifetchinto($stmonlineflag,&$arronlineflag,oci_num)){
if ($arronlineflag[0]!=0){ //表示已经在线
//先取到在线用户关联系统id
$stmtsysid= ociparse($conn,"select n_onlineid from tb_onlineuser where n_onlineuserid='$intonlineuserid'");
ociexecute($stmtsysid);
w
while(ocifetchinto($stmtnick,&$arrn)){
if ($arrn[0]==0){
header("location:logintest.php?msg=1");
}else{
//用户名通过
unset($arrnickname); //撤消临时数组
$stmtpwd = ociparse($conn,"select count(*) countpwd from tb_user where v_pwd='$pwd' and v_nickname='$name'");
ociexecute($stmtpwd);
while(ocifetchinto($stmtpwd,&$arrp,oci_num)){
if ($arrp[0]==0){
header("location:logintest.php?msg=2");
}else{//密码通过
//取出用户的id号
$stmtuid = ociparse($conn,"select n_userid from tb_user where v_nickname='$name'");
ociexecute($stmtuid);
while(ocifetchinto($stmtuid,&$arru,oci_num)){
$intonlineuserid=$arru[0];
}//while_over
//如果该用户通过另一个浏览器重复登陆,解决如下
$stmonlineflag=ociparse($conn,"select count(*) from tb_onlineuser where n_onlineuserid='$intonlineuserid'");
ociexecute($stmonlineflag);
while(ocifetchinto($stmonlineflag,&$arronlineflag,oci_num)){
if ($arronlineflag[0]!=0){ //表示已经在线
//先取到在线用户关联系统id
$stmtsysid= ociparse($conn,"select n_onlineid from tb_onlineuser where n_onlineuserid='$intonlineuserid'");
ociexecute($stmtsysid);
w
| 对此文章发表了评论 |
