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/ingresar_beneficiario.php
<?php 
//require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$linea = '-';
require_once("Conectarse.php");

$fechass = date("Y").'-'.date("m").'-'.date("d");



$control = mysql_query('SELECT cedula, codigo_militar, nombre, grado, numerocontrato,   tipocontrato , numero_libranza , tipo_afiliado, codigo_sucursal, direccion , telefono, celular, ciudad , email, cuenta, banco, entidad_laboral, unidad_descuento, codigo_descuento, entidad_recaudo, fecha_nacimiento, fecha_afiliacion, valorcontrato, numerocuotas, valorcuota, fecha_inicio_contrato, fecha_termino_contrato, fecha_ultimo_registro, mes_inicio, ano_inicio, mes_termino, ano_termino, saldoanteior, cuotaspendientes, cuotasdescontadas, saldonuevo, vendedor, director, beneficiarios, renovacion, causal_terminacion FROM cartera_serviasjudinet WHERE cedula =  "'.$_GET["ced2"]. '" and numerocontrato =  "'.$_GET["numcon"].'" and tipocontrato =  "'.$_GET["tipocontra"].'" ');
if (!$control) {
	die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control); 
		
if ($num != '0')
{
	list($cedula, $codi, $apes, $grad, $numcon, $plan, $num_lib, $titular, $codigosu, $dire, $tele, $celul, $ciud, $email, $cue, $ban, $enti, $unides, $codides, $entre, $fecna, $fechafil, $valcon, $numcuo, $valcuo, $fechainicio, $fechatermino, $fechaul, $mesini, $anoini, $mester, $anoterz, $salant, $cupen, $cudesc, $salnue, $ven, $director, $bene) = mysql_fetch_row($control);

$inipag = $anoini.'-'.$mesini ;

 $control = mysql_query('SELECT nombre FROM sucursal  WHERE codigo = "' . "$codigosu". '" ');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
		list($codigosu) = mysql_fetch_row($control);
	
		  		$cont10 = mysql_query('SELECT nombre  FROM entidad_laboral WHERE codigo = "' . "$enti". '"');
		  if (!$cont10) {
				die('Invalid query 2: ' . mysql_error());
			}
		list($enti) = mysql_fetch_row($cont10);
		
		 		$cont10 = mysql_query('SELECT nombre  FROM director_ventas WHERE codigo = "' . "$director". '"');
		  if (!$cont10) {
				die('Invalid query 3: ' . mysql_error());
			}
		list($director) = mysql_fetch_row($cont10);
	
		$cont10 = mysql_query('SELECT concepto FROM descuentos WHERE id = "' . "$entre". '"');
		  if (!$cont10) {
				die('Invalid query 11: ' . mysql_error());
			}
		list($entre) = mysql_fetch_row($cont10);
		
		$cont10 = mysql_query('SELECT vendedor FROM vendedores  WHERE codigo = "' . "$ven". '" ');
		  if (!$cont10) {
				die('Invalid query 12: ' . mysql_error());
			}
		list($ven) = mysql_fetch_row($cont10);
		
			 if ($plan > 0)
						  {
						   $cont10 = mysql_query('SELECT codigo_contrato FROM planes_contratos WHERE codigo = "' . "$plan". '" ');
		  if (!$cont10) {
				die('Invalid query 42: ' . mysql_error());
			}
		list($plan) = mysql_fetch_row($cont10); 
						 }

		}
////////////////////////////////

	 
	else
	 {
 $control = mysql_query('SELECT cedula,nombre,ciudad,direccion,telefono,celular,email,codigo_plan,codigo_militar,grado,fecha_nac,numero_contrato FROM solicitud_credito  WHERE cedula =  "' . $_GET["cedulita"]  . '"');
			if (!$control) {
				die('Error de consulta: ' . mysql_error());
			}  
     list($cedula,$apes,$ciud,$dire,$tele,$celul,$email,$plan,$codi,$grad,$fecna,$numcon ) = mysql_fetch_row($control);
	 
	 
	 $cont10 = mysql_query('SELECT codigo_contrato FROM planes_contratos WHERE codigo  = "' .$plan. '" ');
		  if (!$cont10) {
				die('Invalid query 42: ' . mysql_error());
			}
		list($plan) = mysql_fetch_row($cont10);
	 
	
	  
	 }


		
