forked from netman2k/analogi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage_refresh.php
59 lines (40 loc) · 1.39 KB
/
page_refresh.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
<?php
/*
* Copyright (c) 2012 Andy 'Rimmer' Shepherd <[email protected]> (ECSC Ltd).
* This program is free software; Distributed under the terms of the GNU GPL v3.
*/
# Change wallboard mode cookie
if(isset($_GET['wallboard'])){
if($_GET['wallboard']=="1"){
setcookie("wallboard_mode", "1", time()+(86400*20));
$wallboard_mode=1;
}else{
setcookie("wallboard_mode", "0", time()+(86400*20));
$wallboard_mode=0;
}
}else{
if(isset($_COOKIE['wallboard_mode']) && $_COOKIE['wallboard_mode']=="1"){
$wallboard_mode=1;
}else{
$wallboard_mode=0;
}
}
if($wallboard_mode==1){
$wallboard_url="<span class='tiny fright'>Wallboard Mode [<a href='".preg_replace("/&wallboard=(0|1)/", "", $_SERVER["REQUEST_URI"])."&wallboard=0'>On</a>]</span>";
if(isset($_GET['slide']) && preg_match("/^[0-9]*$/",$_GET['slide'])){
$slide=$_GET['slide']+1;
$slidemax=count($glb_slidehow_pages);
if($slide>$slidemax){
$slide=1;
}
$newpage=$glb_slidehow_pages[$slide];
}else{
$slide=1;
$newpage=$glb_slidehow_pages[$slide];
}
echo "<meta http-equiv=\"refresh\" content=\"".$glb_autorefresh.";URL='".$newpage."&slide=".$slide."'\">";
}else{
$wallboard_url="<span class='tiny fright'>Wallboard Mode [<a href='".preg_replace("/&wallboard=(0|1)/", "", $_SERVER["REQUEST_URI"])."&wallboard=1'>Off</a>]</span>";
echo "<meta http-equiv=\"refresh\" content=\"".$glb_autorefresh."\" >";
}
?>