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: 14.38 KB
/home/ankaservis/public_html/app/views/blog/index.php

<?php
// Değişkenleri güvenli hale getir
$posts = $posts ?? [];
$device_types = $device_types ?? [];
$brands = $brands ?? [];
$latest_posts = $latest_posts ?? [];
$current_device_type = $current_device_type ?? null;
$current_brand = $current_brand ?? null;
$current_page = $current_page ?? 1;
$total_pages = $total_pages ?? 1;
?>
<section class="py-16 tech-bg-pattern">
    <div class="container mx-auto px-4">
        <div class="text-center mb-12">
            <h1 class="text-3xl md:text-4xl font-bold text-anka-gray mb-4">Ankara Beyaz Eşya Kombi Servisi Çözüm Merkezi</h1>
            <p class="text-anka-orange font-semibold"><?php echo defined('COMPANY_NAME') ? COMPANY_NAME : ''; ?></p>
            <div class="w-24 h-1 bg-gradient-to-r from-anka-orange to-anka-gray mx-auto mt-4 rounded"></div>
        </div>
        
        <!-- Filtreleme -->
        <?php if (!empty($device_types) || !empty($brands)): ?>
        <div class="mb-8 bg-gradient-to-br from-gray-50 via-white to-gray-50 rounded-xl shadow-md p-6 border border-gray-200">
            <form method="GET" action="<?php echo Helper::url('/cozum-merkezi'); ?>" class="grid grid-cols-1 md:grid-cols-3 gap-4">
                <div>
                    <label class="block text-sm font-semibold text-gray-700 mb-2">Cihaz Tipi</label>
                    <select name="device_type" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-anka-orange focus:border-transparent">
                        <option value="">Tümü</option>
                        <?php if (!empty($device_types)): ?>
                            <?php foreach ($device_types as $dt): ?>
                                <option value="<?php echo Helper::escape($dt['device_type']); ?>" <?php echo ($current_device_type ?? '') === $dt['device_type'] ? 'selected' : ''; ?>>
                                    <?php echo Helper::escape($dt['device_type']); ?>
                                </option>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </select>
                </div>
                <div>
                    <label class="block text-sm font-semibold text-gray-700 mb-2">Marka</label>
                    <select name="brand" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-anka-orange focus:border-transparent">
                        <option value="">Tümü</option>
                        <?php if (!empty($brands)): ?>
                            <?php foreach ($brands as $b): ?>
                                <option value="<?php echo Helper::escape($b['brand']); ?>" <?php echo ($current_brand ?? '') === $b['brand'] ? 'selected' : ''; ?>>
                                    <?php echo Helper::escape($b['brand']); ?>
                                </option>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </select>
                </div>
                <div class="flex items-end">
                    <button type="submit" class="w-full bg-anka-orange hover:bg-orange-600 text-white px-6 py-2 rounded-lg transition font-semibold">
                        Filtrele
                    </button>
                </div>
            </form>
        </div>
        <?php endif; ?>
        <div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
            <aside class="space-y-6 cozum-merkezi-sidebar">
                <?php if (!empty($device_types)): ?>
                    <div class="bg-gradient-to-br from-gray-50 via-white to-gray-50 rounded-xl shadow-md border border-gray-200 p-6">
                        <h3 class="text-xl font-bold text-anka-gray mb-4 flex items-center space-x-2">
                            <svg class="w-5 h-5 text-anka-orange" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
                            </svg>
                            <span>Kategoriler</span>
                        </h3>
                        <ul class="space-y-2">
                            <?php foreach ($device_types as $dt): ?>
                                <li>
                                    <a href="<?php echo Helper::url('/cozum-merkezi?device_type=' . urlencode($dt['device_type'])); ?>" class="flex items-center justify-between text-gray-700 hover:text-anka-orange font-medium">
                                        <span><?php echo Helper::escape($dt['device_type']); ?></span>
                                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
                                        </svg>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                <?php endif; ?>

                <?php if (!empty($brands)): ?>
                    <div class="bg-gradient-to-br from-gray-50 via-white to-gray-50 rounded-xl shadow-md border border-gray-200 p-6">
                        <h3 class="text-xl font-bold text-anka-gray mb-4 flex items-center space-x-2">
                            <svg class="w-5 h-5 text-anka-orange" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 16v-2m8-6h2M2 12H4m13.657-6.343l1.414-1.414M5.343 18.657l1.414-1.414"></path>
                            </svg>
                            <span>Markalar</span>
                        </h3>
                        <ul class="space-y-2">
                            <?php foreach ($brands as $b): ?>
                                <li>
                                    <a href="<?php echo Helper::url('/cozum-merkezi?brand=' . urlencode($b['brand'])); ?>" class="flex items-center justify-between text-gray-700 hover:text-anka-orange font-medium">
                                        <span><?php echo Helper::escape($b['brand']); ?></span>
                                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
                                        </svg>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                <?php endif; ?>

                <?php if (!empty($latest_posts)): ?>
                    <div class="bg-gradient-to-br from-gray-50 via-white to-gray-50 rounded-xl shadow-md border border-gray-200 p-6 cozum-merkezi-latest-posts">
                        <h3 class="text-xl font-bold text-anka-gray mb-4 flex items-center space-x-2">
                            <svg class="w-5 h-5 text-anka-orange" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 4H5m14-8H5m14 8H5"></path>
                            </svg>
                            <span>Son Çözümler</span>
                        </h3>
                        <ul class="space-y-4">
                            <?php foreach ($latest_posts as $latest): ?>
                                <li class="border-b border-gray-100 pb-3 last:border-0 last:pb-0">
                                    <a href="<?php 
                                        $url = '/cozum-merkezi';
                                        if (!empty($latest['device_type'])) {
                                            $url .= '/' . Helper::slug($latest['device_type']);
                                            if (!empty($latest['brand'])) {
                                                $url .= '/' . Helper::slug($latest['brand']);
                                            }
                                        }
                                        $url .= '/' . $latest['slug'];
                                        echo Helper::url($url);
                                    ?>" class="font-semibold text-anka-gray hover:text-anka-orange transition leading-snug">
                                        <?php echo Helper::escape($latest['title']); ?>
                                    </a>
                                    <p class="text-xs text-gray-500 mt-1 flex items-center space-x-1">
                                        <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
                                        </svg>
                                        <span><?php echo Helper::dateFormat($latest['created_at']); ?></span>
                                    </p>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                <?php endif; ?>
            </aside>

            <div class="lg:col-span-3 space-y-8 cozum-merkezi-content">
                <div class="space-y-3">
                    <?php if (!empty($posts)): ?>
                        <?php foreach ($posts as $post): ?>
                            <article class="bg-gradient-to-br from-gray-50 via-white to-gray-50 rounded-lg border border-gray-200 hover:border-anka-orange hover:shadow-md transition-all duration-200 p-4">
                                <div class="flex items-start justify-between gap-4">
                                    <div class="flex-1 min-w-0">
                                        <h3 class="text-lg font-semibold text-anka-gray mb-1">
                                            <a href="<?php 
                                                $url = '/cozum-merkezi';
                                                if (!empty($post['device_type'])) {
                                                    $url .= '/' . Helper::slug($post['device_type']);
                                                    if (!empty($post['brand'])) {
                                                        $url .= '/' . Helper::slug($post['brand']);
                                                    }
                                                }
                                                $url .= '/' . $post['slug'];
                                                echo Helper::url($url);
                                            ?>" class="hover:text-anka-orange transition">
                                                <?php echo Helper::escape($post['title']); ?>
                                            </a>
                                        </h3>
                                        <p class="text-sm text-gray-600 mb-2 line-clamp-2"><?php echo Helper::excerpt($post['content'] ?? $post['excerpt'], 150); ?></p>
                                        <span class="text-xs text-gray-500 flex items-center space-x-1">
                                            <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
                                            </svg>
                                            <span><?php echo Helper::dateFormat($post['created_at']); ?></span>
                                        </span>
                                    </div>
                                    <a href="<?php 
                                        $url = '/cozum-merkezi';
                                        if (!empty($post['device_type'])) {
                                            $url .= '/' . Helper::slug($post['device_type']);
                                            if (!empty($post['brand'])) {
                                                $url .= '/' . Helper::slug($post['brand']);
                                            }
                                        }
                                        $url .= '/' . $post['slug'];
                                        echo Helper::url($url);
                                    ?>" class="flex-shrink-0 text-anka-orange hover:text-orange-600 transition">
                                        <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="M9 5l7 7-7 7"></path>
                                        </svg>
                                    </a>
                                </div>
                            </article>
                        <?php endforeach; ?>
                    <?php else: ?>
                        <p class="text-center text-gray-500 py-8">Henüz çözüm yazısı yok.</p>
                    <?php endif; ?>
                </div>

                <?php if (isset($total_pages) && $total_pages > 1): ?>
                    <div class="flex justify-center space-x-2">
                        <?php for ($i = 1; $i <= $total_pages; $i++): ?>
                            <a href="<?php 
                                $pageUrl = '/cozum-merkezi?page=' . $i;
                                if (!empty($current_device_type)) {
                                    $pageUrl .= '&device_type=' . urlencode($current_device_type);
                                }
                                if (!empty($current_brand)) {
                                    $pageUrl .= '&brand=' . urlencode($current_brand);
                                }
                                echo Helper::url($pageUrl);
                            ?>" class="px-4 py-2 rounded-lg <?php echo $i == $current_page ? 'bg-anka-orange text-white' : 'bg-white text-gray-700 hover:bg-gray-100'; ?> transition">
                                <?php echo $i; ?>
                            </a>
                        <?php endfor; ?>
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
</section>

Directory Contents

Dirs: 0 × Files: 2

Name Size Perms Modified Actions
14.38 KB lrw-r--r-- 2025-11-17 19:50:45
Edit Download
9.85 KB lrw-r--r-- 2025-11-17 19:50:45
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