super_agent_details.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:6k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- include("../inc/conn.php");
- include("../inc/base_status.inc.php");
- include("../inc/char.inc.php");
- include("../inc/update_cuts.inc.php");
- $_SESSION["menus"]="股东详细设定";
- if(isset($_GET["view"]))
- {
- $view=$_GET["view"];
- }else $view="A";
- if(isset($_GET["user"]))
- {
- $users=$_GET["user"];
- $sql=mysql_query("select * from agent_cut where user_account='$users' and cut_plate='$view' order by sign asc",$conn);
- }
- if(isset($_POST["act"]))
- { for($i=1;$i<=18;$i++)
- { $c="cut".$i;
- $u="unit".$i;
- $p="pour".$i;
- $is="id".$i;
- $cut=$_POST[$c];
- $unit=$_POST[$u];
- $pour=$_POST[$p];
- $id=$_POST[$is];
- update_sup($users,$view,$i,$cut,$unit,$pour);////更新股东下代理,会员退水
- mysql_query("update agent_cut set cut_num='$cut' where ID='$id'",$conn);
- mysql_query("update agent_cut set unit_limit='$unit',pour_limit='$pour' where user_account='$users' and sign='$i'",$conn);//ABC盘同步
- }
- echo "<script language='javascript'>window.location.href='super_agent_details.php?user=".$users."&view=".$view."'</script>";
- }
- ?>
- <script language="javascript">
- function Isnum(){
- return ((event.keyCode >= 48) && (event.keyCode <= 57));
- }
- </script>
- <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: 0px;
- }
- -->
- </style></head>
- <body>
- <form name="form2" method="post" action="super_agent_details.php?user=<?=$users?>&view=<?=$view?>">
- <table width="700" height="48" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
- <tr>
- <td width="700" height="48" valign="top"><table width="100%" height="95" border="0" cellpadding="0" cellspacing="1" class="t12">
- <tr class="t11">
- <td height="22" colspan="7"><table width="694" height="26" border="0" cellpadding="0" cellspacing="0" class="t11">
- <tr>
- <td width="553" height="26" class="fw12"><strong>股东详细设定 <a href="super_agent_details.php?user=<?=$users?>&view=A" <?php if($view=="B"||$view=="C") echo "class='ah'";?>>A盘</a> <a href="super_agent_details.php?user=<?=$users?>&view=B" <?php if($view=="A"||$view=="C") echo "class='ah'";?>>B盘</a> <a href="super_agent_details.php?user=<?=$users?>&view=C" <?php if($view=="B"||$view=="A") echo "class='ah'";?>>C盘</a> <strong>
- <input name="act" type="hidden" id="act" value="yes">
- </strong></strong></td>
- <td width="141"><div align="center"><a href="super_agent.php" class="aw">返回上一页</a></div></td>
- </tr>
- </table></td>
- </tr>
- <tr class="t11">
- <td width="58" height="22"><div align="center" class="fw12">类型</div></td>
- <td width="87"><div align="center" class="fw12">退水设定</div></td>
- <td width="93"><div align="center" class="fw12">单项(号)限额</div></td>
- <td><div align="center" class="fw12">单注限额</div></td>
- <td width="90"><div align="center"><span class="fw12">原退水设定</span></div></td>
- <td width="97"><div align="center"><span class="fw12">原单项(号)限额</span></div></td>
- <td width="115"><div align="center"><span class="fw12">原单注限额</span></div></td>
- </tr><?php
- while($row=mysql_fetch_array($sql))
- { ?>
- <tr class="t17">
- <td height="23"><div align="right"><strong>
- <? if($row["cut_unit"]=="特码A")
- {
- echo "特码";
- }else echo $row["cut_unit"];?>
- </strong></div></td>
- <td>
- <div align="right">
- <select name="cut<?=$row["sign"]?>" id="user_cut">
- <?php
- $agent_sign=$row["sign"];
- $cut_plate=$row["cut_plate"];
- $sqlh=mysql_query("select * from agent_cut where user_account='admin' and sign='$agent_sign' and cut_plate='$cut_plate'",$conn);
- $asign=mysql_result($sqlh,0,"sign");
- $n=0;
- $num=mysql_result($sqlh,0,"cut_num");
- if($asign=="1"||$asign=="5"||$asign=="18")
- {
- for($i=0;$i<=$num;$i+=0.5)
- {
- if($asign=="5")
- { $ns="";
- }else $ns="";
- $pn[$n]=$ns.$i;
- $n++;
- }
- }elseif($asign=="18")
- {
- for($i=0;$i<=$num;$i++)
- {
- $pn[$n]=$i;
- $n++;
- }
- }else
- {
- for($i=0;$i<=$num;$i+=0.25)
- {
- $pn[$n]=$i;
- $n++;
- }
- }
- for($k=0;$k<=count($pn)-1;$k++)
- {
- if($pn[$k]==$row["cut_num"])
- {
- $se="selected";
- }else $se="";
- echo "<option value='".$pn[$k]."' ".$se.">".$pn[$k]."</option>";
- }
- unset($pn);
- ?>
- </select>
- </div></td><td><div align="center" class="fbred">
- <input name="unit<?=$row["sign"]?>" type="text" class="input" id="unit_limit" value="<?=$row["unit_limit"]?>" size="10" ONKEYPRESS="event.returnValue=Isnum();">
- </div></td>
- <td><div align="center" class="fblue12">
- <input name="pour<?=$row["sign"]?>" type="text" class="input" id="pour_limit" value="<?=$row["pour_limit"]?>" size="10" ONKEYPRESS="event.returnValue=Isnum();">
- <input name="id<?=$row["sign"]?>" type="hidden" id="id" value="<?=$row["ID"]?>">
- <input name="sign<?=$row["sign"]?>" type="hidden" id="sign" value="<?=$row["sign"]?>">
- </div> <div align="center" class="fred12">
- </div></td>
- <td><div align="center"><strong><?=$row["cut_num"]?></strong></div></td>
- <td><div align="center" ><strong><strong><?=$row["unit_limit"]?></strong></strong></div></td>
- <td><div align="center"><span ><strong><strong><?=$row["pour_limit"]?></strong></strong></span></div></td>
- </tr> <?php }?>
- <tr class="t17">
- <td height="23" colspan="7" class="t11"><div align="center"><span class="fred12">
- <input type="reset" name="Submit2" value=" 重置 ">
-
- <input type="submit" name="Submit" value=" 修改 ">
- </span></div></td>
- </tr>
- </table></td>
- </tr>
- </table> </form>
- <p> </p>
- </body>