File: /home/asjudine/public_html/adirectoress/histo_cancelar_cita.php
<?php
global $dbi;
require_once("../Conectarse.php");
$succ = mysql_query('SELECT codigo FROM sucursal WHERE nombre = "' . "$codigo_sucursal". '" ');
if (!$succ) {
die('Invalid query succ: ' . mysql_error());
}
list($codigo_sucursal) = mysql_fetch_row($succ);
$control = mysql_query('SELECT nombre_funcionario, cedula_funcionario FROM record_servicios WHERE cedula = "' . $_GET[cedula] . '" and numero_atencion = "' . $_GET[atencion] . '" ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
list($nomfun, $cedfun) = mysql_fetch_row($control);
$mss = mysql_query("UPDATE record_servicios set estado = '5' WHERE cedula = '" . $_GET[cedula] . "' and numero_atencion = '" . $_GET[atencion] . "' ");
if (!$mss) {
die('Invalid query update 174: ' . mysql_error());
}
$horat = $horas.''.$hor;
$informe = mysql_query("INSERT INTO actuaciones_servicios (cedula, numero_atencion, nombre_funcionario, asesoria, solucion, documentos_re, documentos_ap, concepto, observaciones, estado) VALUES ('" . $_GET[cedula] . "', '" . $_GET[atencion] . "', '" ."$nomfun". "','NINGUNO', 'NINGUNO', 'NINGUNO','NINGUNO','NINGUNO', 'NINGUNO', '5')");
if (!$informe) {
die('Invalid query update informe: ' . mysql_error());
}
/*$mssql2 = mysql_query("UPDATE cartera_serviasjudinet set direccion = '" . $_POST[dir] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', ciudad = '" . $_POST[ciu] . "', email = '" . $_POST[mail] . "' WHERE cedula = '" . $HTTP_GET_VARS[cedula] . "' ");
if (!$mssql2) {
die('Invalid query update 174: ' . mysql_error());
}
$mssql2 = mysql_query("UPDATE beneficiarios set direccion = '" . $_POST[dir] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', ciudad = '" . $_POST[ciu] . "', email = '" . $_POST[mail] . "' WHERE cedula = '" . $HTTP_GET_VARS[cedula] . "' ");
if (!$mssql2) {
die('Invalid query update 1222: ' . mysql_error());
}*/
$cedula=$_GET[cedula];
$atencion=$_GET[atencion];
echo "<script>alert('La cita ha sido candelada correctamente ');</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='ingresar_accion_tomada.php?cedul=$cedula&atencion=$atencion'</SCRIPT>";
?>