Subversion Repositories ALCASAR

Rev

Rev 2182 | Rev 2488 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2182 Rev 2267
1
<?php
1
<?php
2
# $Id: haut.php 2182 2017-04-25 22:10:46Z tom.houdayer $
2
# $Id: haut.php 2267 2017-06-04 09:28:36Z richard $
3
 
-
 
4
// Access counter incrementation
-
 
5
$counterFilename = 'compteur.txt';
-
 
6
$fp = fopen($counterFilename, 'r+');
-
 
7
if ($fp === false) {
-
 
8
	exit();
-
 
9
}
-
 
10
$nbAccess = intval(fgets($fp, 10));
-
 
11
$nbAccess++;
-
 
12
rewind($fp);
-
 
13
fputs($fp, $nbAccess.PHP_EOL); 
-
 
14
fclose($fp);
-
 
15
 
3
 
16
// Inform admin log about his last connection
4
// Inform admin log about his last connection
17
$admin_log = 'admin_log.txt';
5
$admin_log = '/var/Save/security/acc_access.log';
18
$user_htdigest = $_SERVER['PHP_AUTH_USER'];
6
$user_htdigest = $_SERVER['PHP_AUTH_USER'];
19
$date_system = date('d/m/Y H:i:s');
7
$date_system = date('d/m/Y H:i:s');
20
$user_ip = $_SERVER['REMOTE_ADDR'];
8
$user_ip = $_SERVER['REMOTE_ADDR'];
-
 
9
$user_agent = $_SERVER['HTTP_USER_AGENT'];
21
$text = $date_system . '|||' . $user_htdigest . '|||' . $user_ip;
10
$text = $date_system . '|' . $user_htdigest . '|' . $user_ip . '|' . $user_agent;
22
file_put_contents($admin_log, $text.PHP_EOL, FILE_APPEND);
11
file_put_contents($admin_log, $text.PHP_EOL, FILE_APPEND);
23
 
-
 
24
?>
12
?>
25
<!doctype html>
13
<!doctype html>
26
<!-- Writen by Rexy -->
14
<!-- Writen by Rexy -->
27
<!-- ACC Top Window -->
15
<!-- ACC Top Window -->
28
<html>
16
<html>
29
<head>
17
<head>
30
	<meta charset="utf-8">
18
	<meta charset="utf-8">
31
	<title>Top</title>
19
	<title>Top</title>
32
	<script>
20
	<script>
33
	function ouvrir(page) {
21
	function ouvrir(page) {
34
		window.open(page, "portail", "alwaysRaised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480");
22
		window.open(page, "portail", "alwaysRaised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480");
35
	}
23
	}
36
	</script>
24
	</script>
37
	<link rel="stylesheet" type="text/css" href="/css/style.css">
25
	<link rel="stylesheet" type="text/css" href="/css/style.css">
38
</head>
26
</head>
39
<body>
27
<body>
40
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
28
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
41
		<tr>
29
		<tr>
42
			<td valign="top" align="left"><a href="javascript:ouvrir('about.htm')"><img height="80" border="0" src="/images/logo-alcasar.png"></a></td>
30
			<td valign="top" align="left"><a href="javascript:ouvrir('about.htm')"><img height="80" border="0" src="/images/logo-alcasar.png"></a></td>
43
			<td valign="top" align="center"><a href="http://www.alcasar.net" target="_new"><img height="80" border="0" src="/images/titre-alcasar.png"></a></td>
31
			<td valign="top" align="center"><a href="http://www.alcasar.net" target="_new"><img height="80" border="0" src="/images/titre-alcasar.png"></a></td>
44
			<td valign="top" align="right"><a href="admin/logo.php" target="REXY2"><img height="80" border="0" src="/images/organisme.png"></a></td>
32
			<td valign="top" align="right"><a href="admin/logo.php" target="REXY2"><img height="80" border="0" src="/images/organisme.png"></a></td>
45
		</tr>
33
		</tr>
46
	</table>
34
	</table>
47
</body>
35
</body>
48
</html>
36
</html>
49
 
37