Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1248 → Rev 1249

/web/index.php
1,8 → 1,50
<?php
# $Id$
$hostname = "alcasar";
#
# index.php for ALACASAR captive portal
# by REXY
# UI & css style by stephane ERARD
# The contents of this file may be used under the terms of the GNU
# General Public License Version 2, provided that the above copyright
# notice and this permission notice is included in all copies or
# substantial portions of the software.
/****************************************************************
* GLOBAL FILE PATHS *
*****************************************************************/
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
 
/****************************************************************
* FILE reading test *
*****************************************************************/
$conf_files=array(CONF_FILE);
foreach ($conf_files as $file){
if (!file_exists($file)){
exit("File ".$file." unknown");
}
if (!is_readable($file)){
exit("You don't have read rights on the file ".$file);
}
}
/****************************************************************
* Read CONF_FILE *
*****************************************************************/
$ouvre=fopen(CONF_FILE,"r");
if ($ouvre){
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
if (strpos($tampon,"=")!==false){
$tmp = explode("=",$tampon);
$conf[$tmp[0]] = $tmp[1];
}
}
}else{
exit("Error opening the file ".CONF_FILE);
}
fclose($ouvre);
$hostname = alcasar.$conf["DOMAIN"];
$network_pb = False;
$cert_add = "http://alcasar/certs";
$cert_add = "http://$hostname/certs";
$direct_access = False;
$diagnostic = "can't contact the default router";
$remote_ip = ($_SERVER['REMOTE_ADDR']);
/web/intercept.php
1,7 → 1,7
<?php
# $Id$
#
# intercept.php for Alcasar captive portal
# intercept.php for ALCASAR captive portal
# Copyright (C) 2003, 2004 Mondru AB.
# Modify by REXY & steweb57
# UI & css style by stephane ERARD
53,7 → 53,7
}
}
}else{
exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1);
exit("Erreur d'ouverture du fichier ".CONF_FILE);
}
fclose($ouvre);
$organisme = $conf["ORGANISM"];