login(); if( !$user->admin ) { echo "You need to be logged in as an admin user!"; exit(); } set_time_limit(0); $files = glob( 'import/*.*' ); include( 'templates/header.tpl.php' ); if( isset($_POST['import']) ) { echo "

Imported Images:

"; require_once( 'lib/cache.php' ); $cache = new Cache( Config::$cache['path'], 'index' ); $cache->clear(); } else { echo "

Images ready to import:

"; if( !empty($files) ) { echo "
'; } else { echo "

No images found in the import/ directory!

"; } } ?>