along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-define('THUMB_SIZE', 100);
-define('DATA_DIR', 'data');
-define('IMAGES_DIR', 'images');
-define('USE_VIEWER', true);
+require 'config.php';
function getPreview($imgFile, $maxSize = THUMB_SIZE)
{
$realDir = IMAGES_DIR.$shortPath;
+if (! is_dir($realDir)) {
+ header("HTTP/1.1 404 Not Found");
+ die("Directory Not Found");
+}
+
foreach (scandir($realDir) as $file) if ($file != '.' and $file != '..')
{
if (is_dir("$realDir/$file"))