shdzlist.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?
  2. include("../../config/conn.php");
  3. include("../../config/function.php");
  4. sesCheck_m();
  5. $userid=returnuserid($_SESSION[SHOPUSER]);
  6. $sj=date("Y-m-d H:i:s");
  7. if($_GET[control]=="del"){
  8. deletetable("yjcode_shdz where userid=".$userid." and id=".$_GET[id]);
  9. php_toheader("shdzlist.php");
  10. }
  11. ?>
  12. <html>
  13. <head>
  14. <meta http-equiv="x-ua-compatible" content="ie=7" />
  15. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  16. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
  17. <title>会员中心 <?=webname?></title>
  18. <? include("../tem/cssjs.html");?>
  19. <link href="css/buy.css" rel="stylesheet" type="text/css" />
  20. <script language="javascript">
  21. function shdzdel(x){
  22. if(!confirm("确认删除?")){return false;}
  23. layer.open({type: 2,content: '正在删除'});
  24. $.get("shdzdel.php",{id:x},function(result){
  25. location.reload();
  26. });
  27. }
  28. </script>
  29. </head>
  30. <body>
  31. <? include("topuser.php");?>
  32. <div class="bfbtop1 box">
  33. <div class="d1" onClick="gourl('index.php')"><img src="img/topleft.png" height="21" /></div>
  34. <div class="d2">收货地址</div>
  35. <div class="d4 red" onClick="gourl('shdzlx.php')">新增</div>
  36. </div>
  37. <? if(panduan("*","yjcode_shdz where zt=0 and userid=".$rowuser[id])==1){?>
  38. <?
  39. if($_GET[page]!=""){$page=$_GET[page];}else{$page=1;}
  40. pagef(" where zt=0 and userid=".$userid,10,"yjcode_shdz","order by sj desc");while($row=mysql_fetch_array($res)){
  41. $addr=returnarea($row[add1])." ".returnarea($row[add2])." ".returnarea($row[add3])." ".$row[addr];
  42. $au="shdz.php?bh=".$row[bh];
  43. ?>
  44. <div class="shdzlist box">
  45. <div class="d1"><?=$row[lxr]?></div>
  46. <div class="d2"><?=$row[mot]?></div>
  47. <div class="d3" onClick="shdzdel(<?=$row[id]?>)"><img src="img/cardel.png" height="13" /></div>
  48. <div class="d3" onClick="gourl('<?=$au?>')"><img src="img/edit.png" height="13" /></div>
  49. </div>
  50. <div class="shdzlist1 box" onClick="gourl('<?=$au?>')">
  51. <div class="d0"></div>
  52. <div class="d1"><? if(1==$row[ifmr]){?><span class="red">[默认地址]</span> <? }?><?=$addr?></div>
  53. <div class="d0"></div>
  54. </div>
  55. <? }?>
  56. <div class="npa">
  57. <?
  58. $nowurl="shdzlist.php";
  59. $nowwd="";
  60. require("page.html");
  61. ?>
  62. </div>
  63. <? }else{?>
  64. <div class="wait box" onClick="gourl('shdzlx.php')">
  65. <div class="d1">
  66. <span class="s0"><img src="img/shdz.png" width="70" /></span>
  67. <span class="s1">您还没有添加收货地址</span>
  68. <span class="s2">添加新地址</span>
  69. </div>
  70. </div>
  71. <? }?>
  72. </body>
  73. </html>