<?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='vt221.php';</script>";
endif;
include_once ("lib/fpdf/funci.php");
date_default_timezone_set('America/La_Paz');
$conex = conectar();
$xcodi = $_GET['id'];
mysql_query("lock tables vtcli write");
$delet = "update vtcli set vtclistat = 9 where vtcliccli = '$xcodi'";
mysql_query($delet);
mysql_query("unlock tables");
print "<script>alert(\"Se Dio de Baja el Cliente!\");
window.location='vt231.php';</script>";
?>
