Subversion Repositories ALCASAR

Rev

Rev 426 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 426 Rev 475
Line 8... Line 8...
8
# The contents of this file may be used under the terms of the GNU
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
9
# General Public License Version 2, provided that the above copyright
10
# notice and this permission notice is included in all copies or
10
# notice and this permission notice is included in all copies or
11
# substantial portions of the software.
11
# substantial portions of the software.
12
 
12
 
13
$organisme = "etrs-ssic";
13
$organisme = "steweb57";
14
# Redirects from CoovaChilli (chilli daemon) :
14
# Redirects from CoovaChilli (chilli daemon) :
15
# Response to login:
15
# Response to login:
16
  # success :	if login successful
16
  # success :	if login successful
17
  # failed :	if login failed
17
  # failed :	if login failed
18
  # logoff :	if logout successful
18
  # logoff :	if logout successful
Line 23... Line 23...
23
  # popup2 :	if requested a success pop up window
23
  # popup2 :	if requested a success pop up window
24
  # popup3 :	if requested a logout pop up window
24
  # popup3 :	if requested a logout pop up window
25
  # Default :	it was not a form request
25
  # Default :	it was not a form request
26
 
26
 
27
# Shared secret used to encrypt challenge with radius.
27
# Shared secret used to encrypt challenge with radius.
28
$uamsecret = "bZBMKhn2";
28
$uamsecret = "Mkb0pAEE";
29
 
29
 
30
# URL loaded after success authenticates (let blank for browser defaults)
30
# URL loaded after success authenticates (let blank for browser defaults)
31
$adminurl = "";
31
$adminurl = "";
32
 
32
 
33
# Our own path
33
# Our own path
34
$loginpath = $_SERVER['PHP_SELF'];
34
$loginpath = $_SERVER['PHP_SELF'];
-
 
35
$statuspath = "http://alcasar/status.php";
35
 
36
 
36
# Choice of language
37
# Choice of language
37
$Language = 'en';
38
$Language = 'en';
38
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
39
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
39
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
40
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
Line 363... Line 364...
363
      t = new Date();
364
      t = new Date();
364
      time = Math.round((t.getTime() - starttime.getTime())/1000);
365
      time = Math.round((t.getTime() - starttime.getTime())/1000);
365
      if (mytimeleft) {
366
      if (mytimeleft) {
366
        time = mytimeleft - time;
367
        time = mytimeleft - time;
367
        if (time <= 0) {
368
        if (time <= 0) {
368
          window.location = \"$loginpath?res=popup3&uamip=$uamip&uamport=$uamport\";
369
          window.location = \"$statuspath?res=popup3&uamip=$uamip&uamport=$uamport\";
369
        }
370
        }
370
      }
371
      }
371
      if (time < 0) time = 0;
372
      if (time < 0) time = 0;
372
      hours = (time - (time % 3600)) / 3600;
373
      hours = (time - (time % 3600)) / 3600;
373
      time = time - (hours * 3600);
374
      time = time - (hours * 3600);
Line 393... Line 394...
393
        chillispot_popup = window.open(URL, 'chillispot_popup', 'width=500,height=250,resizable,scrollbars=yes,location=yes,toolbar=no,statusbar=no,menubar=no');
394
        chillispot_popup = window.open(URL, 'chillispot_popup', 'width=500,height=250,resizable,scrollbars=yes,location=yes,toolbar=no,statusbar=no,menubar=no');
394
      }
395
      }
395
    }
396
    }
396
 
397
 
397
    function doOnLoad(result, URL, userurl, redirurl, timeleft) {
398
    function doOnLoad(result, URL, userurl, redirurl, timeleft) {
-
 
399
	URL = \"$statuspath\";	    
398
      if (timeleft) {
400
      if (timeleft) {
399
        mytimeleft = timeleft;
401
        mytimeleft = timeleft;
400
      }
402
      }
401
      if ((result == 1) && (self.name == \"chillispot_popup\")) {
403
      if ((result == 1) && (self.name == \"chillispot_popup\")) {
402
	      doTime();
404
	      doTime();
403
	      window.onbeforeunload = DecO($result);
405
	      window.onbeforeunload = DecO($result);
404
      }
406
      }
405
      if ((result == 1) && (self.name != \"chillispot_popup\")) {
407
      if ((result == 1) && (self.name != \"chillispot_popup\")) {
406
	popUp(URL);
408
	      // popUp(URL);
-
 
409
	      window.location = userurl;
407
      }
410
      }
408
      if ((result == 2) || result == 5) {
411
      if ((result == 2) || result == 5) {
409
        document.form1.UserName.focus()
412
        document.form1.UserName.focus()
410
      }
413
      }
411
      if ((result == 2) && (self.name != \"chillispot_popup\")) {
414
      if ((result == 2) && (self.name != \"chillispot_popup\")) {
Line 492... Line 495...
492
			<TR>
495
			<TR>
493
				<TD align=\"right\">$R_password</TD>
496
				<TD align=\"right\">$R_password</TD>
494
				<TD align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\"></TD>
497
				<TD align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\"></TD>
495
			</TR>
498
			</TR>
496
			<TR>
499
			<TR>
497
				<TD height=\"23\" colSpan=\"2\" align=\"middle\"><INPUT value=\"$R_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$loginpath?res=popup1&uamip=$uamip&uamport=$uamport')\"></TD>
500
				<TD height=\"23\" colSpan=\"2\" align=\"middle\"><INPUT value=\"$R_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></TD>
498
			</TR>
501
			</TR>
499
			<TR>
502
			<TR>
500
				<TD colSpan=2 align=middle><H6><A href=\"https://$uamip/pass/\">$R_passwordchg</A></H6></TD>
503
				<TD colSpan=2 align=middle><H6><A href=\"https://$uamip/pass/\">$R_passwordchg</A></H6></TD>
501
			</TR>
504
			</TR>
502
		</TABLE>
505
		</TABLE>