Subversion Repositories ALCASAR

Rev

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

Rev 2258 Rev 2283
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 2258 2017-05-29 17:37:17Z tom.houdayer $
2
# $Id: intercept.php 2283 2017-06-20 08:06:02Z tom.houdayer $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Modify by REXY & steweb57
6
# Modify by REXY & steweb57
7
# UI & css style by stephane ERARD
7
# UI & css style by stephane ERARD
Line 486... Line 486...
486
<head>
486
<head>
487
	<meta charset="utf-8">
487
	<meta charset="utf-8">
488
	<title><?= $l_loggingin ?></title>
488
	<title><?= $l_loggingin ?></title>
489
	<script type="text/javascript">
489
	<script type="text/javascript">
490
	function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
490
	function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
491
		if ((result === 1) || (result === 4)) {	//success or already
491
		if ((result === 1) || (result === 4)) {	// success or already
492
			var url;
492
			var url;
493
			if (adminurl !== '') {
493
			if (adminurl !== '') {
494
				url = adminurl;
494
				url = adminurl;
495
			} else if (redirurl !== '') {
495
			} else if (redirurl !== '') {
496
				url = redirurl;
496
				url = redirurl;
497
			} else if (userurl !== '') {
497
			} else if (userurl !== '') {
498
				url = userurl;
498
				url = userurl;
499
			}
499
			}
500
 
500
 
501
			if (typeof url !== 'undefined') {
501
			if (typeof url !== 'undefined') {
502
				var win = window.open(url, '_blank');
502
				var win = window.open('<?= $statuspath ?>', '_blank');
-
 
503
 
503
				if (win !== null) {
504
				if (win === null) { // Pop-up blocked
-
 
505
					window.location = '<?= $statuspath ?>';
-
 
506
				} else {
504
					win.focus();
507
					window.location = url;
505
				}
508
				}
-
 
509
			} else {
-
 
510
				window.location = '<?= $statuspath ?>';
506
			}
511
			}
507
 
-
 
508
			// Redirect to status page
-
 
509
			window.location = '<?= $statuspath ?>';
-
 
510
		}
512
		}
511
		if ((result === 2) || (result === 3) || result === 5) { //failed or logoff or notyet
513
		if ((result === 2) || (result === 3) || result === 5) { // failed or logoff or notyet
512
			document.form1.UserName.focus();
514
			document.form1.UserName.focus();
513
		}
515
		}
514
	}
516
	}
515
	</script>
517
	</script>
516
	<link rel="stylesheet" href="/css/style_intercept.css" type="text/css">
518
	<link rel="stylesheet" href="/css/style_intercept.css" type="text/css">
517
</head>
519
</head>
518
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
520
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
519
	<center>
521
	<center>
520
 
522
 
521
	<?php if ($result === 2 || $result === 3 || $result === 5): //failed or logoff or notyet ?>
523
	<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
522
	<div id="logon">
524
	<div id="logon">
523
		<h1><?= $organisme ?></h1>
525
		<h1><?= $organisme ?></h1>
524
		<h2><?= $l_loggedcont ?></h2>
526
		<h2><?= $l_loggedcont ?></h2>
525
		<?php if ($result === 2): //failed ?>
527
		<?php if ($result === 2): // failed ?>
526
			<h3><?= $l_loginfailed ?></h3>
528
			<h3><?= $l_loginfailed ?></h3>
527
			<?php if ($reply): //traitement du reply ... ?>
529
			<?php if ($reply): // traitement du reply ... ?>
528
				<center><?= $reply ?><br><br></center>
530
				<center><?= $reply ?><br><br></center>
529
			<?php endif; ?>
531
			<?php endif; ?>
530
		<?php endif;
532
		<?php endif;
531
		if ($userurl === 'http://logout/') $userurl = 'http://www.google.com'; // Avoid cyclic logout
533
		if ($userurl === 'http://logout/') $userurl = 'http://www.google.com'; // Avoid cyclic logout
532
		?>
534
		?>