File: /home/ednermusika/ednergranados.com/admin/galeriaaudios_detalle_admin_tmp.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;
}
}
$colname_galeria_nombre = "-1";
if (isset($_GET['gaa_consecutivo'])) {
$colname_galeria_nombre = $_GET['gaa_consecutivo'];
}
mysql_select_db($database_con_edner, $con_edner);
$query_galeria_nombre = sprintf("SELECT gaa_consecutivo, gaa_titulo FROM galeria_audio WHERE gaa_consecutivo = %s", GetSQLValueString($colname_galeria_nombre, "int"));
$galeria_nombre = mysql_query($query_galeria_nombre, $con_edner) or die(mysql_error());
$row_galeria_nombre = mysql_fetch_assoc($galeria_nombre);
$totalRows_galeria_nombre = mysql_num_rows($galeria_nombre);
$colname_galeria_audios = "-1";
if (isset($_GET['gaa_consecutivo'])) {
$colname_galeria_audios = $_GET['gaa_consecutivo'];
}
mysql_select_db($database_con_edner, $con_edner);
$query_galeria_audios = sprintf("SELECT gaa_consecutivo, gad_consecutivo, gad_titulo, gad_descripcion, gad_ruta, gad_audio, CASE gad_activo WHEN 1 THEN 'SI' WHEN 0 THEN 'NO' END as gad_activo FROM galeria_audio_detalle WHERE gaa_consecutivo = %s", GetSQLValueString($colname_galeria_audios, "int"));
$galeria_audios = mysql_query($query_galeria_audios, $con_edner) or die(mysql_error());
$row_galeria_audios = mysql_fetch_assoc($galeria_audios);
$totalRows_galeria_audios = mysql_num_rows($galeria_audios);
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
?>
<!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>Untitled Document</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>Audios de <?php echo $row_galeria_nombre['gaa_titulo']; ?></h1></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><a href="galeriaaudios_detalle_altas.php?gaa_consecutivo=<?php echo $row_galeria_nombre['gaa_consecutivo']; ?>" class="ligas_menu_principal">« Nuevo audio »</a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><a href="galeriaaudios_admin.php" class="ligas_menu_principal">« Regresar »</a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </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%"><h4>Título</h4></td>
<td width="42%"><h4>Audio</h4></td>
<td width="13%"><h4>Activo</h4></td>
<td width="8%"><h6> </h6></td>
<td width="8%"><h6> </h6></td>
</tr>
<tr>
<td colspan="5"><hr class="hr_principal" /></td>
</tr>
<?php do { ?>
<?php if ($totalRows_galeria_audios > 0) { // Show if recordset not empty ?>
<tr>
<td><p><?php echo $row_galeria_audios['gad_titulo']; ?></p></td>
<td><div class="video-ajustar"><?php echo $row_galeria_audios['gad_audio']; ?></div></p></td>
<td><p><?php echo $row_galeria_audios['gad_activo']; ?></p></td>
<td><a href="galeriaaudios_detalle_cambios.php?gaa_consecutivo=<?php echo $row_galeria_audios['gaa_consecutivo']; ?>&gad_consecutivo=<?php echo $row_galeria_audios['gad_consecutivo']; ?>" class="ligas_menu_interiores">« Modificar »</a></td>
<td><a href="galeriaaudios_detalle_bajas.php?gaa_consecutivo=<?php echo $row_galeria_audios['gaa_consecutivo']; ?>&gad_consecutivo=<?php echo $row_galeria_audios['gad_consecutivo']; ?>" class="ligas_ajustes">« Eliminar »</a></td>
</tr>
<?php } // Show if recordset not empty ?>
<tr>
<td colspan="5"> </td>
</tr>
<tr>
<td colspan="5"><hr class="hr_renglones" /></td>
</tr>
<?php } while ($row_galeria_audios = mysql_fetch_assoc($galeria_audios)); ?>
</table>
</blockquote>
</body>
</html>
<?php
mysql_free_result($galeria_nombre);
mysql_free_result($galeria_audios);
?>