예제 #1
0
function system_message($msg)
{
    global $cfg;
    $theme_color = $cfg['USER_INITIAL_THEME_COLOR'];
    $tpl = new pTemplate();
    /*
        if (preg_match("/(admin|client|reseller)/", $_SERVER['PHP_SELF'], $matches)) {
    
            $tpl_path = "../".$cfg['ROOT_TEMPLATE_PATH'];
    
        } else {
    
            $tpl_path = $cfg['ROOT_TEMPLATE_PATH'];
    
        }
    */
    $tpl_path = "../" . $cfg['ROOT_TEMPLATE_PATH'] . $cfg['USER_INITIAL_THEME'];
    $tpl->define_dynamic('page', $tpl_path . '/system-message.tpl');
    $tpl->assign(array('TR_SYSTEM_MESSAGE_PAGE_TITLE' => 'VHCS Error', 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TR_ERROR_MESSAGE' => 'Error Message', 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'MESSAGE' => $msg));
    $tpl->parse('PAGE', 'page');
    $tpl->prnt();
    exit(0);
}
예제 #2
0
}
if (isset($_POST['uname'])) {
    if ($_POST['uname'] != "" and isset($_SESSION['image']) and isset($_POST['capcode'])) {
        $tpl = new pTemplate();
        $tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'] . '/lostpw_message.tpl');
        $tpl->assign(array('TR_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TC_BLUE_SELECTED' => $theme_color === 'blue' ? 'selected' : '', 'TC_GREEN_SELECTED' => $theme_color === 'green' ? 'selected' : '', 'TC_YELLOW_SELECTED' => $theme_color === 'yellow' ? 'selected' : '', 'TC_RED_SELECTED' => $theme_color === 'red' ? 'selected' : '', 'TR_THEME_COLOR' => tr('Theme color'), 'TR_BLUE' => tr('Blue'), 'TR_GREEN' => tr('Green'), 'TR_YELLOW' => tr('Yellow'), 'TR_RED' => tr('Red'), 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
        if ($_SESSION['image'] == $_POST['capcode']) {
            if (lostpw($_POST['uname'])) {
                $tpl->assign(array('TR_MESSAGE' => tr('The password was requested'), 'TR_LINK' => "<A CLASS=\"submenu\" href=\"index.php\">" . tr('Login') . "</A>"));
            } else {
                $tpl->assign(array('TR_MESSAGE' => tr('ERROR: Unknown user'), 'TR_LINK' => "<A CLASS=\"submenu\" href=\"index.php\">" . tr('Retry') . "</A>"));
            }
        } else {
            $tpl->assign(array('TR_MESSAGE' => tr('ERROR: Security code was not correct!'), 'TR_LINK' => "<A CLASS=\"submenu\" href=\"index.php\">" . tr('Retry') . "</A>"));
        }
        $tpl->parse('PAGE', 'page');
        $tpl->prnt();
        if (isset($cfg['DUMP_GUI_DEBUG'])) {
            dump_gui_debug();
        }
        exit(0);
    }
}
$tpl = new pTemplate();
$tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'] . '/lostpw.tpl');
$tpl->assign(array('TR_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TC_BLUE_SELECTED' => $theme_color === 'blue' ? 'selected' : '', 'TC_GREEN_SELECTED' => $theme_color === 'green' ? 'selected' : '', 'TC_YELLOW_SELECTED' => $theme_color === 'yellow' ? 'selected' : '', 'TC_RED_SELECTED' => $theme_color === 'red' ? 'selected' : '', 'TR_CAPCODE' => tr('Security code'), 'TR_IMGCAPCODE_DESCRIPTION' => tr('Imagecode description'), 'TR_IMGCAPCODE' => "<IMG SRC=\"include/imagecode.php\" BORDER=\"0\" NOSAVE ALT=\"\">", 'TR_USERNAME' => tr('Username'), 'TR_THEME_COLOR' => tr('Theme color'), 'TR_BLUE' => tr('Blue'), 'TR_GREEN' => tr('Green'), 'TR_YELLOW' => tr('Yellow'), 'TR_RED' => tr('Red'), 'TR_SEND' => tr('Request password'), 'TR_BACK' => tr('Back'), 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}