root/trunk/admin/auth.php

Revision 1736, 352 bytes (checked in by jeena, 4 months ago)

changed PHP_SELF to SCRIPT_NAME

Line 
1<?php
2ini_set("session.use_trans_sid", false);
3session_start();
4
5$hostname = $_SERVER['HTTP_HOST'];
6$path = dirname($_SERVER['SCRIPT_NAME']);
7
8if (!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']) {
9    header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/login.php?url='.urlencode($_SERVER["REQUEST_URI"]));
10    exit;
11}
12
13// eof
Note: See TracBrowser for help on using the browser.