⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tpl_upload2.php

📁 一款文件上传程序
💻 PHP
字号:
<script src="templates/default/upload.js"></script>

<form method="post" action="upload.php" enctype="multipart/form-data" id="upload_form">
    <input type="hidden" name="action" value="upload" />
    <!-- upload options -->
    <div style="float:left; width: 150px; margin-right: 10px;">
        <h1>Upload options</h1>
        <select name="upload_to" id="upload_to" style="width:150px; margin:3px 0px 5px 0px;" onclick="getObj('upload_to_select').disabled=true;" onchange="checkAllFiles()">
            <option value="" id="upload_to_select">Upload to...</option>
            <option value="">Main Folder (default)</option>
            <?php /* Display folders */ reset ( $user_folders ); while ( list ( $i, $folder ) = each ( $user_folders ) ) : $folder['spaces'] = str_repeat ( '&nbsp; &nbsp;', $folder['level'] ); ?>
            <option value="<?=$folder['path']?>" <?=$folder['selected'] ? 'selected="selected"' : '' ?>><?=$folder['spaces']?><?=str_slice($folder['name'],25)?></option>
            <?php /* End folders loop */ endwhile; ?>
        </select>
        <select name="overwrite_option" style="width:150px; margin-bottom:5px;" onclick="getObj('file_exists_select').disabled=true;">
            <option value="skip" id="file_exists_select">File exists options...</option>
            <option value="skip">Skip (default)</option>
            <option value="rename">Rename</option>
            <option value="overwrite">Overwrite</option>
        </select>

        <input type="checkbox" name="create_img_tags" value="1" id="create_img_tags" checked="checked" class="chkbox"/>
        <label for="create_img_tags">Create [IMG] tags</label><br />
        <input type="checkbox" name="create_thumbnails" value="1" id="create_thumbnails" class="chkbox"/>
        <label for="create_thumbnails">Create thumbnails</label> (<span class="help" onclick="help('This will create thumbnails of uploaded images. Currently only JPEG and PNG formats are supported. Other types will be uploaded, but no thumbnails will be created.')">?</span>)<br />

        <p id="upload_restrictions" style="font-size:0.9em; color: #404040; line-height: 1.5em;">
            Maximum file size: <?=$restrictions['max_file_size']?><br />
            Allowed file types (<span class="help" onclick="help('You can only upload files with these extensions. If you are limited to Images Only, then you can only upload image files, usually JPEG, PNG, and GIF.');">?</span>): <?=$restrictions['images_only'] ? 'Images only' : ( $restrictions['file_types'] == '' ? 'Any' : $restrictions['file_types'] )?>
            <br />
            Please make sure that filenames do not contain <span class="help" onclick="help('Invalid characters include: &#92;&#32;&#47;&#32;&#58;&#32;&#42;&#32;&#63;&#32;&#60;&#32;&#62;&#32;&#124;&#32;&#38;\nPlease make sure filenames do not contain any of these characters. Also make sure that filenames start with alphanumeric characters (a-z, 0-9). Any violation will result in the file being discarded.');">invalid characters</span>
	    and start with a letter or number.
        </p>
    </div>

    <!-- upload fields -->
    <div style="width:420px; float:right;">
        <h1>Select files</h1>
        <span class="link" onclick="addUploadFields(1);return false;" onmousedown="return false;">Add more upload fields</span>&nbsp;
        <span class="link" onclick="addUploadFields(5);return false;" onmousedown="return false;">(5)</span>

        <p class="note1">
            Note: Currently this server is set to accept files no larger than <strong><?=ini_get('upload_max_filesize')?></strong>.
            Make sure the individual files are smaller than this limit as they will be discarded otherwise.
        </p>

        <div id="upload_status_div" style="background-color:#FAFAFA;display:none;font-size:0.9em;padding:5px;"><!-- --></div>

        <div id="upload_fields_container" style="margin: 10px 0px 10px 0px;" >
	    <!-- The upload fields will be written here through javascript from upload.js  -->
        </div>

        <input type="submit" value="Upload files" class="blue_button" />
        <input type="button" value="Cancel" onclick="go('<?=$cancel_url?>');" class="blue_button"  />
    </div>

    <div class="spacer"><!-- --></div>

</form>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -