Current Path : /home/baheco/public_html/adm/clases/controlador/logo/ |
Linux sd-1582531-l.dattaweb.com 3.10.0-1160.118.1.el7.x86_64 #1 SMP Wed Apr 24 16:01:50 UTC 2024 x86_64 |
Current File : /home/baheco/public_html/adm/clases/controlador/logo/controlador-editar.php |
<?php if (file_exists($_FILES['imagen']['tmp_name']) || is_uploaded_file($_FILES['imagen']['tmp_name'])) { include_once(dirname(dirname(dirname(__FILE__))).'/modelo/logo.php'); include_once(dirname(dirname(dirname(__FILE__))).'/datos/datos-logo.php'); $logo = new Logo(); $logoDatos = new DatosLogo(); if(move_uploaded_file($_FILES['imagen']['tmp_name'], "../../../../img/".$_FILES['imagen']['name'])) { $logo->setId($_POST["id"]); $logo->setImagen($_FILES['imagen']['name']); unlink('../../../../img/'.$_POST['imagen-vieja']); $logoDatos->editarLogo($logo); header('Location: ../../../admin.php?seccion=editar-logo&id='.$_POST["id"].'&operacion=correcto'); } else { header('Location: ../../../admin.php?seccion=editar-logo&id='.$_POST["id"].'&operacion=incorrecto'); } } else { header('Location: ../../../admin.php?seccion=editar-logo&id='.$_POST["id"].'&operacion=incorrecto'); } ?>