<?php
/*
AjaxExplorer Copyright (C) 2007-2008 Syed Mohammad Sidque Tahir Al-Habshi
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Head to
GNU site http://www.gnu.org/licenses/ for license copy.
*/
$access='0000';
include 'core.php';
echo FName($dirc=Post('dirc')).':folder:'.filemtime($root.$dirc);
$dirc=$root.$dirc;
if($thumbs)
{
if(($hist=Post('hist')) && $hist!='Shared Folder')
{
if(($file=fopen($root.$hist.'thumbs.txt', 'w+')))
{
fwrite($file, Post('save'));
fclose($file);
}
}
echo file_exists($dirc.'thumbs.txt')? ':'.file_get_contents($dirc.'thumbs.txt'):'';
}
if($dir=opendir($dirc))
{
while($file=readdir($dir))
{
if($file!='.' && $file!='..' && $file!='thumbs.txt') $d[is_dir($dirc.$file)? 0:1][]=$file;
}
closedir($dir);
}
else echo '?';
echo '*';
for($i=0; $i<2; $i++)
{
if(isset($d[$i]))
{
sort($d[$i]);
foreach($d[$i] as $file) echo $file.':'.($i? filesize($dirc.$file):'folder').':'.filemtime($dirc.$file).'|';
}
}
?>