Tul xxx Tul
User / IP
:
216.73.216.159
Host / Server
:
45.84.207.204 / aircan.me
System
:
Linux lt-bnk-web1726.main-hosting.eu 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
u931257429
/
domains
/
aircan.me
/
public_html
/
construcciones
/
admin
/
app
/
Views
/
projects
/
Viewing: form.php
<?php $isEdit = isset($project); $action = $isEdit ? url('projects/update/' . $project['id']) : url('projects/store'); $mainPreview = $isEdit && !empty($project['main_image']) ? uploaded_url($project['main_image']) : asset('img/logo.png'); ?> <form action="<?= $action ?>" method="POST" enctype="multipart/form-data" class="space-y-6"> <?= csrf_field() ?> <div class="grid gap-6 xl:grid-cols-[1.2fr_0.8fr]"> <section class="rounded-xl border border-slate-200 bg-white p-5 shadow-sm"> <h2 class="text-lg font-black text-slate-950">Informacion del proyecto</h2> <div class="mt-5 grid gap-4 md:grid-cols-2"> <input type="hidden" id="slugInput" name="slug" value="<?= clean(old('slug', $project['slug'] ?? '')) ?>"> <div class="md:col-span-2"><label class="mb-2 block text-sm font-bold">Titulo</label><input id="titleInput" name="title" required value="<?= clean(old('title', $project['title'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold focus:ring-4 focus:ring-gold/15"><?php if (!empty($errors['title'])): ?><p class="mt-1 text-xs font-bold text-red-600"><?= clean($errors['title']) ?></p><?php endif; ?></div> <div class="md:col-span-2"><label class="mb-2 block text-sm font-bold">Descripcion</label><textarea name="description" rows="7" required class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold focus:ring-4 focus:ring-gold/15"><?= clean(old('description', $project['description'] ?? '')) ?></textarea><?php if (!empty($errors['description'])): ?><p class="mt-1 text-xs font-bold text-red-600"><?= clean($errors['description']) ?></p><?php endif; ?></div> <div class="md:col-span-2 grid grid-cols-1 md:grid-cols-2 gap-4"> <div class="space-y-1.5"> <label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Servicio relacionado</label> <select name="service_id" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"> <option value="">Ninguno</option> <?php foreach ($services as $s): ?> <option value="<?= $s['id'] ?>" <?= (old('service_id', $project['service_id'] ?? '') == $s['id']) ? 'selected' : '' ?>><?= clean($s['title']) ?></option> <?php endforeach; ?> </select> </div> <div class="space-y-1.5"> <label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Nombre del Cliente</label> <input name="client_name" placeholder="Ej: Juan Pérez o Inmobiliaria ABC" value="<?= clean(old('client_name', $project['client_name'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"> </div> </div> <div class="md:col-span-2 grid grid-cols-2 md:grid-cols-3 gap-4 p-4 bg-slate-50 rounded-xl border border-slate-100"> <div class="space-y-1.5"><label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Superficie</label><input name="surface" placeholder="ej: 250 m²" value="<?= clean(old('surface', $project['surface'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"></div> <div class="space-y-1.5"><label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Año</label><input name="year" placeholder="ej: 2024" value="<?= clean(old('year', $project['year'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"></div> <div class="space-y-1.5"><label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Habitaciones</label><input name="bedrooms" placeholder="ej: 3" value="<?= clean(old('bedrooms', $project['bedrooms'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"></div> <div class="space-y-1.5"><label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Baños</label><input name="bathrooms" placeholder="ej: 2" value="<?= clean(old('bathrooms', $project['bathrooms'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"></div> <div class="space-y-1.5"> <label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Estado Obra</label> <select name="status_text" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"> <?php $statusOptions = ['Finalizado', 'En Obra', 'Preventa', 'Entregado', 'Planificación', 'Suspendido']; $currentStatusText = old('status_text', $project['status_text'] ?? 'Finalizado'); foreach ($statusOptions as $opt): ?> <option value="<?= $opt ?>" <?= $currentStatusText === $opt ? 'selected' : '' ?>><?= $opt ?></option> <?php endforeach; ?> </select> </div> </div> <div class="space-y-1.5"><label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Fecha Inicio</label><input name="start_date" type="date" value="<?= clean(old('start_date', $project['start_date'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"></div> <div class="space-y-1.5"><label class="text-[10px] font-bold text-slate-500 uppercase tracking-wider ml-1">Fecha Fin</label><input name="end_date" type="date" value="<?= clean(old('end_date', $project['end_date'] ?? '')) ?>" class="w-full rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"></div> <input type="hidden" name="category_id" value="1"> <select name="status" class="rounded-lg border border-slate-200 px-4 py-3 text-sm outline-none focus:border-gold"><option value="activo" <?= old('status', $project['status'] ?? 'activo') === 'activo' ? 'selected' : '' ?>>Activo</option><option value="inactivo" <?= old('status', $project['status'] ?? '') === 'inactivo' ? 'selected' : '' ?>>Inactivo</option></select> </div> </section> <section class="rounded-xl border border-slate-200 bg-white p-5 shadow-sm"> <h2 class="text-lg font-black text-slate-950">Imagen principal</h2> <div class="mt-5 rounded-lg bg-slate-50 p-4 text-center"> <img id="mainPreview" src="<?= $mainPreview ?>" class="mx-auto aspect-[4/3] w-full rounded-lg object-cover bg-white shadow-sm"> <label class="mt-4 inline-flex cursor-pointer rounded-lg bg-slate-950 px-4 py-3 text-sm font-bold text-white hover:bg-gold hover:text-black">Subir imagen<input id="mainInput" name="main_image" type="file" accept="image/jpeg,image/png,image/webp" class="hidden"></label> <?php if (!empty($errors['main_image'])): ?><p class="mt-2 text-xs font-bold text-red-600"><?= clean($errors['main_image']) ?></p><?php endif; ?> </div> </section> </div> <section class="rounded-xl border border-slate-200 bg-white p-5 shadow-sm"> <h2 class="text-lg font-black text-slate-950">Galeria</h2> <label class="mt-5 flex cursor-pointer flex-col items-center justify-center rounded-xl border-2 border-dashed border-slate-200 bg-slate-50 p-8 text-center hover:border-gold"><span class="text-sm font-bold text-slate-700">Arrastra o selecciona multiples imagenes</span><input id="galleryInput" name="gallery[]" multiple type="file" accept="image/jpeg,image/png,image/webp" class="hidden"></label> <div id="galleryPreview" class="mt-5 grid gap-3 sm:grid-cols-3 lg:grid-cols-5"></div> <?php if ($isEdit && !empty($gallery)): ?><div class="mt-6 grid gap-3 sm:grid-cols-3 lg:grid-cols-5"><?php foreach ($gallery as $image): ?><div class="rounded-lg border p-2"><img src="<?= uploaded_url($image['image_path']) ?>" class="aspect-square w-full rounded-lg object-cover"><button name="delete_image_id" value="<?= $image['id'] ?>" class="mt-2 w-full rounded-lg bg-red-50 px-3 py-2 text-xs font-bold text-red-700">Eliminar</button></div><?php endforeach; ?></div><?php endif; ?> </section> <div class="flex justify-end gap-3"><a href="<?= url('projects') ?>" class="rounded-lg border border-slate-200 px-5 py-3 text-sm font-bold">Cancelar</a><button class="rounded-lg bg-slate-950 px-5 py-3 text-sm font-black text-white hover:bg-gold hover:text-black"><?= $isEdit ? 'Guardar cambios' : 'Crear proyecto' ?></button></div> </form> <script> const slug=s=>s.normalize('NFD').replace(/[\u0300-\u036f]/g,'').toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,''); document.getElementById('titleInput').addEventListener('input',e=>{if(!document.getElementById('slugInput').value)document.getElementById('slugInput').value=slug(e.target.value)}); document.getElementById('mainInput').addEventListener('change',e=>{const f=e.target.files[0]; if(f)document.getElementById('mainPreview').src=URL.createObjectURL(f)}); document.getElementById('galleryInput').addEventListener('change',e=>{const box=document.getElementById('galleryPreview'); box.innerHTML=''; [...e.target.files].forEach(f=>{const img=document.createElement('img'); img.src=URL.createObjectURL(f); img.className='aspect-square w-full rounded-lg object-cover shadow-sm'; box.appendChild(img);});}); </script>
Coded With 💗 by
0x6ick