Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
318 richard 1
<?php
2
#
3
# intercept.php for Alcasar captive portal
4
# Copyright (C) 2003, 2004 Mondru AB.
5
# Modify by REXY
6
# Help for language translation by B. AUBARD (thanks)
7
 
8
# The contents of this file may be used under the terms of the GNU
9
# General Public License Version 2, provided that the above copyright
10
# notice and this permission notice is included in all copies or
11
# substantial portions of the software.
12
 
498 richard 13
$organisme = "";
318 richard 14
# Redirects from CoovaChilli (chilli daemon) :
15
# Response to login:
16
  # success :	if login successful
17
  # failed :	if login failed
18
  # logoff :	if logout successful
19
  # already :	if tried to login while already logged in
20
  # notyet :	if not logged in yet
21
  # smartclient :if login from smart client
22
  # popup1 :	if requested a logging in pop up window
23
  # popup2 :	if requested a success pop up window
24
  # popup3 :	if requested a logout pop up window
25
  # Default :	it was not a form request
26
 
27
# Shared secret used to encrypt challenge with radius.
504 richard 28
$uamsecret = "";
318 richard 29
 
30
# URL loaded after success authenticates (let blank for browser defaults)
498 richard 31
$adminurl = "";
318 richard 32
 
33
# Our own path
484 stephane 34
$loginpath	= $_SERVER['PHP_SELF'];
504 richard 35
$alcasarpath = "http://alcasar";
36
$statuspath = $alcasarpath."/status.php";
485 stephane 37
$debug		= false;
318 richard 38
 
