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

Web服务器

开发平台:

PHP

  1. <?php
  2. session_start();
  3. include("checks.php");
  4. include("../inc/conn.php");
  5. include("../inc/base_status.inc.php");
  6. include("../inc/char.inc.php");
  7. include("../inc/update_cuts.inc.php");
  8. $_SESSION["menus"]="股东详细设定";
  9. if(isset($_GET["view"]))
  10. {
  11.  $view=$_GET["view"];
  12. }else $view="A";
  13. if(isset($_GET["user"]))
  14. {
  15.  $users=$_GET["user"];
  16.  $sql=mysql_query("select * from agent_cut where user_account='$users' and cut_plate='$view' order by sign asc",$conn);
  17. }
  18. if(isset($_POST["act"]))
  19. {   for($i=1;$i<=18;$i++)
  20. { $c="cut".$i;
  21.   $u="unit".$i;
  22.   $p="pour".$i;
  23.   $is="id".$i;
  24.   $cut=$_POST[$c];
  25.   $unit=$_POST[$u];
  26.   $pour=$_POST[$p];
  27.   $id=$_POST[$is];
  28.       update_sup($users,$view,$i,$cut,$unit,$pour);////更新股东下代理,会员退水
  29.       mysql_query("update agent_cut set cut_num='$cut' where ID='$id'",$conn);
  30.   mysql_query("update agent_cut set unit_limit='$unit',pour_limit='$pour'  where user_account='$users' and sign='$i'",$conn);//ABC盘同步
  31.  } 
  32. echo "<script language='javascript'>window.location.href='super_agent_details.php?user=".$users."&view=".$view."'</script>";
  33. }
  34. ?>
  35. <script language="javascript">
  36. function Isnum(){
  37.   return ((event.keyCode >= 48) && (event.keyCode <= 57));
  38. }
  39. </script>
  40. <head>
  41. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  42. <link href="../css/css.CSS" rel="stylesheet" type="text/css">
  43. <title></title>
  44. <style type="text/css">
  45. <!--
  46. body {
  47. margin-left: 0px;
  48. }
  49. -->
  50. </style></head>
  51. <body>
  52. <form name="form2" method="post" action="super_agent_details.php?user=<?=$users?>&view=<?=$view?>">
  53. <table width="700" height="48" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
  54.   <tr>
  55.     <td width="700"  height="48" valign="top"><table width="100%" height="95" border="0" cellpadding="0" cellspacing="1" class="t12">
  56.         <tr class="t11">
  57.           <td height="22" colspan="7"><table width="694" height="26" border="0" cellpadding="0" cellspacing="0" class="t11">
  58.             <tr>
  59.               <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>
  60.                 <input name="act" type="hidden" id="act" value="yes">
  61.               </strong></strong></td>
  62.               <td width="141"><div align="center"><a href="super_agent.php" class="aw">返回上一页</a></div></td>
  63.             </tr>
  64.           </table></td>
  65.         </tr>
  66.         <tr class="t11">
  67.           <td width="58" height="22"><div align="center" class="fw12">类型</div></td>
  68.           <td width="87"><div align="center" class="fw12">退水设定</div></td>
  69.           <td width="93"><div align="center" class="fw12">单项(号)限额</div></td>
  70.           <td><div align="center" class="fw12">单注限额</div></td>
  71.           <td width="90"><div align="center"><span class="fw12">原退水设定</span></div></td>
  72.           <td width="97"><div align="center"><span class="fw12">原单项(号)限额</span></div></td>
  73.           <td width="115"><div align="center"><span class="fw12">原单注限额</span></div></td>
  74.         </tr><?php 
  75. while($row=mysql_fetch_array($sql))
  76. { ?>
  77.         <tr class="t17"> 
  78.           <td height="23"><div align="right"><strong>
  79.             <? if($row["cut_unit"]=="特码A")
  80. {
  81.  echo "特码";
  82. }else echo $row["cut_unit"];?>
  83.           </strong></div></td>
  84.          
  85.             <td>
  86.               <div align="right">
  87.                  <select name="cut<?=$row["sign"]?>" id="user_cut">
  88.   <?php 
  89.   $agent_sign=$row["sign"];
  90.   $cut_plate=$row["cut_plate"];
  91.   $sqlh=mysql_query("select * from agent_cut where user_account='admin' and sign='$agent_sign' and  cut_plate='$cut_plate'",$conn);
  92.   $asign=mysql_result($sqlh,0,"sign");
  93.   $n=0;
  94.   $num=mysql_result($sqlh,0,"cut_num");
  95.  if($asign=="1"||$asign=="5"||$asign=="18")
  96.  {
  97.    for($i=0;$i<=$num;$i+=0.5)
  98.    { 
  99.     if($asign=="5")
  100. { $ns="";
  101. }else $ns="";
  102.    $pn[$n]=$ns.$i;
  103.    $n++;
  104.    }
  105.   }elseif($asign=="18")
  106.   {
  107.   for($i=0;$i<=$num;$i++)
  108.    { 
  109.   $pn[$n]=$i;
  110.   $n++;
  111.    }
  112.   }else
  113.   {
  114.     for($i=0;$i<=$num;$i+=0.25)
  115.     { 
  116.      $pn[$n]=$i;
  117.     $n++;
  118.     }
  119.   }
  120.    for($k=0;$k<=count($pn)-1;$k++)
  121.    {
  122.     if($pn[$k]==$row["cut_num"])
  123. {
  124.  $se="selected";
  125. }else $se="";
  126.     echo "<option value='".$pn[$k]."' ".$se.">".$pn[$k]."</option>";
  127.    }
  128.    unset($pn);
  129.    ?>
  130.                   </select>
  131.               </div></td><td><div align="center" class="fbred">
  132.             <input name="unit<?=$row["sign"]?>" type="text" class="input" id="unit_limit" value="<?=$row["unit_limit"]?>" size="10" ONKEYPRESS="event.returnValue=Isnum();">
  133.           </div></td>
  134.           <td><div align="center" class="fblue12">
  135.             <input name="pour<?=$row["sign"]?>" type="text" class="input" id="pour_limit" value="<?=$row["pour_limit"]?>" size="10" ONKEYPRESS="event.returnValue=Isnum();">
  136.             <input name="id<?=$row["sign"]?>" type="hidden" id="id" value="<?=$row["ID"]?>">
  137.             <input name="sign<?=$row["sign"]?>" type="hidden" id="sign" value="<?=$row["sign"]?>">
  138. </div>            <div align="center" class="fred12">
  139.             </div></td>
  140.           <td><div align="center"><strong><?=$row["cut_num"]?></strong></div></td>
  141.           <td><div align="center" ><strong><strong><?=$row["unit_limit"]?></strong></strong></div></td>
  142.           <td><div align="center"><span ><strong><strong><?=$row["pour_limit"]?></strong></strong></span></div></td>
  143.         </tr>  <?php }?>
  144.         <tr class="t17">
  145.           <td height="23" colspan="7" class="t11"><div align="center"><span class="fred12">
  146.               <input type="reset" name="Submit2" value=" 重置 ">
  147. &nbsp;
  148.   <input type="submit" name="Submit" value=" 修改 ">
  149.           </span></div></td>
  150.           </tr> 
  151.   
  152.     </table></td>
  153.   </tr>
  154. </table>    </form>
  155. <p>&nbsp;</p>
  156. </body>