⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 onpser.php

📁 六和投注系统
💻 PHP
字号:
<?php


function ip_times( $user_account, $user_type, $ip, $ips )
{
    global $conn;
    $num_time = 120;
    $ttime = time( );
    $sqls = mysql_query( "select * from ip_time where user_account='{$user_account}'", $conn );
    if ( mysql_num_rows( $sqls ) == 0 )
    {
        mysql_query( "insert into ip_time(user_account,user_type,ip,num_time,ttime,ips)values('{$user_account}','{$user_type}','{$ip}','{$num_time}','{$ttime}','{$ips}')", $conn );
    }
}

session_start( );
include( "../inc/conn.php" );
if ( isset( $_GET['loop'] ) )
{
    $_SESSION['ps'] = "yes";
}
if ( !isset( $_SESSION['ps'] ) )
{
    echo "<script language='javascript'>window.location='../';</script>";
}
include( "../inc/base_status.inc.php" );
$sqlde = mysql_query( "select * from ip_time where ips='1'", $conn );
while ( $rsp = mysql_fetch_array( $sqlde ) )
{
    $usp = $rsp['user_account'];
    mysql_query( "delete from online where user_account='{$usp}'", $conn );
}
$c_user = mysql_num_rows( mysql_query( "select * from online where user_type='1'", $conn ) );
$c_agent = mysql_num_rows( mysql_query( "select * from online where user_type='2'", $conn ) );
$c_all_agent = mysql_num_rows( mysql_query( "select * from online where user_type='3'", $conn ) );
$c_super_agent = mysql_num_rows( mysql_query( "select * from online where user_type='4'", $conn ) );
$c_agent_son = mysql_num_rows( mysql_query( "select * from online where user_type='5'", $conn ) );
$c_all_agent_son = mysql_num_rows( mysql_query( "select * from online where user_type='6'", $conn ) );
$c_super_agent_son = mysql_num_rows( mysql_query( "select * from online where user_type='7'", $conn ) );
if ( isset( $_GET['fip'] ) )
{
    $user = $_GET['user'];
    $utype = $_GET['utype'];
    $ip = $_GET['ip'];
    $ips = 1;
    ip_times( $user, $utype, $ip, $ips );
    mysql_query( "update ip_time set ips='1' where user_account='{$user}' and user_type='{$utype}'" );
    mysql_query( "delete from online where user_account='{$user}'" );
    ip_times( $user, $utype, $ip, $ips );
    echo "<script language='javascript'>window.location.href='?';</script>";
}
if ( isset( $_GET['cip'] ) )
{
    $user = $_GET['user'];
    mysql_query( "delete from ip_time where user_account='{$user}'" );
    echo "<script language='javascript'>window.location.href='?';</script>";
}
if ( isset( $_GET['act'] ) )
{
    $act = $_GET['act'];
    if ( $act == "user" )
    {
        $sq = "where user_type='1'";
    }
    else if ( $act == "agent" )
    {
        $sq = "where user_type='2'";
    }
    else if ( $act == "all" )
    {
        $sq = "where user_type='3'";
    }
    else if ( $act == "super" )
    {
        $sq = "where user_type='4'";
    }
    else if ( $act == "dson" )
    {
        $sq = "where user_type='5'";
    }
    else if ( $act == "zson" )
    {
        $sq = "where user_type='6'";
    }
    else if ( $act == "gson" )
    {
        $sq = "where user_type='7'";
    }
}
if ( isset( $_GET['op'] ) )
{
    $user = $_GET['user'];
    $utype = $_GET['utype'];
    $ip = $_GET['ip'];
    $ips = 0;
    ip_times( $user, $utype, $ip, $ips );
    mysql_query( "delete from online where user_account='{$user}'", $conn );
    if ( $utype == 1 )
    {
        mysql_query( "update member set online='1' where user_account='{$user}'", $conn );
        echo "<script language='javascript'>window.location.href='?';</script>";
    }
    else if ( $utype == 2 )
    {
        mysql_query( "update agent set online='1' where user_account='{$user}'", $conn );
        echo "<script language='javascript'>window.location.href='?';</script>";
    }
    else if ( $utype == 3 )
    {
        mysql_query( "update all_agent set online='1' where user_account='{$user}'", $conn );
        echo "<script language='javascript'>window.location.href='?';</script>";
    }
    else if ( $utype == 4 )
    {
        mysql_query( "update super_agent set online='1' where user_account='{$user}'", $conn );
        echo "<script language='javascript'>window.location.href='?';</script>";
    }
    else if ( $utype == 8 )
    {
        mysql_query( "update admin set sign='1' where username='{$user}'", $conn );
        echo "<script language='javascript'>window.location.href='?';</script>";
    }
    else
    {
        mysql_query( "update son_account set online='1' where user_account='{$user}'", $conn );
        echo "<script language='javascript'>window.location.href='?';</script>";
    }
}
$sql = mysql_query( "select * from online {$sq} order by login_time desc", $conn );
$sps = mysql_query( "select * from online", $conn );
$acounts = mysql_num_rows( $sps );
echo "<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<link href=\"../styles/css_g/css.CSS\" rel=\"stylesheet\" type=\"text/css\">\r\n<title></title>\r\n";
echo "<s";
echo "tyle type=\"text/css\">\r\n<!--\r\nbody {\r\n\tmargin-left: 10px;\r\n}\r\n-->\r\n</style></head>\r\n";
echo "<s";
echo "cript language=\"JavaScript\" type=\"text/JavaScript\">\r\n<!--\r\nfunction MM_jumpMenu(targ,selObj,restore){ //v3.0\r\n  eval(targ+\".location='\"+selObj.options[selObj.selectedIndex].value+\"'\");\r\n  if (restore) selObj.selectedIndex=0;\r\n}\r\n//-->\r\n</script>\r\n<body><br>\r\n<table height=\"91\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tmove\">\r\n  <tr>\r\n    <td height=\"91\" valign=\"top\"><table width=\"8";
echo "32\" height=\"105\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"t17\">\r\n      <tr class=\"t11\">\r\n        <td height=\"27\" colspan=\"2\"><table width=\"100%\" height=\"18\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n          <tr>\r\n            <td width=\"74%\">";
echo "<s";
echo "trong class=\"fw12\"> online(";
echo $acounts;
echo ") </strong></td>\r\n            <td width=\"17%\" align=\"right\">";
echo "<s";
echo "trong class=\"fw12\">";
if ( isset( $_GET['update'] ) )
{
    $update_time = $_GET['update'];
    $_SESSION['update_time'] = $update_time;
}
else
{
    $update_time = $_SESSION['update_time'];
}
if ( isset( $update_time ) && $update_time != 0 )
{
    echo "<meta http-equiv='refresh' content='".$update_time."'>";
}
else
{
    $update_time = 0;
}
echo "        ";
echo "<s";
echo "elect name=\"menu3\" onChange=\"MM_jumpMenu('self',this,0)\">\r\n          <option value=\"?update=0\" ";
if ( $update_time == 0 || !isset( $update_time ) )
{
    echo "selected";
}
echo ">停止</option>\r\n          <option value=\"?update=10\" ";
if ( $update_time == 10 )
{
    echo "selected";
}
echo ">10秒</option>\r\n\t\t  <option value=\"?update=20\" ";
if ( $update_time == 20 )
{
    echo "selected";
}
echo ">20秒</option>\r\n          <option value=\"?update=60\" ";
if ( $update_time == 60 )
{
    echo "selected";
}
echo ">60秒</option>\r\n        </select>\r\n \r\n        &nbsp;";
echo "<s";
echo "pan class=\"fbred\" id=jump></span>\r\n ";
echo "<s";
echo "cript>\r\nfunction countDown(secs)\r\n{\r\nvar tv;\r\njump.innerText=secs+\" 秒\";\r\nif(--secs>0)\r\ntv=setTimeout(\"countDown(\"+secs+\")\",1000);\r\n}\r\ncountDown(";
echo $update_time;
echo ");\r\n</script></strong></td>\r\n            <td width=\"9%\" align=\"right\">";
echo "<s";
echo "trong class=\"fw12\"><a href=\"javascript:window.location.reload();\" class=\"ah\">刷新</a></strong></td>\r\n          </tr>\r\n        </table></td>\r\n        </tr>\r\n      <tr>\r\n        <td width=\"69\" height=\"30\"><div align=\"right\">在线分类:</div></td>\r\n        <td width=\"763\"><a href=\"onpser.php?act=super\" class=\"ags\">股东</a> ";
echo "<s";
echo "pan class=\"fbred\">";
echo $c_super_agent;
echo "</span> 人 <a href=\"onpser.php?act=all\" class=\"ags\">总代理</a> ";
echo "<s";
echo "pan class=\"fbred\">";
echo $c_all_agent;
echo "</span> 人 <a href=\"onpser.php?act=agent\" class=\"ags\">代理商</a> ";
echo "<s";
echo "pan class=\"fbred\">";
echo $c_agent;
echo "</span> 人 <a href=\"onpser.php?act=user\" class=\"ags\">会员</a> ";
echo "<s";
echo "pan class=\"fbred\">";
echo $c_user;
echo "</span> 人 <a href=\"onpser.php?act=gson\" class=\"ags\">股东子账号</a>";
echo "<s";
echo "pan class=\"fbred\"> ";
echo $c_super_agent_son;
echo " </span> 人 <a href=\"onpser.php?act=zson\" class=\"ags\">总代理子账号</a>";
echo "<s";
echo "pan class=\"fbred\"> ";
echo $c_all_agent_son;
echo " </span>人 <a href=\"onpser.php?act=dson\" class=\"ags\">代理商子账号</a>";
echo "<s";
echo "pan class=\"fbred\"> ";
echo $c_agent_son;
echo " </span>人 <a href=\"onpser.php\" class=\"ags\">全部</a> ";
echo "<s";
echo "pan class=\"fbred\">";
echo $acounts;
echo "</a></span> 人</td>\r\n      </tr>\r\n      <tr valign=\"top\">\r\n        <td height=\"48\" colspan=\"2\"><div align=\"right\"></div>\r\n            <table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"1\" class=\"t12\">\r\n              <tr class=\"t17\" >\r\n                <td colspan=\"10\" >";
echo "<s";
echo "trong class=\"fbred\">已封IP用户:</strong>\r\n\t\t\t\t";
$sqlp = mysql_query( "select * from ip_time where ips='1'" );
while ( $rows = mysql_fetch_array( $sqlp ) )
{
    echo $rows['user_account']." (<a href='??cip=yes&user=".$rows['user_account']."' class='ags' title='".$rows['ip']."'>释放IP</a>)&nbsp;";
}
echo " </td>\r\n              </tr>\r\n              <tr class=\"t11\">\r\n                <td width=\"8%\"><div align=\"center\" class=\"fw12\">";
echo $ps_type;
echo "</div></td>\r\n                <td width=\"8%\"><div align=\"center\" class=\"fw12\">";
echo $ps_name;
echo "</div></td>\r\n                <td width=\"8%\"><div align=\"center\" class=\"fw12\">";
echo $ps_account;
echo "</div></td>\r\n                <td width=\"13%\"><div align=\"center\" class=\"fw12\">登入时间</div></td>\r\n                <td width=\"13%\"><div align=\"center\" class=\"fw12\">活动时间</div></td>\r\n                <td width=\"13%\" align=\"center\" class=\"fw12\">所在位置</td>\r\n                <td width=\"11%\"><div align=\"center\" class=\"fw12\">IP地址</div></td>\r\n                <td width=\"8%\"><div align=\"center\" class=\"fw12\">";
echo $ps_function;
echo "</div></td>\r\n                <td width=\"7%\"><div align=\"center\" class=\"fw12\">封IP</div></td>\r\n                <td width=\"11%\"><div align=\"center\" class=\"fw12\">公告</div></td>\r\n              </tr>";
while ( $rs = mysql_fetch_array( $sql ) )
{
    echo "              <tr class=\"t17\">\r\n                <td align=\"left\">";
    if ( $rs['user_type'] == 1 )
    {
        echo "会员";
    }
    else if ( $rs['user_type'] == 2 )
    {
        echo "代理商";
    }
    else if ( $rs['user_type'] == 3 )
    {
        echo "总代理";
    }
    else if ( $rs['user_type'] == 4 )
    {
        echo "股东";
    }
    else if ( $rs['user_type'] == 5 )
    {
        echo "代理子账号";
    }
    else if ( $rs['user_type'] == 6 )
    {
        echo "总代子账号";
    }
    else if ( $rs['user_type'] == 7 )
    {
        echo "股东子账号";
    }
    else if ( $rs['user_type'] == 8 )
    {
        echo "管理员";
    }
    else if ( $rs['user_type'] == 9 )
    {
        echo "操盘员";
    }
    echo "</td>\r\n                <td align=\"left\">";
    echo $rs['user_name'];
    echo "</td>\r\n                <td align=\"left\">";
    echo $rs['user_account'];
    echo "</td>\r\n                <td><div align=\"center\">";
    echo substr( $rs['login_time'], 10 );
    echo "</div></td>\r\n                <td><div align=\"center\">\r\n                  ";
    echo substr( $rs['active_time'], 10 );
    echo "                </div></td>\r\n                <td align=\"left\">";
    echo $rs['title'];
    echo "</td>\r\n                <td><div align=\"center\">";
    echo $rs['ip'];
    echo "</div></td>\r\n                <td><div align=\"center\"><a href=\"?op=yes&user=";
    echo $rs['user_account'];
    echo "&utype=";
    echo $rs['user_type'];
    echo "&ip=";
    echo $rs['ip'];
    echo "\" class=\"ags\">踢出</a></div></td>\r\n                <td><div align=\"center\"><a href=\"?fip=yes&user=";
    echo $rs['user_account'];
    echo "&utype=";
    echo $rs['user_type'];
    echo "&ip=";
    echo $rs['ip'];
    echo "\" class=\"ags\">封锁</a></div></td>\r\n                <td><div align=\"center\"><a href=\"onpser_add.php?user=";
    echo $rs['user_account'];
    echo "\" class=\"ags\" title=\"";
    echo $rs['content'];
    echo "\">out</a></div></td>\r\n              </tr>";
}
echo "            </table>            \r\n          </td>\r\n        </tr>\r\n    </table></td>\r\n  </tr>\r\n</table>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</body>\r\n\r\n</html>\r\n\r\n\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -