-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck4updates.php
More file actions
55 lines (45 loc) · 1.24 KB
/
check4updates.php
File metadata and controls
55 lines (45 loc) · 1.24 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
<?php
##Check4updates.php is a mothership function that informs sattelite deployments about the existance of new code updates
ini_set('display_errors',0);
if($_REQUEST['su3d'])
ini_set('display_errors',1);
if(file_exists('config.inc.php'))
{
include('config.inc.php');
}
else
{
Header('Location: index.php');
exit;
}
$key= $GLOBALS['update_project']['key'];
include 'core.header.php';
$version = $_REQUEST['version'];
switch ($version) {
case 'beta':
$s3ql=compact('user_id','db');
$s3ql['select']='value,notes';
$s3ql['from']='statements';
$s3ql['where']['statement_id']=$GLOBALS['update_project']['version']['beta'];
$done = S3QLaction($s3ql);
break;
case 'stable':
$s3ql=compact('user_id','db');
$s3ql['select']='value,notes';
$s3ql['from']='statements';
$s3ql['where']['statement_id']=$GLOBALS['update_project']['version']['stable'];
$done = S3QLaction($s3ql);
break;
}
if($_REQUEST['options']=='explain'){
$data[0] = array('date'=>$done[0]['value'],'explain'=>$done[0]['notes']);
$cols = array('date','explain');
$format = $_REQUEST['format'];
$z = compact('data','cols','format');
echo outputFormat($z);
}
else {
echo($done[0]['value']);
}
exit;
?>