git-svn-id: https://192.168.0.254/svn/Proyectos.LaFactoriaVerde_Web/trunk@4 017afc1c-778d-45dc-8efe-cc7a6876851a
23 lines
476 B
PHP
23 lines
476 B
PHP
<?php
|
|
require ("config.php");
|
|
|
|
session_start();
|
|
//check to see if the user already has an open session
|
|
if (($_SESSION[user_name] != "") && ($_SESSION[password] != ""))
|
|
{
|
|
header("Location:$_SESSION[redirect]");
|
|
exit;
|
|
}
|
|
|
|
//check to see if cookies have been set previously
|
|
if(($lr_user != "") && ($lr_pass != ""))
|
|
{
|
|
header("Location:$base_dir/redirect.php");
|
|
exit;
|
|
}
|
|
|
|
//if neither is true, redirect to login
|
|
header("Location:$base_dir/login.php");
|
|
?>
|
|
|