Ejemplo n.º 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);
}
Ejemplo n.º 2
0
         }
         if (empty($files) || varsettrue($files[0]['error'])) {
             $error = true;
             if (varset($files[0]['message'])) {
                 $emessage->add($files[0]['message'], E_MESSAGE_ERROR);
             }
         }
         if (!$error) {
             // Got a file of some sort
             $message = process_csv(e_UPLOAD . $files[0]['name'], intval(varset($_POST['ban_over_import'], 0)), intval(varset($_POST['ban_over_expiry'], 0)), $separator_char[intval(varset($_POST['ban_separator'], 1))], $quote_char[intval(varset($_POST['ban_quote'], 3))]);
             banlist_adminlog('07', 'File: ' . e_UPLOAD . $files[0]['name'] . '<br />' . $message);
         }
     }
     $text = "\n\t\t\t<form method='post' action='" . e_ADMIN_ABS . "banlist_export.php' id='core-banlist-transfer-form' >\n\t\t\t\t<fieldset id='core-banlist-transfer-export'>\n\t\t\t\t\t<legend>" . BANLAN_40 . "</legend>\n\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t<col style='width:30%' />\n\t\t\t\t\t\t\t<col style='width:30%' />\n\t\t\t\t\t\t\t<col style='width:40%' />\n\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th colspan='2'>" . BANLAN_36 . "</th>\n\t\t\t\t\t\t\t\t<th>&nbsp;</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t";
     foreach ($ipAdministrator->getValidReasonList() as $i) {
         $text .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='3'>\n\t\t\t\t\t\t\t\t" . $frm->checkbox("ban_types[{$i}]", $i) . $frm->label($ipAdministrator->getBanTypeString($i, FALSE), "ban_types[{$i}]", $i) . "\n\t\t\t\t\t\t\t\t<span class='field-help'>(" . $ipAdministrator->getBanTypeString($i, TRUE) . ")</span>\n\t\t\t\t\t\t\t</td></tr>\n\t\t\t";
     }
     $text .= "<tr>\n\t\t\t<td>" . BANLAN_79 . "</td>\n\t\t\t<td>" . select_box('ban_separator', $separator_char) . ' ' . BANLAN_37 . "</td>\n\t\t<td>" . select_box('ban_quote', $quote_char) . ' ' . BANLAN_38 . "</td></tr>";
     $text .= "\n\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<div class='buttons-bar center'>" . $frm->admin_button('ban_export', BANLAN_39, 'export', BANLAN_39) . "</div>\n\t\t\t\t\t\t<input type='hidden' name='e-token' value='" . e_TOKEN . "' />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t";
     // Now do the import options
     $text .= "\n\t\t\t<form enctype='multipart/form-data' method='post' action='" . e_SELF . "?transfer' id='ban_import_form' >\n\t\t\t\t<fieldset id='core-banlist-transfer-import'>\n\t\t\t\t\t<legend>" . BANLAN_41 . "</legend>\n\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t<col style='width:30%' />\n\t\t\t\t\t\t\t<col style='width:30%' />\n\t\t\t\t\t\t\t<col style='width:40%' />\n\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th colspan='2'>" . BANLAN_42 . "</th>\n\t\t\t\t\t\t\t\t<th>&nbsp;</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan='3'>" . $frm->checkbox('ban_over_import', 1) . $frm->label(BANLAN_43, 'ban_over_import', 1) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan='3'>" . $frm->checkbox('ban_over_expiry', 1) . $frm->label(BANLAN_44, 'ban_over_expiry', 1) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . BANLAN_46 . "</td>\n\t\t\t\t\t\t\t\t<td colspan='2'>\n\t\t\t\t\t\t\t\t\t" . $frm->file('file_userfile[]', array('size' => '40')) . "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t<td>" . BANLAN_80 . "</td>\n\t\t\t<td>" . select_box('ban_separator', $separator_char) . ' ' . BANLAN_37 . "</td>\n\t\t<td>" . select_box('ban_quote', $quote_char) . ' ' . BANLAN_38 . "</td></tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\t\t\t" . $frm->admin_button('ban_import', BANLAN_45, 'import') . "\n\t\t\t\t\t\t\t\t<input type='hidden' name='e-token' value='" . e_TOKEN . "' />\n\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t";
     e107::getRender()->tablerender(BANLAN_35, $emessage->render() . $text);
     break;
     // End case 'transfer'
 // End case 'transfer'
 case 'list':
 case 'white':
 default:
     if ($action != 'list' && $action != 'white') {
         $action = 'list';
     }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
