HEX
Server: Apache
System: Linux pdx1-shared-a1-06 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: ednermusika (2886498)
PHP: 8.4.2
Disabled: NONE
Upload Files
File: /home/ednermusika/ednergranados.com/admin/galeria_admin.php
<?php require_once('../Connections/con_edner.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_con_edner, $con_edner);
$query_galeria = "SELECT gal_consecutivo, usu_consecutivo, gal_titulo, DATE_FORMAT(gal_fecha, '%d/%m/%Y' ) as gal_fecha, gal_ruta, gal_thumbnail, CASE gal_activo WHEN 1 THEN 'SI' WHEN 0 THEN 'NO' END as gal_activo FROM galeria ORDER BY gal_fecha DESC";
$galeria = mysql_query($query_galeria, $con_edner) or die(mysql_error());
$row_galeria = mysql_fetch_assoc($galeria);
$totalRows_galeria = mysql_num_rows($galeria);
?>
<?php
$suc_consecutivo = 1; 
?>
<!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>Galer&iacute;as</title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h1>Galer&iacute;a de Fotos</h1></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td><!--<a href="galeria_altas.php" class="ligas_menu_principal">&laquo; Nueva galer&iacute;a &raquo;</a>--></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><hr class="hr_principal" /></td>
  </tr>
</table>
<blockquote>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="19%" height="20"><h4>Descripci&oacute;n</h4></td>
      <td width="20%"><h4>Fecha</h4></td>
      <td width="15%"><h4>Activo</h4></td>
      <td width="12%">&nbsp;</td>
      <td width="11%">&nbsp;</td>
      <td width="23%">&nbsp;</td>
    </tr>
     <tr>
    	<td colspan="7"><hr class="hr_principal" /></td>
  	</tr>
    <?php do { ?>
        <?php if ($totalRows_galeria > 0) { // Show if recordset not empty ?>
        <tr>
          <td><p><?php echo $row_galeria['gal_titulo']; ?></p></td>
          <td><p><?php echo $row_galeria['gal_fecha']; ?></p></td>
          <td><p><?php echo $row_galeria['gal_activo']; ?></p></td>
          <td><a href="galeria_cambios.php?gal_consecutivo=<?php echo $row_galeria['gal_consecutivo']; ?>" class="ligas_menu_interiores">&laquo; Modificar &raquo;</a></td>
          <td><a href="galeria_bajas.php?gal_consecutivo=<?php echo $row_galeria['gal_consecutivo']; ?>" class="ligas_ajustes">&laquo; Eliminar &raquo;</a></td>
          <td><a href="galeria_detalle_admin.php?gal_consecutivo=<?php echo $row_galeria['gal_consecutivo']; ?>" class="ligas_ajustes">&laquo; Fotos &raquo;</a></td>
        </tr>
          <?php } // Show if recordset not empty ?>

      <tr>
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="6"><hr width="100%" size="1" class="hr_renglones" /></td>
    </tr>
    <?php } while ($row_galeria = mysql_fetch_assoc($galeria)); ?>
  </table>
</blockquote>
</body>
</html>
<?php
mysql_free_result($galeria);
?>