39
# Choice of language
40
$Language = 'en';
41
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
42
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
43
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
44
if($Language == 'es'){
45
  $R_ChilliError	= "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
46
  $R_login		= "El éxito de la autenticación.<HR>Cierre esta ventana interrumpte la sesion.";
47
  $R_logout		= "Conexión de cierre";
48
  $R_loginfailed	= "Error de autenticación";
49
  $R_loggingin		= "Identificación en el portal cautivo";
50
  $R_loggedcont		= "Red de Control de Acceso";
51
  $R_loggedout		= "Su sesión se cierra";
52
  $R_user		= "Usuario";
53
  $R_password		= "Contraseña";
54
  $R_wait		= "Por favor, espere un momento ...";
55
  $R_onlinetime		= "Tiempo de conexión:";
56
  $R_remainingtime	= "Desconexión en:";
57
  $R_encrypted		= "La apertura debe usar conexión cifrada";
58
  $R_boutonO		= "Autenticación";
59
  $R_boutonF		= "Cerrar";
504 richard 60
  $R_loggedin_stringl1 = "Information System Security";
318 richard 61
  $R_loggedin_stringl2 = "El portal fue creado reglamentos para garantizar la trazabilidad, la rendición de cuentas y el no repudio de las conexiones.";
62
  $R_loggedin_stringl3 = "Su actividad en la red es registrada, de conformidad con la privacidad.";
63
  $R_loggedin_stringl4 = "Los datos registrados pueden ser capaces de ser operado por una autoridad judicial en el curso de una investigación.";
64
  $R_loggedin_stringl5 = "Estos datos se eliminan automáticamente después de un año.";
504 richard 65
  $R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
318 richard 66
  $R_loggedout_string = "Cerrar sesión hizo portal cautivo!";
67
  $R_reply_1 = "Your daily connexion time has been reached";
68
  $R_reply_2 = "Your monthly connexion time has been reached";
69
  $R_reply_3 = "You try to connect outside of your allowed timespan";
70
  $R_reply_4 = "your account expired";
71
  $R_reply_5 = "You have reached the maximum number of simultaneous logins";
72
  $R_online_time = "Tiempo en linea";
73
  $R_remaining_time = "Tiempo restante";
74
}
75
else if($Language == 'de'){
76
  $R_ChilliError	= "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
77
  $R_login		= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
78
  $R_logout		= "Beenden der Verbindung";
79
  $R_loginfailed	= "Authentifizierungsfehler Eigenverbrauch";
80
  $R_loggingin		= "Kennzeichnung auf dem Eigenverbrauch";
81
  $R_loggedcont		= "Network Access Control";
82
  $R_loggedout		= "Ihre Sitzung ist geschlossen";
83
  $R_user		= "Benutzer";
84
  $R_password		= "Passwort";
85
  $R_wait		= "Bitte warten Sie einen Moment ...";
86
  $R_onlinetime		= "Online-Zeit:";
87
  $R_remainingtime	= "Abmelden:";
88
  $R_encrypted		= "Die Öffnung muß der Anschluß Zahlen";
89
  $R_boutonO		= "Authentifizierung";
90
  $R_boutonF		= "Schließen";
504 richard 91
  $R_loggedin_stringl1 = "Information System Security";
318 richard 92
  $R_loggedin_stringl2 = "Dieses Portal wurde eingerichtet, um ordnungsgemäß die Rückverfolgbarkeit, der Zurechenbarkeit und der Nicht-Anerkennung der Verbindungen.";
93
  $R_loggedin_stringl3 = "Ihre Tätigkeit im Netzwerk registriert ist nach Schutz der Privatsphäre.";
94
  $R_loggedin_stringl4 = "Die gespeicherten Daten nicht pouront genutzt werden, dass von einer Justizbehörde im Rahmen einer Untersuchung.";
95
  $R_loggedin_stringl5 = "Diese Daten werden automatisch gelöscht nach einem Jahr.";
504 richard 96
  $R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
318 richard 97
  $R_loggedout_string = "Trennung des Portals erfolgt Gefangener!";
98
  $R_reply_1 = "Your daily connexion time has been reached";
99
  $R_reply_2 = "Your monthly connexion time has been reached";
100
  $R_reply_3 = "You try to connect outside of your allowed timespan";
101
  $R_reply_4 = "your account expired";
102
  $R_reply_5 = "You have reached the maximum number of simultaneous logins";
103
  $R_online_time = "Online-zeit";
104
  $R_remaining_time = "Restzeit";
105
 
106
}
107
else if($Language == 'nl'){
108
  $R_ChilliError	= "De authenticatie moet een succes worden via de captive portal dienst.";
109
  $R_login		= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
110
  $R_logout		= "Slotkoers verbinding";
111
  $R_loginfailed	= "Authenticatie mislukt";
112
  $R_loggingin		= "Identificatie van de captive-portaal";
113
  $R_loggedcont		= "Network Access Control";
114
  $R_loggedout		= "Uw sessie is gesloten";
115
  $R_user		= "Gebruiker";
116
  $R_password		= "Wachtwoord";
117
  $R_wait		= "Wacht een moment ...";
118
  $R_onlinetime		= "Sluit tijd:";
119
  $R_remainingtime	= "Verbreking in:";
120
  $R_encrypted		= "De opening moet gebruiken gecodeerde verbinding";
121
  $R_boutonO		= "Authenticatie";
122
  $R_boutonF		= "Sluiten";
504 richard 123
  $R_loggedin_stringl1 = "Information System Security";
318 richard 124
  $R_loggedin_stringl2 = "Het portaal werd opgericht verordeningen om de traceerbaarheid, verantwoordelijkheid en onloochenbaarheid van de verbindingen.";
125
  $R_loggedin_stringl3 = "Uw activiteit op het netwerk is geregistreerd in overeenstemming met de persoonlijke levenssfeer.";
126
  $R_loggedin_stringl4 = "De geregistreerde gegevens kunnen worden kunnen worden bediend door een rechterlijke instantie in de loop van een onderzoek.";
127
  $R_loggedin_stringl5 = "Deze gegevens worden automatisch verwijderd na een jaar.";
504 richard 128
  $R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
318 richard 129
  $R_loggedout_string = "Logout gemaakt intern portaal!";
130
  $R_reply_1 = "Your daily connexion time has been reached";
131
  $R_reply_2 = "Your monthly connexion time has been reached";
132
  $R_reply_3 = "You try to connect outside of your allowed timespan";
133
  $R_reply_4 = "your account expired";
134
  $R_reply_5 = "You have reached the maximum number of simultaneous logins";
135
  $R_online_time = "Online tijd";
136
  $R_remaining_time = "Reterende tijd";
137
}
138
else if($Language == 'fr'){
139
  $R_ChilliError	= "L'authentification doit &ecirc;tre r&eacute;ussie au travers du service du portail captif.";
140
  $R_login		= "Authentification r&eacute;ussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
141
  $R_logout		= "Fermeture de la session";
142
  $R_loginfailed	= "Echec d'authentification";
143
  $R_loggingin		= "Identification sur le portail captif";
144
  $R_loggedcont		= "Contr&ocirc;le d'acc&egrave;s au r&eacute;seau";
145
  $R_loggedout		= "Votre session est fermée";
146
  $R_user		= "Identifiant";
147
  $R_password		= "Mot de passe";
148
  $R_wait		= "Patientez un instant ...";
149
  $R_onlinetime		= "Temps de connexion:";
150
  $R_remainingtime	= "Deconnexion dans :";
151
  $R_encrypted		= "La connexion avec le portail doit &ecirc;tre chiffr&eacute;e";
152
  $R_boutonO		= "Authentification";
153
  $R_boutonF		= "Fermer";
504 richard 154
  $R_loggedin_stringl1 = "S&eacute;curit&eacute; des Syst&egrave;mes d'Information";
155
  $R_loggedin_stringl2 = "Ce contr&ocirc;le a &eacute;t&eacute; mis en place pour assurer r&eacute;glementairement la tra&ccedil;abilit&eacute;, l'imputabilit&eacute; et la non-r&eacute;pudiation des connexions.";
318 richard 156
  $R_loggedin_stringl3 = "Votre activit&eacute; sur le r&eacute;seau est enregistr&eacute;e conform&eacute;ment au respect de la vie priv&eacute;e.";
157
  $R_loggedin_stringl4 = "Les donn&eacute;es enregistr&eacute;es ne pourront &ecirc;tre exploit&eacute;es que par une autorit&eacute judiciaire dans le cadre d'une enqu&ecirc;te.";
158
  $R_loggedin_stringl5 = "Ces donn&eacute;es seront automatiquement supprim&eacute;es au bout d'un an.";
504 richard 159
  $R_loggedin_stringl6 = "Cliquez <a href=$alcasarpath>ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
318 richard 160
  $R_loggedout_string = "D&eacute;connexion du portail captif effectu&eacute;e !";
161
  $R_reply_1 = "Votre dur&eacute;e de connexion journali&egrave;re a &eacute;t&eacute; atteinte";
162
  $R_reply_2 = "Votre dur&eacute;e de connexion mensuelle a &eacute;t&eacute; atteinte";
163
  $R_reply_3 = "Vous tentez de vous connecter en dehors de votre p&eacute;riode autoris&eacute;e";
164
  $R_reply_4 = "Votre compte a expir&eacute";
399 franck 165
  $R_reply_5 = "Vous avez atteint le nombre maximum de connexions simultan&eacute;es";
318 richard 166
  $R_online_time = "Temps de connexion";
167
  $R_remaining_time = "Temps restant";
168
}
169
else{
170
  $R_ChilliError	= "The authentication must be successful through the captive portal service.";
171
  $R_login		= "Successful authentication.<HR>Closing this window interrupts your session";
172
  $R_logout		= "Closing connection";
173
  $R_loginfailed	= "Authentication Failed";
174
  $R_loggingin		= "Identification on the captive portal";
175
  $R_loggedcont		= "Network Access Control";
176
  $R_loggedout		= "Your session is closed";
177
  $R_user		= "User";
178
  $R_password		= "Password";
179
  $R_wait		= "Please wait a moment ...";
180
  $R_onlinetime		= "Connect time:";
181
  $R_remainingtime	= "Disconnection in:";
182
  $R_encrypted		= "The opening must use encrypted connection";
183
  $R_boutonO		= "Authentication";
184
  $R_boutonF		= "Close";
504 richard 185
  $R_loggedin_stringl1 = "Information System Security";
186
  $R_loggedin_stringl2 = "That control was set up regulations to ensure traceability, accountability and non-repudiation of connections.";
318 richard 187
  $R_loggedin_stringl3 = "Your activity on the network is registered in accordance with privacy.";
188
  $R_loggedin_stringl4 = "The recorded data can be able to be operated by a judicial authority in the course of an investigation.";
189
  $R_loggedin_stringl5 = "These data will be automatically deleted after one year.";
504 richard 190
  $R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
318 richard 191
  $R_loggedout_string = "Logout made captive portal!";
192
  $R_reply_1 = "Your daily connexion time has been reached";
193
  $R_reply_2 = "Your monthly connexion time has been reached";
194
  $R_reply_3 = "You try to connect outside of your allowed timespan";
195
  $R_reply_4 = "your account expired";
196
  $R_reply_5 = "You have reached the maximum number of simultaneous logins";
197
  $R_online_time = "Online time";
198
  $R_remaining_time = "Remaining time";
199
}
200
 