if(isset($_POST["guardar"]))
{
	$cont10 = mysql_query('SELECT numero_bene FROM planes_contratos WHERE codigo_contrato  = "' . $_POST["plan"]  . '" ');
	if (!$cont10) {
		die('Invalid query 42: ' . mysql_error());
	}
	list($bene) = mysql_fetch_row($cont10);
		
	$control = mysql_query('SELECT cedula, beneficiarios FROM cartera_serviasjudinet WHERE cedula =  "' . $_GET["ced2"] . '" and numerocontrato =  "' . $_GET["numcon"] . '" ');
	if (!$control) {
		die('Invalid query 1: ' . mysql_error());
	}
	$num=mysql_num_rows($control); 
	list($ced, $ben) = mysql_fetch_row($control);
		
	if ($_POST["parent"] == "Sin parentezco" and ($_POST["plan"] != "SJ05"  and $_POST["plan"] != "SP05"  and $_POST["plan"] != "PPE" and $_POST["plan"] != "SIP" and $_POST["plan"] != "SFM" and $_POST["plan"] != "INT05" )) 
	{
		echo "<script>alert('Beneficiarios exclusivo para planes SJ05 Y SJ07');</script>";
		echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_ingreso_ben.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
	}
	else
	{
		if (($_POST["parent"] == "Empleado") and ($_POST["plan"] != "SCP1" and $_POST["plan"] != "SCP2" and  $_POST["plan"] != "SCP3" and $_POST["plan"] != "SCP4" and $_POST["plan"] != "SJ12" and $_POST["plan"] != "SJ13" and $_POST["plan"] != "INT11" and $_POST["plan"] != "INT12" and $_POST["plan"] != "INT13"   ))
		{
			echo "<script>alert('Beneficiarios esxclusivo para planes corporativos SPC1 - SPC2 - SPC3 -SPC4');</script>";	
			echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_ingreso_ben.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
		}
		else
		{
		
			if ($_POST["plan"] == "SJ01" || $_POST["plan"] == "SJ03" || $_POST["plan"] == "COA01" || $_POST["plan"] == "SP01" || $_POST["plan"] == "SP03")
			{
				echo "<script>alert('No se puede ingresar beneficiario en este plan');</script>";
				echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_ingreso_ben.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
			}
			else
			{
		
	
				if ($ben < $bene)
				{
  					$ben = $ben + 1 ;   

					$mssql4 = mysql_query("INSERT INTO solicitud_beneficiario (cedula,nombre,ciudad,direccion,telefono,celular,email,parentesco ,cedula_titular,contrato_titular,plan_titular,estado,fecha_afiliacion) VALUES ('".$_POST["cedulaben"]."', '".$_POST["apesben"]."','".$_POST["ciueben"]."','".$_POST["direben"]."','".$_POST["teleben"]."','".$_POST["celulben"]."','".$_POST["emailben"]."','".$_POST["parent"]."','".$_POST["cedb"]."','".$_POST["numcon"]."','".$_POST["plan"]."','1','".$_POST["fecha_afilia"]."')");
					if (!$mssql4) {
						die('Invalid query cartera_serviasjudinet insertar: ' . mysql_error());
					}   



					$mssql3 = mysql_query("UPDATE  cartera_serviasjudinet set  direccion = '" . $_POST[dire] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', ciudad = '" . $_POST[ciud] . "', email = '" . $_POST[email] . "',  fecha_nacimiento = '" . $_POST[fecna] . "', beneficiarios = '" .$ben. "'  WHERE cedula = '" . $_GET[ced2] . "'  and numerocontrato =  '" . $_GET[numcon] . "' ");
					if (!$mssql3) {
						die('Invalid query cartera_serviasjudinet insertar: ' . mysql_error());
					}  


					if ($_POST["tiposs"]  == "Empresarial")
					{

						$mssql4 = mysql_query("INSERT INTO beneficiarios_empresariales (cedula, nombres, direccion, telefono, ciudad, email, celular,  empresa, direc_empresa, tele_empresa, ciu_empresa, asesor, estado) VALUES ('" . $_POST["cedulaben"]  . "', '" . $_POST["apesben"] . "', '" . $_POST["direben"] . "',  '" . $_POST["teleben"]  . "', '" . $_POST["ciueben"]  . "' , '" . $_POST["emailben"]  . "','" . $_POST["celulben"]  . "',  '" . $_POST["apenom"]  . "', '" . $_POST["dire"]  . "',  '" . $_POST["tel"]  . "','" . $_POST["ciud"]  . "', '" . $_POST["asesor"]  . "', '1')");
						if (!$mssql4) {
							die('Invalid query cartera_serviasjudinet insertar: ' . mysql_error());
						}   

					}



       				echo "<script>alert('Solicitud Enviada Correctamente');</script>";
	   				echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_ingreso_ben.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
				}
				else
				{
 					echo "<script>alert('No se le Puede Ingresar al Titular mas Beneficiarios');</script>";
 					echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_ingreso_ben.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
				}	
			}
		}
	}
}


$sql = mysql_query('SELECT * FROM entidad_laboral order by nombre ');
			if (!$sql) {
				die('Invalid query: ' . mysql_error());
			}	
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);  

