<?php
session_start();
if (!isset($_SESSION["user_id"]) || $_SESSION["user_id"]==null):
   print "<script>alert(\"Acceso Invalido!\");
   window.location='login.php';</script>";
endif;
if ($_SESSION["user_at"] < 4):
   print "<script>alert(\"Sin Acceso a Transaccion!\");
   window.location='vt511.php';</script>";
endif;
include_once ("lib/fpdf/funci.php");
date_default_timezone_set('America/La_Paz');
$conex = conectar();
$xusua = $_GET['id'];
mysql_query("lock tables adusr write");
$delet = "update adusr set adusrstat = 0 where adusrusua = '$xusua'";
mysql_query($delet);
mysql_query("unlock tables");
print "<script>alert(\"Se Dio de Alta al Usuario!\");
window.location='vt511.php';</script>";
?>