201
# Make sure that the form parameters are clean
202
#$OK_CHARS='-a-zA-Z0-9_.@&=%!';
203
#$_ = $input = <STDIN>;
204
#s/[^$OK_CHARS]/_/go;
205
#$input = $_;
206
 
207
# Make sure that the get query parameters are clean
208
#$OK_CHARS='-a-zA-Z0-9_.@&=%!';
209
#$_ = $query=$ENV{QUERY_STRING};
210
#s/[^$OK_CHARS]/_/go;
211
#$query = $_;
212
 
213
# If https not use, tell it's wrong
214
if (!($_SERVER['HTTPS'] == 'on')) {
215
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
216
<html>
217
<head>
218
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
219
  <title>$R_loggedcont</title>
220
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
221
  <meta http-equiv=\"Pragma\" content=\"no-cache\">
222
</head>
223
<body bgColor = 'white'>
224
  <h1 style=\"text-align: center;\">$R_loginfailed</h1>
225
  <center>$R_encrypted</center>
226
</body>
227
</html>";
228
    exit(0);
229
}
230
 
231
# Read form parameters which we care about
232
if (isset($_POST['UserName'])){	$username	= $_POST['UserName'];} else {$username="";}
233
if (isset($_POST['Password'])){	$password	= $_POST['Password'];} else {$password="";}
234
if (isset($_POST['challenge'])){$challenge	= $_POST['challenge'];} else {$challenge="";}
235
if (isset($_POST['button'])){	$button		= $_POST['button'];} else { $button="";}
236
if (isset($_POST['logout'])){	$logout		= $_POST['logout'];} else {$logout="";}
237
if (isset($_POST['prelogin'])){	$prelogin	= $_POST['prelogin'];} else {$prelogin="";}
238
if (isset($_POST['res'])){	$res		= $_POST['res'];} else {$res="";}
239
if (isset($_POST['uamip'])){	$uamip		= $_POST['uamip'];} else {$uamip="";}
240
if (isset($_POST['uamport'])){	$uamport	= $_POST['uamport'];} else {$uamport="";}
241
if (isset($_POST['userurl'])){	$userurl	= $_POST['userurl'];} else {$userurl="";}
242
if (isset($_POST['timeleft'])){	$timeleft	= $_POST['timeleft'];} else {$timeleft="";}
243
if (isset($_POST['redirurl'])){	$redirurl	= $_POST['redirurl'];} else {$redirurl="";}
244
 