$sql2 = mysql_query('SELECT * FROM vendedores WHERE tipo = "AE" order by codigo ');
			if (!$sql2) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);  


$sql3 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql3) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql3 = mysql_fetch_assoc($sql3);
$totalRows_sql3 = mysql_num_rows($sql3);


$sql4 = mysql_query('SELECT * FROM vendedores WHERE estado = "1" order by vendedor');
			if (!$sql4) {
				die('Invalid query: ' . mysql_error());
			}
		$row_sql4 = mysql_fetch_assoc($sql4);
		$totalRows_sql4 = mysql_num_rows($sql4);


$sql5 = mysql_query('SELECT * FROM sucursal order by nombre ');
			if (!$sql5) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql5 = mysql_fetch_assoc($sql5);
$totalRows_sql5 = mysql_num_rows($sql5); 


$sql6 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql6) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql6 = mysql_fetch_assoc($sql6);
$totalRows_sql6 = mysql_num_rows($sql6); 

$sql7 = mysql_query('SELECT * FROM director_ventas WHERE estado = "1" order by nombre');
			if (!$sql7) {
				die('Invalid query: ' . mysql_error());
			}	
		$row_sql7 = mysql_fetch_assoc($sql7);
		$totalRows_sql7 = mysql_num_rows($sql7); 
		
		
$sql8 = mysql_query('SELECT * FROM planes_contratos  WHERE codigo != "7" and codigo != "8" order by codigo ');
			if (!$sql8) {
				die('Invalid query: ' . mysql_error());
			} 
$row_sql8 = mysql_fetch_assoc($sql8);
$totalRows_sql8 = mysql_num_rows($sql8);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SOLICITUD INGRESO BENEFICIARIO</title>


<style type="text/css">
<!--
.est_cont5 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	font-style: normal;
	font-weight: normal;
	background-color: #EDFAF4;
	margin: 2px;
	padding: 2px;
	height: auto;
	width: auto;
	border: thin groove #E9AAF0;
	color: #C72350;
}
.Estilo2 {
	font-size: 14px;
	font-weight: bold;
}
.est_cont2 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #2B39EC;
	background-color: #F0F5CF;
	height: 18px;
	width: auto;
	border: thin solid #FABF85;
}
.est_cont6 {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #006262;
	background-color: #EDFED3;
	margin: 1px;
	padding: 1px;
	height: auto;
	width: auto;
	border: thin solid #D9B6F8;
}

body {
	background-image: url(ELEMENTOS/gri06.jpg);
}

