left_son.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:2k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- $user=$_SESSION["all_agent_son"];
- $names=$_SESSION["user_name"];
- include("../inc/conn.php");
- $menu=$_SESSION["menus"];
- mysql_query("update online set title='$menu' where user_account='$user' and user_type='6'",$conn);
- $sqlps=mysql_query("select * from online where user_account='$user' and user_type='6' and vmsg='1'",$conn);
- if(mysql_num_rows($sqlps)<>0)
- {
- mysql_query("update online set vmsg='0' where user_account='$user'",$conn);
- echo "<script language='javascript'>alert('".mysql_result($sqlps,0,"content")."')</script>";
- }
- $sqlhv=mysql_query("select * from online where user_account='$user'",$conn);
- $find_haves=mysql_num_rows($sqlhv);
- $ip=$_SERVER['REMOTE_ADDR'];
- $nowtimes=date("Y-m-d H:i:s");
- $h=date("YmdHis");
- if($find_haves==0) mysql_query("insert into online(user_type,user_name,user_account,ip,login_time,login_time,active_time)values('6','$names','$user','$ip','$h','$h')",$conn);
- $sqlps=mysql_query("select * from son_account where user_account='$user'",$conn);
- mysql_query("update online set active_time='$nowtimes' where user_account='$user'",$conn);
- if(mysql_result($sqlps,0,"online")==1)
- {
- echo "<script language='javascript'>alert('Parse error,please login again!');window.location.href='exit.php';</script>";
- }
- $sqlpt=mysql_query("select * from son_account where account='$user'",$conn);//踢出
- if(mysql_result($sqlpt,0,"deleted")==1) echo "<script language='javascript'>alert('对不起,您的账号已被停用!');window.location.href='exit.php';</script>";
- $names=$_SESSION["user_name"];
- $sqlf=mysql_query("select * from online where user_account='$user'",$conn);
- $have=mysql_num_rows($sqlf);
- $ip=$_SERVER['REMOTE_ADDR'];
- $tm=date(YmdHis);
- if($have==0) mysql_query("insert into online(user_type,user_name,user_account,ip,login_time,active_time)values('6','$names','$user','$ip','$tm','$tm')",$conn);
- $sqlon=mysql_query("select * from onuser where user_account='$user' and sign='6'",$conn); //登录T出
- if(mysql_num_rows($sqlon)>0&&!isset($_SESSION["onyes"]))
- {
- echo "<script language='javascript'>alert('对不起,您的账号在别处登录,您被迫下线!');window.location.href='exit.php';</script>";
- }elseif(mysql_num_rows($sqlon)==0)
- {
- unset($_SESSION["onyes"]);
- }
- ?>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta http-equiv="refresh" content="20;URL=">