MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/www/consulta_titu_benefi_nom_telemercadeo.php
<?php 

require_once("Conectarse.php");


    echo "<form name='form' action='' method='post'>";
    require_once("mainfile.php");
    include ("config.php");
   global $dbi;

$control = mysql_query('SELECT cedula, codigo_militar, nombre FROM cartera_serviasjudinet WHERE cedula =  "' . $_GET["ced2"] . '" ');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
		$num=mysql_num_rows($control); 
		list($cedtitu, $codi, $nombreti) = mysql_fetch_row($control);
			
			
?>

.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CONSULTA BENEFICIARIOS POR TITULAR</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block;  }
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000; }
.lista {font-family: Arial; font-size: 12px; color: #000066; display: block; font-weight:bold}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; width:70px; height:22px;}
body {
	background-image: url();
}
.Estilo3 {color: #0000CC}
-->
</style>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
         var mydate=new Date()
         var year=mydate.getYear()
         if (year < 1000)
                 year+=1900
                 var day=mydate.getDay()
                 var month=mydate.getMonth()
                 var daym=mydate.getDate()
                 if (daym<10)
                    daym="0"+daym
                    var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
                    var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
                    document.write("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}					
</script>
<script language="javascript">
function AbreGral()
{ 
    var menu;   
	menu=window.open("mostrar_ingreso.php","","toolbar=no,scrollbars=no,width=800,height=500,status=yes");  
	menu.focus();  
	var ventana = window.self;  
	ventana.opener = window.self;  
	ventana.close();
}
</script>
</head>
<body onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="formulario" action="" method="post">
<table width="671" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td><fieldset><table width="669" border="0" align="center" cellpadding="2" cellspacing="2">
  <tr bgcolor="#FFFFCC">
    <td bgcolor="#FFFFCC" class="titulos"><div align="center">CONSULTA DE BENEFICIARIOS </div></td>
  </tr>
  <tr bgcolor="#ECE9D8">
    <td height="22" class="fecha"><div align="center">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
    </div></td>
  </tr>
  <tr>
   <td  bgcolor="#FFFFCC" align="center">
   <strong>Nombre del Titular:</strong>
  <input name="cedben" type="text" class="Estilo66" id="cedben" value="<?php echo $nombreti ?>" size="40" maxlength="40" readonly="" />
   <strong>Cedula del Titular:</strong>
  <input name="cedben" type="text" class="Estilo66" id="cedben" value="<?php echo   $cedtitu?>" size="14" maxlength="14" readonly="" />
        </td>
  </tr>
  
  <tr bgcolor="#FFCC99">
    <td bgcolor="#FFFFCC"><div align="center">
       <input name="proce" type="submit"  class="lista"  value ="REGRESAR" >

    </div></td>
  </tr>
</table>
</fieldset></td>
  </tr>
</table>
</form>
</body>
</html>

<?php
if(isset($_POST["proce"]))
{
$ced2 = $_GET["ced2"];
$numcon = $_GET["numcon"];
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='telemercadeo_consulta_titular_nom.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
}
$ced2 = $_GET["ced2"];
$numcon = $_GET["numcon"];

$mssql = mysql_query('SELECT * FROM beneficiarios  ');
		  if (!$mssql) {
				die('Invalid query 10ñ: ' . mysql_error());
			}

   if($mssql)
   {
         $filas = mysql_num_rows($mssql);
         if ($filas > 0)
         {

			 $control = mysql_query('SELECT cedula, nombre, cedula_titular, tipo_contrato_titular,  parentesco, telefono, celular, direccion, ciudad, email, estado FROM beneficiarios  WHERE cedula_titular =  "' . $_GET["ced2"] . '" and numero_contrato_titular  =  "' . $_GET["numcon"] . '"  ');
		  if (!$control) {
				die('Invalid query 10ñ: ' . mysql_error());
			}
                      if ((mysql_num_rows($control)!=0)) 
	                    {	 
                              echo "<TABLE width='1100' border='0' align='center' cellpadding='0' cellspacing='1'>
                              <TR >
                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NOMBRE</span></div></TD>
                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEDULA</span></div></TD>		                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEDULA TITULAR</span></div></TD>
				   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>PLAN</span></div></TD>
                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CIUDAD</span></div></TD>		 		                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TELEFONO</span></div></TD>		 		                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEULAR</span></div></TD>
                   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>EMAIL</span></div></TD>
				   <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>DIRECCION</span></div></TD>
                   <TD bgcolor='#FDE69D'><div align='center'><span class='texto'>PARENTESCO</span></div></TD> ";

  while(list($cedben,$apesben,$cedula,$tipo,$parente,$teleben,$celulben,$direben,$ciudben,$emailben,$estadoben) = mysql_fetch_row($control)) 
                              {  
                                  
                                   printf("<tr>
                       <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$apesben."</a></span></div></td>												                       <td bgcolor='#DEF0FE'><div align='center' class='lista'><input type='button' value=$cedben name='cedula' class=ESTILO50 onClick =window.location.href='cartera_tituben_proceso_nom.php?cedben=$cedben&ced2=$ced2&numcon=$numcon'></a></span></div></td>								   
					    <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$cedula."</span></div></td>
		                <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$tipo."</span></div></td>								   						<td bgcolor='#DEF0FE'><div align='center' class='lista'>".$ciudben."</span></div></td>
		                <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$teleben."</span></div></td>					                        <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$celulben."</span></div></td>					                        <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$emailben."</span></div></td>
    	                <td bgcolor='#DEF0FE'><div align='center' class='lista'>".$direben."</span></div>
						<td bgcolor='#DEF0FE'><div align='center' class='lista'>".$parente."</span></div></td>");
                               }
			                       echo "</table>";		  
                        }
	      }
     }
    else
    {
          echo "<script>alert('El número de cédula no se encuentra en la base de datos');</script>";
    }

echo "</form>";

?>