<?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::gallery_grupa_get_child($obj->id), 'level' => $level . ' ', 'curent_id_parent' => $curent_id_parent, 'tpl_folder' => $tpl_folder), $tpl_folder . '/select.php'); ?> <?php }
<?php die('<p style="font-size:36px;color:black;font-weight:bold;">404!</p>'); global $_str; // check for crack! if (isset($_GET['page'])) { system::count_parametr(5); system::isset_numeric($_GET['page']); } else { system::count_parametr(3); $_GET['page'] = 1; } if (isset($_GET['url'])) { // получаем группу галереи $_id_gallery_grupa = dbh::get_gallery_grupa_id($_GET['url']); // проверяеим есть ли дети $children = dbh::gallery_grupa_get_child($_id_gallery_grupa); if (count($children)) { // выводим группы $_str .= gallery::get_group_gallery('/frontend/gallery/list.php'); } else { // check for count gallery at page gallery::count_gallery_at_page(); // get limit $limit = pager::pager_limit(gallery::count_gallery(), GALLERY_AT_PAGE); // выводим фото $_str .= gallery::get_gallery($limit, '/frontend/gallery/show.php'); } } else { $_str .= gallery::get_group_gallery('/frontend/gallery/list.php'); }
<?php foreach ($select as $obj) { ?> <?php $children = dbh::gallery_grupa_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>
<?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::gallery_grupa_count_child($obj->id) > 0 ? '<ul>' : ''; ?> <?php echo system::show_tpl(array('result' => dbh::gallery_grupa_get_child($obj->id), 'tpl_folder' => $tpl_folder), $tpl_folder . '/menu.php'); ?> <?php echo dbh::gallery_grupa_count_child($obj->id) > 0 ? '</ul>' : ''; ?> </li> <?php } ?>