Example #1
0
$perm_flag = true;
$perm_msg = '';
$error_message = '';
$error = false;
$installed = false;
$user_data = array();
$post_flag = false;
$configfile = "../config/config.php";
$settingsfile = "../config/settings.php";
$useradd = "../api/useradd.php";
$serverclass = "../api/server_class.php";
$schemafile = "sql/schema.sql";
$fckeditor = "../FCKeditor/editor/filemanager/connectors/php/config.php";
$directories = array("../custom/", "../styles/", "../attachments/", "../backup/", "../downloads/", "../csvfiles/", "../api/useradd.php", "../api/server_class.php", "../config/settings.php", "../config/config.php", "../admin/purgedtickets/", "../admin/purgedtickets/attachments/", "../staff/images/", "../fckeditorimages/", "../FCKeditor/editor/filemanager/connectors/php/config.php");
$serverSettings = ServerConfig::checkServerConfiguration();
$serverCurrentSettings = ServerConfig::getServerSettings();
$host_name = parse_url($_SERVER['HTTP_HOST']);
if (isset($_POST['upgraderCheck'])) {
    $post_flag = true;
    //For Getting Folder Permission Status and Proper Error messages
    foreach ($directories as $dir) {
        $permission = ServerConfig::fileWritable($dir, str_replace("../", "", $dir));
        if (!$permission['status'] && $error == false) {
            $error = true;
            $serverPermission = "true";
        }
    }
    if ($error == true) {
        if (isset($_POST["btnContinue"]) && !isset($_POST["auto_set"])) {
            $txtFTPusername = $_POST['FTPusername'];
            $txtFTPpassword = $_POST['FTPpassword'];