Subversion Repositories ALCASAR

Rev

Rev 3031 | Rev 3127 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3031 Rev 3033
Line 76... Line 76...
76
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
76
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
77
	}
77
	}
78
if ($Language === 'fr') {
78
if ($Language === 'fr') {
79
	$locale_time = "fr_FR";
79
	$locale_time = "fr_FR";
80
	$l_title = "Bienvenue dans l'ACC (ALCASAR Control Center)";
80
	$l_title = "Bienvenue dans l'ACC (ALCASAR Control Center)";
81
	$l_internet_link = "Accès";
81
	$l_internet_link = "Accès Internet";
82
	$l_lan = "LAN";
82
	$l_lan = "LAN";
83
	$l_router = "Routeur";
83
	$l_router = "Routeur";
84
	$l_DNS = "DNS";
84
	$l_DNS = "DNS";
85
	$l_enable = "Activé";
85
	$l_enable = "Activé";
86
	$l_disable = "Désactivé";
86
	$l_disable = "Désactivé";
Line 91... Line 91...
91
	$l_system_date = "Date du système";
91
	$l_system_date = "Date du système";
92
}
92
}
93
else if ($Language === 'es') {
93
else if ($Language === 'es') {
94
	$locale_time = "es_ES";
94
	$locale_time = "es_ES";
95
	$l_title = "Bienvenido al ACC (Centro de Control de ALCASAR)";
95
	$l_title = "Bienvenido al ACC (Centro de Control de ALCASAR)";
96
	$l_internet_link = "Acceso";
96
	$l_internet_link = "Acceso a Internet";
97
	$l_enable = "Activo";
97
	$l_enable = "Activo";
98
	$l_lan = "LAN";
98
	$l_lan = "LAN";
99
	$l_router = "Rúter";
99
	$l_router = "Rúter";
100
	$l_DNS = "DNS";
100
	$l_DNS = "DNS";
101
	$l_disable = "Desactivado";
101
	$l_disable = "Desactivado";
Line 106... Line 106...
106
	$l_system_date = "Fecha del sistema";
106
	$l_system_date = "Fecha del sistema";
107
}
107
}
108
else {
108
else {
109
	$locale_time = "en_EN";
109
	$locale_time = "en_EN";
110
	$l_title = "Welcome in ACC (ALCASAR Control Center)";
110
	$l_title = "Welcome in ACC (ALCASAR Control Center)";
111
	$l_internet_link = "Access";
111
	$l_internet_link = "Internet access";
112
	$l_lan = "LAN";
112
	$l_lan = "LAN";
113
	$l_router = "Router";
113
	$l_router = "Router";
114
	$l_DNS = "DNS";
114
	$l_DNS = "DNS";
115
	$l_enable = "Enabled";
115
	$l_enable = "Enabled";
116
	$l_disable = "Disabled";
116
	$l_disable = "Disabled";
Line 154... Line 154...
154
$nb_online_users = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
154
$nb_online_users = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
155
 
155
 
156
// LAN Status (Is connected and has IP)
156
// LAN Status (Is connected and has IP)
157
$tmp = file_get_contents("/sys/class/net/".$conf['EXTIF']."/operstate");
157
$tmp = file_get_contents("/sys/class/net/".$conf['EXTIF']."/operstate");
158
if(strcmp($tmp,"up")==1){
158
if(strcmp($tmp,"up")==1){
159
	$lan_status =  $l_lan." : ".$l_enable." <img src='/images/state_ok.gif'> ";	
159
	$lan_status =  $l_lan." "." <img src='/images/state_ok.gif'> ";	
160
} else{
160
} else{
161
	$lan_status =  $l_lan." : ".$l_disable." <img src='/images/state_error.gif'> ";
161
	$lan_status =  $l_lan." "." <img src='/images/state_error.gif'> ";
162
}
162
}
163
 
163
 
164
// Router status
164
// Router status
165
$mask = strrchr($conf['PUBLIC_IP'],"/");
165
$mask = strrchr($conf['PUBLIC_IP'],"/");
166
if(routerTest($conf['GW']) && ($conf['GW'].$mask != $conf['PUBLIC_IP'])){
166
if(routerTest($conf['GW']) && ($conf['GW'].$mask != $conf['PUBLIC_IP'])){
167
	$router_status =  $l_router." : ".$l_enable." <img src='/images/state_ok.gif'> ";	
167
	$router_status =  $l_router." "." <img src='/images/state_ok.gif'> ";	
168
} else{
168
} else{
169
	$router_status =  $l_router." : ".$l_disable." <img src='/images/state_error.gif'> ";
169
	$router_status =  $l_router." "." <img src='/images/state_error.gif'> ";
170
}
170
}
171
 
171
 
172
// Internet status
172
// Internet status
173
if ((filtrageTest("/var/www/html/index.php","/network_pb = false/")) && (internetTest())) {
173
if ((filtrageTest("/var/www/html/index.php","/network_pb = false/")) && (internetTest())) {
174
	$internet_status =  $l_DNS." : ".$l_enable." <img src='/images/state_ok.gif'> ";
174
	$internet_status =  $l_DNS." "." <img src='/images/state_ok.gif'> ";
175
	$version = dns_get_record("version.alcasar.net",DNS_TXT);
175
	$version = dns_get_record("version.alcasar.net",DNS_TXT);
176
	if (!empty($version)) {
176
	if (!empty($version)) {
177
		$AVAILABLEDVERSION = $version[0]['txt'];
177
		$AVAILABLEDVERSION = $version[0]['txt'];
178
	} else {
178
	} else {
179
		$AVAILABLEDVERSION = "-";
179
		$AVAILABLEDVERSION = "-";
180
	}
180
	}
181
} else {
181
} else {
182
	$internet_status =  $l_DNS." : ".$l_disable." <img src='/images/state_error.gif'> ";
182
	$internet_status =  $l_DNS." "." <img src='/images/state_error.gif'> ";
183
	$AVAILABLEDVERSION = "-";
183
	$AVAILABLEDVERSION = "-";
184
}
184
}
185
 
185
 
186
echo $l_internet_link."\t".$lan_status.$router_status.$internet_status."<br>\n";
186
echo $l_internet_link." : ".$lan_status.$router_status.$internet_status."<br>\n";
187
echo $l_version."	: ".$INSTALLEDVERSION."<br>\n";
187
echo $l_version." : ".$INSTALLEDVERSION."<br>\n";
188
echo $l_available."	: ".$AVAILABLEDVERSION."<br>\n";
188
echo $l_available." : ".$AVAILABLEDVERSION."<br>\n";
189
echo "</div><div class=\"panel-cell\">";
189
echo "</div><div class=\"panel-cell\">";
190
echo $l_users."		: ".$nb_users." / ".$nb_online_users."<br>\n";
190
echo $l_users." : ".$nb_users." / ".$nb_online_users."<br>\n";
191
echo $l_groups."	: ".$nb_groups."<br>\n";
191
echo $l_groups." : ".$nb_groups."<br>\n";
192
echo $l_system_date."	: ".$SYSTEM_DATE."<br>\n";
192
echo $l_system_date." : ".$SYSTEM_DATE."<br>\n";
193
?>
193
?>
194
			</div>
194
			</div>
195
		</div>
195
		</div>
196
	</div>
196
	</div>
197
	<div class="panel">
197
	<div class="panel">