-
Notifications
You must be signed in to change notification settings - Fork 3
/
helpers.php
64 lines (55 loc) · 1.09 KB
/
helpers.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
<?php
function sessionVariablesSet($sid, $array)
{
foreach ($array as $entry) {
if (!isset($_SESSION[$sid][$entry])) {
return false;
}
}
return true;
}
function postVariablesSet($array)
{
foreach ($array as $entry) {
if (!isset($_POST[$entry])) {
return false;
}
}
return true;
}
// Returns true if we're on a page with step > 1
function isBigStep() {
global $step;
if (isset($step) && $step > 1) {
return true;
}
return false;
}
function isSearch() {
global $currentPage;
if (isset($currentPage) && ($currentPage == 'ebs' || $currentPage == 'xps')) {
return true;
}
return false;
}
function isHome() {
global $currentPage;
if (isset($currentPage) && $currentPage == 'home') {
return true;
}
return false;
}
function isDocs() {
global $currentPage;
if (isset($currentPage) && $currentPage == 'docs') {
return true;
}
return false;
}
// For debugging: Pretty print variables
function var_dump_pre($mixed = null) {
echo '<pre>';
var_dump($mixed);
echo '</pre>';
return null;
}