File
By: Xmoo | Date: May 13 2009 14:54 | Format: PHP | Expires: never | Size: 3.13 KB | Hits: 1029
- <?php
- $user = $_SESSION['username'];
- $location = "files/";
- echo "<font class='kop'>File Upload</font><br><br>";
- {
- if($_FILES['upload']['size']>640000)
- {
- echo "<img src='images/pointers/delete.png' alt='ERROR' border='0'> <b>File to BIG! (Max 500kb allowed)</b>";
- exit;
- }
- {
- echo "<img src='images/pointers/delete.png' alt='ERROR' border='0'> <b>Wrong extension! (JPG, GIF & PNG allowed!)</b>";
- exit;
- }
- if(!move_uploaded_file($_FILES['upload']['tmp_name'],$location.$user."-".$_FILES['upload']['name']))
- {
- echo"<img src='images/pointers/delete.png' alt='ERROR' border='0'> <b>File could not move!</b>";
- exit;
- }
- echo "<br><img src='images/pointers/view.png' alt='SUCCES' border='0'> <b>The File: <a href='http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."' target='_blank'>".$user."-".$_FILES['upload']['name']."</a> Has Been Uploaded!</b>
- <br><br><br>
- <b>URL:</b><br>
- <input type='text' name='url' size='59' onclick='javascript:url.focus();url.select();' value='http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."' READONLY/>
- <br><br>
- <b>Link:</b><br>
- <textarea name='textarea' onclick='javascript:textarea.focus();textarea.select();' cols='45' rows='4' READONLY>
- [url]http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."[/url]</textarea>
- <br><br>
- <b>Link with title:</b><br>
- <textarea name='textarea' onclick='javascript:textarea.focus();textarea.select();' cols='45' rows='4' READONLY>
- [url=http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."]".$user."".$_FILES['upload']['name']."[/url]</textarea>
- <br><br>
- <b>Image:</b><br>
- <textarea name='textarea' onclick='javascript:textarea.focus();textarea.select();' cols='45' rows='4' READONLY>
- [img]http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."[/img]</textarea>
- <br><br>
- <b>Thumbnail:</b><br>
- <textarea name='textarea' onclick='javascript:textarea.focus();textarea.select();' cols='45' rows='4' READONLY>
- [thumb]http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."[/thumb]</textarea>
- <br><br>
- <b>Image link:</b><br>
- <textarea name='textarea' onclick='javascript:textarea.focus();textarea.select();' cols='45' rows='4' READONLY>
- [link]http://www.xmoo.org/mytrainer/".$location."".$user."-".$_FILES['upload']['name']."[/link]</textarea>";
- } else {
- echo "<img src='images/pointers/delete.png' alt='ERROR' border='0'> <b>The Upload has failed!</b>"; }
- } else {
- echo '<center><form method="post" action="" enctype="multipart/form-data">
- <b>File:</b> <input type="file" name="upload" size="50" /><br/> <br/>
- <input type="submit" name="submit" value="Upload!" /></form></center>';
- }
- ?>
Latest pastes
18 hours ago
21 hours ago
1 days ago
2 days ago
2 days ago