Example #1
0
function auth()
{
    if (!isauth(null)) {
        readfile('frm_auth.php');
        return false;
    }
    return true;
}
Example #2
0
         }
     }
     if ($message != '') {
         echo $message;
         die;
     }
     if (grr_resumeSession()) {
         header("Location: " . htmlspecialchars_decode(page_accueil()) . "");
         die;
     }
     // Cas d'une authentification LCS
 } else {
     if (Settings::get('sso_statut') == 'lcs') {
         include LCS_PAGE_AUTH_INC_PHP;
         include LCS_PAGE_LDAP_INC_PHP;
         list($idpers, $login) = isauth();
         if ($idpers) {
             list($user, $groups) = people_get_variables($login, true);
             $lcs_tab_login["nom"] = $user["nom"];
             $lcs_tab_login["email"] = $user["email"];
             $long = strlen($user["fullname"]) - strlen($user["nom"]);
             $lcs_tab_login["fullname"] = substr($user["fullname"], 0, $long);
             foreach ($groups as $value) {
                 $lcs_groups[] = $value["cn"];
             }
             // A ce stade, l'utilisateur est authentifié par LCS
             // Etablir à nouveau la connexion à la base
             if (empty($db_nopersist)) {
                 $db_c = mysql_pconnect($dbHost, $dbUser, $dbPass);
             } else {
                 $db_c = mysql_connect($dbHost, $dbUser, $dbPass);
Example #3
0
  Dispositif SE3+TFTP+Sauvegarde/Restauration/Clonage
  Stephane Boireau
  Distribu� selon les termes de la licence GPL
  =============================================
 */
require "config.inc.php";
require_once "functions.inc.php";
require_once "lang.inc.php";
require_once "ihm.inc.php";
require_once "ldap.inc.php";
require_once "fonc_parc.inc.php";
require_once "fonc_outils.inc.php";
require_once "lib_action_tftp.php";
//require_once ("parcs_ajax_lib.php");
//debug_var();
$login = isauth();
if (is_admin("system_is_admin", $login) != "Y" && ldap_get_right("parc_can_clone", $login) != "Y") {
    echo "<p style='color:red'>Action non autorisee.</p>";
    die;
}
$restriction_parcs = "n";
if (is_admin("system_is_admin", $login) != "Y") {
    $restriction_parcs = "y";
    $tab_delegated_parcs = list_delegated_parcs($login);
    if (count($tab_delegated_parcs) == 0) {
        echo "<p style='color:red'>Aucun parc ne vous a ete delegue.</p>\n";
        die;
    }
}
if ($_GET['mode'] == 'ping_ip') {
    $resultat = fping($_GET['ip']);
<?php

/**********************************************************************************
 Sistema e-SIC Livre: sistema de acesso a informaзгo baseado na lei de acesso.
 
 Copyright (C) 2014 Prefeitura Municipal do Natal
 
 Este programa й software livre; vocк pode redistribuн-lo e/ou
 modificб-lo sob os termos da Licenзa GPL2.
***********************************************************************************/
require_once "../inc/security.php";
isauth();
/*session_start();
    if(! isset($_SESSION["logado"]))
	{
		header("Location: ../index.php");
		die();
	}*/
Example #5
0
<?php

$pass = $_GET['password'];
setcookie("password", $pass, time() + 60 * 60 * 24);
require_once 'mod_auth.php';
if (isauth($pass)) {
    echo "Your password is <font class='ok'>OK</font>\n";
    echo "<script type='text/javascript'>document.location = 'index.php?r=" . rand() . "';</script>\n";
} else {
    echo "<font class='error'>Wrong password</font>\n";
}