gid<2 ) die( 'Direct Access to this location is not allowed.' );
$im_show_path=$lm_absolute_path.'images/';
$im_webpath=$lm_website."images/";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
{$lang_insert_image_title}
".$fname." was success fully uploaded !!! ";
} else {
$msg.= "
".$fname." could not be uploaded !!! ";
}
}
}
}
if($task=="createfolder")
{
if(mkdir($show_dir.$_POST['createtext'],0777))$msg="Folder successfully created";
else $msg="Error creating folder";
}
if($task=="deletefolder")
{
$todel=$im_show_path.$_POST['deletetext'];
if(is_dir($todel)) {purge($todel."/");
rmdir($todel);
} else {
unlink($todel);
}
}
if($task=="renamefolder")
{
$newname=$im_show_path.$_POST['renametext'];
$oldname=$im_show_path.$_POST['oldrenametext'];
if(rename($oldname,$newname))$msg="Renamed successfully";
else $msg="Error renaming";
}
if (!is_dir($show_dir))
{
$msg = $show_dir." is not a directory !!!";
return;
}
if (!( $dir = opendir($show_dir) ) )
{
$msg = $show_dir." Access denied .
You do not have enought rights to view the dir ";
return;
}
while ( $name = readdir($dir))
{
if($name == ".." || $name == "." ) continue;
if( is_dir($show_dir.$name) )$dir_list[] = $name ;
if( is_file($show_dir.$name) ) $file_list[] = $name ;
}
closedir($dir);
?>