require_once 'lib/path.php'; $action = param('action', 'none'); $do = param('do', 'none'); if ($do == 'none') { echo '<h1>IRIN System Version Update</h1>'; } if ($action == 'none') { ?> <table class="table table-hover"> <tr> <th>Version</th> <th>Updated</th> <th></th> </tr> <?php foreach (Version::getVersions() as $version) { ?> <tr> <td> <?php echo $version->getVersion(); ?> <?php if ($version->isCurrent()) { echo '(Current)'; } ?> </td> <td><?php echo $version->getDate(); ?>
define("ROOT", "../"); require ROOT . 'www/header.php'; $message = ""; //Do we need to set a version as active? if (isset($_GET['setactive'])) { if (ctype_digit($_GET['setactive'])) { $activeVersion = $_GET['setactive']; try { Version::setAsActive($activeVersion); $message = "Active version updated successfully"; } catch (Exception $ex) { $message = $ex->getMessage(); } } } $versions = Version::getVersions(); ?> <h2>Transporter Server</h2> <p><a href="edit_files.php">Edit override files</a></p> <p><button id="new_version" type="button">Create new version</button></p> <?php print "<p><b>{$message}</b></p>"; ?> <p>Clicking on the "Create new version" or "Generate" (image) buttons will start processes on the server that will take at least 3-4 minutes to complete. Do not refresh or navigate away from the page till you get a pop up message with the status.</p> <table border="1">