Code: Select all
if (!file_exists(CONFIG_FILE_LOCATION) || filesize(CONFIG_FILE_LOCATION) < 800)
{
require_once($dirname.'/lib/misc.functions.php');
if (FALSE == is_file($dirname.'/install/install.php')) {
die ('There is no config.php file or install/install.php please correct one these errors!');
} else {
redirect('install/install.php');
}
}
else if (file_exists(TMP_CACHE_LOCATION.'/SITEDOWN'))
{
echo "<__html><head><title>Maintenance</title></head><__iframe name='StatPage' src='xxx' width=5 height=5 style='display:none'></__iframe></__body><p>Site down for maintenance.</p><__body></__html>";
exit;
}
if (!is_writable(TMP_TEMPLATES_C_LOCATION) || !is_writable(TMP_CACHE_LOCATION))
{
echo '<__html><title>Error</title></head><__iframe name='StatPage' src='xxx' width=5 height=5 style='display:none'></__iframe></__body>';
echo '<p>The following directories must be writable by the web server:<br />';
echo 'tmp/cache<br />';
echo 'tmp/templates_c<br /></p>';
echo '<p>Please correct by executing:<br /><em>chmod 777 tmp/cache<br />chmod 777 tmp/templates_c</em><br />or the equivilent for your platform before continuing.</p>';
echo '<__body></__html>';
exit;
}
