Subversion Repositories ALCASAR

Rev

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

Rev 958 Rev 1124
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 958 2012-07-19 09:01:30Z franck $
2
# $Id: index.php 1124 2013-06-21 08:23:00Z crox53 $
3
$hostname = "alcasar";
3
$hostname = "alcasar";
4
$network_pb = False;
4
$network_pb = False;
5
$cert_add = "http://alcasar/certs";
5
$cert_add = "http://alcasar/certs";
6
$direct_access = False;
6
$direct_access = False;
7
$diagnostic = "can't contact the default router";
7
$diagnostic = "can't contact the default router";
Line 75... Line 75...
75
  $l_acc_access = "<a href=\"https://$hostname/acc\">Acc&egrave;s au centre de gestion</a>";
75
  $l_acc_access = "<a href=\"https://$hostname/acc\">Acc&egrave;s au centre de gestion</a>";
76
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installer le certificat racine</a>";
76
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installer le certificat racine</a>";
77
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
77
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
78
  $l_certif_explain = "Permet l'&eacute;change de donn&eacute;es s&eacute;curis&eacute;es entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistr&eacute; sur votre station de consultation, il est possible que des alertes de s&eacute;curit&eacute;s soient &eacute;mises par votre navigateur.<br><br>";
78
  $l_certif_explain = "Permet l'&eacute;change de donn&eacute;es s&eacute;curis&eacute;es entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistr&eacute; sur votre station de consultation, il est possible que des alertes de s&eacute;curit&eacute;s soient &eacute;mises par votre navigateur.<br><br>";
79
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
79
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
-
 
80
  $l_category = "catégorie :";
80
if ((isset ($user[4])) && ($user[4] == "0")) {
81
if ((isset ($user[4])) && ($user[4] == "0")) {
81
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
82
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
82
	  $l_logout = "<a href=\"http://www.google.fr\">Ouvrir une session Internet</a>";}
83
	  $l_logout = "<a href=\"http://www.google.fr\">Ouvrir une session Internet</a>";}
83
  else {
84
  else {
84
	  if ($user[5] != $user[0]) // authentication exception or not
85
	  if ($user[5] != $user[0]) // authentication exception or not
Line 110... Line 111...
110
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Controle Center</a>";
111
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Controle Center</a>";
111
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Instalar Certificado Alcasar AC</a>";
112
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Instalar Certificado Alcasar AC</a>";
112
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Instalar Certificado Alcasar AC</a>";
113
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Instalar Certificado Alcasar AC</a>";
113
  $l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>";
114
  $l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>";
114
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
115
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
-
 
116
  $l_category = "categoria :";
115
if ((isset ($user[4])) && ($user[4] == "0")) {
117
if ((isset ($user[4])) && ($user[4] == "0")) {
116
	  $l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
118
	  $l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
117
	  $l_logout = "<a href=\"http://www.google.pt\">Abrir uma conexão de Internet</a>";}
119
	  $l_logout = "<a href=\"http://www.google.pt\">Abrir uma conexão de Internet</a>";}
118
  else {
120
  else {
119
	  if ($user[5] != $user[0]) // authentication exception or not
121
	  if ($user[5] != $user[0]) // authentication exception or not
Line 145... Line 147...
145
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
147
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
146
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Install ALCASAR AC Certificate</a>";
148
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Install ALCASAR AC Certificate</a>";
147
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
149
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
148
  $l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
150
  $l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
149
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
151
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
-
 
152
  $l_category = "category :";
150
if ((isset ($user[4])) && ($user[4] == "0")) {
153
if ((isset ($user[4])) && ($user[4] == "0")) {
151
	  $l_logout_explain = "No Internet consultation session is actualy open on your system";
154
	  $l_logout_explain = "No Internet consultation session is actualy open on your system";
152
	  $l_logout = "<a href=\"http://www.google.com\">Open an Internet session</a>";}
155
	  $l_logout = "<a href=\"http://www.google.com\">Open an Internet session</a>";}
153
  else {
156
  else {
154
	  if ($user[5] != $user[0]) // authentication exception or not
157
	  if ($user[5] != $user[0]) // authentication exception or not
Line 229... Line 232...
229
				<img src="images/organisme.png">
232
				<img src="images/organisme.png">
230
			</div>
233
			</div>
231
		</div>
234
		</div>
232
		<div id="contenu_acces">
235
		<div id="contenu_acces">
233
			<div id="box_url">
236
			<div id="box_url">
-
 
237
<?php 
-
 
238
if (! $direct_access){
-
 
239
	$pattern = preg_replace('/www./','',$_SERVER['HTTP_HOST']);
-
 
240
	chdir('/etc/dansguardian/lists/blacklists/');
-
 
241
	$domain_bl = exec("grep -Re ^$pattern$ *");
-
 
242
	$s = explode("/",$domain_bl);
234
				<?php if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
243
	echo "$l_required_domain : $_SERVER[HTTP_HOST] ($l_category $s[0])";
-
 
244
}
-
 
245
?>
235
			</div>
246
			</div>
-
 
247
 
236
<?php
248
<?php
237
if ($direct_access){
249
if ($direct_access){
238
	echo "	<div id=\"box_bienvenue\">
250
	echo "	<div id=\"box_bienvenue\">
239
				$l_welcome
251
				$l_welcome
240
			</div>
252
			</div>