Esempio n. 1
0
    eval("\$enter_html .= \"" . $template->get_template('admin_enter') . "\";");
    eval("\$enter_html .= \"" . $template->get_template('footer') . "\";");
    echo $enter_html;
} else {
    // This is an array of some generic variables common to most forms
    $postVars = array('gbsession', 'uid', 'action', 'panel', 'section', 'tbl');
    create_variable($postVars);
    $action = !isset($action) ? '' : $action;
    $rid = !isset($rid) ? '' : $rid;
    $admin = new gb_admin($AUTH['session'], $AUTH['uid']);
    $admin->VARS =& $VARS;
    $admin->db =& $gb_auth;
    switch ($action) {
        case 'accept':
            $admin->accept_entry($id, $tbl);
            $admin->show_entry($tbl, $rid, $LANG['AdminTopMessAcc']);
            break;
        case 'unaccept':
            $admin->unaccept_entry($id, $tbl);
            $admin->show_entry($tbl, $rid, $LANG['AdminTopMessUnacc']);
            break;
        case 'show':
            $postVars = array('record', 'table');
            create_variable($postVars);
            $admin->show_entry($tbl, $rid);
            break;
        case 'del':
            $admin->del_entry($id, $tbl);
            $topmessage = $tbl == 'pubpics' ? $LANG['AdminTopImageDel'] : $LANG['AdminTopMessDel'];
            $admin->show_entry($tbl, $rid, $topmessage);
            break;
Esempio n. 2
0
$enter_html = "";
if (!$AUTH) {
    $message = isset($username) || isset($password) ? $LANG["PassMess2"] : $LANG["PassMess1"];
    eval("\$enter_html = \"" . $template->get_template($GB_TPL['header']) . "\";");
    eval("\$enter_html .= \"" . $template->get_template($GB_TPL['adm_enter']) . "\";");
    eval("\$enter_html .= \"" . $template->get_template($GB_TPL['footer']) . "\";");
    echo $enter_html;
} else {
    $action = !isset($action) ? "" : $action;
    $admin = new gb_admin($AUTH["session"], $AUTH["uid"]);
    $admin->VARS =& $VARS;
    $admin->db =& $gb_auth;
    $admin->table =& $GB_TBL;
    switch ($action) {
        case "show":
            $admin->show_entry($tbl);
            break;
        case "del":
            $admin->del_entry($id, $tbl);
            $admin->show_entry($tbl);
            break;
        case "edit":
            $admin->show_form($id, $tbl);
            break;
        case "info":
            $admin->show_panel("info");
            break;
        case "smilies":
            if (isset($scan_dir)) {
                $smilie_list = $admin->scan_smilie_dir();
            }