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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("checks.php");
  4. $agent=$_SESSION["all_agent"];
  5. include("../inc/conn.php");
  6. include("../inc/main.js.php");
  7. include("../inc/char.inc.php");
  8. $sqlcc=mysql_query("select * from all_agent where user_account='$agent'",$conn);
  9. $user_credit=mysql_result($sqlcc,0,"user_credit");
  10. $used_credit=mysql_result($sqlcc,0,"used_credit");
  11. $profit=mysql_result($sqlcc,0,"profit");
  12. $menu="信用资料";
  13. $_SESSION["menus"]=$menu;
  14. if(isset($_GET["view"]))
  15. {
  16.  $view=$_GET["view"];
  17. }else $view="A";
  18. if(isset($_GET["act"]))
  19. {
  20.   $pwd=chop($_POST["passwd"]);
  21.   if($pwd<>"")
  22.   {
  23.    if(char($pwd))
  24.    {
  25.     echo outscript("alert('请不要输入非法字符!');");
  26.    }elseif(strlen($pwd)>16||strlen($pwd)<3)
  27.    {
  28.      echo outscript("alert('输入的密码长度在 3-16位之间!');");
  29.    }else
  30.    {
  31.     $pwds=md5($pwd);
  32.     $sqlp=mysql_query("update all_agent set user_password='$pwds' where user_account='$agent'",$conn);
  33. if($sqlp)
  34. {
  35.   outscript("alert('密码修改成功!');");
  36.  }else
  37.  {
  38.   outscript("alert('密码修改失败!');history.back();");
  39.  }
  40.    }
  41.   }else
  42.   {
  43.   outscript("alert('请输入新密码!');history.back();");
  44.   }
  45. }
  46.  $sql=mysql_query("select * from agent_cut where user_account='$agent' and cut_plate='$view' order by sign asc",$conn);
  47. ?>
  48. <head>
  49. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  50. <link href="../css/css.CSS" rel="stylesheet" type="text/css">
  51. <title><?=$titles?></title>
  52. <style type="text/css">
  53. <!--
  54. body {
  55. margin-left: 10px;
  56. }
  57. -->
  58. </style>
  59. </head>
  60. <body onLoad="show5();" oncontextmenu="return false" onselectstart="return false" 
  61. onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
  62. ondragstart="return false" onmouseover="window.status=''; return true">
  63. <?php include("linemsg.php");?>
  64. <table width="809" height="335" border="0" cellpadding="5" cellspacing="0">
  65.   <tr>
  66.     <td width="200" valign="top"><table width=188 height=45 border="0" align=center cellpadding="0" cellspacing="0" class="tmove">
  67.       <tr>
  68.         <td height="45"><table width="200" height="189"  border="0" cellpadding="0" cellspacing="1" class="t17" >
  69.           <tr>
  70.               <td height="23" align="left" class="t11"><div align="center" class="fw12">&nbsp;账号</div>
  71.            </td>
  72.               <td width="121" height="23" align="right" class="t15"><?=$agent?></td>
  73.               </tr>
  74.             <tr class="t13">
  75.               <td width="73" height="28" class="t11"><div align="center" class="fw12">信用额度</div></td>
  76.               <td class="t15"><div align="right"><?=rmb($user_credit)?></div></td>
  77.               </tr>
  78.             <tr class="t13">
  79.               <td height="27" class="t11"><div align="center" class="fw12">已用额度</div></td>
  80.               <td class="t15"><div align="right"><?=rmb($used_credit)?></div></td>
  81.             </tr>
  82.             <tr class="t13">
  83.               <td height="25" class="t11"><div align="center" class="fw12">可开会员数</div></td>
  84.               <td align="right" class="t15"><?=anum($agent,5)?></td>
  85.             </tr>
  86.             <tr class="t13">
  87.               <td height="25" class="t11"><div align="center" class="fw12">已开会员数</div></td>
  88.               <td align="right" class="t15"><?=anum($agent,2)?></td>
  89.             </tr>
  90.             <tr class="t13">
  91.               <td height="25" class="t11">
  92.                 <div align="center" class="fw12">占成</div></td>
  93.               <td align="right" class="t15"><?=$profit?>%</td>
  94.             </tr>
  95.             <tr class="t13">
  96.               <td height="28" class="t11"><div align="center" class="fw12">更改密码</div></td>
  97.                <form name="form1" method="post" action="creditdata.php?act=yes"> <td class="t15"><div align="right">
  98.                   <input name="passwd" type="password" class="input" id="passwd" size="10" maxlength="16">
  99.                   <input type="submit" name="Submit22" value="更改">
  100.               </div></td></form>
  101.             </tr>
  102.         </table></td>
  103.       </tr>
  104.     </table><br>    <br>
  105.       <br>      
  106.       <br>
  107.     </td>
  108.     <td width="609" valign="top"><table height="48" border="0" align="left" cellpadding="0" cellspacing="0" class="tmove">
  109.       <tr>
  110.         <td width="388"    height="48" valign="top"><table width="388" height="71" border="0" cellpadding="0" cellspacing="1" class="t12">
  111.             <tr class="t11">
  112.               <td height="22" colspan="8"><table height="26" border="0" cellpadding="0" cellspacing="0" class="t11">
  113.                   <tr>
  114.                     <td height="26" class="fw12"><strong><a href="creditdata.php?user=<?=$users?>&view=A" <?php if($view=="B"||$view=="C") echo "class='ah'";?>>A盘</a> <a href="creditdata.php?user=<?=$users?>&view=B" <?php if($view=="A"||$view=="C") echo "class='ah'";?>>B盘</a> <a href="creditdata.php?user=<?=$users?>&view=C" <?php if($view=="B"||$view=="A") echo "class='ah'";?>>C盘</a> </strong></td>
  115.                     <td><div align="center"></div></td>
  116.                   </tr>
  117.               </table></td>
  118.             </tr>
  119.             <tr class="t11">
  120.               <td width="124" height="22"><div align="center" class="fw12">类型</div></td>
  121.               <td width="137"><div align="center" class="fw12">退水设定</div></td>
  122.               <td width="173"><div align="center" class="fw12">单项(号)限额</div></td>
  123.               <td width="164"><div align="center" class="fw12">单注限额</div></td>
  124.             </tr>
  125.             <?php 
  126. while($row=mysql_fetch_array($sql))
  127. { ?>
  128.             <form name="form2" method="post" action="all_agent_details.php?user=<?=$users?>&view=<?=$view?>">
  129.               <tr class="t15">
  130.                 <td height="23"><div align="right">
  131.                      <?php if($row["cut_unit"]=="特码A")
  132. {  echo "特码";
  133. }else echo $row["cut_unit"];?>
  134.               </div></td>
  135.                 <td>
  136.                   <div align="right">
  137.                     <?=$row["cut_num"]?>
  138.                 </div></td>
  139.                 <td><div align="center" >
  140.                     <?=rmb($row["unit_limit"])?>
  141.                 </div></td>
  142.                 <td><div align="center" >
  143.                     <?=rmb($row["pour_limit"])?>
  144.                 </div></td>
  145.               </tr>
  146.             </form>
  147.             <?php }?>
  148.         </table></td>
  149.       </tr>
  150.     </table>
  151.     <p>&nbsp;</p></td>
  152.   </tr>
  153. </table>
  154. </body>