File: /home/ednermusika/ednergranados.com/admin/galeriaaudios_detalle_bajas.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;
}
}
if ((isset($_POST['gad_consecutivo'])) && ($_POST['gad_consecutivo'] != "")) {
$deleteSQL = sprintf("DELETE FROM galeria_audio_detalle WHERE gaa_consecutivo=%s and gad_consecutivo=%s",
GetSQLValueString($_POST['gaa_consecutivo'], "int"),
GetSQLValueString($_POST['gad_consecutivo'], "int"));
mysql_select_db($database_con_edner, $con_edner);
$Result1 = mysql_query($deleteSQL, $con_edner) or die(mysql_error());
$deleteGoTo = "galeriaaudios_detalle_admin.php";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
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_audio = "-1";
if (isset($_GET['gaa_consecutivo'])) {
$colname_galeria_audio = $_GET['gaa_consecutivo'];
}
mysql_select_db($database_con_edner, $con_edner);
$query_galeria_audio = sprintf("SELECT gaa_consecutivo, gaa_titulo FROM galeria_audio WHERE gaa_consecutivo = %s", GetSQLValueString($colname_galeria_audio, "int"));
$galeria_audio = mysql_query($query_galeria_audio, $con_edner) or die(mysql_error());
$row_galeria_audio = mysql_fetch_assoc($galeria_audio);
$totalRows_galeria_audio = mysql_num_rows($galeria_audio);
$colname_galeria_audios = "-1";
if (isset($_GET['gaa_consecutivo'])) {
$colname_galeria_audios = $_GET['gaa_consecutivo'];
}
$colname2_galeria_audios = "-1";
if (isset($_GET['gad_consecutivo'])) {
$colname2_galeria_audios = $_GET['gad_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, gad_activo FROM galeria_audio_detalle WHERE gaa_consecutivo = %s and gad_consecutivo = %s", GetSQLValueString($colname_galeria_audios, "int"),GetSQLValueString($colname2_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);
?>
<!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>Galería de Audios de <?php echo $row_galeria_audio['gaa_titulo']; ?></h1></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><a href="galeriaaudios_detalle_admin.php?gaa_consecutivo=<?php echo $row_galeria_audio['gaa_consecutivo']; ?>" class="ligas_menu_interiores">« 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>
<form method="POST" name="form1" id="form1">
<table width="742">
<tr valign="baseline">
<td colspan="2" nowrap="nowrap"><h3>¿Eliminar Audio?</h3> </td>
</tr>
<tr valign="baseline">
<td width="244" nowrap="nowrap" class="texto_14_verdana"> </td>
<td width="486"><input type="hidden" name="gaa_consecutivo" value="<?php echo $row_galeria_audios['gaa_consecutivo']; ?>" size="32" />
<input type="hidden" name="gad_consecutivo" value="<?php echo $row_galeria_audios['gad_consecutivo']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap"><h4>Encabezado:</h4></td>
<td><p class="texto_resaltado"><?php echo $row_galeria_audios['gad_titulo']; ?></p></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap"><h4>Descripción corta:</h4></td>
<td class="texto_resaltado"><?php echo $row_galeria_audios['gad_descripcion']; ?></td>
</tr>
<tr valign="baseline">
<td valign="top" nowrap="nowrap"> </td>
<td> </td>
</tr>
<tr valign="baseline">
<td valign="top" nowrap="nowrap"><h4>Audio:</h4></td>
<td><?php echo $row_galeria_audios['gad_audio']; ?></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" class="texto_14_verdana"> </td>
<td><input name="gvd_autor" type="hidden" value="" />
<input type="hidden" name="gad_ruta" value="galeria_audios" size="32" />
<input name="gvd_thumbnail" type="hidden" value="tn_video.jpg" />
<input name="accion" type="hidden" id="accion" value="C" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" class="texto_14_verdana"><h4> </h4></td>
<td><input name="eliminar" type="button" id="eliminar" value="Eliminar" onclick="f_enviar();"/>
<input type="button" name="cancelar" id="cancelar" value="Cancelar" onclick="history.back();" /></td>
</tr>
</table>
</form>
<p> </p>
</blockquote>
</body>
</html>
<?php
mysql_free_result($galeria_audio);
mysql_free_result($galeria_audios);
?>
<script type="text/javascript">
function f_validar ( )
{
var retorno = true;
with ( document.form1 )
{
return retorno
}
}
function f_enviar()
{
with (document.form1)
{
if ( f_validar ( ) )
{
submit ( );
}
}
}
</script>