Esempio n. 1
0
$tpl->define_dynamic('logged_from', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
//
// common page data.
//
$domain = $_SESSION['user_logged'];
$domain = "http://www." . $domain;
$tpl->assign(array('TR_CLIENT_ERROR_PAGE_TITLE' => tr('VHCS - Client/Manage Error Custom Pages'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'DOMAIN' => $domain));
//
// dynamic page data.
//
update_error_page($sql, $_SESSION['user_id']);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_ERROR_401' => tr('Error 401 (unauthorized)'), 'TR_ERROR_403' => tr('Error 403 (forbidden)'), 'TR_ERROR_404' => tr('Error 404 (not found)'), 'TR_ERROR_500' => tr('Error 500 (internal server error)'), 'TR_ERROR_PAGES' => tr('Error pages'), 'TR_EDIT' => tr('Edit'), 'TR_VIEW' => tr('View')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
Esempio n. 2
0
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @link 		http://www.easyscp.net
 * @author 		EasySCP Team
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'client/error_pages.tpl';
// common page data.
$domain = $_SESSION['user_logged'];
$domain = "http://www." . $domain;
// dynamic page data.
update_error_page($sql);
// static page messages.
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Manage Error Custom Pages'), 'DOMAIN' => $domain, 'TR_ERROR_401' => tr('Error 401 (unauthorised)'), 'TR_ERROR_403' => tr('Error 403 (forbidden)'), 'TR_ERROR_404' => tr('Error 404 (not found)'), 'TR_ERROR_500' => tr('Error 500 (internal server error)'), 'TR_ERROR_503' => tr('Error 503 (service unavailable)'), 'TR_ERROR_PAGES' => tr('Error pages'), 'TR_EDIT' => tr('Edit'), 'TR_VIEW' => tr('View')));
gen_client_mainmenu($tpl, 'client/main_menu_webtools.tpl');
gen_client_menu($tpl, 'client/menu_webtools.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
}
$tpl->display($template);
unset_messages();
// page functions.
function write_error_page($sql, $eid)
{