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_new/warehouses/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/laciasmara.com/public_html/shop/application/views/admin_new/warehouses/manage.php
<div class="container mx-auto px-4 py-4">
    <div class="flex justify-between items-center mb-4">
        <h1 class="text-xl font-bold text-[#333]">Gudang</h1>
        <button type="button" id="btnAddWarehouse" class="px-4 py-2 bg-[#7A4397] text-sm text-white rounded-lg hover:bg-[#7A4397]">
            + Tambah Gudang
        </button>
    </div>

    <?php if ($this->session->flashdata('message')): ?>
        <div class="mb-4 alert flex items-center justify-between bg-<?php echo $this->session->flashdata('message_type') === 'success' ? 'green' : 'red'; ?>-100 border-l-4 border-<?php echo $this->session->flashdata('message_type') === 'success' ? 'green' : 'red'; ?>-500 text-<?php echo $this->session->flashdata('message_type') === 'success' ? 'green' : 'red'; ?>-800 px-6 py-4 rounded-lg shadow-lg transition transform duration-300">
            <div class="flex items-center">
                <i data-feather="<?php echo $this->session->flashdata('message_type') === 'success' ? 'check-circle' : 'x-circle'; ?>" class="h-6 w-6 mr-3"></i>
                <span class="font-semibold text-sm"><?php echo $this->session->flashdata('message'); ?></span>
            </div>
            <button class="ml-4 text-<?php echo $this->session->flashdata('message_type') === 'success' ? 'green' : 'red'; ?>-500 hover:text-<?php echo $this->session->flashdata('message_type') === 'success' ? 'green' : 'red'; ?>-700 focus:outline-none" onclick="this.parentElement.style.display='none'">
                <i data-feather="x" class="h-5 w-5"></i>
            </button>
        </div>
    <?php endif; ?>

    <div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
        <div class="p-4 bg-white border-b">
            <h2 class="text-base font-medium text-[#333]">Daftar Gudang</h2>
            <p class="text-xs text-gray-500">Daftar gudang di laci asmara</p>
        </div>

        <?php if (empty($warehouses)): ?>
            <div class="p-8 text-center text-gray-500">
                <svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 mx-auto mb-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
                </svg>
                <p class="mb-2 text-sm">Belum ada gudang yang ditambahkan</p>
                <a href="<?= base_url('admin/contents/flying-banners/add') ?>" class="text-blue-600 hover:text-blue-800 text-base font-medium">Tambah Gudang Sekarang</a>
            </div>
        <?php else: ?>
            <div class="overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead class="bg-gray-50">
                        <tr>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Gudang</th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Alamat</th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Dibuat tanggal</th>
                            <th scope="col" class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Aksi</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <?php foreach ($warehouses as $warehouse): ?>
                            <tr class="hover:bg-gray-50" data-id="<?= $warehouse->id ?>">
                                <td class="px-4 py-3 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <div class="text-sm text-gray-900"><?= $warehouse->name ?> (<?= $warehouse->alias ?>)</div>
                                    </div>
                                </td>
                                <td class="px-4 py-3">
                                    <div class="text-sm text-gray-500"><?= $warehouse->address ?></div>
                                </td>
                                <td class="px-4 py-3">
                                    <div class="text-sm text-gray-500"><?= $warehouse->phone ?></div>
                                </td>
                                <td class="px-4 py-3 whitespace-nowrap">
                                    <div class="text-sm text-gray-500"><?= date('d M Y', strtotime($warehouse->create_date)) ?></div>
                                </td>
                                <td class="px-4 py-3 whitespace-nowrap text-right text-sm font-medium">
                                    <a href="<?= base_url('admin/stocks/warehouses/edit/' . $warehouse->id) ?>" class="text-blue-600 hover:text-blue-900 mr-3">Edit</a>
                                    <a class="text-red-600 hover:text-red-900 delete-warehouse cursor-pointer" data-id="<?= $warehouse->id ?>">Hapus</a>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        <?php endif; ?>
    </div>
</div>
<script>
    document.addEventListener('DOMContentLoaded', function() {
        document.getElementById('btnAddWarehouse').addEventListener('click', function() {
            window.location.href = '<?= base_url('admin/stocks/warehouses/add') ?>';
        });

        document.querySelectorAll('.delete-warehouse').forEach(function(element) {
            element.addEventListener('click', function(event) {
                event.preventDefault();
                const id = this.getAttribute('data-id');
                if (confirm('Apakah Anda yakin ingin menghapus gudang ini?')) {
                    window.location.href = '<?= base_url('admin/warehouses/delete_warehouse/') ?>' + id;
                }
            });
        });
    });
</script>

https://t.me/RX1948 - 2025