<?php
session_start(); $user=getRemoteUser();  if (isset($_SESSION['SESS_LOGIN'])) $oldlogin=	$_SESSION['SESS_LOGIN']; else $oldlogin= '';   if (  strcmp($user,$oldlogin)==0 ){  $_SESSION = array(); session_destroy(); Header("WWW-Authenticate: Basic realm=\"fotoweb\""); Header( "HTTP/1.0 401 Unauthorized"); exit();  }  else echo "authentifier();";   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 trim($result); }  function getRemoteUser() { $strVar = getValeurIni("remoteUser"); $user=''; eval("if (isset($strVar)) \$user=$strVar;" ); return trim($user); } ?> 