File: /home/asjudine/public_html/entrachat.php
<?php
include ("header.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style type="text/css">
<!--
.Estilo1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #990000;
}
.Estilo2 {color: #FFFFFF}
.Estilo3 {
font-size: 16px;
font-weight: bold;
}
-->
</style>
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>INGRESO CHAT - ASJUDINET</title>
</head>
<body>
<p> </p>
<p> </p>
<table width="516" align="center">
<tr>
<td width="508" bgcolor="#00CCFF"><div align="center"><img src="ELEMENTOS/textoatencion.gif" width="313" height="30"></div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="justify" class="Estilo1">
<p>Servicio exclusivo para clientes de SERVIASJUDINET. <a href="entrachatnuevo.php">new</a> <br>
<br>
Para conectarse con nuestro servicio de Chat por favor digite los siguientes datos, teniendo en cuenta que en el espacio "Código" debe anotar su número de C.C., NIT o código militar, según el caso: </p>
REQUERIMIENTOS:DEBE TENER INSTALADO EN SU EQUIPO EL PROGRAMA <CENTER>JAVA, DESCARGUELO GRATIS EN INTERNET</CENTER></div></td>
</tr>
<tr>
<td> <table width="100%" align="center">
<form name="formulario" action="<?php echo $editFormAction; ?>" method="post">
<tr bgcolor="#990000">
<td width="56%" class="Estilo2 texto"><span class="Estilo3">Cédula del Afiliado:</span></td>
<td width="44%">
<input name="cedula" type="password" id="cedula" size="15" maxlength="11">
</td>
</tr>
<tr bgcolor="#990000">
<td colspan="2" class="texto"> <div align="center"><br>
<input type="submit" name="Submit" value="Entrar" style="font-family: Verdana; font-size: 8 pt; color: #FF0000; background-color: #FFFFCC; border-style: solid">
<input name="button" type="button" style="font-family: Verdana; font-size: 8 pt; color: #FF0000; background-color: #FFFFCC; border-style: solid" onclick="window.location.href='index.php'" value="IR PAGINA PRINCIPAL">
<input type="reset" name="Reset" value="Borrar" style="font-family: Verdana; font-size: 8 pt; color: #FF0000; background-color: #FFFFCC; border-style: solid">
</div>
</td>
</tr>
<input type="hidden" name="MM_insert" value="formulario">
</form>
</table>
</td>
</tr>
</table>
</body>
</html>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING']))
{
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "formulario"))
{
//require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.php");
// $sql = "select * from asjudinet_cartera where cedula='$cedula' ";
//$consulta = mysql_query("select * from cartera_serviasjudinet where cedula='$cedula'");
$consulta = mysql_query('SELECT * FROM cartera_serviasjudinet WHERE cedula = "' . $_POST[cedula] . '" ');
if (!$consulta) {
die('Invalid query resul: ' . mysql_error());
}
if (mysql_num_rows($consulta)!=0)
{
$nombre = mysql_result($consulta,0,"nombre");
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='/chat/?user=$nombre'</SCRIPT>";
/*echo "<script>alert('CHAT No Disponible, Temporalmente, hasta nueva orden');</script>";*/
}
else
{
$consulta = mysql_query("select * from Usuarios where Cedula='$cedula'");
if (mysql_num_rows($consulta)!=0)
{
}else
{
echo "<script>alert('La información suministrada no existe en la base de datos, por lo cual no podrá entrar al CHAT');</script>";
}
}
}
?>