Example #1
0
    if ($changed) {
        $admin_log->log_event($pref['maintainance_flag'] == 0 ? 'MAINT_02' : 'MAINT_01', $pref['maintainance_text'], E_LOG_INFORMATIVE, '');
        save_prefs();
        $emessage->{$emessage_method}(UGFLAN_1, E_MESSAGE_SUCCESS);
    } else {
        $emessage->{$emessage_method}(UGFLAN_7);
    }
    if (!e_AJAX_REQUEST) {
        header("location:" . e_SELF);
        exit;
    }
}
require_once "auth.php";
$text = "\n\t<form method='post' action='" . e_SELF . "' id='core-ugflag-form'>\n\t\t<fieldset id='core-ugflag'>\n\t\t\t<legend class='e-hideme'>" . UGFLAN_4 . "</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>";
$elements = array(e_UC_PUBLIC => LAN_DISABLED, e_UC_ADMIN => UGFLAN_8, e_UC_MAINADMIN => UGFLAN_9);
$text .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . UGFLAN_2 . ": </td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_multi('maintainance_flag', $elements, $pref['maintainance_flag'], TRUE) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
//TODO multilanguage pref
$text .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . UGFLAN_5 . "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->bbarea('maintainance_text', $pref['maintainance_text'], 'maintenance', 'maintenance_bbhelp') . "\n\t\t\t\t\t\t<div class='field-help'>" . UGFLAN_6 . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<div class='buttons-bar center'>\n\t\t\t\t" . $frm->admin_button('updatesettings', UGFLAN_3, 'update') . "\n\t\t\t</div>\n\t\t</fieldset>\n\t</form>\n\n";
//Ajax Support
if (!e_AJAX_REQUEST) {
    echo "<div id='ajax-container'>\n";
    $e107->ns->tablerender(UGFLAN_4, $emessage->render() . $text, 'core-ugflag');
    echo "\n</div>";
    require_once e_ADMIN . "footer.php";
    exit;
}
$e107->ns->tablerender(UGFLAN_4, $emessage->render() . $text, 'core-ugflag');
/**
 * Handle page DOM within the page header
 *
 * @return string JS source
Example #2
0
        $emessage->add(LAN_NO_CHANGE);
    }
    //info
    unset($temp);
    $temp['search_restrict'] = intval($_POST['search_restrict']);
    $temp['search_highlight'] = intval($_POST['search_highlight']);
    if ($admin_log->logArrayDiffs($temp, $pref, 'SEARCH_02')) {
        //XXX - additional lan search messages
        save_prefs();
    }
}
require_once e_HANDLER . "form_handler.php";
$rs = new form();
$handlers_total = count($search_prefs['core_handlers']) + count($search_prefs['plug_handlers']);
if ($query[0] == 'settings') {
    $text = "\n\t<form method='post' action='" . e_SELF . "?settings'>\n\t\t<fieldset id='core-search-settings'>\n\t\t\t<legend class='e-hideme'>" . SEALAN_20 . "</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_15 . ": </td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $e_userclass->uc_dropdown('search_restrict', $pref['search_restrict'], 'public,guest,nobody,member,admin,classes', "tabindex='" . $frm->getNext() . "'") . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_30 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('search_highlight', $pref['search_highlight']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_10 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('relevance', $search_prefs['relevance']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_11 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('user_select', $search_prefs['user_select']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_19 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('multisearch', $search_prefs['multisearch']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_35 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_multi('selector', array(2 => SEALAN_36, 1 => SEALAN_37, 0 => SEALAN_38), $search_prefs['selector']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_12 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_multi('time_restrict', array(0 => LAN_DISABLED, 1 => SEALAN_13), $search_prefs['time_restrict']) . "&nbsp;\n\t\t\t\t\t\t\t" . $frm->text('time_secs', $tp->toForm($search_prefs['time_secs']), 3, 'class=tbox&size=5') . "&nbsp;" . SEALAN_14 . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_3 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('search_sort', $search_prefs['mysql_sort'], 'MySql', SEALAN_31) . "&nbsp;\n\t\t\t\t\t\t\t" . $frm->text('php_limit', $tp->toForm($search_prefs['php_limit']), 5, 'class=tbox&size=5') . "&nbsp;" . SEALAN_32 . "\n\t\t\t\t\t\t\t<div class='field-help'>" . SEALAN_49 . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_47 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('boundary', $search_prefs['boundary']) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . SEALAN_48 . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<div class='buttons-bar center'>\n\t\t\t\t" . $frm->admin_button('update_prefs', LAN_UPDATE, 'update') . "\n\t\t\t</div>\n\t\t</fieldset>\n\t</form>\n\n";
    $e107->ns->tablerender(SEALAN_20, $emessage->render() . $text);
} elseif ($query[0] == 'edit') {
    if ($query[1] == 'c') {
        $handlers = $search_handlers;
        $handler_type = 'core_handlers';
    } elseif ($query[1] == 'p') {
        $handlers = $search_prefs['plug_handlers'];
        $handler_type = 'plug_handlers';
    } else {
        exit;
    }
    $caption = SEALAN_43 . ": " . $query[2];
    $text = "\n\t<form method='post' action='" . e_SELF . "?main." . $query[1] . "." . $query[2] . "'>\n\t\t<fieldset id='core-search-edit'>\n\t\t\t<legend class='e-hideme'>{$caption}</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_44 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . r_userclass("class", $search_prefs[$handler_type][$query[2]]['class'], "off", "public,guest,nobody,member,admin,classes") . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_45 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' name='results' value='" . $tp->toForm($search_prefs[$handler_type][$query[2]]['results']) . "' size='4' maxlength='4' />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_46 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' name='chars' value='" . $tp->toForm($search_prefs[$handler_type][$query[2]]['chars']) . "' size='4' maxlength='4' />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_26 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type='radio' class='radio' id='pre-title-1' name='pre_title' value='1'" . ($search_prefs[$handler_type][$query[2]]['pre_title'] == 1 ? " checked='checked'" : "") . " /><label for='pre-title-1'>" . SEALAN_22 . "</label><br />\n\t\t\t\t\t\t\t<input type='radio' class='radio' id='pre-title-0' name='pre_title' value='0'" . ($search_prefs[$handler_type][$query[2]]['pre_title'] == 0 ? " checked='checked'" : "") . " /><label for='pre-title-0'>" . SEALAN_17 . "</label><br />\n\t\t\t\t\t\t\t<input type='radio' class='radio' id='pre-title-2' name='pre_title' value='2'" . ($search_prefs[$handler_type][$query[2]]['pre_title'] == 2 ? " checked='checked'" : "") . " /><label for='pre-title-2'>" . SEALAN_23 . "</label>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<input class='tbox input-text' type='text' name='pre_title_alt' value='" . $tp->toForm($search_prefs[$handler_type][$query[2]]['pre_title_alt']) . "' size='20' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<div class='buttons-bar center'>\n\t\t\t\t<button class='update' type='submit' name='update_handler' value='no-value'><span>" . LAN_UPDATE . "</span></button>\n\t\t\t</div>\n\t\t</fieldset>\n\t</form>\n\t";
    $e107->ns->tablerender($caption, $emessage->render() . $text);
} else {