245
# Read query parameters which we care about
246
if (isset($_GET['res']))	$res		= $_GET['res'];
247
if (isset($_GET['challenge']))	$challenge	= $_GET['challenge'];
248
if (isset($_GET['uamip']))	$uamip		= $_GET['uamip'];
249
if (isset($_GET['uamport']))	$uamport	= $_GET['uamport'];
250
if (isset($_GET['reply'])){	$reply		= $_GET['reply'];} else {$reply="";}
251
if (isset($_GET['userurl']))	$userurl	= $_GET['userurl'];
252
if (isset($_GET['timeleft']))	$timeleft	= $_GET['timeleft'];
253
if (isset($_GET['redirurl']))	$redirurl	= $_GET['redirurl'];
254
 
255
# translation of radius replies
256
if (isset($reply)){
257
	switch(trim ($reply)) {
258
  case 'Your maximum daily usage time has been reached' : $reply = $R_reply_1 ; break;
259
  case 'Your maximum monthly usage time has been reached' : $reply = $R_reply_2 ; break;
260
  case 'You are calling outside your allowed timespan' : $reply = $R_reply_3 ; break;
261
  case 'Password Has Expired' : $reply =  $R_reply_4 ; break;
262
  case 'You are already logged in - access denied' : $reply = $R_reply_5 ; break;
263
  }}
264
 
265
# If attempt to login
266
if ("$button" == "$R_boutonO") {
267
  $hexchal = pack ("H32", $challenge);
268
  $newchal = pack ("H*", md5($hexchal . $uamsecret));
269
  $response = md5("\0" . $password . $newchal);
270
  $newpwd = pack("a32", $password);
271
  $pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal)));
