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: edit.php Size: 4.21 KB
/home/ankaservis/public_html/app/views/admin/services/edit.php

<?php
ob_start();
?>

<div class="bg-white rounded-lg shadow p-6">
    <h2 class="text-2xl font-bold text-anka-gray mb-6">Hizmet Düzenle</h2>

    <form method="POST" action="<?php echo Helper::url('/admin/services/edit/' . $service['id']); ?>">
        <div class="space-y-4">
            <div>
                <label class="block text-gray-700 font-semibold mb-2">Başlık *</label>
                <input type="text" name="title" value="<?php echo Helper::escape($service['title']); ?>" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-anka-orange focus:border-transparent">
            </div>

            <div>
                <label class="block text-gray-700 font-semibold mb-2">Kısa Açıklama</label>
                <textarea name="description" rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-anka-orange focus:border-transparent"><?php echo Helper::escape($service['description']); ?></textarea>
            </div>

            <div>
                <label class="block text-gray-700 font-semibold mb-2">İçerik</label>
                <textarea id="content" name="content"><?php echo $service['content'] ?? ''; ?></textarea>
            </div>

            <div class="grid grid-cols-2 gap-4">
                <div>
                    <label class="block text-gray-700 font-semibold mb-2">Sıra</label>
                    <input type="number" name="sort_order" value="<?php echo $service['sort_order']; ?>" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-anka-orange focus:border-transparent">
                </div>

                <div>
                    <label class="block text-gray-700 font-semibold mb-2">Durum</label>
                    <select name="status" 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="active" <?php echo $service['status'] === 'active' ? 'selected' : ''; ?>>Aktif</option>
                        <option value="inactive" <?php echo $service['status'] === 'inactive' ? 'selected' : ''; ?>>Pasif</option>
                    </select>
                </div>
            </div>

            <div class="flex space-x-4">
                <button type="submit" class="bg-anka-orange hover:bg-orange-600 text-white px-6 py-2 rounded-lg transition">
                    Güncelle
                </button>
                <a href="<?php echo Helper::url('/admin/services'); ?>" class="bg-gray-300 hover:bg-gray-400 text-gray-800 px-6 py-2 rounded-lg transition">
                    İptal
                </a>
            </div>
        </div>
    </form>
</div>

<script>
$(document).ready(function() {
    $('#content').summernote({
        height: 300,
        lang: 'tr-TR',
        toolbar: [
            ['style', ['style']],
            ['font', ['bold', 'italic', 'underline', 'clear']],
            ['fontname', ['fontname']],
            ['fontsize', ['fontsize']],
            ['color', ['color']],
            ['para', ['ul', 'ol', 'paragraph']],
            ['table', ['table']],
            ['insert', ['link', 'picture', 'video']],
            ['view', ['fullscreen', 'codeview', 'help']]
        ],
        callbacks: {
            onImageUpload: function(files) {
                uploadImage(files[0]);
            }
        }
    });
    
    function uploadImage(file) {
        var formData = new FormData();
        formData.append('image', file);
        
        $.ajax({
            url: '<?php echo Helper::url('/admin/upload-image'); ?>',
            method: 'POST',
            data: formData,
            processData: false,
            contentType: false,
            success: function(response) {
                if (response.success) {
                    $('#content').summernote('insertImage', response.url);
                } else {
                    alert('Resim yükleme hatası: ' + (response.message || 'Bilinmeyen hata'));
                }
            },
            error: function() {
                alert('Resim yüklenirken bir hata oluştu.');
            }
        });
    }
});
</script>

<?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
3.88 KB lrw-r--r-- 2025-11-17 19:50:57
Edit Download
4.21 KB lrw-r--r-- 2025-11-17 19:50:57
Edit Download
3.53 KB lrw-r--r-- 2025-11-17 19:50:58
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