32 lines
664 B
PHP
32 lines
664 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
include("seguridad.php");
|
||
|
|
include("functions.php");
|
||
|
|
if(!comprobar_permisos("SP") && (!puede_gestionar($oid, $_SESSION["oid"]) or !comprobar_permisos("GP"))){
|
||
|
|
header("Location: aplicacion.php?e=permiso");
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
|
||
|
|
$oid = stripinput($_POST["oid"]);
|
||
|
|
|
||
|
|
$errores = "";
|
||
|
|
|
||
|
|
if($link = conectar()){
|
||
|
|
$consulta = "delete from clientes where oid='$oid'";
|
||
|
|
$resultado = mysql_query($consulta, $link);
|
||
|
|
if(!$resultado){
|
||
|
|
$errores .= $locale['2209'];
|
||
|
|
}else{
|
||
|
|
$aciertos .= $locale['2210'];
|
||
|
|
}
|
||
|
|
}else{
|
||
|
|
$errores .= $locale['bd'];
|
||
|
|
}
|
||
|
|
|
||
|
|
header("Location: lista_clientes.php?e=$errores&a=$aciertos");
|
||
|
|
exit();
|
||
|
|
|
||
|
|
include_once("html/pie.php");
|
||
|
|
|
||
|
|
?>
|