<?
/*
Copyright (C)2004-2007 Matthieu Perez - hide@address.com
This file is part of PhPress.
PhPress is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PhPress is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PhPress. If not, see <http://www.gnu.org/licenses/>.
*/
//popup affichant l'historique de la numérisation
session_start();
// constantes
require 'program/common/constantes.php' ;
require LANG_PATH . $lang ."/msg.php";
require 'program/html/white.css';
// chemin du fichier htm contenant l'historique
$scan_history="users/$login/scan_history.htm";
// si on vient d'appuyer sur "effacer" :
if($popup_history==="clear")
{
if(file_exists($scan_history))
{
//rename("$scan_history", "users/$user/old_scan_history.htm");
unlink($scan_history);
}
//$popup_history='';
SetCookie("scan_msg", MSG_SCAN_HIST_CLEARED);
header("location:popup_info.php");
}
// sinon on affiche le bouton effacer et l'historique
else
{
// rafraîchissement toutes les x secondes
print '<META HTTP-EQUIV="refresh" CONTENT="2" >';
// titre de la page
print '<title>' . MSG_NAME_POPUP_HIST . '</title>';
// bouton pour effacer l'historique
print '
<form action="popup_info.php" method="POST">
<input type="hidden" name="popup_history" value="clear">
<input type="submit" value="' . TXT_CLEAR . '">
<hr>
</form>';
// affichage de l'historique
if(file_exists($scan_history))
{
$scan_history_html=file_get_contents("users/$login/scan_history.htm");
print $scan_history_html;
}
else
{
echo MSG_SCAN_HIST_EMPTY;
}
}
?>