drate_animal_ends.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='12' 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' 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_ends.php?menu=10'>";
  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. <br>
  37. <table width="271" height="48" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
  38.   <tr>
  39.     <td width="271" height="48" valign="top"><table width="271" height="48" border="0" cellpadding="0" cellspacing="1" class="t12">
  40.         <tr class="t11">
  41.           <td width="72" height="22"><div align="center" class="fw12">类型</div></td>
  42.           <td width="80"><div align="center" class="fw12">当前赔率</div></td>
  43.           <td width="115"><div align="center" class="fw12">修改赔率</div></td>
  44.         </tr>
  45.         <?php 
  46. while($row=mysql_fetch_array($sql))
  47. {
  48.         ?>
  49.         <form name="form2" method="post" action="drate_animal_ends.php?menu=5">
  50.           <tr class="t17">
  51.             <td height="23"><div align="center"><strong>
  52.                 <?=$row["tp"]?>
  53.             </strong></div></td>
  54.             <td><div align="center"> <span class="fbred">
  55.                 <?=$row["rate"]?>
  56.                 </span>
  57.                     <input name="id" type="hidden" id="id2" value="<?=$row["ID"]?>">
  58.             </div></td>
  59.             <td><div align="center" class="fbred">
  60.                 <input name="rate" type="text" class="input" id="rate_num2" size="5" ONKEYPRESS="event.returnValue=Isnum();">
  61.                 <input type="submit" name="Submit" value="修改">
  62.             </div></td>
  63.           </tr>
  64.         </form>
  65.         <? }?>
  66.     </table></td>
  67.   </tr>
  68. </table>
  69. </body>