$errors = array(); if (!file_exists($x_CONFIG['directory']['template']['fs'].'/index.php')) { $errors['template'][] = array('name' => 'Template does not exist.', 'msg' => 'This may be caused by an improperly set configuration variable, the template not existing, or a permissions problem.'); } if (!is_writeable($x_CONFIG['directory']['thumbnail']['fs'])) { $errors['thumbnail'][] = array('name' => 'Thumbnail directory is not writeable.', 'msg' => 'The webserver does not have write-access to the thumbnail directory. Please rectify this, for it prevents thumbnails from being generated.'); } if (count($errors)) { foreach ($errors as $type => $suberrors) { foreach ($suberrors as $error) { echo '
'.$error['msg'].'
'; } } die(); }