1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<?
session_start();
#init var
$dossier=null;
$name=null;
$album=null;
$titre_page="PHProg";
if (isset($_GET['id'])) {
$id=$_GET['id'];
}
else {
$id=0;
}
if (file_exists('option.php') && (file_exists('install.php') | file_exists('install2.php')) ){
echo "Veuillez supprimer les fichiers install.php et install2.php";
exit;
}
if (file_exists('option.php')){
include('option.php');
}
elseif($id==4) {
$dossier='';
}
else {
$id=2;
$dossier='';
}
function test_admin() {
if (isset($_SESSION['name']) and $_SESSION['name']==nom_admin) {
return TRUE;
}
else {return "0";}
}
include('fonction/page_url.func.php');
$page_url=page_url($id);
$lang='fr';
switch ($lang) {
case "fr":
include("lang/$lang.php");
break;
}
$titre="<a href=\"index.php\" class=\"lien-titre\">".text_titre_liste_album."</a>";
include('fonction/liste_albums.func.php');
$liste_album=liste_albums($dossier);
if (isset($_GET['album'])) {
foreach($liste_album as $value) {
if($value==$_GET['album']) {
$album=$_GET['album'];
$titre=$titre." > ".$album;
}
}
}
if ($id==2) {
$titre=titre_installation;
}
include('fonction/page_titre.func.php');
$titre=page_titre($id);
?> |