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