} $action = OA_UPGRADE_CONFIGSETUP; } else { if (array_key_exists('btn_adminsetup', $_POST)) { if (!OA_Upgrade_Login::checkLogin()) { $message = $strUsernameOrPasswordWrong; $action = OA_UPGRADE_LOGIN; } else { // Acquire the sync settings from session in order to add them session_start(); $syncEnabled = !empty($_SESSION['checkForUpdates']); // Store the detected timezone of the system, whatever that is require_once '../../lib/OX/Admin/Timezones.php'; $timezone['timezone'] = OX_Admin_Timezones::getTimezone(); if ($oUpgrader->saveConfig($_POST['aConfig']) && $oUpgrader->putSyncSettings($syncEnabled) && $oUpgrader->putTimezoneAccountPreference($aTimezone, true)) { if (!checkFolderPermissions($_POST['aConfig']['store']['webDir'])) { $aConfig = $_POST['aConfig']; $aConfig['store']['webDir'] = stripslashes($aConfig['store']['webDir']); $errMessage = $strImageDirLockedDetected; $action = OA_UPGRADE_CONFIGSETUP; } else { if ($_COOKIE['oat'] == OA_UPGRADE_INSTALL) { $action = OA_UPGRADE_ADMINSETUP; } else { $message = $strUpgradeComplete; $action = OA_UPGRADE_PLUGINS; } } } else { $aConfig = $_POST['aConfig']; if ($_COOKIE['oat'] == OA_UPGRADE_INSTALL) {
array_push($folders2, $file); } } closedir($handle); natcasesort($images); $images = array_reverse($images); array_push($folders, $images); echo '<div id="files">'; while ((list(, $images) = each($folders)) && (list(, $file) = each($folders2))) { ?> <h2 class="folderName"><?php echo $file; ?> </h2> <?php if (checkFolderPermissions($config['fileDir'] . "/" . $file)) { echo "<h3 class=\"folderIsRestricted\">" . $lang["folderAccessRestricted"] . "</h3>\n"; } ?> <table class="listOfFiles"> <tr> <th> <?php echo $lang['listName']; ?> <a href="?sort=NameUp">↑</a> <a href="?sort=NameDown">↓</a> </th> <th> <?php echo $lang['listDate']; ?>
exit; if (!$mysqli->query("DROP DATABASE `" . mysqli_real_escape_string($_SESSION['dbName']) . "`")) { $json['status'] = 'ERROR'; $json['result'] = 'Truncation of database: ' . $_SESSION['dbName'] . ' failed. <br>'; $json['result'] .= $mysqli->errno . ' ' . $mysqli->error; } else { $json['status'] = 'OK'; $json['result'] = 'Truncated database: ' . $_SESSION['dbName']; } break; default: $json['status'] = 'ERROR'; $json['result'] = 'Unhandled exception'; } exit(json_encode($json)); break; } exit; } } } if (isset($_COOKIE['theme']) and strlen(@$_COOKIE['theme'])) { $_SESSION['theme'] = $_COOKIE['theme']; } else { setcookie('theme', DEFAULT_JQUERY_UI_THEME); $_SESSION['theme'] = DEFAULT_JQUERY_UI_THEME; } $_SESSION['themeString'] = jQueryUIStringToTemplateName($_SESSION['theme']); $permissionErrors = checkFolderPermissions(); $smarty->assign('permissionErrors', $permissionErrors); $smarty->display('html/index.tpl');