From b9744f8d99b2a45441c70edd53a9958742b6c195 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Carlos=20Vladimir=20Hidalgo=20Dur=C3=A1n?= Date: Fri, 12 Dec 2008 12:30:15 -0600 Subject: [PATCH] =?utf8?q?Men=C3=BAs=20de=20administrador,=20instructor=20?= =?utf8?q?y=20visitante.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- index.php | 56 +++++++++++++++++++++++++++++++++++++++++--------------- t/ingreso.php | 10 +++++++++- 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/index.php b/index.php index f5e1305..b9323de 100644 --- a/index.php +++ b/index.php @@ -60,7 +60,7 @@ function OBTENER($archivo) { @@ -78,13 +78,11 @@ function OBTENER($archivo) { $q = "SELECT username FROM ".TBL_ACTIVE_USERS ." ORDER BY timestamp DESC,username"; $result = $database->query($q); - /* Error occurred, return given name by default */ $num_rows = mysql_numrows($result); if(!$result || ($num_rows < 0)){ echo "Error displaying info"; } else if($num_rows > 0){ - /* Display active users, with link to their info */ for($i=0; $i<$num_rows; $i++){ $uname = mysql_result($result,$i,"username"); echo '
  • '.$uname.'
  • '; @@ -97,7 +95,7 @@ function OBTENER($archivo) {
    -

    +


    + logged_in){ + echo '
    Gestión
    '; + } + if($session->isAdmin()){ + echo + '
    -
    Departamentos
    +
    Instructores
    +
    + +
    -
    Dpto. Informática
    +
    Horarios
    + '; + } + if($session->logged_in && !$session->isAdmin()){ + echo + '
    -
    Dpto. Electrónica
    +
    Horarios
    + '; + } + ?> +
    +
    Información
    +
    + +
    +
    diff --git a/t/ingreso.php b/t/ingreso.php index b8e8ccf..801689d 100644 --- a/t/ingreso.php +++ b/t/ingreso.php @@ -1,9 +1,17 @@ logged_in){ echo "

    Ingresado

    "; - echo "Bienvenido $session->username, Ud. ha ingresado al sistema.

    "; + echo "Bienvenido $session->username, Ud. ha ingresado al sistema.

    "; + if($session->isAdmin()){ + echo '

    Puede encontrar sus herramientas administrativas en los menús laterales

    '; + } + echo 'Continuar'; exit; } +if(!$_SESSION['regsuccess']){ +echo "

    Error

    "; +echo "Por favor intentelo de nuevo.

    "; +} ?>

    cLab - Control de Ingresos


    -- 2.11.4.GIT