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/clientes_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['cli_consecutivo'])) && ($_POST['cli_consecutivo'] != "")) {
  $deleteSQL = sprintf("DELETE FROM clientes WHERE cli_consecutivo=%s",
                       GetSQLValueString($_POST['cli_consecutivo'], "int"));

  mysql_select_db($database_con_edner, $con_edner);
  $Result1 = mysql_query($deleteSQL, $con_edner) or die(mysql_error());

  $deleteGoTo = "clientes_admin.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $deleteGoTo));
}

$colname_clientes = "-1";
if (isset($_GET['cli_consecutivo'])) {
  $colname_clientes = $_GET['cli_consecutivo'];
}
mysql_select_db($database_con_edner, $con_edner);
$query_clientes = sprintf("SELECT cli_consecutivo, usu_consecutivo, DATE_FORMAT(cli_fecha, '%%d/%%m/%%Y') as cli_fecha, cli_nombre, cli_ruta, cli_thumbnail, cli_activo FROM clientes WHERE cli_consecutivo = %s ORDER BY cli_fecha DESC", GetSQLValueString($colname_clientes, "int"));
$clientes = mysql_query($query_clientes, $con_edner) or die(mysql_error());
$row_clientes = mysql_fetch_assoc($clientes);
$totalRows_clientes = mysql_num_rows($clientes);

//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 type="text/javascript">
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h1>clientes</h1></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td><a href="clientes_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="" method="POST" name="form1" id="form1">
      <table width="913">
        <tr valign="baseline">
          <td colspan="2" nowrap="nowrap"><h3>&iquest;Eliminar Cliente?</h3></td>
        </tr>
        <tr valign="baseline">
          <td width="122" nowrap="nowrap"><h6>&nbsp;</h6></td>
          <td width="779"><input type="hidden" name="cli_consecutivo" value="<?php echo $row_clientes['cli_consecutivo']; ?>" size="32" />
          <input type="hidden" name="usu_consecutivo" value="<?php echo $_SESSION['USUARIO'] ?>" size="32" /></td>
        </tr>
        
        <tr valign="baseline">
          <td nowrap="nowrap"><h4>Nombre:</h4></td>
          <td class="texto_resaltado"><?php echo $row_clientes['cli_nombre']; ?></td>
        </tr>
        
        <tr valign="baseline">
          <td valign="top" nowrap="nowrap"><h4>Logo:</h4></td>
          <td><img src="../<?php echo $row_clientes['cli_ruta'].$row_clientes['cli_thumbnail']; ?>" border="1" /></td>
        </tr>
            
        <tr valign="baseline">
          <td nowrap="nowrap"><h6>
            
          </h6></td>
          <td><input name="cli_imagen2" type="hidden" id="cli_imagen2" value="<?php echo $row_clientes['cli_imagen2']; ?>" />
            <input name="cli_imagen2_anterior" type="hidden" id="cli_imagen2_anterior" value="<?php echo $row_clientes['cli_imagen2']; ?>" />
            <input type="hidden" name="cli_ruta" value="clientes" size="32" />
            <input name="cli_thumbnail1" type="hidden" id="cli_thumbnail1" value="<?php echo $row_clientes['cli_thumbnail1']; ?>" size="32" />
            <input name="cli_thumbnail1_anterior" type="hidden" id="cli_thumbnail1_anterior" value="<?php echo $row_clientes['cli_thumbnail1']; ?>" size="32" />
            <input name="cli_thumbnail2" type="hidden" id="cli_thumbnail2" value="<?php echo $row_clientes['cli_thumbnail2']; ?>" />
            <input name="cli_thumbnail2_anterior" type="hidden" id="cli_thumbnail2_anterior" value="<?php echo $row_clientes['cli_thumbnail2']; ?>" />
            <input name="cli_archivo" type="hidden" id="cli_archivo" value="<?php echo $row_clientes['cli_archivo']; ?>" size="32" />
            <input name="cli_orientacion" type="hidden" id="cli_orientacion" value="<?php echo $row_clientes['cli_orientacion']; ?>" />
          <input type="hidden" name="cli_permalink" id="cli_permalink" />
          <input name="accion" type="hidden" id="accion" value="C" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap"><h6>&nbsp;</h6></td>
          <td><input name="eliminar" type="button" class="boton_panel" id="eliminar" onclick="MM_callJS('f_enviar();')" value="Eliminar" />
            <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>
      </table>
      
      
    </form>
  </blockquote>
  <p>&nbsp;</p>
</blockquote>
</body>
<script type="text/javascript">
function f_validar ( )
{
	var retorno = true;
	
	
	return retorno
}
function f_enviar()
{
	with (document.form1)
	{
		if ( f_validar ( ) )
		{
			submit ( );
		}
	}
}
</script>
</html>
<?php
mysql_free_result($clientes);
?>