shdz.php 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. $bh=$_GET[bh];
  6. $userid=returnuserid($_SESSION["SHOPUSER"]);
  7. if($_GET[control]=="update"){
  8. $sj=date("Y-m-d H:i:s");
  9. $ifmr=intval($_POST[R1]);
  10. if(1==$ifmr){updatetable("yjcode_shdz","ifmr=0");}
  11. $area1=sqlzhuru($_POST[area1]);
  12. $area2=sqlzhuru($_POST[add2]);
  13. $area3=sqlzhuru($_POST[add3]);
  14. updatetable("yjcode_shdz","lxr='".sqlzhuru($_POST[t1])."',add1=".$area1.",add1v='".returnarea($area1)."',add2=".$area2.",add2v='".returnarea($area2)."',add3=".$area3.",add3v='".returnarea($area3)."',addr='".sqlzhuru($_POST[t2])."',mot='".sqlzhuru($_POST[t3])."',yb='".sqlzhuru($_POST[t4])."',sj='".$sj."',zt=0,ifmr=".$ifmr." where bh='".$bh."' and userid=".$userid);
  15. php_toheader("shdz.php?t=suc&bh=".$bh);
  16. }
  17. while0("*","yjcode_shdz where bh='".$bh."' and userid=".$userid);if(!$row=mysql_fetch_array($res)){php_toheader("shdzlist.php");}
  18. $ifarea="yes";
  19. $add1=$row[add1];
  20. $add2=$row[add2];
  21. $add3=$row[add3];
  22. ?>
  23. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <meta http-equiv="x-ua-compatible" content="ie=7" />
  27. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  28. <title>收货地址管理</title>
  29. <style type="text/css">
  30. body{margin:0;font-size:12px;text-align:center;color:#333;word-wrap:break-word;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;}
  31. *{margin:0 auto;padding:0;}
  32. ul{list-style-type:none;margin:0;padding:0;}
  33. .red{color:#ff0000;}
  34. .uk{float:left;width:700px;font-size:14px;}
  35. .uk li{float:left;}
  36. .uk .l1{width:100px;text-align:right;padding:14px 8px 0 0;height:36px;border-bottom:#F5F5F5 dotted 1px;}
  37. .uk .l2{width:592px;height:42px;padding:8px 0 0 0;border-bottom:#F5F5F5 dotted 1px;}
  38. .uk .l2 label{float:left;cursor:pointer;margin:0 20px 0 0;padding:8px 20px 0 10px;height:22px;background-color:#FCFCFD;border:#ECECEC solid 1px;border-radius:5px;}
  39. .uk .l2 .inp{float:left;outline:none;border:#CCCCCC solid 1px;height:27px;padding:4px 0 0 5px;margin-right:7px;}
  40. .uk .l2 .fd{float:left;margin-right:5px;}
  41. .uk .l3{width:100px;text-align:right;padding:13px 8px 0 0;height:55px;border-bottom:#F5F5F5 dotted 1px;font-weight:700;}
  42. .uk .l4{width:592px;height:55px;padding:13px 0 0 0;border-bottom:#F5F5F5 dotted 1px;}
  43. .btn1{cursor:pointer;float:left;border:0;color:#fff;width:173px;height:44px;margin-right:10px;background-color:#E83A17;font-size:16px;}
  44. .btn2{background-color:#D43211;}
  45. </style>
  46. <script language="javascript" src="../js/jquery.min.js"></script>
  47. <script language="javascript" src="../js/layer.js"></script>
  48. <script language="javascript">
  49. function tj(){
  50. if(document.f1.t1.value==""){alert("请输入收货人姓名");document.f1.t1.focus();return false;}
  51. if(document.f1.t2.value==""){alert("请输入详细地址");document.f1.t2.focus();return false;}
  52. if(document.f1.t3.value==""){alert("请输入手机号码");document.f1.t3.focus();return false;}
  53. layer.msg('正在保存', {icon: 16 ,time: 0,shade :0.25});
  54. f1.action="shdz.php?control=update&bh=<?=$bh?>";
  55. }
  56. function area1cha(){
  57. farea2.location="../tem/area2.php?area1id="+document.getElementById("area1").value;
  58. }
  59. <? if($_GET[t]=="suc"){?>
  60. parent.location.reload();
  61. <? }?>
  62. </script>
  63. </head>
  64. <body>
  65. <form name="f1" method="post" onsubmit="return tj()">
  66. <input type="hidden" value="shdz" name="jvs" />
  67. <ul class="uk">
  68. <li class="l1"><span class="red">*</span> 收货人:</li>
  69. <li class="l2"><input name="t1" class="inp" value="<?=$row[lxr]?>" size="25" type="text" /></li>
  70. <li class="l1"><span class="red">*</span> 所在地区:</li>
  71. <li class="l2"><? include("../tem/area.php");?></li>
  72. <li class="l1"><span class="red">*</span> 详细地址:</li>
  73. <li class="l2"><input name="t2" class="inp" value="<?=$row[addr]?>" size="50" type="text" /></li>
  74. <li class="l1"><span class="red">*</span> 手机号码:</li>
  75. <li class="l2"><input name="t3" class="inp" value="<?=$row[mot]?>" size="25" type="text" /></li>
  76. <li class="l1">默认地址:</li>
  77. <li class="l2">
  78. <span class="finp">
  79. <label><input name="R1" type="radio" value="0"<? if(empty($row[ifmr])){?> checked="checked"<? }?> /> 否</label>&nbsp;&nbsp;&nbsp;
  80. <label><input name="R1" type="radio" value="1"<? if($row[ifmr]==1){?> checked="checked"<? }?> /> 是</label>
  81. </span>
  82. </li>
  83. <li class="l1">邮编:</li>
  84. <li class="l2"><input name="t4" class="inp" value="<?=$row[yb]?>" size="10" type="text" /></li>
  85. <li class="l3"></li>
  86. <li class="l4"><?=tjbtnr("保存修改")?></li>
  87. </ul>
  88. </form>
  89. </body>
  90. </html>