left_son.php
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:2k
源码类别:

Web服务器

开发平台:

PHP

  1. <?php
  2. session_start();
  3. $user=$_SESSION["all_agent_son"];
  4. $names=$_SESSION["user_name"];
  5. include("../inc/conn.php");
  6. $menu=$_SESSION["menus"];
  7. mysql_query("update online set title='$menu' where user_account='$user' and user_type='6'",$conn);
  8. $sqlps=mysql_query("select * from online where user_account='$user' and user_type='6' and vmsg='1'",$conn);
  9. if(mysql_num_rows($sqlps)<>0)
  10. {
  11.   mysql_query("update online set vmsg='0' where user_account='$user'",$conn);
  12.   echo "<script language='javascript'>alert('".mysql_result($sqlps,0,"content")."')</script>";
  13.  }
  14. $sqlhv=mysql_query("select * from online where user_account='$user'",$conn);
  15. $find_haves=mysql_num_rows($sqlhv);
  16. $ip=$_SERVER['REMOTE_ADDR'];
  17. $nowtimes=date("Y-m-d H:i:s");
  18. $h=date("YmdHis");
  19. 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);
  20. $sqlps=mysql_query("select * from son_account where user_account='$user'",$conn);
  21. mysql_query("update online set active_time='$nowtimes' where user_account='$user'",$conn);
  22. if(mysql_result($sqlps,0,"online")==1)
  23. {
  24.   echo "<script language='javascript'>alert('Parse error,please login again!');window.location.href='exit.php';</script>";
  25. $sqlpt=mysql_query("select * from son_account where  account='$user'",$conn);//踢出
  26. if(mysql_result($sqlpt,0,"deleted")==1) echo "<script language='javascript'>alert('对不起,您的账号已被停用!');window.location.href='exit.php';</script>";
  27. $names=$_SESSION["user_name"];
  28. $sqlf=mysql_query("select * from online where user_account='$user'",$conn);
  29. $have=mysql_num_rows($sqlf);
  30. $ip=$_SERVER['REMOTE_ADDR'];
  31. $tm=date(YmdHis);
  32. 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);    
  33. $sqlon=mysql_query("select * from onuser where user_account='$user' and sign='6'",$conn); //登录T出
  34. if(mysql_num_rows($sqlon)>0&&!isset($_SESSION["onyes"]))
  35. {
  36.   echo "<script language='javascript'>alert('对不起,您的账号在别处登录,您被迫下线!');window.location.href='exit.php';</script>";
  37. }elseif(mysql_num_rows($sqlon)==0)
  38. {
  39.   unset($_SESSION["onyes"]);
  40. }
  41. ?>
  42. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  43. <meta http-equiv="refresh" content="20;URL=">