menber_manage.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:8k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- $agent=$_SESSION["all_agent"];
- $_SESSION["menus"]="会员管理";
- include("../inc/conn.php");
- include("../inc/base_status.inc.php");
- include("../inc/char.inc.php");
- $fct="";
- if(isset($_GET["fct"]))
- {
- $fct=$_GET["fct"];
- $id=$_GET["id"];
- if($fct=="stop") mysql_query("update member set deleted='1' where ID='$id'",$conn);
- if($fct=="use") mysql_query("update member set deleted='0' where ID='$id'",$conn);
- }
- $act="";
- if(isset($_GET["act"]))
- { $act=$_GET["act"];
- if($act=="uselist")
- {
- $sq=" deleted='0' and all_agent='$agent' and m='0'";
- }elseif($act=="stoplist")
- {
- $sq=" deleted='1' and all_agent='$agent' and m='0'";
- }
- }else
- {
- $sq=" deleted='0' and all_agent='$agent' and m='0'";
- }
- if(isset($_GET["rank"]))
- {
- $rank=$_GET["rank"];
- if($rank=="time")
- {
- $rk="reg_time";
- }elseif($rank=="name")
- {
- $rk="user_name";
- }elseif($rank=="credit")
- {
- $rk="user_credit";
- }elseif($rank=="login")
- {
- $rk="login_time";
- }
- }else
- {
- $rk="id";
- }
- if(isset($_GET["pusers"]))
- { $puser=trim($_GET["pusers"]);
- $_SESSION["pusersu"]=$puser;
- }else $puser=$_SESSION["pusersu"];
- if(isset($puser))
- {
- $st=" agent='$puser' and ";
- }else $st="";
- $pagesize=15;
- $sqlc=mysql_query("select count(*) from member where $st all_agent='$agent'",$conn);
- $myrow=mysql_fetch_array($sqlc);
- $numrows=$myrow[0];
- $pages=intval($numrows/$pagesize);
- if ($numrows%$pagesize) $pages++;
- if (isset($_GET['page']))
- {
- $page=intval($_GET['page']);
- }
- else{
- $page=1;
- }
- $offset=$pagesize*($page - 1);
- $sql=mysql_query("select * from member where $st $sq order by $rk desc limit $offset,$pagesize",$conn);
- ?>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="../css/css.CSS" rel="stylesheet" type="text/css">
- <title></title>
- <style type="text/css">
- <!--
- body {
- margin-left: 10px;
- margin-right: 10px;
- }
- -->
- </style>
- <script language="JavaScript" type="text/JavaScript">
- <!--
- function MM_jumpMenu(targ,selObj,restore){ //v3.0
- eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
- if (restore) selObj.selectedIndex=0;
- }
- //-->
- </script>
- </head>
- <body>
- <table width="800" border="0" cellpadding="0" cellspacing="0" class="t12">
- <tr bgcolor="#417dec">
- <td width="9"> </td>
- <form name="form1">
- <td bgcolor="#417dec" class="fw12"> <script>
- function countDown(secs)
- {
- clearTimeout();
- jump.innerText=secs+" 秒";
- if(--secs>0)
- setTimeout("countDown("+secs+")",1000);
- }
- </script> <div align="right">
- <table border="0" align="left" cellpadding="0" cellspacing="0">
- <tr>
- <td width="65" height="26"> <font color="#ffffff">会员管理</font> </td>
- <td width="77"> <div align="center" class="fw12" ><?php
- if($act==""):
- echo "启用列表";
- elseif($act=="uselist"):
- echo "启用列表";
- elseif($act=="stoplist"):
- echo "停用列表";
- endif; ?>
- </div></td>
- <td width="427"> <select name="menu1" onChange="MM_jumpMenu('self',this,0)">
- <option value="menber_manage.php?rank=time" <?php if(@$_GET["rank"]=="time") echo "selected";?>>按新增日期</option>
- <option value="menber_manage.php?rank=name" <?php if(@$_GET["rank"]=="name") echo "selected";?>>按会员名称</option>
- <option value="menber_manage.php?rank=credit" <?php if(@$_GET["rank"]=="credit") echo "selected";?>>按信用额度</option>
- <option value="menber_manage.php?rank=login" <?php if(@$_GET["rank"]=="login") echo "selected";?>>按最后登录</option>
- </select>
- <font color="#FFFFFF">代理商</font>
- <select name="menu2" onChange="MM_jumpMenu('self',this,0)">
- <?php
- $sqlw=mysql_query("select * from agent where m='0' and all_agent='$agent' order by user_account asc",$conn);
- while($rsl=mysql_fetch_array($sqlw))
- {
- ?>
- <option value="menber_manage.php?pusers=<?=$rsl["user_account"]?>" <?php if($puser==$rsl["user_account"]) echo "selected";?>><?=$rsl["user_account"]?></option>
- <? }?>
- </select></td>
- <td width="211"><div align="right"><a href="menber_manage.php?act=uselist" class="ah">启用列表</a> <a href="menber_manage.php?act=stoplist" class="ah">停用列表</a> <a href="menber_add.php" class="ah">新增</a> </div></td>
- </tr>
- </table>
- </div></td>
- </form>
- <td width="11"> </td>
- </tr>
- </table>
- <table width="100%" height="62" border="0" align="center" cellpadding="0" cellspacing="0" class="tmove">
- <tr>
- <td height="62" valign="top"><table width="800" border="0" cellpadding="5" cellspacing="1" class="t12">
- <tr class="t11">
- <td><div align="center" class="fw12">所属代理商</div></td>
- <td><div align="center" class="fw12">会员账号</div></td>
- <td><div align="center" class="fw12">会员名称</div></td>
- <td><div align="center" class="fw12">盘类</div></td>
- <td><div align="center" class="fw12">信用额度</div></td>
- <td><div align="center" class="fw12">新增日期</div></td>
- <td><div align="center" class="fw12">登入次数</div></td>
- <td><div align="center" class="fw12">最后登入</div></td>
- <td><div align="center" class="fw12">状况</div></td>
- <td><div align="center"></div>
- <div align="center" class="fw12">功能设定</div></td>
- </tr><?php
- while($row=mysql_fetch_array($sql))
- {
- ?>
- <tr class="t17">
- <td><div align="center" class="fblue12"><?=$row["agent"]?></div></td>
- <td><div align="center">
- <?=$row["user_account"]?>
- </div></td>
- <td><div align="center">
- <?=$row["user_name"]?>
- </div></td>
- <td><div align="center"><?=$row["user_plate"]?>盘</div></td>
- <td><div align="center" class="fred12"><?=rmb($row["user_credit"])?></div></td>
- <td><div align="center"><? echo substr($row["reg_time"],5)?></div></td>
- <td><div align="center"><? echo $row["login_num"]?></div></td>
- <td><div align="center"><? echo substr($row["login_time"],5)?></div></td>
- <td><div align="center" class="fblue12"><a href="#" class="ags">
- <?
- if($row["deleted"]=="0")
- {
- echo "<a href='menber_manage.php?fct=stop&id=".$row["ID"]."&act=uselist'>启用</a>";
- }else
- {
- echo "<a href='menber_manage.php?fct=use&id=".$row["ID"]."&act=stoplist'>停用</a>";
- }
- ?></a></div></td>
- <td><div align="center"></div>
- <div align="center"><a href="menber_modify.php?id=<?=$row["ID"]?>" target="_self" class="ags">修改</a> / <a href="menber_details.php?user=<?=$row["user_account"]?>&view=<?=$row["user_plate"]?>" class="ags">限额</a> </div></td>
- </tr><? }?>
- <tr class="t17">
- <td colspan="10" class="t12"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <form name="form1">
- <td>
- <?
- $fp="menber_manage.php";
- $first=1;
- $prev=$page-1;
- $next=$page+1;
- $last=$pages;
- if ($page>1)
- {
- echo "<a href='".$fp."?page=".$first."' class='aw'>第一页</a> ";
- echo "<a href='".$fp."?page=".$prev."' class='aw'>上一页</a> ";
- }else
- {
- echo "<font color='#ffffff'>第一页 上一页</font> ";
- }
- if ($page<$pages)
- {
- echo "<a href='".$fp."?page=".$next."' class='aw'>下一页</a> ";
- echo "<a href='".$fp."?page=".$last."' class='aw'>最终页</a> ";
- } else
- {
- echo "<font color='#ffffff'>下一页 最终页</font> ";
- }
- $nums=$pagesize*$pages;
- ?>
- <span class="fw12"> 页次:</span>
- <select name="select" onChange="MM_jumpMenu('self',this,0)">
- <?php for ($i=1;$i<=$pages;$i++)
- {
- if($page==$i)
- { $se="selected";
- }else $se="";
- echo "<option value='".$fp."?page=".$i."' ".$se.">".$i."</option>";
- }
- ?>
- </select>
- </td>
- </form>
- <td><div align="right"><span class="fw12">共 <strong>
- <?=$pages?>
- </strong> 页</span></div></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table>
- </body>