0
 } else {
     $text .= "\n\t\t\t\t\t\t\t<input class='tbox' type='text' size='30' maxlength='100' name='client_name' value='' />\n\t\t\t\t\t\t\t<div class='field-help'>" . BNRLAN_29 . "</div>\n\t\t";
 }
 $text .= "\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>" . BNRLAN_30 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' size='30' maxlength='20' id='clientlogin' name='client_login' value='" . $_POST['client_login'] . "' />\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>" . BNRLAN_31 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' size='30' maxlength='50' id='clientpassword' name='client_password' value='" . $_POST['client_password'] . "' />\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>" . BNRLAN_32 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class='field-spacer'>\n\t\t\t\t\t\t\t\t<button class='action' type='button' value='no-value' onclick='e107Helper.toggle(\"banner-repo\")'><span>" . BNRLAN_43 . "</span></button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='e-hideme' id='banner-repo'>\n\t";
 $c = 0;
 while ($images[$c]) {
     $image = $images[$c]['path'] . $images[$c]['fname'];
     $fileext1 = substr(strrchr($image, "."), 1);
     $fileext2 = substr(strrchr($image, "."), 0);
     $text .= "\n\t\t\t\t\t\t\t\t<div class='field-spacer'>\n\t\t\t\t\t\t\t\t\t" . $frm->radio('banner_image', $images[$c]['fname'], basename($image) == $_POST['banner_image']) . "\n\t\t";
     if ($fileext1 == 'swf') {
         //FIXME - swfObject
         $text .= "\n\t\t\t\t\t\t\t\t\t<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='468' height='60'>\n\t\t\t\t\t\t\t\t\t\t<param name='movie' value='" . e_IMAGE . "banners/" . $images[$c]['fname'] . "'>\n\t\t\t\t\t\t\t\t\t\t<param name='quality' value='high'><param name='SCALE' value='noborder'>\n\t\t\t\t\t\t\t\t\t\t<embed src='" . e_IMAGE . "banners/" . $images[$c]['fname'] . "' width='468' height='60' scale='noborder' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t";
     } else {
         if ($fileext1 == "php" || $fileext1 == "html" || $fileext1 == "js") {
             $text .= $frm->label(BNRLAN_46 . ": " . $images[$c]['fname'], 'banner_image', $images[$c]['fname']);
         } else {
             $text .= $frm->label("<img src='{$image}' alt='' />", 'banner_image', $images[$c]['fname']);
         }
     }
     $text .= "\n\t\t\t\t\t\t\t\t</div>\n\t\t";
     $c++;
 }
 $text .= "\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\t<tr>\n\t\t\t\t\t\t<td>" . BNRLAN_33 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' size='50' maxlength='150' name='click_url' value='" . $_POST['click_url'] . "' />\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>" . BNRLAN_34 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' size='10' maxlength='10' name='impressions_purchased' value='" . $_POST['impressions_purchased'] . "' />\n\t\t\t\t\t\t\t<div class='field-help'>0 = " . BNRLAN_35 . "</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<td>" . BNRLAN_36 . "</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name='startday' class='tbox'>\n\t\t\t\t\t\t\t<option value='0'>&nbsp;</option>\n\t";
 for ($a = 1; $a <= 31; $a++) {
     $text .= "<option value='{$a}'" . ($a == $_POST['startday'] ? " selected='selected'" : "") . ">" . $a . "</option>";
 }
 $text .= "\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<select name='startmonth' class='tbox'>\n\t\t\t\t\t\t\t<option value='0'>&nbsp;</option>\n\t";
 for ($a = 1; $a <= 12; $a++) {
     $text .= "<option value='{$a}'" . ($a == $_POST['startmonth'] ? " selected='selected'" : "") . ">" . $a . "</option>";
 }