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/rabbithabit.com/public_html/application/views/admin/categories/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/rabbithabit.com/public_html/application/views/admin/categories/index.php
<div class="row">
    <div class="col-sm-12">
        <p><a href="<?= base_url('admin/product_index'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke Produk</a></p>
        <h2>Kategori Produk</h2>
        <?= $this->session->flashdata('success'); ?> 
    </div>
</div> 

<div class="row">
    <div class="col-sm-12">
        <p><?= anchor('admin/categories/edit', '<i class="fa fa-plus" aria-hidden="true"></i> Buat Kategori Baru', array('class' => 'btn btn-primary')); ?></p>  
    </div>
</div> 

<div class="row">
    <div class="col-sm-12">
       <div class="table-responsive">  
           <table class="table table-striped">
            <thead> 
                <tr>
                    <th>Nama Kategori (id)</th> 
                    <th>Nama Kategori (en)</th>
                    <th>Turunan (Sub) dari</th> 
                    <th>Urutan Tampilan</th>
                    <th>Aktif?</th>
                    <th>Edit</th>
                    <th>Hapus</th>
                </tr>
            </thead>
            <tbody>
                <?php if(count($parent_categories)) : ?> 
                    <?php foreach($parent_categories as $category): ?>
                        <tr>
                            <td><?= ucfirst($category->category); ?></td>
                            <td><?= ucfirst($category->category_en); ?></td>
                            <td><?php
                                if ($category->parent == NULL) { 
                                    echo '-'; 
                                } else {
                                    //get category name from category table
                                    $this->db->select('category, category_en')->from('categories')->where('id_categories', $category->parent);
                                    $category_name = $this->db->get()->row();
                                    echo ucfirst($category_name->category); 
                                } ?>    
                            </td>
                            <td><?= $category->priority; ?></td>
                            <td>
                                <?php
                                    if ($category->status == 1) {
                                        echo 'Ya';
                                    }
                                    else {
                                        echo 'Tidak';
                                    }      
                                ?>
                            </td>
                            
                            <td><?= bt_edit('admin/categories/edit/' . $category->id_categories); ?></td>
                            <td><?= bt_delete('admin/categories/delete/' . $category->id_categories); ?></td> 
                        </tr>

                        <?php
                            //GET CATEGORY LEVEL 2
                            $this->db->select('id_categories, category, category_en, parent, priority, status')->from('categories')->where('parent', $category->id_categories)->order_by('priority', 'ASC');
                            $categories_level2 = $this->db->get()->result();
                        ?>
                        <?php foreach($categories_level2 as $category2): ?>

                            <tr>
                                <td>- <?= ucfirst($category2->category); ?></td>
                                <td>- <?= ucfirst($category2->category_en); ?></td>
                                <td><?php
                                    //get category name from category table
                                    $this->db->select('category, category_en')->from('categories')->where('id_categories', $category2->parent);
                                    $category_name = $this->db->get()->row();
                                    echo ucfirst($category_name->category); 
                                    ?>    
                                </td>
                                <td><?= $category2->priority; ?></td>
                                <td>
                                <?php
                                    if ($category2->status == 1) {
                                        echo 'Ya';
                                    }
                                    else {
                                        echo 'Tidak';
                                    }      
                                ?>
                                </td>
                                
                                <td><?= bt_edit('admin/categories/edit/' . $category2->id_categories); ?></td>
                                <td><?= bt_delete('admin/categories/delete/' . $category2->id_categories); ?></td>
                            </tr>

                            <?php
                                //GET CATEGORY LEVEL 3
                                $this->db->select('id_categories, category, category_en, parent, priority, status')->from('categories')->where('parent', $category2->id_categories)->order_by('priority', 'ASC');
                                $categories_level3 = $this->db->get()->result();
                            ?>
                            <?php foreach($categories_level3 as $category3): ?>
                                <tr>
                                    <td>-- <?= ucfirst($category3->category); ?></td>
                                    <td>-- <?= ucfirst($category3->category_en); ?></td>
                                    <td><?php
                                        //get category name from category table
                                        $this->db->select('category, category_en')->from('categories')->where('id_categories', $category3->parent);
                                        $category_name = $this->db->get()->row();
                                        echo ucfirst($category_name->category); 
                                        ?>    
                                    </td>
                                    <td><?= $category3->priority; ?></td>
                                    <td>
                                        <?php
                                            if ($category3->status == 1) { echo 'Ya'; } else { echo 'Tidak';
                                            }      
                                        ?>
                                    </td>
                                    
                                    <td><?= bt_edit('admin/categories/edit/' . $category3->id_categories); ?></td>
                                    <td><?= bt_delete('admin/categories/delete/' . $category3->id_categories); ?></td> 
                                </tr>
                            <?php endforeach; ?>
                        <?php endforeach; ?>
                    <?php endforeach; ?>
                <?php else: ?>
                    <tr>
                    <td colspan="3">Kategori Produk tidak ditemukan.</td>
                    </tr>
                <?php endif; ?>

            </tbody> 
        </table>
        </div>
    </div>
</div>   

<div class="row">
   <div class="col-sm-12">
        <?= '<div style="text-align:center;">' . $this->pagination->create_links() . '</div>'; ?>
    </div>
</div> 

https://t.me/RX1948 - 2025