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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/laciasmara.com/public_html/shop/application/views/admin/affiliator/view.php
<div class="row">
    <div class="col-sm-12">
        <p><a href="<?= base_url('admin/affiliator'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke Halaman Affiliator</a></p><br>
        <h4>ID Daftar : <?php echo $affiliator->id_daftar; ?></h4>
        <h4>Tanggal Pendaftaran: <?= date('Y-m-d H:i:s', strtotime($affiliator->created)); ?></h4>
        <?= $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(); ?>

<div class="row">
    <div class="col-sm-3">
        <p>Status Asmaradoor Saat Ini</p>
    </div><!-- end class="col-sm-3" -->

    <div class="col-sm-9">
        <?php
        if ($affiliator->status == "waiting") {
            $options['waiting'] = 'Waiting';
            $options['approve'] = 'Approve';
            $options['rejected'] = 'Rejected';
        }
        if ($affiliator->status == "approve") {
            $options['approve'] = 'Approve';
        }
        if ($affiliator->status == "rejected") {
            $options['rejected'] = 'Rejected';
        }


        echo form_dropdown('register_status', $options, $affiliator->status, 'class="form-control changeOrderStatus"');
        ?>
        <br>

        <span><?= form_submit('update', 'Ubah Status Daftar', 'class="btn btn-primary btn-success submitOrderStatus"'); ?></span>


        <script>
            $(document).ready(function() {
                $('.submitOrderStatus').prop('disabled', true);
                $('.changeOrderStatus').change(function() {
                    $('.submitOrderStatus').prop('disabled', false);
                });
            });
        </script>

        <?= form_close(); ?>
        <br><br>

    </div><!-- end class="col-sm-9" -->
</div> <!-- end row -->


<div class="row">
    <div class="col-sm-12">
        <div class="table-responsive">
            <table class="table table-striped">

                <tr>
                    <td>Nama Affiliator</td>
                    <td> <?= ucfirst($affiliator->nama); ?>
                    </td>
                </tr>
                <tr>
                    <td>No Telepon</td>
                    <td> <?= strtoupper($affiliator->no_telpon); ?>
                    </td>
                </tr>
                <tr>
                    <td>Email</td>
                    <td> <?= ($affiliator->email); ?>
                    </td>
                </tr>
                <tr>
                    <td>Link Sosial Media</td>
                    <td> <a style="text-underline-offset: ;" href="<?= ($affiliator->sosial_media); ?>"><?= ($affiliator->sosial_media); ?></a> </td>
                </tr>
                <tr>
                    <td>Refferal Code</td>
                    <td><b><?= ($affiliator->referral); ?></b></td>
                </tr>
                <tr>
                    <td>Voucher Code</td>
                    <td><b><?= ($affiliator->voucher); ?></b></td>
                </tr>
                <!-- Row for changing category -->
                <tr>
                    <td>Kategori Affiliator</td>
                    <td>
                        <?php echo form_open('admin/affiliator/update_category'); ?>
                        <input type="hidden" name="affiliator_id" value="<?= $affiliator->id_daftar ?>">

                        <div style="display: flex; align-items: center;">
                            <select name="kategori_affiliator" class="form-control" style="flex: 1; margin-right: 10px;">
                                <option value="asmaradoor" <?= ($affiliator->kategori == 'asmaradoor') ? 'selected' : ''; ?>>Asmaradoor</option>
                                <option value="asmarasana" <?= ($affiliator->kategori == 'asmarasana') ? 'selected' : ''; ?>>Asmarasana</option>
                            </select>

                            <input class="btn btn-primary" type="submit" value="Update Kategori">
                        </div>

                        <?php echo form_close(); ?>
                    </td>
                </tr>

                <tr>
                    <td>Promotion List</td>
                    <td>
                        <table class="table table-striped">
                            <tr>
                                <th>Nama Produk</th>
                                <th>Status</th>
                                <th>Link</th>
                                <th>Open</th>
                                <th>Order</th>
                                <th>Total Order</th>
                                <th>Total Komisi</th>
                            </tr>
                            <!-- Contoh baris dengan data -->
                            <?php if (count($link)) : ?>
                                <?php foreach ($link as $ar) : ?>
                                    <tr>
                                        <!-- Nama Produk -->
                                        <td><?php echo $ar->product_name; ?></td>
                                        <!-- Status -->
                                        <td class="<?php echo ($ar->status == 'Active') ? 'text-success' : 'text-danger'; ?>">
                                            <b> <?php echo $ar->status; ?></b>
                                        </td>
                                        <!-- Link Copy -->
                                        <td>
                                            <button class="btn btn-primary" onclick="copyToClipboard('<?php echo $ar->link; ?>')">Copy Link</button>
                                        </td>
                                        <!-- Open -->
                                        <td><?php
                                            $count_visit = $this->db->select('COUNT(DISTINCT ip_address) AS total_visits')
                                                ->from('link_tracks')
                                                ->where('link_url', $ar->link)
                                                ->get()
                                                ->row()->total_visits;

                                            echo $count_visit;
                                            ?>
                                        </td>
                                        <!-- Order -->
                                        <td><?php echo $ar->order; ?></td>
                                        <td>IDR 0</td>
                                        <!-- Komisi -->
                                        <?php if ($ar->unique_id == 'laciput') : ?>
                                            <td>IDR <?php echo number_format($count_visit * 0); ?></td>
                                        <?php else : ?>
                                            <td>IDR <?php echo number_format($count_visit * 50 + $ar->komisi_order); ?></td>
                                        <?php endif; ?>
                                    </tr>
                                <?php endforeach; ?>
                            <?php else : ?>
                                <tr>
                                    <td colspan="8">Tidak Ada Produk Yang Sedang Dipromosikan</td>
                                </tr>
                            <?php endif; ?>
                            <!-- Tambahkan baris lainnya sesuai kebutuhan -->
                        </table>
                        <?php echo form_open('admin/affiliator/create_unique_link'); ?>
                        <input name="unique" type="hidden" value="<?= $affiliator->referral ?>">
                        <input name="customer_id" type="hidden" value="<?= $affiliator->id_customer ?>">
                        <input name="aff_name" type="hidden" value="<?= $affiliator->nama ?>">
                        <select class="form-control" name="product_affiliate_choose" id="product_affiliate_choose">
                            <?php foreach ($product_active as $pa) : ?>
                                <option value="<?= $pa->id_products ?>"><?= $pa->title ?></option>
                            <?php endforeach ?>
                        </select>
                        <br>
                        <input class="form-control" style="cursor: pointer; padding:2px; padding-left:5px; padding-right:5px;" type="submit" value="Buat Link">
                        <?php echo form_close(); ?>
                    </td>

                    <script>
                        function copyToClipboard(link) {
                            var tempInput = document.createElement("input");
                            tempInput.style.position = "absolute";
                            tempInput.style.left = "-1000px";
                            tempInput.style.top = "-1000px";
                            tempInput.value = link;
                            document.body.appendChild(tempInput);
                            tempInput.select();
                            document.execCommand("copy");
                            document.body.removeChild(tempInput);

                            // Show the alert
                            alert("Link copied to clipboard: " + link);
                        }
                    </script>

                </tr>
            </table>
        </div>
    </div>
</div>

https://t.me/RX1948 - 2025