272
  echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
273
<html>
274
<head>
275
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
276
  <title>$R_loggingin</title>
277
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
278
  <meta http-equiv=\"Pragma\" content=\"no-cache\">
279
  <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl\">
280
  </head>
281
<body bgColor = 'white'>
282
<h1 style=\"text-align: center;\">$R_loggingin</h1>
283
  <center>
284
    $R_wait
285
  </center>
286
</body>
287
</html>";
288
    exit(0);
289
}
290
 
291
switch($res) {
292
  case 'success':     $result =  1; break; // If login successful
293
  case 'failed':      $result =  2; break; // If login failed
294
  case 'logoff':      $result =  3; break; // If logout successful
295
  case 'already':     $result =  4; break; // If tried to login while already logged in
296
  case 'notyet':      $result =  5; break; // If not logged in yet
297
  case 'smartclient': $result =  6; break; // If login from smart client
298
  case 'popup1':      $result = 11; break; // If requested a logging in pop up window
299
  case 'popup2':      $result = 12; break; // If requested a success pop up window
300
  case 'popup3':      $result = 13; break; // If requested a logout pop up window
301
  default: $result = 0; // Default: It was not a form request
302
}
303
 
304
# Otherwise it was not a form request
305
# Send out an error message
484 stephane 306
if ($result == 0) {	//erreur
318 richard 307
    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
308
<html>
309
<head>
310
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
311
  <title>$R_loginfailed</title>
312
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
313
  <meta http-equiv=\"Pragma\" content=\"no-cache\">
314
</head>
315
<body bgColor = 'white'>
316
  <h1 style=\"text-align: center;\">$R_loginfailed</h1>
317
  <center>
318
    $R_ChilliError
319
  </center>
320
</body>
321
</html>";
322
    exit(0);
323
}
324
 
325
# Generate the output
326
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
327
<html>
328
<head>
329
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
330
  <title>$R_loggingin</title>
331
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
332
  <meta http-equiv=\"Pragma\" content=\"no-cache\">
484 stephane 333
  <script type=\"text/javascript\" language=\"JavaScript\">
334
    var blur = 0; // not un use
335
	var mytimeleft = 0; // not un use
336
	alcasar_popup = null;
337
 
318 richard 338
    function popUp(URL) {
484 stephane 339
      if (self.name != \"alcasar_popup\") {
340
        alcasar_popup = window.open(URL, 'alcasar_popup', 'width=500,height=250,directories=no,resizable=no,scrollbars=yes,location=no,toolbar=no,statusbar=no,menubar=no');
318 richard 341
      }
342
    }
343
 
484 stephane 344
    function doOnLoad(result, userurl, redirurl, timeleft) {    
345
      if (timeleft) { // not in use
318 richard 346
        mytimeleft = timeleft;
347
      }
484 stephane 348
      if (result == 1) {	//success
349
	      //window.location = userurl;
350
		  if (alcasar_popup != null) alcasar_popup.focus();
351
		  ";
352
if ($adminurl) { echo "window.location = \"$adminurl\";";}
353
else if	($redirurl) { echo "window.location = \"$redirurl\";";}
354
else if ($userurl) { echo "window.location = \"$userurl\";";}
355
else echo "window.home();";
318 richard 356
        echo "
357
      }
484 stephane 358
      if ((result == 2) || (result == 3) || result == 5) { //failed or logoff or notyet
359
		if (alcasar_popup != null) alcasar_popup.close();
360
		document.form1.UserName.focus();
318 richard 361
      }
362
    }
363
  </script>
354 richard 364
<link rel=\"stylesheet\" href=\"/css/style_intercept.css\" type=\"text/css\">
318 richard 365
</head>
484 stephane 366
<body onLoad=\"javascript:doOnLoad($result,'$userurl','$redirurl','$timeleft')\">
354 richard 367
  <center>";
368
#Modifications par stephane ERARD le 30 11 2010
484 stephane 369
#Modifications par steweb57 le 06 02 2011
370
if ($debug){
318 richard 371
# begin debugging
484 stephane 372
	print "<center>THE INPUT by GET method (for debugging):<br>";
373
	foreach ($_GET as $key => $value) {
374
		print $key . "=" . $value . "<br>";
375
	}
376
	print "<br>";
377
	print "<center>THE INPUT by POST method (for debugging):<br>";
378
	foreach ($_POST as $key => $value) {
379
		print $key . "=" . $value . "<br>";
380
	}
381
	print "<br></center>";
318 richard 382
# end debugging
484 stephane 383
}
318 richard 384
 
