コード例 #1
0
ファイル: plugin.php プロジェクト: KonzolozZ/e107
 function pluginUpload()
 {
     global $plugin;
     $frm = e107::getForm();
     //TODO 'install' checkbox in plugin upload form. (as it is for theme upload)
     /* plugin upload form */
     if (!is_writable(e_PLUGIN)) {
         e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_44);
     } else {
         // Get largest allowable file upload
         require_once e_HANDLER . 'upload_handler.php';
         $max_file_size = get_user_max_upload();
         $text = "\n\t\t\t\t<form enctype='multipart/form-data' method='post' action='" . e_SELF . "'>\n                <table class='table adminform'>\n                \t<colgroup>\n                \t\t<col class='col-label' />\n                \t\t<col class='col-control' />\n                \t</colgroup>\n\t\t\t\t<tr>\n\t\t\t\t<td>" . EPL_ADLAN_37 . "</td>\n\t\t\t\t<td>\n\t\t\t\t<input type='hidden' name='MAX_FILE_SIZE' value='{$max_file_size}' />\n\t\t\t\t<input type='hidden' name='ac' value='" . md5(ADMINPWCHANGE) . "' />\n\t\t\t\t<input class='tbox' type='file' name='file_userfile[]' size='50' />\n\t\t\t\t</td>\n                </tr>\n\t\t\t\t</table>\n\n\t\t\t\t<div class='center buttons-bar'>";
         $text .= $frm->admin_button('upload', EPL_ADLAN_38, 'submit', EPL_ADLAN_38);
         $text .= "\n\t\t\t\t</div>\n\n\t\t\t\t</form>\n";
     }
     e107::getRender()->tablerender(ADLAN_98 . SEP . EPL_ADLAN_38, $text);
 }
コード例 #2
0
ファイル: db.php プロジェクト: notzen/e107
 /**
  * Import XML Form
  * @return none
  */
 private function importForm()
 {
     // Get largest allowable file upload
     $frm = e107::getSingleton('e_form');
     require_once e_HANDLER . 'upload_handler.php';
     $max_file_size = get_user_max_upload();
     $text = "\n\t\t\t\t\t<form enctype='multipart/form-data' method='post' action='" . e_SELF . "?mode=" . $_GET['mode'] . "'>\n\t                <table class='table adminform'>\n\t                \t<colgroup>\n\t                \t\t<col class='col-label' />\n\t                \t\t<col class='col-control' />\n\t                \t</colgroup>\n\n\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td>" . LAN_UPLOAD . "</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type='hidden' name='MAX_FILE_SIZE' value='{$max_file_size}' />\n\t\t\t\t\t\t<input type='hidden' name='ac' value='" . md5(ADMINPWCHANGE) . "' />\n\t\t\t\t\t\t<input class='tbox' type='file' name='file_userfile[]' accept='text/xml' size='50' />\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\n\t\t\t\t\t<div class='center buttons-bar'>";
     $text .= $frm->admin_button('upload', LAN_UPLOAD, 'submit', LAN_UPLOAD);
     $text .= "\n\t\t\t\t\t</div>\n\n\t\t\t\t\t</form>\n";
     $emessage = eMessage::getInstance();
     e107::getRender()->tablerender(DBLAN_59, $emessage->render() . $text);
 }
