Example #1
0
    ?>
" <?php 
    if (stripos($_SERVER['REQUEST_URI'], '/' . $item->url) !== false) {
        echo 'class="active"';
    }
    ?>
><?php 
    echo $item->name;
    ?>
</a>
                    
                    <?php 
    if ($item->id == 6) {
        ?>
                        <?php 
        $pages = Core\QB\DB::select()->from('content')->where('status', '=', 1)->where('parent_id', '=', 2)->order_by('sort')->as_object()->execute();
        ?>
                        <?php 
        if (count($pages)) {
            ?>
                            <ul>
                                <?php 
            foreach ($pages as $key => $page) {
                ?>
                                    <li><a href="<?php 
                echo Core\HTML::link($page->alias);
                ?>
"><?php 
                echo $page->name;
                ?>
</a></li>
Example #2
0
<?php

if (count($result[$currentParent])) {
    ?>
    <?php 
    foreach ($result[$currentParent] as $obj) {
        ?>
        <?php 
        $countChildGroups = Core\QB\DB::select(array(Core\QB\DB::expr('COUNT(id)'), 'count'))->from('catalog_tree')->where('parent_id', '=', $obj->id)->count_all();
        ?>
        <?php 
        if ($countChildGroups) {
            ?>
            <optgroup label="<?php 
            echo $space . $obj->name;
            ?>
"></optgroup>
        <?php 
        } else {
            ?>
            <option value="<?php 
            echo $obj->id;
            ?>
" <?php 
            echo $parentID == $obj->id ? 'selected' : '';
            ?>
><?php 
            echo $space . $obj->name;
            ?>
</option>
        <?php