protype2.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. include("../../config/conn.php");
  3. include("../../config/function.php");
  4. $type1id=$_GET[type1id];
  5. ?>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="x-ua-compatible" content="ie=7" />
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  11. <title>二级分类</title>
  12. <style type="text/css">
  13. body{margin:0;}
  14. ul{margin:0;list-style-type:none;}
  15. p{margin:2pt 0 0 0;}
  16. *{margin:0 auto;padding:0;}
  17. input,select{outline: medium none;}
  18. </style>
  19. </head>
  20. <body>
  21. <?
  22. if(!empty($type1id)){
  23. $type1name=returntype(1,$_GET[type1id]);
  24. ?>
  25. <select name="d1" id="d1" style="font-size:13px;border:0;width:120%;background-color:transparent;" onChange="prosx2()">
  26. <option value="0">选择二级分类(可留空)</option>
  27. <? while2("*","yjcode_type where admin=2 and type1='".$type1name."' order by xh asc");while($row2=mysql_fetch_array($res2)){?>
  28. <option value="<?=$row2[id]?>" <? if(intval($_GET[nid])==$row2[id]){?>selected="selected"<? }?>><?=$row2[type2]?></option>
  29. <? }?>
  30. </select>
  31. <? }?>
  32. <script language="javascript">
  33. function prosx2(){
  34. d=options=document.getElementById("d1").value;
  35. parent.ptype3.location="protype3.php?type1id=<?=$type1id?>&type2id="+d;
  36. parent.ptype4.location="protype4.php";
  37. parent.ptype5.location="protype5.php";
  38. parent.document.f1.type2id.value=d;
  39. parent.document.f1.type3id.value=0;
  40. parent.document.f1.type4id.value=0;
  41. parent.document.f1.type5id.value=0;
  42. }
  43. </script>
  44. </body>
  45. </html>