function __construct()
 {
     // Init variables
     self::$db = DBCxn::Get();
 }
示例#2
0
/*
 * This file is part of Siempre CMS
 *
 * (c) 2015 Steve Morgan http://siempresolutions.co.uk/
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
// Allows user to login.
require_once '../../admin-includes/admin.base.inc.php';
require_once '../../admin-includes/admin.security.inc.php';
// require_once('../../admin-includes/admin.vercheck.inc.php');
if (isset($_GET['perform'])) {
    $upgrade = true;
    $vercheck = new vercheck();
    $upgradeResult = $vercheck->performUpgrade();
} else {
    $upgrade = false;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
<head>
	<title>Siempre CMS - Upgrade</title>
	<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
	<meta name="description" content="Siempre CMS" />
	<meta name="keywords" content="Siempre CMS" />
	<meta name="robots" content="noindex, nofollow" />
	<link rel="icon" type="image/png" href="images/favicon.ico" />
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<?php

/*
 * This file is part of Siempre CMS
 *
 * (c) 2015 Steve Morgan http://siempresolutions.co.uk/
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
// Gets and checks the version (ensures DB is up to date with the files)
// updates are only checked in the home dashboard - this just avoids errors / corrupt data
// DB Version Number
$vercheck = new vercheck();
define('DBVERSION', $vercheck->getDBVersion());
// File version number
define('FILEVERSION', '1.3.6');
// if not equal - redirect to upgrade page?
// TO DO for now just shows an error - upgrading is not yet automated
if (DBVERSION !== FILEVERSION) {
    header('Location: upgrade.php?msg=version_error&dbversion=' . DBVERSION . '&fileversion=' . FILEVERSION);
}