Example #1
0
function lpanel_main()
{
    global $gbl, $login, $ghtml;
    initProgram();
    initLanguage();
    initLanguageCharset();
    $gbl->__navigmenu = null;
    $gbl->__navig = null;
    $skincolor = $login->getSkinColor();
    // This should be called only in display.php, and not anywhere else. It doesn't matter anyway, since both lpanel.php, AND header.php never allows any modification to be carried out. Also, the display.php automatically deletes the login info, so if you click on any link on the header or the lpanel, you will automatically logged out.
    //check_if_disabled_and_exit();
    $imgbordermain = "{$login->getSkinDir()}/top_line_medium.gif";
    if ($gbl->isOn('show_help')) {
        $background = "{$login->getSkinDir()}/top_line_dark.gif";
        $border = null;
    } else {
        $background = null;
    }
    $ghtml->print_include_jscript('left_panel');
    print "<body topmargin=0 leftmargin=0 style='background-color:#fafafa'>";
    //$ghtml->lpanel_beginning();
    try {
        //$ghtml->xp_panel($login);
        //print_ext_tree($login);
        $ghtml->tab_vheight();
    } catch (exception $e) {
        print "The Resource List could not gathered....{$e->getMessage()}<br> \n";
    }
}
Example #2
0
function header_main()
{
    global $gbl, $sgbl, $login, $ghtml;
    initProgram();
    initLanguage();
    initLanguageCharset();
    // Load default skin or feather skin
    if ($login->isDefaultSkin()) {
        include_once "lib/default_header.php";
        CreateDefaultHeaderMenu();
    } else {
        print_header();
    }
}
Example #3
0
 static function loginAndCheckExpired()
 {
     global $ui, $config, $plist, $message, $smarty;
     /* Remove all locks of this user */
     del_user_locks($ui->dn);
     /* Save userinfo and plugin structure */
     session::global_set('ui', $ui);
     /* User might have its own language, re-run initLanguage */
     initLanguage();
     /* Save config to session. */
     session::global_set('config', $config);
     /* We need a fully loaded plist and config to test account expiration */
     session::global_un_set('plist');
     $plist = load_plist();
     /* Check account expiration */
     if ($config->get_cfg_value('handleExpiredAccounts') == 'TRUE') {
         $expired = $ui->expired_status();
         if ($expired == POSIX_ACCOUNT_EXPIRED) {
             new log('security', 'login', '', array(), 'Account for user "' . self::$username . '" has expired');
             $message = _('Account locked. Please contact your system administrator!');
             $smarty->assign('nextfield', 'password');
             return FALSE;
         }
     }
     return TRUE;
 }
Example #4
0
<?php

ob_start();
initProgram();
initLanguage();
check_if_disabled_and_exit();
$gbl->__inside_ajax = true;
// We need to convert the tree format to frm_o_o.
if ($ghtml->frm_action === 'tree') {
    convert_tree_to_frm_o();
}
createPrincipleObject();
$cgi_action = "__ajax_desc_{$ghtml->frm_action}";
//sleep(6);
$ret = $cgi_action();
while (@ob_end_clean()) {
}
print json_encode($ret);
flush();
function convert_tree_to_frm_o()
{
    global $gbl, $sgbl, $login, $ghtml;
    $cid = $ghtml->node;
    if (!csa($cid, "&")) {
        return null;
    }
    $cid = trim($cid, "/&");
    $dlist = explode("&", $cid);
    $i = 0;
    $ghtml->__title_function = false;
    $ghtml->__resource_class = false;
Example #5
0
function display_init()
{
    global $gbl, $sgbl, $login, $ghtml;
    initProgram();
    initLanguage();
    if ($sgbl->is_this_slave()) {
        print "This is a Slave Server. You control it at the Master Server.\n";
        exit;
    }
    // The only thing that gets modified when the dbaction is not a modify action, is the ssession table. Other tables should get modified only inside non-form actions.
    if (isModifyAction() && isUpdating()) {
        $ghtml->print_redirect_back('system_is_updating_itself', '');
        exit;
    }
    try {
        do_display_init();
        main_system_lock();
        print_navigation($gbl->__navig);
        if (if_demo()) {
            //$url = $ghtml->get_get_from_current_post(null);
            //log_clicks($url);
        }
        print_warning();
        password_contact_check();
    } catch (Exception $e) {
        log_log("redirect_error", "exception");
        $gbl->setSessionV('__tmp_redirect_var', $ghtml->__http_vars);
        $gbl->c_session->write();
        if (is_array($e->variable)) {
            $evlist = implode(",", $e->variable);
        } else {
            $evlist = $e->variable;
        }
        $ghtml->print_redirect_back($e->getMessage(), $evlist, $e->value);
        exit;
    }
    //license_check();
    if ($ghtml->frm_filter) {
        $filtername = $gbl->__c_object->getFilterVariableForThis($ghtml->frm_o_cname);
        $list[$filtername] = $ghtml->frm_filter;
        $login->setupHpFilter($list);
        $login->setUpdateSubaction();
    }
    if ($ghtml->frm_hpfilter) {
        //dprintr($ghtml->frm_hpfilter);
        $login->setupHpFilter($ghtml->frm_hpfilter);
        $login->setUpdateSubaction();
    }
}
Example #6
0
/* Check for compile directory */
if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))) {
    msg_dialog::display(_("Smarty"), sprintf(_("Directory '%s' specified as compile directory is not accessible!"), $smarty->compile_dir), FATAL_ERROR_DIALOG);
    exit;
}
/* Get posted language */
if (isset($_POST['lang_selected']) && $_POST['lang_selected'] != "") {
    $lang = $_POST['lang_selected'];
    /* Append .UTF-8 to language string if necessary */
    if (!preg_match("/utf(-)8\$/i", $lang)) {
        $lang .= ".UTF-8";
    }
} else {
    $lang = get_browser_language();
}
initLanguage($lang);
$smarty->assign("rtl", language_is_rtl($lang));
$smarty->assign("must", '<span class="must">*</span>');
/* Minimal config */
if (!session::global_is_set('config')) {
    $config = new config('');
    session::global_set('config', $config);
}
$config = session::global_get('config');
IconTheme::loadThemes('themes');
/* Fake user bypassing acl system */
$ui = new fake_userinfo();
/* Call setup */
$display = "";
require_once "../setup/main.inc";
$smarty->assign("rtl", language_is_rtl($lang));
Example #7
0
function index_main()
{
    initLanguage();
    print_index();
}