drate_animal_color.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:3k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- include("../inc/conn.php");
- $_SESSION["menus"]="修改默认赔率";
- $sql=mysql_query("select * from dnum where sign='6' order by id asc",$conn);
- if(isset($_POST["id"]))
- { $id=$_POST["id"];
- $rate=chop($_POST["rate"]);
- $brate=chop($_POST["brate"]);
- if($rate<>"")
- {
- $sqlgc=mysql_query("select * from dnum where ID='$id'",$conn); //变更更新
- if(mysql_num_rows($sqlgc)<>0)
- {
- $gup=mysql_result($sqlgc,0,"rate");
- mysql_query("update dnum set brate='$gup' where ID='$id'",$conn);
- } $timep=date("YmdHis");
- $ok=mysql_query("update dnum set rate='$rate',brate='$brate',m='1',h='1',uptime='$timep' where ID='$id'",$conn);
- if($ok) echo " <font color='red'><strong>修改成功!</strong></font>";
- echo "<meta http-equiv='refresh' content='3;URL=drate_animal_color.php?menu=6'>";
- }else
- {
- echo " <font color='red'><strong>请输入赔率!</strong></font>";
- }
- }
- ?>
- <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: 10px;
- }
- -->
- </style></head>
- <body>
- <?php include("drate_menu.inc.php");?>
- <br>
- <br>
- <table width="271" height="48" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
- <tr>
- <td width="271" height="48" valign="top"><table width="271" height="48" border="0" cellpadding="0" cellspacing="1" class="t12">
- <tr class="t11">
- <td width="72" height="22"><div align="center" class="fw12">类型</div></td>
- <td width="80"><div align="center" class="fw12">当前赔率</div></td>
- <td width="115"><div align="center" class="fw12">修改赔率</div></td>
- </tr>
- <?php
- while($row=mysql_fetch_array($sql))
- {
- ?>
- <form name="form2" method="post" action="drate_animal_color.php?menu=6">
- <tr class="t17">
- <td height="23"><div align="center"><strong>
- <?=$row["tp"]?>
- </strong></div></td>
- <td><div align="center"> <span class="fbred">
- <input name="brate" type="hidden" id="brate" value=" <?=$row["rate"]?>">
- <?=$row["rate"]?>
- </span>
- <input name="id" type="hidden" id="id2" value="<?=$row["ID"]?>">
- </div></td>
- <td><div align="center" class="fbred">
- <input name="rate" type="text" class="input" id="rate_num2" size="5" ONKEYPRESS="event.returnValue=Isnum();">
- <input type="submit" name="Submit" value="修改">
- </div></td>
- </tr>
- </form>
- <? }?>
- </table></td>
- </tr>
- </table>
- </body>