PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: index.php Size: 8.36 KB
/home/ankaservis/public_html/app/views/admin/price-quotes/index.php

<?php
ob_start();
// Değişkenleri güvenli hale getir
$current_status = $current_status ?? 'all';
$stats = $stats ?? [];
$quotes = $quotes ?? [];
?>

<div class="bg-white rounded-lg shadow p-6">
    <div class="flex justify-between items-center mb-6">
        <h2 class="text-2xl font-bold text-anka-gray">Fiyat Teklifi Talepleri</h2>
    </div>

    <!-- İstatistikler -->
    <div class="grid grid-cols-2 md:grid-cols-5 gap-4 mb-6">
        <a href="<?php echo Helper::url('/admin/price-quotes?status=all'); ?>" class="bg-gradient-to-br from-blue-500 to-blue-600 text-white p-4 rounded-lg hover:shadow-lg transition <?php echo $current_status === 'all' ? 'ring-2 ring-blue-300' : ''; ?>">
            <div class="text-xs opacity-90">Tümü</div>
            <div class="text-xl font-bold"><?php echo $stats['all']; ?></div>
        </a>
        <a href="<?php echo Helper::url('/admin/price-quotes?status=new'); ?>" class="bg-gradient-to-br from-yellow-500 to-yellow-600 text-white p-4 rounded-lg hover:shadow-lg transition <?php echo $current_status === 'new' ? 'ring-2 ring-yellow-300' : ''; ?>">
            <div class="text-xs opacity-90">Yeni</div>
            <div class="text-xl font-bold"><?php echo $stats['new']; ?></div>
        </a>
        <a href="<?php echo Helper::url('/admin/price-quotes?status=quoted'); ?>" class="bg-gradient-to-br from-indigo-500 to-indigo-600 text-white p-4 rounded-lg hover:shadow-lg transition <?php echo $current_status === 'quoted' ? 'ring-2 ring-indigo-300' : ''; ?>">
            <div class="text-xs opacity-90">Teklif Verildi</div>
            <div class="text-xl font-bold"><?php echo $stats['quoted']; ?></div>
        </a>
        <a href="<?php echo Helper::url('/admin/price-quotes?status=accepted'); ?>" class="bg-gradient-to-br from-green-500 to-green-600 text-white p-4 rounded-lg hover:shadow-lg transition <?php echo $current_status === 'accepted' ? 'ring-2 ring-green-300' : ''; ?>">
            <div class="text-xs opacity-90">Kabul Edildi</div>
            <div class="text-xl font-bold"><?php echo $stats['accepted']; ?></div>
        </a>
        <a href="<?php echo Helper::url('/admin/price-quotes?status=rejected'); ?>" class="bg-gradient-to-br from-red-500 to-red-600 text-white p-4 rounded-lg hover:shadow-lg transition <?php echo $current_status === 'rejected' ? 'ring-2 ring-red-300' : ''; ?>">
            <div class="text-xs opacity-90">Reddedildi</div>
            <div class="text-xl font-bold"><?php echo $stats['rejected']; ?></div>
        </a>
    </div>

    <!-- Talepler Tablosu -->
    <div class="overflow-x-auto">
        <table class="w-full">
            <thead class="bg-gray-50">
                <tr>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Ad Soyad</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Telefon</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Cihaz</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Tarih</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Durum</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">İşlemler</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-gray-200">
                <?php if (!empty($quotes)): ?>
                    <?php foreach ($quotes as $quote): ?>
                        <tr class="hover:bg-gray-50 <?php echo $quote['status'] === 'new' ? 'bg-yellow-50' : ''; ?>">
                            <td class="px-6 py-4 whitespace-nowrap">
                                <div class="font-medium text-gray-900"><?php echo Helper::escape($quote['name']); ?></div>
                                <div class="text-sm text-gray-500"><?php echo Helper::escape($quote['email']); ?></div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <a href="tel:<?php echo str_replace(' ', '', $quote['phone']); ?>" class="text-gray-700 hover:text-anka-orange">
                                    <?php echo Helper::escape($quote['phone']); ?>
                                </a>
                            </td>
                            <td class="px-6 py-4">
                                <div class="text-sm text-gray-900"><?php echo Helper::escape($quote['device_type'] ?? '-'); ?></div>
                                <div class="text-xs text-gray-500"><?php echo Helper::escape($quote['device_brand'] ?? ''); ?> <?php echo Helper::escape($quote['device_model'] ?? ''); ?></div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <?php echo Helper::dateFormat($quote['created_at']); ?>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded font-semibold <?php 
                                    echo $quote['status'] === 'new' ? 'bg-yellow-100 text-yellow-800' : 
                                        ($quote['status'] === 'quoted' ? 'bg-indigo-100 text-indigo-800' : 
                                        ($quote['status'] === 'accepted' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800')); 
                                ?>">
                                    <?php 
                                        $statusText = [
                                            'new' => 'Yeni',
                                            'quoted' => 'Teklif Verildi',
                                            'accepted' => 'Kabul Edildi',
                                            'rejected' => 'Reddedildi'
                                        ];
                                        echo $statusText[$quote['status']] ?? $quote['status'];
                                    ?>
                                </span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
                                <div class="flex items-center space-x-2">
                                    <a href="<?php echo Helper::url('/admin/price-quotes/view/' . $quote['id']); ?>" class="text-anka-orange hover:text-orange-600" title="Görüntüle">
                                        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
                                        </svg>
                                    </a>
                                    <a href="<?php echo Helper::url('/admin/price-quotes/delete/' . $quote['id']); ?>" class="text-red-600 hover:text-red-800" onclick="return confirm('Bu fiyat teklifi talebini silmek istediğinize emin misiniz?')" title="Sil">
                                        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path>
                                        </svg>
                                    </a>
                                </div>
                            </td>
                        </tr>
                    <?php endforeach; ?>
                <?php else: ?>
                    <tr>
                        <td colspan="6" class="px-6 py-4 text-center text-gray-500">
                            <?php echo $current_status === 'all' ? 'Henüz fiyat teklifi talebi yok.' : 'Bu kategoride fiyat teklifi talebi bulunamadı.'; ?>
                        </td>
                    </tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>

<?php
$content = ob_get_clean();
require_once APP_PATH . '/app/views/admin/layout.php';
?>

Directory Contents

Dirs: 0 × Files: 3

Name Size Perms Modified Actions
8.36 KB lrw-r--r-- 2025-11-17 19:50:56
Edit Download
8.34 KB lrw-r--r-- 2025-11-17 19:50:55
Edit Download
0 B lrw-r--r-- 2026-02-08 14:28:33
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI