forked from craig-russell/Log-Hog
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstaticUpdate.php
90 lines (88 loc) · 2.63 KB
/
staticUpdate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
$cssVersion = date("YmdHis");
require_once("core/php/class/core.php");
$core = new core();
require_once("core/php/class/update.php");
$update = new update();
require_once("core/php/class/session.php");
$session = new session();
if(!$session->startSession())
{
$core->echoErrorJavaScript("", "", 17);
}
$currentSelectedTheme = $session->returnCurrentSelectedTheme();
$baseUrl = "local/".$currentSelectedTheme."/";
require_once($baseUrl.'conf/config.php');
require_once('core/conf/config.php');
include('local/conf/globalConfig.php');
include('core/conf/globalConfig.php');
$currentTheme = $core->loadSpecificVar($defaultConfig, $config, "currentTheme");
$defaultSettingsDir = 'core/Themes/'.$currentTheme."/defaultSetting.php";
if(is_dir('local/Themes/'.$currentTheme))
{
$defaultSettingsDir = 'local/Themes/'.$currentTheme."/defaultSetting.php";
}
require_once($defaultSettingsDir);
require_once('core/php/configStatic.php');
$daysSince = $update->calcuateDaysSince($configStatic['lastCheck']);
require_once('core/php/updateCheck.php');
require_once('core/php/loadVars.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>Static Update Page</title>
<?php echo $core->loadCSS("",$baseUrl, $cssVersion);?>
<?php $core->getScript(array(
"filePath" => "core/js/jquery.js",
"baseFilePath" => "core/js/jquery.js",
"default" => $configStatic["version"]
)); ?>
<link rel="icon" type="image/png" href="core/img/favicon.png" />
</head>
<body>
<div id="main">
<?php require_once('core/php/template/update.php'); ?>
</div>
<?php require_once('core/php/template/popup.php'); ?>
</body>
</html>
<?php $core->getScripts(
array(
array(
"filePath" => "Modules/Updater/js/update.js",
"baseFilePath" => "Modules/Updater/js/update.js",
"default" => $configStatic["version"]
),
array(
"filePath" => "core/js/settingsExt.js",
"baseFilePath" => "core/js/settingsExt.js",
"default" => $configStatic["version"]
),
array(
"filePath" => "core/js/lazyLoadImg.js",
"baseFilePath" => "core/js/lazyLoadImg.js",
"default" => $configStatic["version"]
),
array(
"filePath" => "core/js/errorHandle.js",
"baseFilePath" => "core/js/errorHandle.js",
"default" => $configStatic["version"]
)
)
); ?>
<script type="text/javascript">
$(document).ready(function()
{
loadImgFromData("updateImg");
});
var currentVersion = "<?php echo $configStatic['version'];?>";
var baseUrl = "<?php echo $baseUrl;?>";
var saveVerifyImage = <?php echo json_encode($core->generateImage(
$arrayOfImages["greenCheck"],
array(
"height" => "50px"
)
)); ?>
</script>
<form id="settingsInstallUpdate" action="update/updater.php" method="post" style="display: none"></form>