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/ase_apro_pos.php
<?php 
require_once("mainfile.php");
include ("config.php");
global $dbi;

function Conectarse()
	{
	
	   if (!($link=@mysql_connect("localhost","asjudine","as2006")))
	   {
		  echo "Error conectando con el servidor.";
		  exit();
	   }
	   $dbname = "asjudinet";
	   if (!@mysql_select_db($dbname,$link))
	   {
		  echo "Error seleccionando la base de datos.";
		  exit();
	   }
	   return $link;
	}
	Conectarse();


?>
<!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>Consulta Citas Pendientes por Rango</title>
<style type="text/css">
<!--
.texto {background-color: #CCFFCC; font-size: 10px; font-family: Arial; color:#0000CC; display: block;}
.lista {font-family: Arial; font-size: 12px;	color: #003333;}
.Estilo2 {color: #FF6633;
	font-size: 16px;
}
.Estilo3 {color: #2492FF;
	font-weight: bold;
}
.Estilo4 {	color: #D94B3C;
	font-size: 24px;
}
.Estilo51 {	font-size: 18px
}
.recaudo {font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	font-variant: normal;
	color: #000000;
	background-color: #CCFFCC;
	margin: 4px;
	padding: 8px;
	width: auto;
	border: medium outset #339966;
}
.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;
}
.Estilo52 {font-family: Arial;	font-size: 16px;	color: #990000;}
.campo {	background-color:#FFFFFF;
	width: 80px;
	border:2px solid #990000;
	height: 17px;
}
.col_cre2 {font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	color: #F92F0B;
	background-color: #FFFFCC;
	height: auto;
	width: auto;
	border: medium groove #FC9227;
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
    <table width="391" border="3" cellpadding="3" cellspacing="3" class="recaudo">
      <caption>
      <div align="center" class="Estilo4 Estilo51">CONSULTA CITAS PENDIENTES POR RANGO </div>
      </caption>
      <tr>
        <th colspan="4" scope="col"><label>Fecha Posible Llamada </label></th>
      </tr>
      <tr>
        <td width="110"><div align="right"><span class="Estilo2">Del: </span></div></td>
        <td width="92"><span class="Estilo52">
          <input name="fecha1" type="text" class="campo" id="fecha1" value="0000-00-00" size="10" maxlength="10" />
        </span></td>
        <td width="30"><span class="Estilo2">Al:</span></td>
        <td width="104"><span class="Estilo52">
          <input name="fecha2" type="text" class="campo" id="fecha2" value="0000-00-00" size="10" maxlength="10" />
        </span></td>
      </tr>
      <tr>
        <td colspan="4"><div align="center">
          <input name="consultar" type="submit" class="col_cre2" id="consultar" value="Consultar"  />
        </div></td>
      </tr>
      </table>
    <p>
      <input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='tel_ase_menu.php'" value="IR AL MENU" />
    </p>
  </div>
</form>
</body>
</html>
<?php
if(isset($_POST["consultar"]))
{

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


	$mssql = mysql_query('SELECT cedula, razon, direccion, representante, fecha_cita, hora_cita, gestion, asesor_empresarial FROM telemaprueba  WHERE  fecha_pos >= "' . $_POST["fecha1"]  . '" and fecha_pos <= "' . $_POST["fecha2"]  . '" and estado = "3"');
			if (!$mssql) {
				die('Invalid query: ' . mysql_error());
			}

   if($mssql)
   {
         $filas = mysql_num_rows($mssql);
         if ($filas > 0)
         {
	$contro2 = mysql_query('SELECT cedula, razon, direccion, representante, zona,  fecha_gestion ,  gestion, fecha_pos, estado FROM telemaprueba  WHERE fecha_pos  >= "' . $_POST["fecha1"]  . '" and fecha_pos  <= "' . $_POST["fecha2"]  . '" and estado = "3" ');
			if (!$contro2) {
				die('Invalid query: ' . mysql_error());
			}

  						if ((mysql_num_rows($contro2)!=0)) 
	                    {	 
                              echo "<TABLE width='1800' border='' align='center' cellpadding='' cellspacing=''>
                              <TR>
                              <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>CEDULA</span></div></TD>
							  <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>RAZON</span></div></TD>
							  <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>DIRRECCION</span></div></TD>	
                              <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>REPRESENTANTE</span></div></TD>		 
                              <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>FECHA GESTION </span></div></TD>
							  <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>GESTION</span></div></TD>
							   <TD bgcolor='#CCFFCC'><div align='center'><span class='texto'>FECHA POSIBLE </span></div></TD>";	
							  
  		 	 while(list($cedula, $razon, $dir, $repre, $zona , $fech, $gest, $pos, $esta) = mysql_fetch_row($contro2)) 
            {  

								   printf("<tr>
									<TD bgcolor='#ECE9D8'><div align='center' class='lista'><input type='button' value=$cedula name='cedu' class=est_cont1 onClick =window.location.href='informe_citas_pen_ase.php?ced=$cedula&zona=$zona&esta=$esta'></a></span></div></TD>
									<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$razon."</span></div></td>			
								   <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$dir."</span></div></td>						   
		                           <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$repre."</span></div></td>								   								
		                           <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$fech."</span></div></td>
								    <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$gest."</span></div></td>
									 <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$pos."</span></div></td>
								  
								  ");  
        								   
                       } 
					    echo "</table>";
						 	
			 }
	      }
     }
    

echo "</form>";
 
}
?>