<?php
session_start();
 if ( isset($_SERVER['HTTP_REFERER']) && ($_SERVER['HTTP_REFERER'] != "")) {  $_SESSION['SESS_REFERER_BASE']=$_SERVER['HTTP_REFERER'];
}  $user=getRemoteUser();
if ( isset($_GET['OldNav']) || (isset($_SERVER['HTTP_USER_AGENT']) && eregi($_SERVER['HTTP_USER_AGENT'], "Safari") ) ){   echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">";
echo "<HTML>";
echo "<HEAD>";
echo "<script language=\"javascript\" src=\"../script/script.js\" type=\"text/javascript\"></script>";
echo "</HEAD>";
if ($user!=getValeurIni("loginAdministrateur")){ $_SESSION['SESS_LOGIN']=$user;
echo "<body onLoad=\"loginPublic();\">";
} else { $pathAdmin= getValeurIni("pathAdmin");
$_SESSION['SESS_LOGIN']=$user;
echo "<body onLoad=\"window.location='../".$pathAdmin."/fotoweb4.html';\">";
} echo "<form id='formAuthent' method=\"POST\" action=\"../album.php\">";
echo "<input type=\"hidden\" size='0' id=\"res\" name=\"res\" value=''>";
echo "</form>";
echo "</body>";
echo "</html>";
}else  if ($user!=getValeurIni("loginAdministrateur")){ $_SESSION['SESS_LOGIN']=$user;
echo "loginPublic();";
} else { $pathAdmin= getValeurIni("pathAdmin");
$_SESSION['SESS_LOGIN']=$user;
echo "window.location='../application/".$pathAdmin."/fotoweb4.html';";
}  function getValeurIni($cle) { $result = "";
if (file_exists('../access/fotoweb.conf')) { $fcontents = file('../access/fotoweb.conf');
while ( list( $numero_ligne, $ligne ) = each( $fcontents ) ) { $tab = explode (":", $ligne);
$cleTab = array_shift($tab);
if ($cleTab == $cle) { $result = trim(array_pop($tab));
break;
} } if ($result == "") { $result = "<clé non trouvée>";
} } else { $result = "FICHIER D INITIALISATION NON TROUVE";
} return $result;
}  function getRemoteUser() { $strVar = getValeurIni("remoteUser");
$user='';
eval("if (isset($strVar)) \$user=$strVar;" );
return $user;
} ?> 