<?php foreach ($select as $obj) { ?> <option value="<?php echo $obj->id; ?> "<?php echo $obj->id == $curent_id_parent ? 'selected' : ''; ?> ><?php echo $level . $obj->pole; ?> </option> <?php echo system::show_tpl(array('select' => dbh::catalog_tree_get_child($obj->id), 'level' => $level . ' ', 'curent_id_parent' => $curent_id_parent, 'tpl_folder' => $tpl_folder), $tpl_folder . '/select.php'); ?> <?php }
<li> <?php if (isset($_GET['grupa']) and $obj->id == intval($_GET['grupa'])) { $_cur = 'class="cur"'; } ?> <?php echo general::link_to('catalog/grupa/' . $obj->id . '/brand/0', $level . $obj->pole, $_cur); ?> <?php $children = dbh::catalog_tree_get_child($obj->id); ?> <?php if (count($children)) { ?> <ul><?php echo system::show_tpl(array('result' => dbh::catalog_tree_get_child($obj->id), 'level' => $level . ''), '/frontend/catalog/menu_ind.php'); ?> </ul> <?php } ?> </li> <?php }
<?php echo general::link_to($tpl_folder . '/delete/id/' . $obj->id, 'Удалить?', 'onclick="return confirm(\'Вы уверены?\')"'); ?> <?php } ?> </span> </span> <span class="name"><?php echo $level . $obj->pole; ?> </span> </span> <?php echo dbh::catalog_tree_count_child($obj->id) > 0 ? '<ul>' : ''; ?> <?php echo system::show_tpl(array('result' => dbh::catalog_tree_get_child($obj->id), 'tpl_folder' => $tpl_folder), $tpl_folder . '/menu.php'); ?> <?php echo dbh::catalog_tree_count_child($obj->id) > 0 ? '</ul>' : ''; ?> </li> <?php } ?>
<?php foreach ($select as $obj) { ?> <?php $children = dbh::catalog_tree_get_child($obj->id); ?> <?php if (count($children)) { ?> <optgroup label="<?php echo $level . $obj->pole; ?> "> <?php echo system::show_tpl(array('select' => $children, 'level' => $level . ' ', 'curent_id_parent' => $curent_id_parent, 'tpl_folder' => $tpl_folder), $tpl_folder . '/select.php'); ?> </optgroup> <?php } else { ?> <option value="<?php echo $obj->id; ?> "<?php echo $obj->id == $curent_id_parent ? ' selected' : ''; ?> ><?php echo $obj->pole; ?> </option>