<?php require "login/login.php"; include 'monitor.inc'; $id = $_REQUEST['id']; displayErrorIfNotAdmin(); if (!($forwardTo = $_REQUEST['forwardTo'])) { $forwardTo = "listLocations.php"; } updateLocations($id); header("Location: " . $forwardTo); exit;
$user['Password'] = $adminPassword; $user['IsSuperAdmin'] = true; $user['IsActive'] = true; $user['MaxJobsPerMonth'] = 9999999; $user['EmailAddress'] = $adminEmailAddress; $user->save(); $host = new WPTHost(); $host['Active'] = true; $host['Label'] = $hostLabel; $host['Contact'] = $hostContact; $host['ContactEmailAddress'] = $hostContactEmail; $host['HostURL'] = $hostUrl; $host->save(); $_SESSION['ls_id'] = 1; //include 'FixFolders.php'; updateLocations(1); header("Location: install.php?step=3"); } else { echo "<br><h2>Warning!</h2><br><h3>Database file already exists.<br></h3>To reinitialize remove/drop the wpt_monitor database. If using sqlite this will be wpt_monitor.sqlite in the db direcotry.<br>"; } } catch (Exception $e) { echo $e; } } else { if ($step == "3") { echo "Creating db...<br>"; echo "Initializing configuration...<br>"; echo "Creating admin user...<br>"; echo "Fetching location information from WebPagetest host<br>"; echo "Done<br>"; $configTable = Doctrine_Core::getTable('WPTMonitorConfig');