forked from eastonman/material
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.php
More file actions
27 lines (22 loc) · 727 Bytes
/
update.php
File metadata and controls
27 lines (22 loc) · 727 Bytes
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
<?php
$version_file_path = dirname(__FILE__) . '/.version';
$theme_root = dirname(__FILE__);
include_once('inc/updateChecker.php');
if (isset($_GET['update'])) {
if (($_GET['update'] == 1) and (checkUpdate())) {
echo "<strong>Update Checker For Theme New Material</strong><br><br>";
echo "Starting Update<br>";
if (!update()){
echo 'Update Failed!';
} else {
echo "Update Success!";
}
} else {
echo 'Argument Error Or Already Latest Version.<br>';
}
} elseif (checkUpdate()) {
echo '<script> alert("Confirm Update?"); location.href=document.URL + "?update=1"; </script>';
} else {
echo '您的主题已是最新版本<br> Already Latest Version. <br>';
}
?>