-
Notifications
You must be signed in to change notification settings - Fork 8
/
environment-details.php
71 lines (55 loc) · 1.76 KB
/
environment-details.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
65
66
67
68
69
70
71
<?php
/*
Report information about our environment
Red = Could cause damage with live data / live users...be very careful.
Orange = Not a huge danger, but operating a little differently than expected for local so be aware.
Black = Normal operating for local.
*/
if(!IN_PRODUCTION && !Utils::is_ajax()) {
echo "<div onClick='this.style.display = \"none\";' style='cursor:pointer; position:fixed; font-family:consolas; z-index:999; background-color:yellow; padding:3px; bottom:0px; left:0px;'>";
# TIME
if(Time::now() != time()) {
$color = "orange"; # Not a huge danger, but good to draw attention to because it can cause confusing things to happen if you forget you're mimicking the time
}
else {
$color = "black";
}
echo " <span style='color:".$color."'>".Time::display(Time::now())."</span> ";
if(USE_COMBINED_ASSETS) {
echo "USE_COMBINED_ASSETS ";
}
# OUTGOING EMAIL
if(ENABLE_OUTGOING_EMAIL) {
$status = "TRUE";
$color = "black";
}
else {
$status = "FALSE";
$color = "black";
}
echo "<span style='color:".$color."'>ENABLE_OUTGOING_EMAIL=".$status."</span> ";
# FAKEMAIL
if(FAKEMAIL) {
$status = "TRUE";
$color = "black";
}
else {
$status = "FALSE";
$color = "black";
}
echo "<span style='color:".$color."'>FAKEMAIL=".$status."</span> ";
if(!FAKEMAIL && ENABLE_OUTGOING_EMAIL) {
echo "<span style='color:red'>WARNING: SYSTEM CAN SEND EMAIL TO USERS</span> ";
}
# DATABASE
if(REMOTE_DB) {
$status = "TRUE";
$color = "red"; // Danger! You're on the live DB!
}
else {
$status = "FALSE";
$color = "black";
}
echo "<span style='color:".$color."'>REMOTE_DB=".$status."</span> ";
echo "</div>";
}