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/acorreos/consultar_dep_recibe.php
<?php

global $dbi;
require_once("../Conectarse.php");


//$query_sql = "SELECT * FROM Dependencias order by Nombre";
//$sql = mysql_query($query_sql, $dbi) or die(mysql_error());
$sql = mysql_query('SELECT * FROM Dependencias order by Nombre ');
			if (!$sql) {
				die('Invalid query: ' . mysql_error());
			} 
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);
?>


<html>
<head>
<title>Serviasjudinet - Asesor&iacute;a Jur&iacute;dica por Internet</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;}
    
    .titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
    table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
    .divirmenu{text-align: center;}
    .irmenu{width: 200px;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{padding: 1px; border: 1px solid #a0a0a0;}
    .td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
    .boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text]{border-radius: 5px; padding: 3px;background-color: #fffde8;}
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
    .tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
    .botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;border-radius:5px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
</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" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">CONSULTAR POR DEPENDENCIA QUE RECIBE</h3>

<form action='Validacion_Correspondencia.php' method='post' name='formulario'>
<table width="461" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>
	<td class="fecha">
   		<script languaje="JavaScript">Mostrar_Fecha()</script>
    </td>
</tr>

<tr>
	<td class="td">Seleccione el nombre de la Dependencia para saber cuantos mensajes se han enviados a ella:</td>
</tr>

<tr>
	<td class="td">
		<select name="codigo" id="codigo">
        	<option value="">--SELECCIONE EL NOMBRE DE LA DEPENDENCIA--</option>
            <?php
    		do {  
			?>
          	<option value="<?php echo $row_sql['Codigo'];?>"><?php echo $row_sql['Nombre']?></option>
            <?php
			} while ($row_sql = mysql_fetch_assoc($sql));
  			$rows = mysql_num_rows($sql);
  			if($rows > 0) {

     			 mysql_data_seek($sql, 0);
       			$row_sql = mysql_fetch_assoc($sql);
  			}
			?>
 		</select>
  	</td>
</tr>

<tr>
	<td class="td">
    	<input name="submit" type="submit" class="boton1" value="CONSULTAR">
      	<input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='../menu_admin.php'" value="IR AL MENU">
     </td>
</tr>
</table>
</div>
</form>

</body>
</html>

<?php /*

if(isset($_POST["submit"]))
{
	echo $_POST['codigo'];
	$registros = 1000;

	if (!$pagina) { 
		$inicio = 0; 
		$pagina = 1; 
	} 
	else { 
		$inicio = ($pagina - 1) * $registros; 
	} 
	
	   $query_sql = "SELECT Codigo, Nombre FROM Dependencias where Codigo = '" . $_POST[codigo] . "'";
	   $sql = mysql_query($query_sql) or die(mysql_error());
	   list($codigo, $nomdep) = mysql_fetch_row($sql);
	
	echo "<table width='1000' cellspacing='0' cellpadding='3' align='center'>
		<tr>
			<td class='titulo'>DEPENDENCIA QUE RECIBE: '".$nomdep."'</td>
		</tr>
	</table>
	
	<TABLE width='1000' align='center' cellpadding='3' cellspacing='4'>
	<TR>
		<TD class='tdtitulo'># Radicación</TD>
		<TD class='tdtitulo'>Dependencia que envía</TD>				
		<TD class='tdtitulo'>Funcionario que expide</TD>
		<TD class='tdtitulo'>Asunto</TD>		  
		<TD class='tdtitulo'>Fecha de envío</TD>		  		
		<TD class='tdtitulo'>Hora de envío</TD>				
		<TD class='tdtitulo'>Leído S/N</TD>
	</tr>";			
	
	$resultados = mysql_query("select * from correo_interno where Codigo_Dep_Recibe = '" .$codig . "'");
	$total_registros = mysql_num_rows($resultados); 
	
	
	$resultados = mysql_query("select Id, numradica, Codigo_Dep_Envia, Dia_Envio, Mes_Envio, Ano_Envio, Hora_Envio, Asunto, Funcionario_Expide, Notificar from correo_interno where Codigo_Dep_Recibe = '$codigo' ORDER BY  Id DESC LIMIT $inicio, $registros");	
	//$total_paginas = ceil($total_registros / $registros); 		  			

	if($total_registros) 
	{
    	$lin = 0; 	
    	while(list($id, $numradica, $cde, $dia,$mes,$ano,$he,$asun,$fe,$noti) = mysql_fetch_row($resultados)) 
     	{			
			if($noti  == "N"){$lin = $lin + 1;}
            $query_sql = "SELECT Nombre FROM Dependencias where Codigo = '$cde'";
            $sql = mysql_query($query_sql) or die(mysql_error());
			list($nde) = mysql_fetch_row($sql);
                   
			printf("<tr>
					 
            <td class='tdfull'>".$numradica."</a></td>
			<td class='tdfull'><a href=\"Mostrar_Correos.php?Id=$id&num=$numradica\"  target='_blank'>".$nde."</td>
		   	<td class='tdfull'>".$fe."</td>
		    <td class='tdfull'>".$asun."</td>
			<td class='tdfull'>".$dia." - ".$mes." - ".$ano."</td>					 			
			<td class='tdfull'>".$he."</td>					 
			<td class='tdfull'>".$noti."</td>");
		}
 		echo "</table>";
		echo "<center><span class='tdtitulo'>Tienes $lin mensaje(s) sin leer</span></center>";		
	} 
	
	else
	{
		echo "<font color='darkgray'>(sin resultados)</font>";
	}
	
	//mysql_free_result($resultados);				
	
	if($total_registros)
	{
		echo "<center>";
		
		if(($pagina - 1) > 0) {
			echo "<a href='paginacion_dep_recibe.php?codigo=$codigo&pagina=".($pagina-1)."'>< Anterior</a> ";
		}
		
		for ($i=1; $i<=$total_paginas; $i++){ 
			if ($pagina == $i) 
				echo "<b>".$pagina."</b> "; 
			else
				echo "<a href='paginacion_dep_recibe.php?codigo=$codigo&pagina=$i'>$i</a> "; 
		}
	  
		if(($pagina + 1)<=$total_paginas) {
			echo " <a href='paginacion_dep_recibe.php?codigo=$codigo&pagina=".($pagina+1)."'>Siguiente ></a>";
		}
		
		echo "</center>";
		
	}
	
}
*/
	?>