This repository was archived by the owner on Jan 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontroller.php
More file actions
70 lines (53 loc) · 1.92 KB
/
controller.php
File metadata and controls
70 lines (53 loc) · 1.92 KB
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
<?php
/*
* Copyright (c) Codiad & daeks, distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
require_once('../../common.php');
require_once('class.autoupdate.php');
//////////////////////////////////////////////////////////////////
// Verify Session or Key
//////////////////////////////////////////////////////////////////
if($_GET['action']!='authenticate'){ checkSession(); }
$update = new AutoUpdate();
//////////////////////////////////////////////////////////////////
// Set Initial Version
//////////////////////////////////////////////////////////////////
if($_GET['action']=='init'){
$update->Init();
}
//////////////////////////////////////////////////////////////////
// Clear Version
//////////////////////////////////////////////////////////////////
if($_GET['action']=='clear'){
if(checkAccess()) {
$update->Clear();
}
}
//////////////////////////////////////////////////////////////////
// Test Write Access
//////////////////////////////////////////////////////////////////
if($_GET['action']=='test'){
if(checkAccess()) {
$update->Test();
}
}
//////////////////////////////////////////////////////////////////
// Download Version
//////////////////////////////////////////////////////////////////
if($_GET['action']=='download'){
if(checkAccess()) {
$update->commit = $_GET['remoteversion'];
$update->Download();
}
}
//////////////////////////////////////////////////////////////////
// OptOut
//////////////////////////////////////////////////////////////////
if($_GET['action']=='optout'){
if(checkAccess()) {
$update->OptOut();
}
}
?>