- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
menber_modify.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:8k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- include("../inc/conn.php");
- include("../inc/base_status.inc.php");
- include("../inc/char.inc.php");
- if(isset($_GET["act"]))
- {
- $id=$_POST["id"];
- $user_name=$_POST["user_name"];
- $pwd1=$_POST["pwd1"];
- $pwd2=$_POST["pwd2"];
- $user_plate=$_POST["user_plate"];
- $user_credit=$_POST["user_credit"];
- $old_credit=$_POST["old_credit"];
- $agents=$_POST["agent"];
- $tb_right=$_POST["tb_right"];
- $used_credits=$user_credit-$old_credit; // 额差
- // echo $used_credits
- $drop_type=$_POST["drop_type"];
- $password=md5($pwd1);
- if($pwd1<>$pwd2)
- {
- echo "<script language='javascript'>alert('两次密码不一致!');window.location.href='menber_modify.php?id=".$id."';</script>";
- }else
- { if($pwd1==""&&$pwd2=="" )
- {
- $sqlyes=mysql_query("update member set user_name='$user_name',user_plate='$user_plate',user_credit='$user_credit',drop_type='$drop_type',tb_right='$tb_right' where ID='$id'",$conn);//used_credit='$used_credits',
- }else $sqlyes=mysql_query("update member set user_name='$user_name',user_password='$password',user_plate='$user_plate',user_credit='$user_credit',drop_type='$drop_type',tb_right='$tb_right' where ID='$id'",$conn);
- if($sqlyes)
- {
- mysql_query("update agent set used_credit=used_credit+$used_credits where user_account='$agents'",$conn);
- echo "<script language='javascript'>alert('修改成功!');window.location.href='menber_manage.php';</script>";
- }else
- {
- echo "<script language='javascript'>alert('修改失败,请重新修改!');window.location.href='menber_modify.php?id=".$id."'</script>";
- }
- }
- }
- $id=$_GET["id"];
- $sqlv=mysql_query("select * from member where id='$id'",$conn);
- $user_account=mysql_result($sqlv,0,"user_account");
- $user_name=mysql_result($sqlv,0,"user_name");
- $user_plate=mysql_result($sqlv,0,"user_plate");
- $user_credit=mysql_result($sqlv,0,"user_credit");
- $agent=mysql_result($sqlv,0,"agent");
- $drop_type=mysql_result($sqlv,0,"drop_type");
- $tb_right=mysql_result($sqlv,0,"tb_right");
- ?>
- <script language="javascript">
- function check(form)
- {
- if(form.user_name.value=="")
- {
- alert('请输入用户名称!');
- return false;
- form.user_name.focus();
- }
- if(form.user_credit.value=="")
- {
- alert('请输入额度!');
- return false;
- form.user_credit.focus();
- }
- if(parseFloat(form.user_credit.value)>parseFloat(form.can_credit.value))
- {
- alert('开设额度不能越过可用额度 '+form.can_credit.value+'!');
- return false;
- form.user_credit.focus();
- }
- }
- </script><script language="javascript">
- function Isnum(){
- return ((event.keyCode >= 48) && (event.keyCode <= 57));
- }
- </script>
- <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;
- }
- .STYLE1 {color: #FFFFFF}
- -->
- </style></head>
- <body>
- <table width="645" height="91" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
- <tr>
- <td height="91" valign="top"><table width="645" height="127" border="0" cellpadding="0" cellspacing="0" class="t17">
- <tr bgcolor="#417dec">
- <td width="553" height="22"><strong class="fw12"> 修改会员</strong></td>
- <td width="92" bgcolor="#417dec"><a href="menber_manage.php" class="fwhit9pt STYLE1">返回上一页</a></td>
- </tr>
- <tr> <form name="form2" method="post" action="menber_modify.php?act=yes" onSubmit="return check(this);">
- <td colspan="2"><div align="right"></div>
- <div align="center">
- <table width="100%" height="207" border="0" cellspacing="1">
- <tr>
- <td height="22"><div align="right">代理商:</div></td>
- <td><div align="left">
- <?=$agent?>
- <input name="id" type="hidden" id="id" value="<?=$id?>">
- <?php
- $sqlcc=mysql_query("select * from agent where user_account='$agent'",$conn);
- $user_creditm=mysql_result($sqlcc,0,"user_credit");
- $used_credit=mysql_result($sqlcc,0,"used_credit");
- $low_credit=$user_creditm-$used_credit;
- $tb_right_f=mysql_result($sqlcc,0,"tb_right");
- ?>
- <input name="agent" type="hidden" id="agent" value="<?=$agent?>">
- </div></td>
- </tr>
- <tr>
- <td width="16%" height="22"><div align="right">账号:</div></td>
- <td width="84%"><div align="left">
- <?=$user_account?>
- </div></td>
- </tr>
- <tr>
- <td height="24"><div align="right">会员名称:</div></td>
- <td><div align="left">
- <input name="user_name" type="text" class="input" id="user_name" value="<?=$user_name?>" size="15" maxlength="15">
- </div></td>
- </tr>
- <tr>
- <td><div align="right">密码:</div></td>
- <td><div align="left">
- <input name="pwd1" type="password" class="input" id="pwd1" size="15" maxlength="15">
- <span class="fred12">密码框为空,则默认为原密码</span></div></td>
- </tr>
- <tr>
- <td height="25"><div align="right">确认密码:</div></td>
- <td><div align="left">
- <input name="pwd2" type="password" class="input" id="pwd2" size="15" maxlength="15">
- </div></td>
- </tr>
- <tr>
- <td><div align="right">开放盘别:</div></td>
- <td><div align="left">
- <select name="user_plate" id="user_plate">
- <option value="A" <?php if($user_plate=="A") echo "selected";?>>A盘</option>
- <option value="B" <?php if($user_plate=="B") echo "selected";?>>B盘</option>
- <option value="C" <?php if($user_plate=="C") echo "selected";?>>C盘</option>
- </select>
- </div></td>
- </tr>
- <tr>
- <td height="26"><div align="right">投注方式:</div></td>
- <td><div align="left"><select name="drop_type" id="drop_type">
- <option value="信用额度" <? if($drop_type=="信用额度") echo "selected" ?> >信用额度</option>
- <option value="现金投注" <? if($drop_type=="现金投注") echo "selected" ?>>现金投注</option>
- </select>
- </div></td>
- </tr>
- <tr>
- <td height="26"><div align="right">信用额度:</div></td>
- <td><div align="left"><input name="user_credit" type="text" class="input" id="user_credit" value="<?=$user_credit?>" size="15" maxlength="15" ONKEYPRESS="event.returnValue=Isnum();">
- (可用额度 <span class="fred12">
- <?=$low_credit?>
- </span>)
- <input name="can_credit" type="hidden" id="can_credit3" value="<? echo $low_credit+$user_credit?>">
- <input name="old_credit" type="hidden" id="old_credit2" value="<?=$user_credit?>">
- </div></td>
- </tr>
- <tr>
- <td><div align="right">特码B:</div></td>
- <td><select name="tb_right" id="tb_right" <? if($tb_right_f==0){?>disabled="disabled"<? }?>>
- <option value="0" <? if($tb_right==0){?>selected<? }?>>禁止</option>
- <option value="1" <? if($tb_right==1){?>selected<? }?>>允许</option>
- </select></td>
- </tr>
- <tr>
- <td><div align="right"></div></td>
- <td><div align="left">
- <input type="submit" name="Submit" value="确认修改">
- <input type="reset" name="Submit2" value="重置">
- </div></td>
- </tr>
- </table>
- </div></td> </form>
- </tr>
- </table></td>
- </tr>
- </table>
- <p> </p>
- <p> </p>
- </body>