index.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?
  2. include("../../config/conn.php");
  3. include("../../config/function.php");
  4. ?>
  5. <html>
  6. <head>
  7. <meta http-equiv="x-ua-compatible" content="ie=7" />
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  9. <meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no" />
  10. <title>所有分类 - 手机版<?=webname?></title>
  11. <? include("../tem/cssjs.html");?>
  12. <script language="javascript">
  13. function aonc(x){
  14. al=parseInt(document.getElementById("allnum").innerHTML);
  15. for(i=1;i<al;i++){
  16. document.getElementById("lefta"+i).className="";
  17. document.getElementById("pright"+i).style.display="none";
  18. }
  19. document.getElementById("lefta"+x).className="a1";
  20. document.getElementById("pright"+x).style.display="";
  21. }
  22. </script>
  23. </head>
  24. <body>
  25. <? $nowpagetit="商品分类";include("../tem/moban/".$rowcontrol[wapmb]."/tem/top.php");?>
  26. <div class="pleft" id="pleft">
  27. <? $i=1;while1("*","yjcode_type where admin=1 order by xh asc");while($row1=mysql_fetch_array($res1)){?>
  28. <a href="javascript:void(0);" id="lefta<?=$i?>" onClick="aonc(<?=$i?>)"><?=$row1[type1]?></a>
  29. <? $i++;}?>
  30. </div>
  31. <span id="allnum" style="display:none;"><?=$i?></span>
  32. <? $i=1;while1("*","yjcode_type where admin=1 order by xh asc");while($row1=mysql_fetch_array($res1)){?>
  33. <div class="pright" id="pright<?=$i?>" style="display:none;">
  34. <? while2("*","yjcode_type where admin=2 and type1='".$row1[type1]."' order by xh asc");while($row2=mysql_fetch_array($res2)){?>
  35. <div class="d1" onClick="gourl('../product/search_j<?=$row1[id]?>v_k<?=$row2[id]?>v.html')"><img onerror="this.src='img/none.png'" src="../../upload/type/type2_<?=$row2[id]?>_m.png"><br><?=$row2[type2]?></div>
  36. <? }?>
  37. </div>
  38. <? $i++;}?>
  39. <script language="javascript">
  40. aonc(1);
  41. </script>
  42. </body>
  43. </html>