left.php
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:2k
- <?php
- session_start();
- set_time_limit(1800);
- include("../inc/conn.php");
- if(isset($_SESSION["son"]))
- {
- $son=1;
- $sign=9;
- $user=$_SESSION["aduser"];
- }else
- {
- $son=0;
- $sign=8;
- $user=$_SESSION["adminuser"];
- }
- $menu=$_SESSION["menus"];
- mysql_query("update online set title='$menu' where user_account='$user' and user_type='8'",$conn);
- $names=$_SESSION["adminuser"];
- $nowtimes=date("Y-m-d H:i:s");
- $h=date("YmdHis");
- include("checks.php");
- $sqlhv=mysql_query("select * from online where user_account='$user'",$conn);
- $find_haves=mysql_num_rows($sqlhv);
- $ip=$_SERVER['REMOTE_ADDR'];
- if($find_haves==0) mysql_query("insert into online(user_type,user_name,user_account,ip,login_time,login_time,active_time)values('$sign','$names','$user','$ip','$h','$h')",$conn);
- mysql_query("update online set active_time='$nowtimes' where user_account='$user'",$conn);
- $sqlf=mysql_query("select * from online where user_account='$user'",$conn);
- $have=mysql_num_rows($sqlf);
- $ip=$_SERVER['REMOTE_ADDR'];
- $tm=date(YmdHis);
- if($son==1)
- {
- $sqlpt=mysql_query("select * from son_manage where account='$names' and deleted='1'",$conn);//踢出
- if(mysql_num_rows($sqlpt)>0) echo "<script language='javascript'>alert('对不起,您的账号已被停用!');window.location.href='exit.php';</script>";
- }
- if($have==0) mysql_query("insert into online(user_type,user_name,user_account,ip,login_time,active_time)values('$sign','$names','$user','$ip','$tm','$tm')",$conn);
- $sqlon=mysql_query("select * from onuser where user_account='$user' and sign='$sign'",$conn); //登录T出
- if(mysql_num_rows($sqlon)>0&&!isset($_SESSION["onyes"]))
- {
- echo "<script language='javascript'>alert('Lawless login out,please on 3 minute try again!');window.location.href='exit.php';</script>";
- }elseif(mysql_num_rows($sqlon)==0)
- {
- unset($_SESSION["onyes"]);
- }
- $sqlaa=mysql_query("select * from admin where username='$user' and sign='1'",$conn); //登录T出
- if(mysql_num_rows($sqlaa)>0)
- {
- echo "<script language='javascript'>alert('Lawless login out,please on 3 minute try again!');window.location.href='exit.php';</script>";
- }
- ?>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta http-equiv="refresh" content="20;URL=">