484 stephane 385
if ($result == 2) { //failed
318 richard 386
    echo "
354 richard 387
	<DIV id=\"logon\">
388
	<h2>$R_loginfailed</h2>";
318 richard 389
    if ($reply) {
390
#traitement du reply ...
391
    echo "<center> $reply </BR></BR></center>";
392
    }
393
}
394
 
484 stephane 395
if ($result == 3 || $result == 5) { //logoff or notyet
318 richard 396
    echo "
354 richard 397
	<DIV id=\"logon\">
398
	<h1>$organisme</h1>
399
	<h2>$R_loggedcont</h2>";
318 richard 400
}
484 stephane 401
 
402
if ($result == 2 || $result == 3 || $result == 5) { //failed or logoff or notyet
318 richard 403
  echo "
354 richard 404
	<IMG id=\"logo-alcasar\" src=\"/images/logo-alcasar.png\">
405
	<form name=\"form1\" method=\"post\" action=\"$loginpath\">
406
	<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
407
	<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
408
	<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
409
	<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
410
		<TABLE id=\"boite-logon\">
411
			<TR>
504 richard 412
				<TD width=\"20%\" rowspan=\"3\"><IMG id=\"logo-organ\" src=\"/images/organisme.png\"></TD>
354 richard 413
				<TD width=\"30%\" align=\"right\">$R_user</TD>
414
				<TD width=\"50%\" align=\"left\"><INPUT type=\"text\" maxLength=\"32\" name=\"UserName\"></TD>
415
			</TR>
416
			<TR>
417
				<TD align=\"right\">$R_password</TD>
418
				<TD align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\"></TD>
419
			</TR>
420
			<TR>
484 stephane 421
				<TD height=\"23\" colSpan=\"2\" align=\"center\"><INPUT value=\"$R_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></TD>
354 richard 422
			</TR>
423
		</TABLE>
424
		<TABLE id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">
425
			<TR>
504 richard 426
				<TD align=\"center\"><FONT color=\"red\"><B>$R_loggedin_stringl1</B></FONT></TD>
354 richard 427
			</TR>
428
			<TR>
429
				<TD align=\"left\">
430
					<UL>
431
						<LI>$R_loggedin_stringl2</LI>
432
						<LI>$R_loggedin_stringl4</LI>
433
						<LI>$R_loggedin_stringl3</LI> 
434
						<LI>$R_loggedin_stringl5</LI>
504 richard 435
						<LI>$R_loggedin_stringl6</LI>
354 richard 436
					</UL>
437
				</TD>
438
			</TR>
439
		</TABLE>
484 stephane 440
 
318 richard 441
  </center>
442
  </form>
484 stephane 443
  </DIV>
318 richard 444
</body>
445
</html>";
446
}
354 richard 447
#Fin des modifications
484 stephane 448
if ($result == 1) { //sucess
318 richard 449
  echo "
354 richard 450
  <table id=\"auth_reussi\">
318 richard 451
  <tr>
452
  <td>
340 richard 453
  <img height=\"150\" src=\"/images/logo-alcasar.png\">
318 richard 454
  </td>
455
  <td>
354 richard 456
  <p class=\"text_auth\">$R_login</p>
318 richard 457
  </td>
484 stephane 458
  </tr>
459
  <tr>
460
  <td></td>
461
  <td>";
318 richard 462
  if ($reply) { 
463
 ## traitement reply
484 stephane 464
     echo "$reply</br></br>";
318 richard 465
  }
466
  echo "
484 stephane 467
  <a href=\"http://$uamip:$uamport/logoff\">$R_logout</a>
318 richard 468
  </td>
469
  </tr>
470
  </table>
484 stephane 471
</body>
472
</html>";
318 richard 473
}
484 stephane 474
if ($result == 11) { //popup 1 (login)
318 richard 475
  echo "
354 richard 476
  <h2 style=\"text-align: center;\">$R_loggingin</h2>
318 richard 477
  <center>$R_wait</center>
478
</body>
479
</html>";
480
}
481
exit(0);
482
?>