https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/laciasmara.com/public_html/shop/application/views/admin/menus/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/laciasmara.com/public_html/shop/application/views/admin/menus/ajax_get_category.php
<div class="row">
    <div class="col-sm-3">
        <p>Select Category</p>
    </div><!-- end class="col-sm-3" -->

    <div class="col-sm-9">
        <select name="category" id="category" class="form-control">
            <option value="">pilih kategori produk...</option>

            <?php foreach ($categories as $category) : ?>

                <option value="<?= $category->id_categories; ?>" <?php if (isset($current_category_id)) : ?> <?php if ($category->id_categories == $current_category_id) : ?> selected <?php endif; ?> <?php endif; ?>><?= ucwords($category->category); ?></option>

                <?php
                //check if the current id does have child
                $this->db->select('*')->from('categories')->where('parent', $category->id_categories);
                $count_child_category = $this->db->get()->num_rows();
                ?>

                <?php if ($count_child_category > 0) : ?>

                    <?php
                    //get all existing child categories 
                    $this->db->select('id_categories, category')->from('categories')->where('parent', $category->id_categories)->order_by('priority', 'ASC');
                    $child_categories = $this->db->get()->result();
                    ?>

                    <?php foreach ($child_categories as $child_category) : ?>

                        <option style="margin-left: 10px;" value="<?= $child_category->id_categories; ?>" <?php if (isset($current_category_id)) : ?> <?php if ($child_category->id_categories == $current_category_id) : ?> selected <?php endif; ?> <?php endif; ?>>- <?= ucwords($child_category->category); ?></option>

                        <?php
                        //check if the current id does have child
                        $this->db->select('*')->from('categories')->where('parent', $child_category->id_categories);
                        $count_child2_category = $this->db->get()->num_rows();
                        ?>

                        <?php if ($count_child2_category > 0) : ?>
                            <?php
                            //get all existing child2 categories 
                            $this->db->select('id_categories, category')->from('categories')->where('parent', $child_category->id_categories)->order_by('priority', 'ASC');
                            $child2_categories = $this->db->get()->result();
                            ?>

                            <?php foreach ($child2_categories as $child2_category) : ?>

                                <option style="margin-left: 10px;" value="<?= $child2_category->id_categories; ?>" <?php if (isset($current_category_id)) : ?> <?php if ($child2_category->id_categories == $current_category_id) : ?> selected <?php endif; ?> <?php endif; ?>>&nbsp;&nbsp;&nbsp;- <?= ucwords($child2_category->category); ?></option>
                            <?php endforeach; ?>
                        <?php endif; ?>

                    <?php endforeach; ?>

                <?php endif ?>

            <?php endforeach; ?>

            <option value="all" <?php if ($current_category_id == 'category/all') : ?> selected <?php endif; ?>>Semua Kategori</option>

            <option value="new" <?php if ($current_category_id == 'category/new') : ?> selected <?php endif; ?>>Produk Baru</option>

            <option value="sale" <?php if ($current_category_id == 'category/diskon') : ?> selected <?php endif; ?>>Sale / Promo</option>

            <option value="bestseller" <?php if ($current_category_id == 'category/bestseller') : ?> selected <?php endif; ?>>Produk Terlaris</option>

        </select>

        <?= form_error('category'); ?>
    </div><!-- end class="col-sm-9" -->
</div> <!-- end row -->

https://t.me/RX1948 - 2025