Subversion Repositories ALCASAR

Rev

Rev 2134 | Rev 2267 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
958 franck 1
<?php
2
# $Id: haut.php 2182 2017-04-25 22:10:46Z tom.houdayer $
2182 tom.houday 3
 
958 franck 4
// Access counter incrementation
2182 tom.houday 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); 
589 richard 14
fclose($fp);
2093 raphael.pi 15
 
2182 tom.houday 16
// Inform admin log about his last connection
17
$admin_log = 'admin_log.txt';
18
$user_htdigest = $_SERVER['PHP_AUTH_USER'];
19
$date_system = date('d/m/Y H:i:s');
20
$user_ip = $_SERVER['REMOTE_ADDR'];
21
$text = $date_system . '|||' . $user_htdigest . '|||' . $user_ip;
2093 raphael.pi 22
file_put_contents($admin_log, $text.PHP_EOL, FILE_APPEND);
23
 
589 richard 24
?>
2182 tom.houday 25
<!doctype html>
26
<!-- Writen by Rexy -->
27
<!-- ACC Top Window -->
28
<html>
29
<head>
30
	<meta charset="utf-8">
31
	<title>Top</title>
32
	<script>
33
	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");
35
	}
36
	</script>
37
	<link rel="stylesheet" type="text/css" href="/css/style.css">
38
</head>
39
<body>
40
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
41
		<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>
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>
44
			<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>
46
	</table>
47
</body>
48
</html>