aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tftp/tftp_files.tmp
diff options
context:
space:
mode:
authorMark Crane <mcrane@pfsense.org>2008-12-26 20:00:08 +0000
committerMark Crane <mcrane@pfsense.org>2008-12-26 20:00:08 +0000
commit68e96fbf345846169ffeed749641ad0f4a2ab5eb (patch)
tree68956af6451d8fe8a35ec6befa1123812c405ea4 /packages/tftp/tftp_files.tmp
parent3c773829dac7f4a71f9667b5901d530e8dfeaced (diff)
downloadpfsense-packages-68e96fbf345846169ffeed749641ad0f4a2ab5eb.tar.gz
pfsense-packages-68e96fbf345846169ffeed749641ad0f4a2ab5eb.tar.bz2
pfsense-packages-68e96fbf345846169ffeed749641ad0f4a2ab5eb.zip
TFTP package add file upload to the tftpboot directory.
Diffstat (limited to 'packages/tftp/tftp_files.tmp')
-rw-r--r--packages/tftp/tftp_files.tmp37
1 files changed, 33 insertions, 4 deletions
diff --git a/packages/tftp/tftp_files.tmp b/packages/tftp/tftp_files.tmp
index cd74bd62..d79d39a2 100644
--- a/packages/tftp/tftp_files.tmp
+++ b/packages/tftp/tftp_files.tmp
@@ -48,6 +48,12 @@ if (($_GET['a'] == "download") && file_exists("/tftpboot/".$_GET['filename'])) {
exit;
}
+if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
+ move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tftpboot/" . $_FILES['ulfile']['name']);
+ $ulmsg = "Uploaded file to /tftpboot/" . htmlentities($_FILES['ulfile']['name']);
+ unset($_POST['txtCommand']);
+}
+
if ($_GET['act'] == "del") {
if ($_GET['type'] == 'ivr') {
@@ -87,8 +93,6 @@ include("head.inc");
<tr>
<td class="tabcont" >
-<form action="tftp_files.php" method="post" name="iform" id="iform">
-
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td><p><span class="vexpl"><span class="red"><strong>TFTP files<br />
@@ -99,6 +103,32 @@ include("head.inc");
</tr>
</table>
<br />
+
+
+ <div id="niftyOutter">
+ <form action="tftp_files.php" method="POST" enctype="multipart/form-data" name="frmUpload" onSubmit="">
+ <table>
+
+ <tr>
+ <td colspan="2" valign="top" class="vnsepcell">Upload</td>
+ </tr>
+ <tr>
+ <td align="right">File to upload:</td>
+ <td valign="top" class="label">
+ <input name="ulfile" type="file" class="button" id="ulfile">
+ </td></tr>
+ <tr>
+ <td valign="top">&nbsp;&nbsp;&nbsp;</td>
+ <td valign="top" class="label">
+ <input name="submit" type="submit" class="button" id="upload" value="Upload"></td>
+ </tr>
+
+ </table>
+ </div>
+ </form>
+
+
+ <form action="tftp_files.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -145,7 +175,7 @@ include("head.inc");
?>
<tr>
- <td class="list" colspan="3"></td>
+ <td class="list" colspan="2"></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -179,7 +209,6 @@ include("head.inc");
</div>
-
<?php include("fend.inc"); ?>
</body>
</html>