Guest User

Untitled

a guest
Jan 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
  2. from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
  3. where c.categories_id = cd.categories_id
  4. and c.categories_status=1 " .
  5. // "and c.categories_id = ptc.category_id " .
  6. // "and ptc.category_id = cd.categories_id " .
  7. // "and ptc.product_type_id not in " . $this->document_types_list . "
  8. " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
  9. order by c.parent_id, c.sort_order, cd.categories_name";
  10. $categories = $db->Execute($categories_query);
  11. while (!$categories->EOF) {
  12. $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
  13. $categories->MoveNext();
  14. }
  15.  
  16. <ul>
  17. <li>Menu One</li>
  18. <li>Menu Two
  19. <ul>
  20. <li>Submenu One</li>
  21. <li>Submenu Two</li>
  22. <li>Submenu Three</li>
  23. </ul>
  24. </li>
  25. <li>Menu Three</li>
  26. <li>Menu Four</li>
  27. <li>Menu Five</li>
  28. <li>ect...</li>
  29. </ul>
  30.  
  31. <ul>
  32. <li>Menu One</li>
  33. <li>Menu Two
  34. <ul>
  35. <li>Submenu One</li>
  36. <li>Submenu Two</li>
  37. <li>Submenu Three</li>
  38. </ul>
  39. </li>
  40. <li>Menu Three</li>
  41. <li>Menu Four</li>
  42. </ul>
  43.  
  44. <ul>
  45. <li>Menu One</li>
  46. <li>Menu Two</li>
  47. <li>Menu Three</li>
  48. <li>Menu Four</li>
  49. </ul>
  50.  
  51. $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
  52. from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
  53. where c.categories_id = cd.categories_id
  54. and c.categories_status=1 " .
  55. " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
  56. " and c.parent_id in " .
  57. " ( select parent_id from " . TABLE_CATEGORIES . " limit 4) " .
  58. " order by c.parent_id, c.sort_order, cd.categories_name";
  59. $categories = $db->Execute($categories_query);
  60. while (!$categories->EOF) {
  61. $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
  62. $categories->MoveNext();
  63. }
Add Comment
Please, Sign In to add comment