Example #1
0
 function show_download_options()
 {
     global $pref, $ns;
     require_once e_HANDLER . "form_handler.php";
     $frm = new e_form(true);
     //enable inner tabindex counter
     $agree_flag = $pref['agree_flag'];
     $agree_text = $pref['agree_text'];
     $c = $pref['download_php'] ? " checked = 'checked' " : "";
     $sacc = varset($pref['download_incinfo'], 0) == '1' ? " checked = 'checked' " : "";
     $order_options = array("download_id" => "Id No.", "download_datestamp" => LAN_DATE, "download_requested" => LAN_PLUGIN_DOWNLOAD_NAME, "download_name" => DOWLAN_59, "download_author" => DOWLAN_15);
     $sort_options = array("ASC" => DOWLAN_62, "DESC" => DOWLAN_63);
     $text = "\n\t\t\t\t   \n\t\t\t\t\t   <ul class='nav nav-tabs'>\n\t\t\t\t\t\t   <li class='active'><a data-toggle='tab' href='#core-download-download1'>" . LAN_DL_DOWNLOAD_OPT_GENERAL . "</a></li>\n\t\t\t\t\t\t   <li><a data-toggle='tab' href='#core-download-download2'>" . LAN_DL_DOWNLOAD_OPT_BROKEN . "</a></li>\n\t\t\t\t\t\t   <li><a data-toggle='tab' href='#core-download-download3'>" . LAN_DL_DOWNLOAD_OPT_AGREE . "</a></li>\n\t\t\t\t\t\t   <li><a data-toggle='tab' href='#core-download-download4'>" . LAN_DL_UPLOAD . "</a></li>\n\t\t\t\t\t   </ul>\n\t\t\t\t\t\t\n\t\t        \t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\n\t\t        \t\t<div class='tab-content'>\n\t\t   \t\t\t\t<div class='tab-pane active' id='core-download-download1'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_DL_USE_PHP . "</td>\n\t\t            \t\t         <td>" . $frm->checkbox('download_php', '1', $pref['download_php']) . $frm->label(LAN_DL_USE_PHP_INFO, 'download_php', '1') . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_DL_SUBSUB_CAT . "</td>\n\t\t            \t\t         <td>" . $frm->checkbox('download_subsub', '1', $pref['download_subsub']) . $frm->label(LAN_DL_SUBSUB_CAT_INFO, 'download_subsub', '1') . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_DL_SUBSUB_COUNT . "</td>\n\t\t            \t\t         <td>" . $frm->checkbox('download_incinfo', '1', $pref['download_incinfo']) . $frm->label(LAN_DL_SUBSUB_COUNT_INFO, 'download_incinfo', '1') . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_55 . "</td>\n\t\t            \t\t         <td>" . $frm->text('download_view', $pref['download_view'], '4', array('size' => '4')) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_56 . "</td>\n\t\t            \t\t         <td>" . $frm->select('download_order', $order_options, $pref['download_order']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_ORDER . "</td>\n\t\t             \t\t         <td>" . $frm->select('download_sort', $sort_options, $pref['download_sort']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_160 . "</td>\n\t\t               \t\t      <td>\n\t\t                  \t\t      <select name='mirror_order' class='tbox'>" . ($pref['mirror_order'] == "0" ? "<option value='0' selected='selected'>" . DOWLAN_161 . "</option>" : "<option value='0'>" . DOWLAN_161 . "</option>") . ($pref['mirror_order'] == "1" ? "<option value='1' selected='selected'>" . LAN_ID . "</option>" : "<option value='1'>" . LAN_ID . "</option>") . ($pref['mirror_order'] == "2" ? "<option value='2' selected='selected'>" . DOWLAN_163 . "</option>" : "<option value='2'>" . DOWLAN_12 . "</option>") . "\n\t\t            \t\t            </select>\n\t\t               \t\t      </td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_164 . "</td>\n\t\t            \t\t         <td><input type='text' name='recent_download_days' class='tbox' value='" . $pref['recent_download_days'] . "' size='3' maxlength='3'/>\n\t\t            \t\t         </td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t   \t\t\t\t<div class='tab-pane' id='core-download-download2'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_151 . "</td>\n\t\t               \t\t      <td>" . r_userclass("download_reportbroken", $pref['download_reportbroken']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_150 . "</td>\n\t\t               \t\t      <td>" . ($pref['download_email'] ? "<input type='checkbox' name='download_email' value='1' checked='checked'/>" : "<input type='checkbox' name='download_email' value='1'/>") . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t   \t\t\t\t<div class='tab-pane' id='core-download-download3'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_100 . "</td>\n\t\t               \t\t      <td>" . ($agree_flag ? "<input type='checkbox' name='agree_flag' value='1' checked='checked'/>" : "<input type='checkbox' name='agree_flag' value='1'/>") . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_101 . "</td>\n\t\t               \t   \t   <td>" . $frm->bbarea('agree_text', $agree_text) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_146 . "</td>\n\t\t            \t\t         <td>" . $frm->bbarea('download_denied', $pref['download_denied']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t   \t\t\t\t<div class='tab-pane' id='core-download-download4'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_XXX . "</td>\n\t\t            \t\t         <td>//TODO</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t\t\t\t\t   <div class='buttons-bar center'>\n\t\t                  <input class='btn btn-default button' type='submit' name='updatedownlaodoptions' value='" . DOWLAN_64 . "'/>\n\t\t               </div>\n\t\t              \n\t\t           </div>\n\t\t           </form>\n\t\t      ";
     // $ns->tablerender(LAN_DL_OPTIONS, $text);
     echo $text;
 }
Example #2
0
        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
 */
function headerjs()