2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $page_security = 'SA_SOFTWAREUPGRADE';
13 $path_to_root = "../..";
14 include_once($path_to_root . "/includes/session.inc");
15 include_once($path_to_root . "/includes/packages.inc");
17 page(_($help_context = "Log View"), true);
19 include_once($path_to_root . "/includes/ui.inc");
21 if (!isset($_GET['id']))
23 /*Script was not passed the correct parameters */
24 display_note(_("The script must be called with a valid company number."));
28 display_heading(sprintf(_("Upgrade log for company '%s'"), $_GET['id']));
33 $log = strtr(file_get_contents(VARLOG_PATH.'/upgrade.'.$_GET['id'].'.log'),
34 array('Fatal error' => 'Fatal error')); // prevent misinterpretation in output_handler
35 label_cells(null, nl2br(html_specials_encode($log)));