git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@1 e2b1556b-49f8-d141-9351-52d6861a72d9
43 lines
1015 B
PHP
43 lines
1015 B
PHP
<?php
|
|
|
|
include("seguridad.php");
|
|
include("functions.php");
|
|
if (!comprobar_permisos("AS")){
|
|
header("Location: aplicacion.php?e=permiso");
|
|
exit;
|
|
}
|
|
//include_once("html/cabecera.php");
|
|
|
|
/* TABLAS_MADRE.PHP */
|
|
|
|
$id = stripinput($_POST["id"]);
|
|
$valor = stripinput($_POST["valor"]);
|
|
|
|
if ($link = conectar()){
|
|
foreach($_POST as $key => $value){
|
|
$value = stripinput($value);
|
|
$key = stripinput($key);
|
|
$consulta = "update sistema set valor='$value' where id='$key'";
|
|
$resultado = mysql_query($consulta, $link);
|
|
if(!resultado){
|
|
$errores .= $locale['900']." $key";
|
|
}
|
|
}
|
|
|
|
if($id != ""){
|
|
$consulta = "insert into sistema (id, valor) values ('$id','$valor')";
|
|
$resultado = mysql_query($consulta, $link);
|
|
if(!resultado){
|
|
$errores .= $locale['901']." $key";
|
|
}
|
|
}
|
|
}else
|
|
$errores .= $locale['bd'];
|
|
|
|
if(!$errores) $aciertos .= $locale['902'];
|
|
|
|
header("Location: administracion.php?opcion=constantes&e=$errores&a=$aciertos");
|
|
include_once("html/pie.php");
|
|
|
|
?>
|