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 :  /proc/self/root/var/www/kamariallee.com/public_html/application/views/admin/products/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/var/www/kamariallee.com/public_html/application/views/admin/products/index.php
<div class="row">
    <div class="col-sm-12">
         <p><a href="<?= base_url('admin/dashboard'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back to Dashboard</a></p><br>
        <h2>Manage Products</h2>
        <?= $this->session->flashdata('success'); //to display success message ?> 
        <?= $this->session->flashdata('result'); //to display result message ?> 
    </div>
</div>  

<div class="row" style="display:none">
    <div class="col-sm-12">
    <h3>Import Product Photos</h3>
    <p>UPLOAD PRODUCTS PHOTOS. ACCEPT ONLY ZIP FILE.</p>
    <?php
        $attributes = array(
            'name' => 'uploadphotos',
            'id' => 'uploadphotos'
        ); 
    ?>
    <?= form_open_multipart('admin/products/upload_product_photos', $attributes); ?>
    <table>
        <tr>
            <td>ULPLOAD PRODUCTS PHOTOS ZIP (MAX 20MB PER ZIP FILE):</td>
            <td>
                <div class="form-group">
                    <input type="file" class="form-control" name="userfile" id="userfile"  align="center"/><input type="submit" name="upload_photos" class="btn btn-info" value="UPLOAD">
                </div>
            </td>
        </tr>
    </table> 
    </form>
    <p>Note: Same file name will be replaced. During Upload, please wait until process finish. Do not close current window.</p>
    </div> 
</div>  

<div class="row" style="display:none">
    <div class="col-sm-12">
    <h3>Import Products Data</h3>
    <p>UPLOAD PRODUCTS DATA. ACCEPT ONLY CSV. PLEASE SAVE EXCEL AS CSV. DOWNLOAD EXCEL SAMPLE <a style="color:blue;" href="<?= base_url('uploads/products.xls'); ?>">HERE</a>.</p>
    <p>PS: Products data with same SKU will not be uploaded.</p>
    
    <?php
        $attributes = array(
            'name' => 'uploadcsv',
            'id' => 'uploadcsv'
        );
    ?>
    <?= form_open_multipart('admin/products/upload_csv', $attributes); ?>
        <table>
            <tr>
            <td> ULPLOAD PRODUCTS DATA CSV: </td>
            <td>
                <div class="form-group">
                    <input type="file" class="form-control" name="userfile" id="userfile"  align="center"/><input type="submit" name="upload_csv" class="btn btn-info" value="UPLOAD">
                </div>
            </td>
        </tr>
    </table> 
    </form>
    <p>Note: During Upload, please wait until process finish. Do not close current window.</p>
    </div> 
</div>  
<br>

<div class="row">
     <?= form_open('admin/products'); ?> 
    <div class="col-sm-5 col-xs-6"> 
        <input class="form-control" type="text" placeholder="Enter Product Name" name="product" required 
        <?php if (isset($keyword)) : ?>
            value="<?= ucwords($keyword); ?>" 
        <?php endif; ?>>
    </div>   

    <div class="col-sm-3 col-xs-6">
        <input class="btn btn-primary form-control" type="submit" name="search_product" value="SEARCH PRODUCT">
    </div>    
    <?= form_close(); ?> 
</div>   

