Subversion Repositories ALCASAR

Rev

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

<?php
# $Id: haut.php 2182 2017-04-25 22:10:46Z tom.houdayer $

// Access counter incrementation
$counterFilename = 'compteur.txt';
$fp = fopen($counterFilename, 'r+');
if ($fp === false) {
        exit();
}
$nbAccess = intval(fgets($fp, 10));
$nbAccess++;
rewind($fp);
fputs($fp, $nbAccess.PHP_EOL); 
fclose($fp);

// Inform admin log about his last connection
$admin_log = 'admin_log.txt';
$user_htdigest = $_SERVER['PHP_AUTH_USER'];
$date_system = date('d/m/Y H:i:s');
$user_ip = $_SERVER['REMOTE_ADDR'];
$text = $date_system . '|||' . $user_htdigest . '|||' . $user_ip;
file_put_contents($admin_log, $text.PHP_EOL, FILE_APPEND);

?>
<!doctype html>
<!-- Writen by Rexy -->
<!-- ACC Top Window -->
<html>
<head>
        <meta charset="utf-8">
        <title>Top</title>
        <script>
        function ouvrir(page) {
                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");
        }
        </script>
        <link rel="stylesheet" type="text/css" href="/css/style.css">
</head>
<body>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                        <td valign="top" align="left"><a href="javascript:ouvrir('about.htm')"><img height="80" border="0" src="/images/logo-alcasar.png"></a></td>
                        <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>
                        <td valign="top" align="right"><a href="admin/logo.php" target="REXY2"><img height="80" border="0" src="/images/organisme.png"></a></td>
                </tr>
        </table>
</body>
</html>