Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post"
- enctype="multipart/form-data">
- <table width="384" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td width="104"><label for="file">Fil-upload:</label>
- <br /></td>
- <td width="270"><input type="file" name="file" id="file" /></td>
- </tr>
- <tr>
- <td> </td>
- <td><input type="submit" name="submit" value="Upload" /></td>
- </tr>
- </table>
- </form>
- <br />
- <?php
- if ($_FILES["file"]["size"] < 5000000000)
- {
- move_uploaded_file($_FILES["file"]["tmp_name"],
- "upload2/" . $_GET[id] . "/" . $_FILES["file"]["name"]);
- $b="Stored in: " . "http://www....dk/upload2/" . $_GET[id] . "/" . $_FILES["file"]["name"];
- $a="http://www....dk/upload2/" . $_GET[id] . "/" . $_FILES["file"]["name"];
- //echo "<table border=0 cellspacing=0 cellpading=0 width=384 align=center>
- //<tr> <td>Fil uploadet!</td></tr>
- //<tr> <td><font color=blue>$b</td></tr>
- //<tr> <td><font color=blue><a href=$a>Link</a></td></tr>
- //</table>";
- }
- else
- {
- echo "Filen er for stor";
- }
- ?>
- <br /><br /><br />
- <table>
- <tr>
- <td class="fld_ttl">
- <?php echo "$_GET[id]" . ":"; ?>
- </td>
- </tr>
- </table>
- <div class="submit_small">
- <br />
- <table width="100%" border="0" cellspacing="2" cellpadding="2">
- <?php
- $dir = "./upload2/" . nl2br($_GET[id]);
- if (is_dir($dir)) {
- if ($dh = opendir($dir)) {
- while (($file = readdir($dh)) !== false) {
- $bleh = "http://www....dk/upload2/" . $_GET[id] . "/" . $file;
- if ($file != "." && $file != "..") {
- ?>
- <tr>
- <td class="table_nice">
- <?
- echo "<a href=$bleh>$file</a>" . '<br />';
- }
- ?>
- </td>
- </tr>
- <?
- }
- closedir($dh);
- }
- }
- ?>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement