<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
if ($acces == 1) {
if($admintest && $adminsecu)  {

Max_OpenTable();
echo "<b>"._GESTIONIMAGES."</b><br />";
echo "<table border='1' width='100%'><tr>";
echo "<td align='center'><b>"._FOLDERS."</b></td><td align='center'><b>"._RAPPORT."</b></td></tr><tr>";
echo "<td valign='top'>&nbsp;&nbsp; images</td>";
if (!file_exists("images/index.html"))
   { $a++; echo "<td>&nbsp;&nbsp;$imgno "._FILENOEXISTS.": index.html<br />"; }
   else { echo "<td>&nbsp;&nbsp;$imgok  "._FILEINDEXEXIT."<br />"; }
 if (!file_exists("images/.htaccess"))
   { $a++; echo "&nbsp;&nbsp;$imgno "._FILEHTACCESSNOEXISTS."</td></tr>"; }
   else { echo "&nbsp;&nbsp;$imgok  "._FILEHTACCESSEXIT."</td></tr>"; }
    $handle=opendir("images");

    while ($file = readdir($handle)) {
        if (!ereg("[.]",$file)) {
            $tlist .= "$file ";
        }
    }
    closedir($handle);
    $tlist = explode(" ", $tlist);
    sort($tlist);
    for ($i=0; $i < sizeof($tlist); $i++) {
        if($tlist[$i]!="") {
        ECHO "<tr><td>&nbsp;&nbsp; images/$tlist[$i]</td>";
        if (!file_exists("images/$tlist[$i]/index.html"))
   { $a++; echo "<td>&nbsp;&nbsp;$imgno "._FILENOEXISTS.": index.html</td></tr>"; }
   else { echo "<td>&nbsp;&nbsp;$imgok  "._FILEINDEXEXIT."</td></tr>"; }
        }
    }
    echo "</tr></table>";
Max_CloseTable();
echo "<br /><center><a href='javascript: self.close ()'>"._CLOSE_WINDOWS."</a></center>";

if ($a) { echo "<br /><center><font size='6' color='red'>"._WARNING."</FONT></center>"; }
die();

}
}else {
	echo "Access Denied";
}