Example #1
0
    		}
    		exit();
    */
}
//added in order to redirect to proper page if SubjectsPlus is not installed. Only check if $installCheck variable doesn't exists and says no
if (!isset($installCheck) || $installCheck != 'no') {
    $isInstalled = isInstalled();
    if (!$isInstalled) {
        $lstrURL = getControlURL();
        header("location:{$lstrURL}install.php");
        exit;
    }
}
//added in order to redirect to proper page if SubjectsPlus is not updated to 2.0. Only check if $updateCheck variable doesn't exists and says no
if (!isset($updateCheck) || $updateCheck != 'no') {
    $isUpdated = isUpdated();
    if (!$isUpdated) {
        $lstrURL = getControlURL();
        header("location:{$lstrURL}update.php");
        exit;
    }
}
//added in order to redirect to control home if already logged in. Only check if $sessionCheck variable doesn't exists and says no
$sessionCheck = checkSession();
if ($sessionCheck != "failure") {
    global $CpanelPath;
    header("location:{$CpanelPath}");
    exit;
}
// If they have tried too many times, send them away
// Could add some sort of log of this failed attempt . . .
Example #2
0
 *   @todo
 */
use SubjectsPlus\Control\Updater;
//set varirables needed in header
$subcat = "update";
$page_title = "Update";
$sessionCheck = 'no';
$no_header = "yes";
$updateCheck = 'no';
include "includes/header.php";
//logo only header
displayLogoOnlyHeader();
//find what step we are in
$lintStep = isset($_GET['step']) ? (int) $_GET['step'] : 0;
//if at SubjectsPlus 3.0 already, display message and discontinue
if (isUpdated()) {
    ?>
	<div id="maincontent" class="update-main">
<div class="box required_field">
		<h2 class="bw_head"><?php 
    echo _("Already Updated");
    ?>
</h2>

			<p><?php 
    echo _('Already at SubjectsPlus 3.0. No need to run updater.');
    ?>
</p>
			<p><a href="login.php"><?php 
    echo _('Log In.');
    ?>