관리-도구
편집 파일: upload_form.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <Title>XUpload</Title> <META http-equiv=Content-Type content="text-html; charset=UTF-8"> <Script language="JavaScript" type="text/javascript"> //var exts = "jpg|gif|png|bmp|mp3|mpg|mpeg|avi|rar|zip|7z|gz|txt|avi|mpg"; var exts = ".*"; //Use this to accept all Extensions function StartUpload(f1) { if(f1.file_1.value==""){alert('Select at least one file to upload');return false;}; if(!checkExt(f1.file_1.value))return false; var UID = Math.round(10000*Math.random())+'0'+Math.round(10000*Math.random()); f1.action = f1.action.split('?')[0]+'?upload_id='+UID; if(f1.popup.checked) { win1 = window.open(f1.action.split('upload.cgi')[0]+'upload_status.cgi?upload_id='+UID,'win1','width=320,height=240,resizable=1'); win1.window.focus(); } return true; } function checkExt(value) { if(value=="")return true; var re = new RegExp("^.+\.("+exts+")$","i"); if(!re.test(value)) { alert("This file extension is not allowed: \n" + value + "\n\nOnly these extensions are allowed: "+exts.replace(/\|/g,',')+" \n\n"); return false; } return true; } </Script> </HEAD> <BODY style="background-color: #f9f9f9;font:13px Arial;text-align:center;"> <h2>XUpload demo page</h2> <form enctype="multipart/form-data" action="/cgi-bin/upload.cgi?upload_id=" method="post" onSubmit="return StartUpload(this);" target="xupload"> Send file: <input name="file_1" type="file" onChange="checkExt(this.value)"><br> Comment: <input type="text" name="comment">(optional) <br><br> <Input type="checkbox" name="popup" checked id="popup"><label FOR="popup" ACCESSKEY="Z">Show upload status in pop-up window</label><br> <br> <input type="submit" value="Upload File"> </form> <br><br> <iframe src="about:blank" name="xupload" style="position:absolute;left:-9999px;"></iframe> <a href="http://www.sibsoft.net/xupload.html" style="font: 12px Arial; color: #a3a3a3;text-decoration:none;">Powered by XUpload</a> </BODY> </HTML>