Ejemplo n.º 1
0
 }
 if (!empty($_FILES['fileFoto2']['tmp_name'])) {
     $uploaded_files_location = '../../fotos/';
     //This is the directory where uploaded files are saved on your server
     $final_location = $uploaded_files_location . basename($_FILES['fileFoto2']['name']);
     move_uploaded_file($_FILES['fileFoto2']['tmp_name'], $final_location);
     $objProductoEntidad->setFoto2("fotos/" . $_FILES['fileFoto2']['name']);
 } else {
     $objProductoEntidad->setFoto2($sTmpFoto2);
 }
 if (!empty($_FILES['fileFoto3']['tmp_name'])) {
     $uploaded_files_location = '../../fotos/';
     //This is the directory where uploaded files are saved on your server
     $final_location = $uploaded_files_location . basename($_FILES['fileFoto3']['name']);
     move_uploaded_file($_FILES['fileFoto3']['tmp_name'], $final_location);
     $objProductoEntidad->setFoto3("fotos/" . $_FILES['fileFoto3']['name']);
 } else {
     $objProductoEntidad->setFoto3($sTmpFoto3);
 }
 if (!empty($_FILES['fileFoto4']['tmp_name'])) {
     $uploaded_files_location = '../../fichas/';
     //This is the directory where uploaded files are saved on your server
     $final_location = $uploaded_files_location . basename($_FILES['fileFoto4']['name']);
     move_uploaded_file($_FILES['fileFoto4']['tmp_name'], $final_location);
     $objProductoEntidad->setDocumento("fichas/" . $_FILES['fileFoto4']['name']);
 } else {
     $objProductoEntidad->setDocumento($sTmpFoto4);
 }
 if ($_POST["accion"] == 'DEL_LOG') {
     if (DAOProducto::mantenimientoProducto($objProductoEntidad, array($_POST["accion"]))) {
         echo "1";