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/testimonios_cambios.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_testimonios = "-1";
if (isset($_GET['tes_consecutivo'])) {
  $colname_testimonios = $_GET['tes_consecutivo'];
}
mysql_select_db($database_con_edner, $con_edner);
$query_testimonios = sprintf("SELECT tes_consecutivo, usu_consecutivo, tes_descripcion, tes_autor, tes_puesto, tes_ruta, tes_imagen, tes_orden, tes_activo FROM testimonio WHERE tes_consecutivo = %s ORDER BY tes_orden ASC", GetSQLValueString($colname_testimonios, "int"));
$testimonios = mysql_query($query_testimonios, $con_edner) or die(mysql_error());
$row_testimonios = mysql_fetch_assoc($testimonios);
$totalRows_testimonios = mysql_num_rows($testimonios);
//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" />
<link href="css/calendario.css" rel="stylesheet" type="text/css" />
<script src="calendario/mootools.v1.1.js" type="text/javascript"></script>
<script src="calendario/calendario.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="editor/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,|,insertdate,inserttime,preview",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : false,

		// Example word content CSS (should be your site CSS) this one removes paragraph margins
		content_css : "../css/interiores.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h1>Testimonios</h1></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td><a href="testimonios_admin.php" class="ligas_menu_interiores">&laquo; Regresar</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>&nbsp;
  <blockquote>
    <form action="testimonios_guardar.php" method="POST" enctype="multipart/form-data" name="form1" id="form1">
      <table width="913">
        <tr valign="baseline">
          <td colspan="2" nowrap="nowrap"><h3>Modificar testimonio</h3></td>
        </tr>
        <tr valign="baseline">
          <td width="122" nowrap="nowrap"><h6>&nbsp;</h6></td>
          <td width="779"><input name="tes_consecutivo" type="hidden" id="tes_consecutivo" value="<?php echo $row_testimonios['tes_consecutivo']; ?>" size="32" />
            <input type="hidden" name="usu_consecutivo" value="<?php echo $_SESSION['USUARIO'] ?>" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"></td>
          <td><p>&nbsp;</p></td>
        </tr>
        <tr valign="baseline">
          <td height="123" valign="top" nowrap="nowrap"><h4>Descripci&oacute;n:</h4></td>
          <td><textarea name="tes_descripcion" cols="100" rows="7" id="tes_descripcion"><?php echo $row_testimonios['tes_descripcion']; ?></textarea></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h4>Autor:</h4></td>
          <td><input name="tes_autor" type="text" id="tes_autor" value="<?php echo $row_testimonios['tes_autor']; ?>" size="100" maxlength="200" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h4>Puesto:</h4></td>
          <td><input name="tes_puesto" type="text" id="tes_puesto" value="<?php echo $row_testimonios['tes_puesto']; ?>" size="100" maxlength="200" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h4>Imagen:</h4></td>
          <td><input name="tes_imagen" type="file" id="tes_imagen" value="" size="100" />
          <input name="tes_imagen_anterior" type="hidden" id="tes_imagen_anterior" size="32" value="<?php echo $row_testimonios['tes_imagen']; ?>" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td><img src="../<?php echo $row_testimonios['tes_ruta'].$row_testimonios['tes_imagen']; ?>" border="1" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h4>Orden:</h4></td>
          <td><input name="tes_orden" type="text" id="tes_orden" value="<?php echo $row_testimonios['tes_orden']; ?>" size="10" maxlength="5" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h4>Activo:</h4></td>
          <td><select name="tes_activo" id="tes_activo">
            <option value="1" <?php if (!(strcmp(1, $row_testimonios['tes_activo']))) {echo "selected=\"selected\"";} ?>>SI</option>
            <option value="0" <?php if (!(strcmp(0, $row_testimonios['tes_activo']))) {echo "selected=\"selected\"";} ?>>NO</option>
          </select></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h6>
            <input name="tes_ruta" type="hidden" id="tes_ruta" value="testimonios" size="32" />
            <input name="accion" type="hidden" id="accion" value="M" />
          </h6></td>
          <td><input name="guardar" type="button" class="boton_panel" id="guardar" onclick="MM_callJS('f_enviar();')" value="Guardar" />
          <input name="cancelar" type="button" class="boton_panel" id="cancelar" onclick="MM_callJS('history.back();')" value="Cancelar" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </form>
  </blockquote>
  <p>&nbsp;</p>
</blockquote>
</body>
<script type="text/javascript">
function f_validar ( )
{
	var retorno = true;
	
	with ( document.form1 )
	{
		if ( tes_autor.value == '' )
		{
			alert               ( 'Por favor proporcione el autor' );
			tes_autor.focus    	( );
			retorno             = false;
		}
	}
	return retorno
}
function f_enviar()
{
	
	with (document.form1)
	{
		if ( f_validar ( ) )
		{
			submit ( );
		}
	}
}
</script>
</html>
<?php
mysql_free_result($testimonios);
?>