adding menulist fopen check

This commit is contained in:
Benjamin Sonntag 2009-11-30 04:41:00 +00:00
parent a24cc93d6c
commit 2441ba9936
1 changed files with 9 additions and 7 deletions

View File

@ -38,14 +38,16 @@ require_once("../class/config.php");
<?php
$MENUPATH="/var/alternc/bureau/admin/";
$tt=fopen("menulist.txt","rb");
while (!feof ($tt)) {
$tt=@fopen("menulist.txt","rb");
if ($tt) {
while (!feof ($tt)) {
$c=trim(fgets($tt,4096));
if ($c && file_exists($MENUPATH.$c)) {
include($MENUPATH.$c);
}
}
fclose($tt);
}
fclose($tt);
?>
<p class="center"><a href="http://www.alternc.org" target="_blank"><img src="logo2.png" border="0" alt="" /></a>