Location: PHPKode > projects > LDAPted > ldapted/includes/session.php
<?php
/***************************************************************************
 *
 *                                  session.php
 *                              -------------------
 *
 *   begin                : Friday, Jul 5, 2002
 *   copyright            : (C) 2002 The Kabramps Team
 *   email                : hide@address.com,
 *                          hide@address.com
 *
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 *   See the GNU General Public License for more details.
 *   (http://www.gnu.org/licenses/gpl.html)
 *
 ***************************************************************************/

session_start();
$bind_dn   = $HTTP_SESSION_VARS["user"];
$pw        = $HTTP_SESSION_VARS["pass"];
$host      = $HTTP_SESSION_VARS["host"];
$ldap_base = $HTTP_SESSION_VARS["ldap_base"];
$language  = $HTTP_SESSION_VARS["lang"];

if ($bind_dn == "" && $host == "" && $ldap_base == "") {
  header ("Location: logout.php?logoutmessage=".gettext("Your session seems to be expired - please login again."));
}

// set the language
bindtextdomain("LDAPted", "locale");
textdomain ("LDAPted");
setlocale(LC_ALL, $HTTP_SESSION_VARS["lang"]);
?>
Return current item: LDAPted