Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 2092 → Rev 2093

/web/acc/admin_log.php
0,0 → 1,72
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Admin Logs</TITLE>
<link rel="stylesheet" href="../css/bootstrap.min.css">
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<style>
 
body {
background-color: #EFEFEF;
}
 
</style>
</HEAD>
<body>
 
<?php
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2));
}
 
if($Language == 'fr')
{
$l_title_amdin_log="Connexion à l'ALCASAR Control Center (ACC)";
}
else
{
$l_title_amdin_log="Connection to ALCASAR Control Center (ACC)";
}
 
echo '<center><h3>';
echo "$l_title_amdin_log";
echo '</h3></center><div class="container"><table class="table table-striped">';
echo "<thead>";
echo "<tr>";
echo "<th>Date</th>";
echo "<th>User</th>";
echo "<th>IP address</th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
 
$fichier='admin_log.txt';
$pointeur=fopen($fichier,"r");
if ($pointeur){
while (!feof($pointeur)){
$ligne=fgets($pointeur);
$infos=explode("|||",$ligne);
echo "<tr>";
echo "<td>$infos[0]</td>";
echo "<td>$infos[1]</td>";
echo "<td>$infos[2]</td>";
echo "</tr>";
}
}
else
{
echo '<tr><center>Empty</center></tr>';
}
fclose($pointeur);
echo '</tbody></table></div>';
 
 
 
?>
 
</body>
</HTML>
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/web/acc/haut.php
23,6 → 23,16
if (($fp=fopen($name_fic,"w")) == false) exit;
fputs($fp, "$nb\n");
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);
 
?>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
33,3 → 43,4
</TABLE>
</BODY>
</HTML>
 
/web/acc/menu.php
200,13 → 200,16
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td valign="middle" align="center">
<a href="admin_log.php" target="REXY2" >
<? // Access counter
$name_fic="compteur.txt";
if (($fp=fopen($name_fic,"r")) == false) exit;
$nb=fgets($fp,10);
fclose($fp);
printf("%d", $nb);
$name_fic="compteur.txt";
if (($fp=fopen($name_fic,"r")) == false) exit;
$nb=fgets($fp,10);
fclose($fp);
printf("%d", $nb);
?>
 
</a>
<br>depuis le 13/08/2013<br></center></td></tr>
</TABLE>
</td></tr>
215,3 → 218,4
</BODY>
</HTML>