Example #1
0
function show_upload_options()
{
    global $pref, $ns;
    require_once e_HANDLER . "form_handler.php";
    $frm = new e_form(true);
    //enable inner tabindex counter
    $text = "\n           <form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n            <fieldset id='core-download-upload1'>\n               <div>\n                  <table class='table adminform'>\n                     <colgroup>\n                        <col style='width:30%'/>\n                        <col style='width:70%'/>\n                     </colgroup>\n                     <tr>\n                        <td>" . DOWLAN_26 . "</td>\n                        <td>" . $frm->radio_switch('upload_enabled', $pref['upload_enabled']) . "<div class='field-help'>" . $frm->label(DOWLAN_51, 'upload_enabled', '1') . "</div>" . "</td>\n                     </tr>\n                     <tr>\n                        <td>" . DOWLAN_35 . "</td>\n                        <td>" . $frm->text('upload_maxfilesize', $pref['upload_maxfilesize'], '4', array('size' => '10')) . "<div class='field-help'>" . $frm->label(str_replace(array("%1", "%2"), array(ini_get('upload_max_filesize'), ini_get('post_max_size')), DOWLAN_58), 'upload_maxfilesize', '1') . "</div>" . "</td>\n                     </tr>\n                     <tr>\n                        <td>" . DOWLAN_61 . "</td>\n                        <td>" . r_userclass("upload_class", $pref['upload_class']) . "<div class='field-help'>" . $frm->label(DOWLAN_60, 'upload_class', '1') . "</div>" . "</td>\n                     </tr>\n                  </table>\n        \t</div>\n            </fieldset>\n            <div class='buttons-bar center'>\n               <input class='btn btn-default button' type='submit' name='updateuploadoptions' value='" . DOWLAN_64 . "'/>\n            </div>\n           </form>\n      ";
    $ns->tablerender(LAN_DL_OPTIONS, $text);
}
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 {