<?php 
session_start();
foreach($_GET as $campo => $valor){${$campo}=trim($valor);} 
foreach($_POST as $campo => $valor){${$campo}=trim($valor);} 

include_once('lib_main.php');
if(!empty($empr)){$link_data=msql_connect('','','',$empr); $cfg_empr=$empr;}
$user_codigo=$_SESSION['user_codigo'];
$user0=data_maes('user',$user_codigo);

$error=0;
if(empty($user_codigo)){$error=1;}
elseif(empty($tabla)){$error=2;}
elseif(empty($codigo)){$error=3;}

if(empty($error))
{
     $sql_updt='update '.$tabla.'0 set '.$tabla.'_status="X" where '.$tabla.'_codigo='.$codigo.'';
     $res_updt=msql_query($sql_updt,$link_data);
}
     
?>