.sol_cre1 {
	font-family: "Times New Roman", Times, serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #0B3495;
	background-color: #E6FAFF;
	margin: 1px;
	padding: 1px;
	height: 18px;
	width: auto;
	border: thin outset #56AD95;
}
.col_cre2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	color: #F92F0B;
	background-color: #B3D9F0;
	height: auto;
	width: auto;
	border: medium groove #FC9227;
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.Estilo53 {color: #2492FF;
	font-weight: bold;
}
.recaudo {font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	font-variant: normal;
	color: #000000;
	background-color: #B6CBDC;
	margin: 4px;
	padding: 8px;
	width: auto;
	border: medium outset #339966;
}
.campo1 {background-color: #B7FFFF;
	border: thin dashed #B6B6B6;
}
.campo1 {font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	font-style: normal;
	font-weight: bold;
	background-color: #E1EFFD;
	border: thin doble #009999;
}
.campo1 {	font-family: "Courier New", Courier, monospace;
	font-size: 11px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
	height: 18px;
	width: auto;
}
.datos1 {font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-style: normal;
	text-decoration: blink;
	background-color: #CCFFCC;
	margin: 5px;
	padding: 7px;
	height: auto;
	width: auto;
	border: thin solid #0099FF;
}
.datos1 {font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 16px;
	background-color: #FDE0C1;
	margin: 2px;
	padding: 3px;
	border: medium doble #DBAED7;
}
.datos1 {	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-weight: normal;
	background-color: #B8F5E8;
	margin: 4px;
	padding: 5px;
	border: thin outset #009999;
}
.datos2 {	font-family: "Courier New", Courier, monospace;
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 2px;
	padding: 3px;
	border: medium doble #EEBFEB;
}
.datos3 {	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #FF3300;
	background-color: #A6ECD7;
	margin: 4px;
	padding: 4px;
	border: medium groove #CCCCFF;
}
.go {	font-family: "Times New Roman", Times, serif;
	font-size: 9px;
	font-style: normal;
	color: #FF6633;
	background-color: #FBDCBD;
	padding: 1px;
	height: auto;
	width: auto;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
}
.Estilo64 {
	font-size: 8px;
	font-weight: bold;
	color: #000000;
}
.Estilo66 {
	font-size: 12px;
	font-weight: bold;
}
.label {background-color: #FFFFCC; font-size: 12px; font-family: Arial; color:#0000CC; display: block;}
.Estilo68 {
	color: #FF3300;
	font-weight: bold;
}
.Estilo70 {font-size: 14px; font-weight: bold; color: #FF6600; }
.Estilo72 {font-size: 14px; font-weight: bold; color: #0000CC; }
-->
</style>
<script Language="JavaScript">

function validarEntero(valor){ 
      //intento convertir a entero. 
     //si era un entero no le afecta, si no lo era lo intenta convertir 
     valor = parseInt(valor) 

      //Compruebo si es un valor numérico 
      if (isNaN(valor)) { 
            //entonces (no es numero) devuelvo el valor cadena vacia 
            return "" 
      }else{ 
            //En caso contrario (Si era un número) devuelvo el valor 
            return valor 
      } 
} 

function valida_envia(){
	//valido LOS APELLIDOS
	if (document.form1.apesben.value.length== ""){
		alert("Tiene que Escribir el Nombre")
		document.form1.apesben.focus()
		return (false);
	}
	
		//valido el nombre
	if (document.form1.cedulaben.value.length== ""){
		alert("Tiene que escribir el numero de cedula")
		document.form1.cedulaben.focus()
		return (false);
	}

		//validar el celular
	if (document.form1.celulben.value.length== ""){
		alert("Tiene que escribir el numero de celular")
		document.form1.celulben.focus()
		return (false);
	}


	if (document.form1.tiposs.value.length== ""){
		alert("Seleccione Tipo")
		document.form1.tiposs.focus()
		return (false);
	}
	
	if (document.form1.tiposs.value == "Empresarial")
	{
	
		if (document.form1.asesor.value ==""){
			alert("Seleccione Asesor Empresarial")
			document.form1.asesor.focus()
			return (false);
	}
}

	return (true);
}
</script>
</head>
<body >
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center> 
<form action=""  method="post" onsubmit="return valida_envia()" enctype="multipart/form-data" name="form1" class="color_fondo_sc" id="form1">
  <div align="center">
    <div class="Estilo50">SOLICITUD PARA INGRESAR BENEFICIARIO </div>
    <table width="724" border="2" cellpadding="1" cellspacing="1" class="sol_cre1">
      <caption>
      <div align="center"><br />
          <span class="Estilo72"> DATOS TITULAR</span><br />
          <br />
          <br />
          <br />
      </div>
	  
	  <span class="Estilo70">SI SUS DATOS PERSONALES SON DIFERENTES A LOS QUE SE MUESTRAN EN LA PANTALLA FAVOR MODIFICARLOS.</span><br />
      </caption>
      <tr>      </tr>
      <tr>
        <td  align="right"><strong>Apellidos y Nombres:</strong></td>
        <td colspan="3" align="left"><input name="apenom" type="text" class="Estilo66" id="apenom" value="<?php echo $apes ?>" size="60" maxlength="65"  readonly=""/></td>
        <td width="109" height="21"><div align="right"><strong>Cedula No:</strong></div></td>
        <td width="217" ><div align="left">
            <input name="cedb" type="text" class="Estilo66" id="cedb" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly="" />
        </div></td>
      </tr>
      <tr>
        <td><div align="right"><strong>Cogido Militar :</strong></div></td>
        <td ><div align="left">
            <input name="cod" type="text" class="Estilo66" id="cod" value="<?php echo $codi ?>" size="14" maxlength="20" readonly=""/>
        </div></td>
        <td><div align="right"><strong>
           
          Grado :</strong></div></td>
        <td width="116"> <input name="gra" type="text" class="Estilo66" id="gra" value="<?php echo $grad ?>" size="12" maxlength="10" readonly=""/></td>
        <td align="right"><span class="Estilo68">Fecha Nacimiento :</span></td>
        <td align="left"><input name="fecna" type="text" class="Estilo66" id="fecna" value="<?php echo $fecna ?>" size="5" maxlength="5" />
            <span class="Estilo64">DIA-MES</span> </td>
      </tr>
      <tr>
        <td><div align="right" class="Estilo68">Ciudad :</div></td>
        <td><div align="left">
            <input name="ciud" type="text" class="Estilo66" id="ciud" value="<?php echo $ciud ?>" size="14" maxlength="20" />
        </div></td>
        <td><div align="right" class="Estilo68">Direccion :</div></td>
        <td colspan="3"><div align="left">
            <input name="dire" type="text" class="Estilo66" id="dire" value="<?php echo $dire ?>" size="45" maxlength="45" />
        </div></td>
      </tr>
      <tr>
        <td><div align="right" class="Estilo68">Telefono :</div></td>
        <td><div align="left">
            <input name="tel" type="text" class="Estilo66" id="tel" value="<?php echo $tele ?>" size="10" maxlength="20" />
        </div></td>
        <td><div align="right" class="Estilo68">Celular :</div></td>
        <td><div align="left">
            <input name="cel" type="text" class="Estilo66" id="cel" value="<?php echo $celul ?>" size="20" maxlength="20" />
        </div></td>
        <td><div align="right" class="Estilo68">E-mail :</div></td>
        <td colspan="2"><div align="left">
            <input name="email" type="text" class="Estilo66" id="email" value="<?php echo $email ?>" size="35" maxlength="35"/>
        </div></td>
      </tr>
      <tr>
        <td><div align="right"><strong>Plan :</strong></div></td>
        <td><div align="left">
            <input name="plan" type="text" class="Estilo66" id="plan" value="<?php echo $plan ?>" size="5" maxlength="5" readonly=""/>
        </div></td>
        <td><div align="right"><strong> N° Contrato:</strong></div></td>
        <td><div align="left">
            <input name="numcon" type="text" class="Estilo66" id="numcon" value="<?php echo $numcon ?>" size="20" maxlength="20" readonly=""/>
        </div></td>
      </tr>
    </table>
    <table width="779" border="4" cellpadding="1" cellspacing="1" class="label">
      <caption>
      <div align="center"><br />
          <span class="Estilo2">INGRESAR BENEFICIARIO</span><br />
      </div>
      </caption>
      <tr>
        <td width="73"  align="right"><strong>Apellidos y Nombres:</strong></td>
        <td colspan="3" align="left"><input name="apesben" type="text" class="Estilo66" id="apesben" value="<?php echo $apesben ?>" size="60" maxlength="65" />        </td>
        <td width="111" height="21"><strong>Cedula No:</strong></td>
        <td width="210" ><div align="left">
            <input name="cedulaben" type="text" class="Estilo66" id="cedulaben" value="<?php echo $cedulaben ?>" size="20" maxlength="20" />
        </div></td>
      </tr>
      <tr>
        <td><div align="right"><strong>Cuidad :</strong></div></td>
        <td width="88"><div align="left">
            <input name="ciueben" type="text" class="Estilo66" id="ciueben" value="<?php echo $ciueben ?>" size="14" maxlength="20" />
        </div></td>
        <td width="74"><div align="right"><strong>Direccion :</strong></div></td>
        <td colspan="3"><div align="left">
            <input name="direben" type="text" class="Estilo66" id="direben" value="<?php echo $direben ?>" size="45" maxlength="45" />
        </div></td>
      </tr>
      <tr>
        <td><div align="right"><strong>Telefono :</strong></div></td>
        <td><div align="left">
            <input name="teleben" type="text" class="Estilo66" id="teleben" value="<?php echo $teleben ?>" size="10" maxlength="20" />
        </div></td>
        <td><div align="right"><strong>Celular :</strong></div></td>
        <td width="188"><div align="left">
            <input name="celulben" type="text" class="Estilo66" id="celulben" value="<?php echo $celulben ?>" size="20" maxlength="20" />
        </div></td>
        <td><strong>Email:</strong></td>
        <td colspan="2"><input name="emailben" type="text" class="Estilo66" id="emailben" value="<?php echo $emailben ?>" size="35" maxlength="35" /> 
        </td>
      </tr>
      <tr>
        <td><div align="right"><strong>Parentesco :</strong></div></td>
        <td colspan="2"><div align="left">
            <select name="parent" class="Estilo66">
              <option value="">--SELECCIONE--</option>
              <option value="Esposo (a)">Esposo (a)</option>
              <option value="Hermano(a)">Hermano(a)</option>
              <option value="Hijo(a)">Hijo(a)</option>
              <option value="Papá">Papá</option>
              <option value="Mamá">Mamá</option>
              <option value="Empleado">Empleado</option>
              <option value="Sin parentezco">Sin parentesco</option>
            </select>
        </div></td>
        <td><strong>Tipo :</strong>
         
              <select name="tiposs" class="Estilo66">
                <option value="">--SELECCIONE--</option>
                <option value="Familiar">Familiar</option>
                <option value="Empresarial">Empresarial</option>
              </select></td>
			  
        <td><strong>Asesor Empresarial :</strong></td>
		<td>  
		<select name="asesor" class="est_cont21" id="asesor">
          <option value="">SELECCIONE ASESOR</option>
          <?php
     do {  
?>
          <option value="<?php echo $row_sql2['vendedor'];?>"><?php echo $row_sql2['vendedor']?></option>
          <?php
} while ($row_sql2 = mysql_fetch_assoc($sql2));
  $rows2 = mysql_num_rows($sql2);
  if($rows2 > 0) {
      mysql_data_seek($sql2, 0);
       $row_sql2 = mysql_fetch_assoc($sql2);
  }
?>
        </select></td>
      </tr>
      
       <tr>
        <td><div align="right"><strong>Fecha Afiliacion :</strong></div></td>
        <td><div align="left">
            <input name="fecha_afilia" type="text" class="Estilo66" id="fecha_afilia" value="<?php echo $fechass ?>" size="10" maxlength="20" />
        </div></td>
        <td><div align="right"></div></td>
        <td width="188"><div align="left"></div></td>
        <td>&nbsp;</td>
        <td colspan="2">&nbsp;</td>
      </tr>
      
      
    </table>
    <p>
      <label>
      <input name="guardar" type="submit" class="Estilo53" id="guardar" value="Enviar"  />
      </label>
    </p>

  </div>
</form>
</body>
</html>