exit;
}
- function handler_sqlerror(&$page, $clear = null) {
+ function handler_sqlerror(&$page) {
global $globals;
+ $page->coreTpl('sql_errors.tpl');
$file = @fopen($globals->spoolroot . '/spool/tmp/query_errors', 'r');
if ($file !== false) {
- echo '<html><body>';
- fpassthru($file);
+ $page->assign('errors', fpassthru($file));
fclose($file);
- echo '</html></body>';
}
- if ($clear == 'clear') {
+ if (Post::has('clear')) {
@unlink($globals->spoolroot . '/spool/tmp/query_errors');
+ $page->trigSuccess("Erreurs MySQL effacées.");
}
- exit;
}
}
--- /dev/null
+{**************************************************************************}\r
+{* *}\r
+{* Copyright (C) 2003-2009 Polytechnique.org *}\r
+{* http://opensource.polytechnique.org/ *}\r
+{* *}\r
+{* This program is free software; you can redistribute it and/or modify *}\r
+{* it under the terms of the GNU General Public License as published by *}\r
+{* the Free Software Foundation; either version 2 of the License, or *}\r
+{* (at your option) any later version. *}\r
+{* *}\r
+{* This program is distributed in the hope that it will be useful, *}\r
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}\r
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}\r
+{* GNU General Public License for more details. *}\r
+{* *}\r
+{* You should have received a copy of the GNU General Public License *}\r
+{* along with this program; if not, write to the Free Software *}\r
+{* Foundation, Inc., *}\r
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}\r
+{* *}\r
+{**************************************************************************}\r
+\r
+<h1>Erreurs MySQL</h2>\r
+<p>\r
+ {if $errors}\r
+ {$errors}\r
+ {else}\r
+ Il n'y pas d'erreurs actuellement recencées.\r
+ {/if}\r
+</p>\r
+<form action="sql_errors" method="post">\r
+ <div>\r
+ <input type="submit" name="clear" value="Effacer les erreurs" />\r
+ </div>\r
+</form>\r
+\r
+\r
+{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}\r