-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_as.inc
154 lines (141 loc) · 5.39 KB
/
config_as.inc
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
$GLOBALS['CONFIG']['DEBUG'] = true;
$GLOBALS['CONFIG']['THROW_ERRORS'] = (E_ALL | E_STRICT) & ~E_NOTICE;
$domain = explode( '.', $_SERVER["HTTP_HOST"] );
$file = '/dns/' . array_pop( $domain ) . '/' . array_pop( $domain ) . '/etc/settings' . '/' . implode( '.', $domain ) . '.ini';
if( file_exists( $file ) )
{
$conf = parse_ini_file( $file, true );
$conf['type'] = 'file';
}
else if( file_exists( '../www.ini' ) )
{
$conf = parse_ini_file('../www.ini');
$conf['type'] = 'file';
}
$GLOBALS['CONFIG']['API_HOST'] = 'https://' . $conf['Main']['API_HOST'];
$GLOBALS['CONFIG']['API_USERNAME'] = $conf['Main']['API_USERNAME'];
$GLOBALS['CONFIG']['API_PASSWORD'] = $conf['Main']['API_TOKEN'];
$GLOBALS['CONFIG']['HOSTNAME'] = $conf['Main']['HOSTNAME'];
$GLOBALS['CONFIG']['UPTIME_TOKEN'] = $conf['Main']['UPTIME_TOKEN'];
$GLOBALS['CONFIG']['DOMAIN_GENERIC'] = $conf['Main']['DOMAIN_GENERIC'];
$GLOBALS['CONFIG']['REDMINE_TOKEN'] = $conf['Main']['REDMINE_TOKEN'];
$GLOBALS['CONFIG']['DEBUG'] = false;
unset($conf);
unset($file);
unset($domain);
$GLOBALS['CONFIG']['DEFAULT_PAGE'] = '/default';
$GLOBALS['CONFIG']['PANEL_PAGE'] = '/panel';
$GLOBALS['CONFIG']['LOGIN_PAGE'] = '/?elogin';
$GLOBALS['CONFIG']['DEFAULT_LANGUAGE'] = 'FR';
$GLOBALS['CONFIG']['MAIL_TEMPLATE'] = "
<html>
<head>
<title>Another Service</title>
<style type=\"text/css\">
html, body {
background-color: #e5e9ee;
}
body {
margin: 0;
font-family: Arial;
font-size: 15px;
font-weight: normal;
line-height: 18px;
color: #404040;
}
a {
color: #2e9fff;
text-decoration: none;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}
a:hover {
color: #0079e1;
}
h1 {
font-size: 20px;
font-weight: bold;
}
h2 {
font-size: 17px;
font-weight: bold;
}
.btn {
display: inline-block;
padding: 4px 17px 3px;
margin: 0px 7px 4px 0;
font-size: 14px;
line-height: 21px;
color: #585858;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
border-radius: 20px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
cursor: pointer;
background-color: #f1f1f1;
background-image: -moz-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: -ms-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f8f8f8), to(#e7e7e7));
background-image: -webkit-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: -o-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: linear-gradient(top, #f8f8f8, #e7e7e7);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#e7e7e7', GradientType=0);
background-color: #f1f1f1;
background-image: -moz-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: -ms-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f8f8f8), to(#e7e7e7));
background-image: -webkit-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: -o-linear-gradient(top, #f8f8f8, #e7e7e7);
background-image: linear-gradient(top, #f8f8f8, #e7e7e7);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#e7e7e7', GradientType=0);
/* @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0px rgba(255,255,255,0.5);*/
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
border: 1px solid #c9ccd0;
*margin-left: .3em;
*margin-left: .3em;
}
</style>
</head>
<body>
<div style=\"background-color: #000000; width: 100%; height: 60px; padding: 20px 10px 10px 10px; margin-bottom: 20px; text-align: center;\">
<img src=\"https://www.anotherservice.com/as/images/logo.png\" alt=\"\" />
</div>
<div style=\"padding: 10px; width: 600px; margin: 0 auto; border: 1px solid #a1a1a1;\">
<div style=\"\">
<h1>{TITLE}</h1>
{CONTENT}
</div>
<br /><br />
<div style=\"float: left;\">
<strong>S.Y.S. SAS - Another Service</strong><br />
<a href=\"https://www.anotherservice.com\">https://www.anotherservice.com</a><br />
<a href=\"mailto: contact@anotherservice.com\">contact@anotherservice.com</a>
</div>
<div style=\"float: right;\">
<strong>Support technique</strong><br />
<a href=\"https://support.anotherservice.com/projects/global-support\">https://support.anotherservice.com</a><br />
<a href=\"mailto: support@anotherservice.com\">support@anotherservice.com</a>
</div>
<div style=\"clear: both; padding: 2px;\"></div>
</div>
</body>
</html>";
?>