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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("checks.php");
  4. include("../inc/conn.php");
  5. $_SESSION["menus"]="修改默认赔率";
  6. $sql=mysql_query("select * from dnum where sign='9' order by id asc",$conn);
  7. if(isset($_POST["id"]))
  8. { $id=$_POST["id"];
  9.   $rate=chop($_POST["rate"]);
  10.    if($rate<>"")
  11.    {
  12.    $sqlgc=mysql_query("select * from dnum where ID='$id'",$conn);  //变更更新
  13. if(mysql_num_rows($sqlgc)<>0)
  14. {
  15.   $gup=mysql_result($sqlgc,0,"rate");
  16.   mysql_query("update dnum set brate='$gup' where ID='$id'",$conn);
  17. } $timep=date("YmdHis");
  18.   $ok=mysql_query("update dnum set rate='$rate',brate='$rate',bnum='0',m='1',h='1',uptime='$timep' where ID='$id'",$conn);
  19.   if($ok) echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'><strong>修改成功!</strong></font>";
  20.   echo "<meta http-equiv='refresh' content='3;URL=drate_six_animal.php?menu=8'>";
  21.   }else
  22.   {
  23.    echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'><strong>请输入赔率!</strong></font>";
  24.   }
  25. }
  26. ?>
  27. <head>
  28. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  29. <link href="../css/css.CSS" rel="stylesheet" type="text/css">
  30. <title></title>
  31. <style type="text/css">
  32. <!--
  33. body {
  34. margin-left: 10px;
  35. }
  36. -->
  37. </style></head>
  38. <body>
  39. <?php include("drate_menu.inc.php");?>
  40. <br>
  41. <br>
  42. <br>
  43. <table width="271" height="48" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
  44.   <tr>
  45.     <td width="271" height="48" valign="top"><table width="271" height="48" border="0" cellpadding="0" cellspacing="1" class="t12">
  46.         <tr class="t11">
  47.           <td width="72" height="22"><div align="center" class="fw12">类型</div></td>
  48.           <td width="80"><div align="center" class="fw12">当前赔率</div></td>
  49.           <td width="115"><div align="center" class="fw12">修改赔率</div></td>
  50.         </tr>
  51.         <?php 
  52. while($row=mysql_fetch_array($sql))
  53. {
  54.         ?>
  55.         <form name="form2" method="post" action="drate_six_animal.php?menu=5">
  56.           <tr class="t17">
  57.             <td height="23"><div align="center"><strong>
  58.                 <?=$row["tp"]?>
  59.             </strong></div></td>
  60.             <td><div align="center"> <span class="fbred">
  61.                 <?=$row["rate"]?>
  62.                 </span>
  63.                     <input name="id" type="hidden" id="id2" value="<?=$row["ID"]?>">
  64.             </div></td>
  65.             <td><div align="center" class="fbred">
  66.                 <input name="rate" type="text" class="input" id="rate_num2" size="5" ONKEYPRESS="event.returnValue=Isnum();">
  67.                 <input type="submit" name="Submit" value="修改">
  68.             </div></td>
  69.           </tr>
  70.         </form>
  71.         <? }?>
  72.     </table></td>
  73.   </tr>
  74. </table>
  75. </body>