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/dir_juridico_asignacion_inicios.php
<!DOCTYPE html>
<html>
<head>
<title>Asignacion Proceso</title>
	<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
<style type="text/css">
	*{margin: 0;padding: 0;}
    body{background-color:#EAEAEA;font-family:Geneva, Arial, Helvetica, sans-serif;}
    header {background-color: #B7271F; text-align: center;}
    .cerrarsesion{width: auto;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
    .cerrarsesion:hover{background-color: #ffffff;color: #000;}
    .titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
    table{margin: 0 auto;border: 2px solid #bebebe; text-align: center;}
    .divirmenu{text-align: center;}
    .irmenu{width: 150px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
    .irmenu:hover{background-color: #67a0d9; color: #000;}
    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
    td{border: #969696 solid 1px;}
    .tdizq{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: right;}
	.exp{color:#8A0000; font-size:12px;}
    .boton1{width:150px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:4px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 1px 3px; text-align: center; font-size: 12px; font-weight: 700}
    .tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
    .botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;}
</style>


<script type="text/JavaScript">

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
</script>
</head>

<body>
<header>
    <img src="ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">ASIGNACION PROCESO - DIRECTOR JURIDICO</h3>


<form action="" method="post" name="form1" class="provd" id="form1">
<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 colspan="2" class="titulos"><div align="center">CONSULTA POR NUMERO DE LIBRANZA </div></td>
  </tr>-->
  <tr bgcolor="#ECE9D8">
    <td height="22" colspan="2" class="fecha"><div align="center">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
    </div></td>
  </tr>

<tr>
	<td class="tdcen" width="373" >Digite &quot;<span class="exp"># Cedula</span>&quot; para continuar</td>
	<td class="tdcen" width="282"><input name="cedula" type="text" class="campo1" id="cedula" value="" size="21" maxlength="21"></td>
</tr>
<tr>
    <td class="tdcen" colspan="2"><input name="consultar" id="consultar" type="submit" class="boton1" value="Consultar"></td>
</tr>
<tr>
    <td class="tdcen" colspan="2">
    
    <?php 
 
 	$nom = $_GET["nom"]; 
	$ced = $_GET["ced"]; 
 
 echo"<div class='divirmenu'>
<input type='button' name='menu' id='menu' class='irmenu' onClick='window.location.href=\"menu_directores_juridicos.php?ced=$ced&nom=$nom\"' value='MENU'></div>";
		
?>
</tr>
</table>
</fieldset></td>
  </tr>
</table>

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

<?php
$cedul=$_GET[ced];
$nombri=$_GET[nom];
$sucursi=$_GET[sucu];
      

if(isset($_POST["consultar"]))
{
    echo "<form name='form' action='' method='post'>";
   	global $dbi;
   
    $cf = $_GET["ced"]  ;
   
   require_once("Conectarse.php");


	$proceben = 0;
	$procetitu= 0;
					  
	$control = mysql_query('SELECT cedula, nombre, numerocontrato, tipocontrato FROM cartera_serviasjudinet  WHERE cedula = "' . $_POST[cedula] . '" and numerocontrato != "" and tipocontrato != "" and estado = "1" ');
	if (!$control) {
		die('Invalid query: ' . mysql_error());
	}
	$fil = mysql_num_rows($control);
			
	if ($fil == 0)
	{
		$control = mysql_query('SELECT cedula, nombre, numero_contrato_titular, tipo_contrato_titular FROM beneficiarios  WHERE  cedula =  "' . $_POST[cedula]  . '"  order by nombre ');
		if (!$control) {
			die('Invalid query 2: ' . mysql_error());
		}
		$proce = 1 ; 
		$set = 1;  
			
	} 
					   
					   
                      
   	if ((mysql_num_rows($control)!=0)) 
	{	 
    	echo "<TABLE width='600' border='0' align='center' cellpadding='0' cellspacing='1'>
     	<TR>
        <TD class='tdtitulo'>CEDULA</span></div></TD>
        <TD class='tdtitulo'>NOMBRE</span></div></TD>
		<TD class='tdtitulo'>CONTRATO</span></div></TD>
		<TD class='tdtitulo'>TIPO</span></div></TD>";

        while(list($cedula, $nombre, $contrato, $tipo) = mysql_fetch_row($control))
        {
			$conttr = mysql_query('SELECT cantidad_procesos  FROM control_procesos   WHERE contrato  =  "' .$contrato. '" and tipo  =  "' .$tipo. '"');
			if (!$conttr) {
				die('Invalid query proceso bene: ' . mysql_error());
			} 
			list($cantipro) = mysql_fetch_row($conttr);
					
			$cont = mysql_query('SELECT cantidad_sustanciacion FROM control_sustanciacion  WHERE contrato  =  "' .$contrato. '" and tipo  =  "' .$tipo. '"');
			if (!$cont) {
				die('Invalid query proceso bene: ' . mysql_error());
			} 
			list($cantisus) = mysql_fetch_row($cont);
								  
			if ($tipo > 0)
			{
				$con = mysql_query('SELECT codigo_contrato   FROM planes_contratos  WHERE  codigo  =  "' .$tipo. '" ');
		  		if (!$con) {
					die('Invalid query proceso bene: ' . mysql_error());
				} 
				list($tipo) = mysql_fetch_row($con);
			}
			
			
			$conHH = mysql_query('SELECT cantidad_procesos , canitdad_sustasiacion FROM planes_contratos  WHERE  codigo_contrato  =  "' .$tipo. '" ');
		  	if (!$conHH) {
				die('Invalid query proceso bene: ' . mysql_error());
			} 
			list($cantpro, $cantsus) = mysql_fetch_row($conHH);
					
					
			if ($cantpro == "")
			{
				$cantpro = 100;
			}
					
				
				
			if($set == '1')
			{
				$tipo_afiliado = 'BENEFICIARIO';
								  
				$titu = mysql_query('SELECT  estado FROM cartera_serviasjudinet  WHERE numerocontrato = "' .$contrato. '" and tipocontrato = "' .$tipo. '"');
				if (!$titu) {
					die('Invalid query: ' . mysql_error());
				} 
			
				list($pruesta) = mysql_fetch_row($titu);

			}
			
			
			if($pruesta == '0')
			{ 
				echo "<script>alert('Contrato Titular esta en Histórico');</script>";
			}else
			{
				
				printf("<tr>
                <td class='tdfull'>".$cedula."</a></span></div></td>
				<td class='tdfull'>".$nombre."</span></div></td>
                
				<td class='tdfull'><div align='center' class='lista'><input type='button' value=$contrato name='proceso' class='botonnew' onClick =	window.open('consultar_asignacion_procesos.php?id=$cedula&numcon=$contrato&tipo=$tipo&cedulita=$cedul&sucu=$sucursi','','top=50,left=1200,toolbar=yes,scrollbars=yes,width=2000,height=9000,status=yes')></a></span></div></td>
								   
		   
				<td class='tdfull'>".$tipo."</span></div></td>
				</div></td>");
			}
						
		}
		echo "</table>";		  
					
	}
    else  
    {
         echo "<script>alert('Datos no validos');</script>";
    }
	
	  
}
echo "</form>";
?>