PageRenderTime 29ms CodeModel.GetById 22ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/fcl-web/examples/fptemplate/fileupload/templates/uploadform.html

https://github.com/slibre/freepascal
HTML | 67 lines | 55 code | 12 blank | 0 comment | 0 complexity | 26111793ae4006d504f7895b38353600 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1<html>
 2<head>
 3<script type="text/javascript" language="JavaScript1.2">
 4
 5function chkFields(){
 6
 7  var Error = false;
 8
 9  if ( document.DataForm.uploaderperson.value == '')
10    { alert('Please enter an uploader person.'); }
11  else if ( (document.DataForm.file1.value == '') && (document.DataForm.file2.value == '') )
12    { alert('Please select a file to upload.'); }
13  else
14    Error = true;
15
16  return Error;
17}
18
19</script>
20</head>
21<body>
22File upload screen<br>
23<small>Last refresh: {+DATETIME [-FORMAT=MM/DD/YYYY hh:mm:ss.zzz-]+}</small><br><br>
24
25{+MESSAGES [-TOOBIG=<font color="red">You have tried to upload a file that exceeds the size limit.</font>-]
26           [-NOTFOUND=<font color="red">File not found for delete.</font>-]
27+}
28
29<br><br>Maximum allowed file size to be stored: {+MAX_SIZE+}MB<br>
30
31 <form action="/fileuploader/listfiles" method="post" enctype="multipart/form-data" name="DataForm" onsubmit="return chkFields();">
32         
33  <table>
34   <tr>
35    <td>Uploader:</td>
36    <td><input type="text" name="uploaderperson" value=""></td>
37   </tr>
38   <tr>
39    <td>File1:</td>
40    <td><input name="file1" type="file" size="60"></td>
41   </tr>
42   <tr>
43    <td>File2:</td>
44    <td><input name="file2" type="file" size="60"></td>
45   </tr>
46   <tr>
47    <td colspan=2 align="center"><input type="submit" value="Upload"></td>
48   </tr>
49  </table>
50
51 </form><br><br>
52
53Uploaded File List (.../{+UPLOAD_DIR+}):
54 <table border=1>
55  <tr><th>File Name</th><th>Uploader</th></tr>
56{+FILELIST
57 [-ONE_ROW=
58  <tr><td><pre>~FILENAME</pre></td><td>~UPLOADER</td><td><a href="/fileuploader/listfiles?delete=~DFILENAME">Delete</a></td></tr>
59 -]
60 [-NOTHINGTOLIST=
61  <tr><td colspan=3>No files to list</td></tr>
62 -]
63+}
64 </table>
65
66</body>
67</html>