root/trunk/gui/include/system-message.php

Revision 1327, 1.9 kB (checked in by rats, 4 months ago)

* Fixed: --scan-knownbad-files and --check-deleted are no longer supported by rkhunter
* Fixed #1471: chkrootkit should be in lenny / hardy
* Updated Chinese (simplified)
* Updated German
* Fixed #1475: typo on installation (ispcp-setup)
* Fixed: default user for rkhunter.log

Line 
1 <?php
2 /**
3  * ispCP ω (OMEGA) a Virtual Hosting Control System
4  *
5  * @copyright     2001-2006 by moleSoftware GmbH
6  * @copyright     2006-2008 by ispCP | http://isp-control.net
7  * @version     SVN: $Id$
8  * @link         http://isp-control.net
9  * @author         ispCP Team
10  *
11  * @license
12  *   This program is free software; you can redistribute it and/or modify it under
13  *   the terms of the MPL General Public License as published by the Free Software
14  *   Foundation; either version 1.1 of the License, or (at your option) any later
15  *   version.
16  *   You should have received a copy of the MPL Mozilla Public License along with
17  *   this program; if not, write to the Open Source Initiative (OSI)
18  *   http://opensource.org | osi@opensource.org
19  */
20
21 function system_message($msg, $backButtonDestination = "") {
22     if (isset($_SESSION['user_theme'])) {
23         $theme_color = $_SESSION['user_theme'];
24     } else {
25         $theme_color = Config::get('USER_INITIAL_THEME');
26     }
27
28     if (empty($backButtonDestination)) {
29         $backButtonDestination = "javascript:history.go(-1)";
30     }
31     
32     $tpl = new pTemplate();
33
34     // If we are on the login page, path will be like this
35     $template = Config::get('LOGIN_TEMPLATE_PATH') . '/system-message.tpl';
36
37     if (!is_file($template)) {
38         // But if we're inside the panel it will be like this
39         $template = '../' . Config::get('LOGIN_TEMPLATE_PATH') . '/system-message.tpl';
40     }
41     
42     if (!is_file($template)) {
43         // And if we don't find the template, we'll just die displaying error message
44         die($msg);
45     }
46     
47     $tpl->define('page', $template);
48     $tpl->assign(array(
49         'TR_SYSTEM_MESSAGE_PAGE_TITLE'    => tr('ispCP Error'),
50         'THEME_COLOR_PATH'                => "/themes/$theme_color",
51         'THEME_CHARSET'                    => tr('encoding'),
52         'TR_BACK'                        => tr('Back'),
53         'TR_ERROR_MESSAGE'                => tr('Error Message'),
54         'MESSAGE'                        => $msg,
55         'BACKBUTTONDESTINATION'            => $backButtonDestination
56     ));
57
58     $tpl->parse('PAGE', 'page');
59     $tpl->prnt();
60
61     die();
62 }
63 ?>
Note: See TracBrowser for help on using the browser.