Foros del Web » Programando para Internet » PHP »

Usuario grupo ocultar

Estas en el tema de Usuario grupo ocultar en el foro de PHP en Foros del Web. Bueno tarde usuario grupo "usuarios" y "administrador" pero cuenta pagina usuario como creo "administrador" es muy ocultar solo cuenta Código PHP:   <?php //initialize the session if (!isset( ...
  #1 (permalink)  
Antiguo 21/06/2011, 13:16
Avatar de camilo_1987  
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 15 años, 10 meses
Puntos: 0
Usuario grupo ocultar

Bueno tarde
usuario grupo "usuarios" y "administrador" pero cuenta pagina usuario como creo "administrador" es muy ocultar solo cuenta
Código PHP:
 <?php
//initialize the session
if (!isset($_SESSION)) {
  
session_start();
}

// ** Logout the current user. **
$logoutAction $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset(
$_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  
$logoutAction .="&"htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset(
$_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  
//to fully log out a visitor we need to clear the session varialbles
  
$_SESSION['MM_Username'] = NULL;
  
$_SESSION['MM_UserGroup'] = NULL;
  
$_SESSION['PrevUrl'] = NULL;
  unset(
$_SESSION['MM_Username']);
  unset(
$_SESSION['MM_UserGroup']);
  unset(
$_SESSION['PrevUrl']);
    
  
$logoutGoTo "index.php";
  if (
$logoutGoTo) {
    
header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  
session_start();
}
$MM_authorizedUsers "usuarios,administrator";
$MM_donotCheckaccess "false";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers$strGroups$UserName$UserGroup) { 
  
// For security, start by assuming the visitor is NOT authorized. 
  
$isValid False

  
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  
if (!empty($UserName)) { 
    
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    
$arrUsers Explode(","$strUsers); 
    
$arrGroups Explode(","$strGroups); 
    if (
in_array($UserName$arrUsers)) { 
      
$isValid true
    } 
    
// Or, you may restrict access to only certain users based on their username. 
    
if (in_array($UserGroup$arrGroups)) { 
      
$isValid true
    } 
    if ((
$strUsers == "") && false) { 
      
$isValid true
    } 
  } 
  return 
$isValid
}

$MM_restrictGoTo "usuario.php";
if (!((isset(
$_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers$_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  
$MM_qsChar "?";
  
$MM_referrer $_SERVER['PHP_SELF'];
  if (
strpos($MM_restrictGoTo"?")) $MM_qsChar "&";
  if (isset(
$_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0
  
$MM_referrer .= "?" $_SERVER['QUERY_STRING'];
  
$MM_restrictGoTo $MM_restrictGoTo$MM_qsChar "accesscheck=" urlencode($MM_referrer);
  
header("Location: "$MM_restrictGoTo); 
  exit;
}
?>
<?php 
require("header.php"); ?>
<?php 
require("menu.php"); ?> 
 <div class="contenedor">
    <div class="principal">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Mi Cuenta</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><a href="<?php echo $logoutAction ?>">Salir</a></td>
          <td>Administrador</td>
        </tr>
      </table>
      
    </div>  
  </div>
<?php require("footer.php"); ?>
  #2 (permalink)  
Antiguo 21/06/2011, 13:22
Avatar de skiper0125  
Fecha de Ingreso: octubre-2010
Ubicación: $this->Mexico('Toluca');
Mensajes: 1.127
Antigüedad: 13 años, 6 meses
Puntos: 511
Respuesta: Usuario grupo ocultar

hola que tal.


¿Y cual es la duda?

Puedes explicarte un poco mejor para ayudarte mejor!!!

Saludos
__________________
Recuerda que estamos aquí para orientarte, y no para hacer tu trabajo.
Si mi aporte fue de ayuda, recuerda que agradecer no cuesta nada +1

Skiper0125
  #3 (permalink)  
Antiguo 21/06/2011, 13:24
Avatar de camilo_1987  
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Usuario grupo ocultar

pero el gente no puedes toca Administrador, el gente grupo "usuarios", como administrador ocultar
Código PHP:
<a href="admin.php">Administrador</a
  #4 (permalink)  
Antiguo 21/06/2011, 13:29
Avatar de skiper0125  
Fecha de Ingreso: octubre-2010
Ubicación: $this->Mexico('Toluca');
Mensajes: 1.127
Antigüedad: 13 años, 6 meses
Puntos: 511
Respuesta: Usuario grupo ocultar

Cita:
Iniciado por camilo_1987 Ver Mensaje
pero el gente no puedes toca Administrador, el gente grupo "usuarios", como administrador ocultar
Código PHP:
<a href="admin.php">Administrador</a
No te entiendo?

do not speak Spanish, no problem writing in English.
__________________
Recuerda que estamos aquí para orientarte, y no para hacer tu trabajo.
Si mi aporte fue de ayuda, recuerda que agradecer no cuesta nada +1

Skiper0125
  #5 (permalink)  
Antiguo 21/06/2011, 13:32
Avatar de camilo_1987  
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Usuario grupo ocultar

mira "Restringir accesoa a página" solo grupo Administrator Vínculo ocultar vale?
  #6 (permalink)  
Antiguo 21/06/2011, 14:46
Avatar de camilo_1987  
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Usuario grupo ocultar

estas hacer habla nada,problemas
  #7 (permalink)  
Antiguo 21/06/2011, 14:51
Avatar de Aaronus23  
Fecha de Ingreso: diciembre-2010
Ubicación: https://home
Mensajes: 81
Antigüedad: 13 años, 4 meses
Puntos: 4
Respuesta: Usuario grupo ocultar

feel free to talk in english(or in your native language) because the translators dont help much for us to understand you!

Etiquetas: grupo, usuarios
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:54.