コード例 #3
0
ファイル: filemanager.php プロジェクト: gitter-badger/e107
}
if (count($dirs) == 1) {
    $dstr = FMLAN_14;
} else {
    $dstr = FMLAN_15;
}
$pathd = $path;
$text = "\n\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\t<div class='buttons-bar left'>\n\t" . FMLAN_32 . "\n\t<select name='admin_choice' class='tbox' onchange=\"location.href=this.options[selectedIndex].value\">";
foreach ($dir_options as $key => $opt) {
    $select = str_replace("../", "", $adchoice[$key]) == e_QUERY ? "selected='selected'" : "";
    $text .= "<option value='" . e_SELF . "?" . str_replace("../", "", $adchoice[$key]) . "' {$select}>" . $opt . "</option>";
}
$text .= "</select>\n\t</div>\n\t</form>\n";
// $ns->tablerender(FMLAN_34, $text);
// Get largest allowable file upload
$max_file_size = get_user_max_upload();
if ($path != e_FILE) {
    if (substr_count($path, "/") == 1) {
        //$pathup = e_SELF;
        $pathup = '';
    } else {
        $pathup = "<a class='action' href='" . e_SELF . "?" . substr($path, 0, strrpos(substr($path, 0, -1), "/")) . "/'><img class='icon S24' src='" . $imagedir . "updir.png' alt='" . FMLAN_30 . "' /></a>";
    }
}
$text .= "\n\t<form enctype='multipart/form-data' action='" . e_SELF . (e_QUERY ? "?" . e_QUERY : "") . "' method='post'>\n\t\t<fieldset id='core-filemanager'>\n\t\t\t<legend class='e-hideme'>XX</legend>\n\t\t\t<table class='table adminlist'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style='width:  5%' />\n\t\t\t\t\t<col style='width: 40%' />\n\t\t\t\t\t<col style='width: 20%' />\n\t\t\t\t\t<col style='width: 15%' />\n\t\t\t\t</colgroup>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th class='center'>\n\t\t\t\t\t\t\t" . $pathup . "\n\t\t\t\t\t\t<!-- <a href='filemanager.php'><img src='" . $imagedir . "home.png' alt='" . FMLAN_16 . "' /></a> -->\n\t\t\t\t\t\t\t<input type='hidden' name='MAX_FILE_SIZE' value='{$max_file_size}' />\n\t\t\t\t\t\t</th>\n\t\t\t\t\t\t<th class='center'>" . LAN_SIZE . "</th>\n\t\t\t\t\t\t<th class='center'>" . FMLAN_18 . "</th>\n\t\t\t\t\t\t<th class='center'>" . FMLAN_19 . "</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n";
$c = 0;
while ($dirs[$c]) {
    $dirsize = dirsize($path . $dirs[$c]);
    $el_id = str_replace(array('/', '_', ' ', '\\'), '-', $path . $dirs[$c]);
    if (FILE_UPLOADS && is_writable(e_BASE . $path . $dirs[$c])) {
        $up_button = $frm->admin_button('erquest', FMLAN_21, 'action', '', array('id' => false, 'other' => "onclick='e107Helper.toggle(\"{$el_id}\")'"));
コード例 #4
0
ファイル: theme_handler.php プロジェクト: armpit/e107
 function renderUploadForm()
 {
     $mes = e107::getMessage();
     $ns = e107::getRender();
     $sql = e107::getDb();
     $frm = e107::getForm();
     if (!is_writable(e_THEME)) {
         $ns->tablerender(TPVLAN_16, TPVLAN_15);
         $text = "";
     } else {
         require_once e_HANDLER . 'upload_handler.php';
         $max_file_size = get_user_max_upload();
         $text = "\n\t\t\t<form enctype='multipart/form-data' action='" . e_SELF . "' method='post'>\n\t\t\t\t<table class='table adminform'>\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t\t<col class='col-control' />\n\t\t\t\t\t</colgroup>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . TPVLAN_13 . "</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type='hidden' name='MAX_FILE_SIZE' value='{$max_file_size}' />\n\t\t\t\t\t\t<input type='hidden' name='ac' value='" . md5(ADMINPWCHANGE) . "' />\n\t\t\t\t\t\t<input class='tbox' type='file' name='file_userfile[]' size='50' />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n                <tr>\n\t\t\t\t\t<td>" . TPVLAN_10 . "</td>\n\t\t\t\t\t<td><input type='checkbox' name='setUploadTheme' value='1' /></td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\n\t\t\t<div class='buttons-bar center'>" . $frm->admin_button('upload', 1, 'submit', LAN_UPLOAD) . "</div>\n\t\t\t</form>\n\t\t\t";
     }
     $ns->tablerender(TPVLAN_26 . SEP . TPVLAN_38, $mes->render() . $text);
 }