Example #1
0
?>
js/shared.js"></script>
       <script type="text/javascript" src="<?php 
print $AssetURL;
?>
js/jquery.colorbox-min.js"></script>
       <title>Setup Configuration Page</title>
   </head>

   <body>
<?php 
//error if no base file
if (!$lobjConfig->setConfigPath($lstrConfigBaseFilePath)) {
    $lstrTitle = _("Configuration File Error!");
    $lstrMessage = _("Error! No Base file to use!");
    $lobjConfig->displayErrorPage($lstrTitle, $lstrMessage);
}
//error if Config already exists and is not a file placeholder
if (file_exists($lstrConfigFilePath) && filesize($lstrConfigFilePath) > 10) {
    $lstrTitle = _("Configuration File Error!");
    $lstrMessage = _("The file 'config.php' already exists. If you need to reset any of the configuration items in this file, you must be an admin and go to the Admin Nav and click 'Config Site'.");
    $lobjConfig->displayErrorPage($lstrTitle, $lstrMessage);
} else {
    //echo out error message if the configuration file exists and cannot be writable or the directory cannot be written to
    if (file_exists($lstrConfigFilePath) && !is_writable($lstrConfigFilePath) || !is_writable(dirname($lstrConfigFilePath))) {
        $lstrTitle = _("Configuration File Error!");
        $lstrMessage = _("Sorry, but I can't write to the <code>config.php</code> file. Please change permissions.");
        $lobjConfig->displayErrorPage($lstrTitle, $lstrMessage);
    } else {
        //display steps page if requested by GET variable
        if (isset($_GET['steps'])) {