?> </td> <td class="mbox" width="50%"> <select name="sort"> <?php $last = null; while ($row = $db->fetch_assoc($sort)) { if ($last != $row['position']) { if ($last != null) { echo '</optgroup>'; } $last = $row['position']; echo '<optgroup label="' . htmlspecialchars($pos[$last], ENT_QUOTES) . '">'; unset($pos[$last]); } echo '<option value="' . $row['id'] . '">' . navLang($row['name']) . '</option>'; } foreach ($pos as $key => $name) { ?> </optgroup> <optgroup label="<?php echo htmlspecialchars($name, ENT_QUOTES); ?> "> <option value="pos_<?php echo $key; ?> "><<?php echo $lang->phrase('admin_cms_nav_sort_in_here'); ?> ></option>
function _prepare_navigation($position, $id) { if (!isset($this->menu[$position][$id])) { return array(); } else { $navigation = array(); foreach ($this->menu[$position][$id] as $row) { if ($this->_check_permissions($row['groups'])) { $row['navigation'] = $this->_prepare_navigation($position, $row['id']); $row['name'] = navLang($row['name']); $navigation[] = $row; } } return $navigation; } }