Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. <ul class="cd-accordion-menu animated">
  2.  
  3. <?php $catquery = mysql_query("SELECT * FROM `test_category` WHERE `level` = 1 ORDER BY `listorder` ASC"); ?>
  4. <?php while($catmenu = mysql_fetch_array($catquery)): ?>
  5. <li class="has-children">
  6. <input type="checkbox" name ="group-<?php echo $i; ?>" id="group-<?php echo $i; ?>">
  7. <label for="group-<?php echo $i; $i++; ?>"><?php echo $catmenu['name']; ?></label>
  8.  
  9. <ul>
  10. <?php
  11. $idcategoo = $catmenu['id'];
  12. $catqueryt = mysql_query("SELECT * FROM `test_category` WHERE `level` = 2 AND `parent_id` = '$idcategoo' ORDER BY `listorder` ASC"); ?>
  13. <?php while($catmenut = mysql_fetch_array($catqueryt)): ?>
  14.  
  15. <li class="has-children">
  16. <input type="checkbox" name ="sub-group-<?php echo $j; ?>" id="sub-group-<?php echo $j; ?>">
  17. <label for="sub-group-<?php echo $j; $j++; ?>"><?php echo $catmenut['name']; ?></label>
  18. <?php
  19. $idcategot = $catmenut['id'];
  20. $catquerytt = mysql_query("SELECT * FROM `test_category` WHERE `level` = 3 AND `parent_id` = '$idcategot' ORDER BY `listorder` ASC");
  21. $querythirdmen = mysql_fetch_array($catquerytt);
  22. ?>
  23. <?php if(!empty($querythirdmen['name'])): ?>
  24. <ul>
  25. <?php while($catmenutt = mysql_fetch_array($catquerytt)): ?>
  26. <li><a href="?cn=<?php echo urlencode($catmenutt['name']).'&id='.$catmenutt['id']; ?>"><?php echo $catmenutt['name']; ?></a></li>
  27. <?php endwhile; ?>
  28. </ul>
  29. <?php endif; ?>
  30.  
  31. </li>
  32.  
  33. <?php endwhile; ?>
  34.  
  35. </ul>
  36. </li>
  37. <?php endwhile; ?>
  38.  
  39. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement