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/customers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/rabbithabit.com/public_html/application/views/admin/customers/index.php
<?= $this->session->unset_userdata('location_add_customer'); ?>
<div class="row">
    <div class="col-sm-12">
         <p><a href="<?= base_url('admin/customer_index'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke 
Pelanggan</a></p>
        <h2>Pelanggan</h2>
        <?= $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 --> 

<div class="row">
    <!-- <div class="col-sm-12">
        <p><a href="<?= base_url('admin/customer_excel_export'); ?>"><img src="<?= base_url('assets/admin/img/excel-icon.png'); ?>"> EKSPOR KE MS EXCEL</a></p>
        <p>(Ekspor ini ke file excel)</p>
    </div> -->
    <!-- <div class="col-sm-12">
        <h3>Unggah Pelanggan Massal</h3>
        <p>DATA PELANGGAN UPLOAD. SETUJUI HANYA CSV. HARAP SIMPAN EXCEL AS CSV. PENGGUNAAN CSV, SEBAGAI PEMISAHAN.</p> -->
        <!-- <p>PS: Products data with same SKU will be updated.</p> -->

      <!--   <?php
            $attributes = array(
                'name' => 'uploadcsv',
                'id' => 'uploadcsv'
            );
        ?>
        <?= form_open_multipart('admin/customers/upload_customers', $attributes); ?>
            <table>
                <tr>
                    <td> UNGGAH PELANGGAN DATA CSV: </td>
                    <td>
                        <div class="form-group">
                            <input style="float:left; width:60%;" 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>Catatan: Selama Upload, harap tunggu hingga proses selesai. Jangan tutup jendela saat ini.</p> -->
    <!-- </div> --><!-- end class="col-sm-12" --> 
</div> <!-- end row -->

<div class="row">
    <?= form_open('admin/customers'); ?> 
    <div class="col-sm-4"> 
        <input class="form-control" type="text" placeholder="Isi Nama / Email Pelanggan" name="customer" 
        <?php if (isset($keyword)) : ?>
            value="<?= ucwords($keyword); ?>" 
        <?php endif; ?>>
    </div><!-- end class="col-sm-8" -->   

    <div class="col-sm-2">
        <?php
            $options = array(
                'by_name'  => 'Name',
                'by_email'  => 'Email'
            );
            echo form_dropdown('search_by', $options,$search_by, 'class="form-control"'); 
        ?>
    </div>

    <div class="col-sm-3">
        <input class="btn btn-primary form-control" type="submit" name="search_customer" value="Cari Pelanggan">
    </div><!-- end class="col-sm-6" -->    
    <?= form_close(); ?> 
</div> <!-- end row -->  

<div class="row">
    <div class="col-sm-12">
        <?= $this->session->flashdata('flash_search_by'); ?>
        <p><?= anchor('admin/customers/add', '<i class="fa fa-plus" aria-hidden="true"></i> TAMBAH PELANGGAN BARU'); ?></p>
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row -->  

<div class="row">
    <div class="col-sm-12">
        <div class="table-responsive">
            <table class="table table-striped"> 
                <thead>
                    <tr>
                        <th>Nama Pelanggan</th>
                        <th>Tanggal Lahir</th>
                        <th>Jenis Kelamin</th>
                        <th>HP/Telepon</th>
                        <th>E-mail</th>
                        <th>Tanggal Bergabung</th>  
                        <th>Total Beli (Rp)</th>
                        <th>Tipe Reseller</th>
                        <th>Status</th>
                        <th>Lihat Info</th>
                        <th>Apakah ingin Hapus?</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if(count($customers)) : ?> 
                    <?php foreach($customers as $customer): ?>
                        <tr>
                            <td><?= ucfirst($customer->name); ?></td>
                            <td><?= $customer->birthday;?></td>
                            <td><?= ucfirst($customer->sex_type);?></td>
                            <td><?= ucfirst($customer->phone); ?></td>
                            <td><a href="mailto:<?= $customer->email; ?>"><?= ucfirst($customer->email); ?></a></td>
                            <td>
                                <?php
                                    $join_date = date('d M Y', strtotime($customer->join_date)); 
                                    echo $join_date;
                                ?>
                             </td>
                            <td>
                                <?php
                                    //get total purchase
                                    $total_purchase = 0;
                                    $this->db->select('*')->from('orders')->where('customer_id', $customer->id_customers)->group_start()->where('payment_status',3)->or_where('payment_status',4)->or_where('payment_status',5)->group_end();
                                    $purchases = $this->db->get()->result();
                                    foreach($purchases as $purchase) {
                                        $grand_total = (($purchase->total_amount - $purchase->redeemed_voucher_amount - $purchase->minus_reward_amount)+($purchase->shipping_fee - $purchase->free_shipping_fee));
                                        if($grand_total > 0){
                                            $total_purchase = $total_purchase + $grand_total;    
                                        }
                                    }
                                    echo number_format($total_purchase);
                                ?>  
                                <a href="<?= base_url() . 'admin/orders/customer/' . $customer->id_customers; ?>" target="_blank">&nbsp;&nbsp;<i class="fa fa-eye" aria-hidden="true"></i> Lihat</a>
                            </td>
                            <td>
                                <?php 
                                $resellers_name = $this->db->select('reseller_name')->from('resellers')->where('id_resellers',$customer->reseller_id)->get()->row();
                                if ($resellers_name == NULL) {
                                    $tampil = "Regular";
                                }else{
                                    $tampil = $resellers_name->reseller_name;
                                }
                                ?>
                               <?= ucwords($tampil); ?>
                            </td>
                            <td>
                                <?php if($customer->status == 1) : ?>
                                    Aktif
                                <?php else : ?>
                                    Tidak Aktif  
                                <?php endif; ?>    
                            </td>
                            <td><?= bt_edit('admin/customers/edit/' . $customer->id_customers); ?></td>
                           
                            <td><?= bt_delete('admin/customers/delete/' . $customer->id_customers); ?></td>
                              
                        </tr>
                    <?php endforeach; ?>
                    <?php else: ?>
                        <tr>
                        <td colspan="3">Kami tidak dapat menemukan pelanggan apa pun.</td>
                        </tr>
                    <?php endif; ?>
                </tbody> 
            </table>
        </div>
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row --> 
    
<div class="row">
    <div class="col-sm-12">
        <?php if(isset($use_pagination)) : ?>
        <?php
        //create pagination...
        echo '<p style="text-align:center;">' . $this->pagination->create_links() . '</p>';
        ?>
        <?php endif; ?>
    </div><!-- end class="col-sm-12" -->
</div> <!-- end row --> 

https://t.me/RX1948 - 2025