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/usuario_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;
}
}
$colname_usuarios = "-1";
if (isset($_SESSION['USUARIO'])) {
  $colname_usuarios = $_SESSION['USUARIO'];
}
mysql_select_db($database_con_edner, $con_edner);
$query_usuarios = sprintf( "SELECT usu_consecutivo, usu_correo, usu_nombre, usu_contrasena, usu_rol, usu_tipo, CASE usu_activo WHEN 1 THEN 'SI' WHEN 0 THEN 'NO' END as usu_activo FROM usuario WHERE ( usu_consecutivo <> 0 or %s = 0 )", GetSQLValueString($colname_usuarios, "int"));
$usuarios = mysql_query($query_usuarios, $con_edner) or die(mysql_error());
$row_usuarios = mysql_fetch_assoc($usuarios);
$totalRows_usuarios = mysql_num_rows($usuarios);
?>

<!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=utf-8" />
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<title>Usuarios</title>
</head>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h1>Usuarios</h1></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td><a href="usuario_altas.php" class="ligas_menu_principal">&laquo; Nuevo usuario &raquo;
      <input name="usuario" type="hidden" id="usuario" value="<?php echo $_SESSION['USUARIO']; ?>" />
    </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="17%"><h4>Usuario</h4></td>
      <td width="20%"><h4>Contrase&ntilde;a</h4></td>
      <td width="18%"><h4>Nombre</h4></td>
      <td width="14%"><h4>Rol</h4></td>
      <td width="13%"><h4>Activo</h4></td>
      <td width="10%"><h6>&nbsp;</h6></td>
      <td width="8%"><h6>&nbsp;</h6></td>
    </tr>
     <tr>
    	<td colspan="7"><hr class="hr_principal" /></td>
  	</tr>
    <?php do { ?>
        <?php if ($totalRows_usuarios > 0) { // Show if recordset not empty ?>
        <tr>
          <td><p><?php echo $row_usuarios['usu_correo']; ?></p></td>
          <td><p><?php echo $row_usuarios['usu_contrasena']; ?></p></td>
          <td><p><?php echo $row_usuarios['usu_nombre']; ?></p></td>
          <td><p><?php echo $row_usuarios['usu_rol']; ?></p></td>
          <td><p><?php echo $row_usuarios['usu_activo']; ?></p></td>
          <td><a href="usuario_cambios.php?usu_consecutivo=<?php echo $row_usuarios['usu_consecutivo']; ?>" class="ligas_menu_interiores">&laquo; Modificar &raquo;</a></td>
          <td><a href="usuario_bajas.php?usu_consecutivo=<?php echo $row_usuarios['usu_consecutivo']; ?>" class="ligas_ajustes">&laquo; Eliminar &raquo;</a></td>
        </tr>
          <?php } // Show if recordset not empty ?>

      <tr>
      <td colspan="7">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="7"><hr class="hr_renglones" /></td>
    </tr>
    <?php } while ($row_usuarios = mysql_fetch_assoc($usuarios)); ?>
  </table>
</blockquote>
<body>
</body>
</html>
<?php
mysql_free_result($usuarios);
?>