<div class="row">
     <?= form_open('admin/products/search_category'); ?>
    <div class="col-sm-5 col-xs-6">
       <select name="category" class="form-control">
            <?php
                //get parent category id and name and parent from categories table
                $this->db->select('id_categories, category')->from('categories')->where('parent', NULL)->order_by('priority', 'ASC');
                $categories = $this->db->get()->result();
            ?>
            <option value="">Select Category ...</option>

            <?php foreach ($categories as $category) : ?>
                
                <option value="<?= $category->id_categories; ?>"

                <?php if (isset($category_id)) : ?>
                    <?php if ($category->id_categories == $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($category_id)) : ?>
                            <?php if ($child_category->id_categories == $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', $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($category_id)) : ?>
                                    <?php if ($child_category->id_categories == $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($category_id)) : ?>
                                                <?php if ($child2_category->id_categories == $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; ?>

                <?php endif ?>

            <?php endforeach; ?>

        </select> 
    </div><!-- end class="col-sm-5" -->   

    <div class="col-sm-3 col-xs-6">
       <input class="btn btn-primary form-control" type="submit" name="search_category" value="SEARCH CATEGORY">
    </div><!-- end class="col-sm-3" -->    
    <?= form_close(); ?> 
</div>   

<div class="row">
     <?= form_open('admin/products/search_brand'); ?>
    <div class="col-sm-5 col-xs-6">
        <select name="brand" class="form-control">
            
            <?php
                //get brands id and name from brandsa table
                $this->db->select('id_brands, brand')->from('brands')->order_by('brand', 'ASC');
                $brands = $this->db->get()->result();
            ?>

            <option value="">Select Brand ...</option>

            <?php foreach ($brands as $brand) : ?>

                <?php if ($brand->id_brands != 0) : ?> 
                    
                    <option value="<?= $brand->id_brands; ?>"

                    <?php if (isset($brand_id)) : ?>
                        
                        <?php if ($brand->id_brands == $brand_id) : ?>
                        selected
                    <?php endif; ?>

                    <?php endif; ?>

                    ><?= ucwords($brand->brand); ?></option>
                
                <?php endif; ?>

            <?php endforeach; ?>

        </select>
    </div>   

    <div class="col-sm-3 col-xs-6">
        <input class="btn btn-primary form-control" type="submit" name="search_brand" value="SEARCH BRAND">
    </div>    
    <?= form_close(); ?> 
</div>   

<div class="row">
    <div class="col-sm-12">
        <br>
         <p><?= anchor('admin/products/add', '<i class="fa fa-plus" aria-hidden="true"></i> ADD A NEW PRODUCT'); ?></p>
    </div>
</div>   

<div class="row">
    <div class="col-sm-12">

    <div class="table-responsive">    
    <table class="table table-striped">
    <thead>
        <tr>
            <th>Product Name</th>
            <th>Display</th>
            <!-- <th>Quick Edit</th> -->
            <th>Edit</th>
            <th>Duplicate</th>
            <th>Preview</th>
            <th>Delete</th>
        </tr>
    </thead>
    <tbody>
    	<?php if(count($products)) : ?> 
        <?php foreach($products as $product): ?>
        	<tr>
            	<td><img style="width:50px;" src="<?= base_url() . 'uploads/product/thumbnail/' . $product->image1; ?>"> <?= ucfirst($product->title); ?></td>
                <td>
                <?php
                    if ($product->product_status == 1) {
                        echo 'Yes';
                    }
                    else {
                        echo 'No'; 
                    }      
                ?>  
                </td>   
                <!-- <td><a class="quickedit" href="<?= $product->id_products; ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a></td> -->
                <td><?= bt_edit('admin/products/edit/' . $product->id_products); ?></td>
                <td><a href="<?= base_url() . 'admin/products/duplicate_product/' . $product->id_products; ?>"><i class="fa fa-files-o" aria-hidden="true"></i></a></td>
                <td><a href="<?= base_url() . 'product/' . $product->alias; ?>" target="_blank"><i class="fa fa-eye" aria-hidden="true"></i></a></td>
                <td><?= bt_delete('admin/products/delete/' . $product->id_products); ?></td>
            </tr> 
        <?php endforeach; ?>
        <?php else: ?>
        	<tr>
            <td colspan="3">We could not find any product.</td>
            </tr>
        <?php endif; ?>

    </tbody> 
    </table>
    </div><!-- end class responsive-->

    </div>
</div>   

<div class="row">
    <div class="col-sm-12">
        <?php if(isset($use_pagination)) : ?>
             <div style="text-align:center;"><?= $this->pagination->create_links(); ?></div>
        <?php endif; ?> 
    </div>
</div>  


<div id="getProductDetail"></div>

 <script>
    $(document).ready(function() {

        var controller = 'admin/products';
        var base_url = '<?php echo base_url(); ?>'; 

        $('a.quickedit').click(function(event) {
           event.preventDefault();
           var id_product = $(this).attr('href');
           ajax_getproductdetails(id_product);
        });   

        function ajax_getproductdetails(id_product) { 

            $.ajax({
                'url'       : base_url + controller + '/ajax_getproductdetails',
                'type'      : 'POST', 
                'data'      : {'id_product' : id_product},  
                'success'   : 
                
                function(data) {
                    
                    var container = $('#getProductDetail');   
                    if (data) { 
                        /*---success----*/
                        $('#getProductDetail').html(data);  
                        $('#showModal').trigger('click');  
                    };
                }
            });
        }

    });

</script>


https://t.me/RX1948 - 2025