Куча говна / Говнокод #5364 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
<td rowspan="1" colspan="3">e-mail</td>
      <td><textarea name="e-mail" rows=1 cols=10></textarea></td>
      <td>TEXTAREA</td>
    </tr>
    <tr>
      <td rowspan="1" colspan="3">Отзывы</td>
      <td><textarea name="otziv" rows=10 cols=20></textarea></td>
      <td>TEXTAREA</td>
    </tr>
    <tr>
      <td colspan="4" rowspan="1">
	<input type="checkbox" name="news"  checked="yes">Желаете ли вы получать новости на свой e-mail факультета?
      </td>
      <td>INPUT<br>CHECKBOX</td>
    </tr>
    <tr>
      <td colspan="4" rowspan="1">
      <center>
	<input type="reset" value="Отмена" name="Cancel">
	<input type="submit" value="Отправить" name="Send" onClick="SendMsg();">
      </center>
      </td>
      <td>INPUT<br>RESET<br>SUBMIT</td>
    </tr>
    <tr>
      <td
 colspan="2" rowspan="3">Вход для зарегистрированных пользователей:</td>
      <td>Имя</td>
      <td><input type="text" name="name" value=""></td>
      <td>TEXT</td>
    </tr>
    <tr>
      <td>Пароль</td>
      <td><input type="password" name="password" value=""></td>
       <input type="hidden" name="recipient" value="netelisz@yahoo.com">
       <input type="hidden" name="subject" value="Message From My Form otzivi.html"> 
       <input type="hidden" name="required" value="name,password"> 
       <input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT"> 
       <input type="hidden" name="title" value="Результаты заполнения формы"> 
       <input type="hidden" name="return_link_title" value="Назад на мою домашнюю страничку"> 
       <input type="hidden" name="bgcolor" value="white"> 
       <input type="hidden" name="text_color" value="black"> 
      <td>INPUT<br>PASSWORD</td>
    </tr>
  </tbody>
</table>
<p align="center"><input type="submit" value="Отправить" name="Send"></p>
</form>
<form enctype="multipart/form-data" action="" method=POST> Choose file upload: <input name="userfile" type="file"><br>
Name <input type="text" name="name"><br>
<p style="background-attachment : inherit; background-image : url('../Pictures/Alice-Cullen-twilight-movie-2185809-800-600.jpg'); background-position : center; font-family : ; table-layout : inherit;">
<input type="submit" value="Upload file">
</form>
<?php
   echo $_SERVER['DOCUMENT_ROOT'];
    $FILEREPOSITORY=$_SERVER['DOCUMENT_ROOT']."/";
   if (isset($_FILES['userfile'])) {

      if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {

         if ($_FILES['userfile']['type'] != "image/jpeg" & $_FILES['userfile']['type'] != "image/pjpeg" & $_FILES['userfile']['type'] & "image/gif"  ) {
            echo "<p>Homework must be uploaded in jpeg format.</p>";
         } else {
	    include_once("connect.php");
	    connect_db("downloads");
	    echo "connect<br>";
            $today = @date("m-d-Y");
            echo $today;
            if (! is_dir($today)) {
               mkdir($today);
            }
            $name = $_POST['name'];
            $result = move_uploaded_file($_FILES['userfile']['tmp_name'], $_SERVER['DOCUMENT_ROOT']."/".$today."/"."$name");
            if ($result == 1){ 
               echo "<p>File successfully uploaded.</p>";
		$fn=$_SERVER['DOCUMENT_ROOT']."/".$today."/".$name;
		$query="INSERT INTO downloads(path) VALUES('$fn')";
		mysql_query($query);
		echo $fn;
	      }
            else 
               echo "<p>There was a problem uploading the homework.</p>";
         }
      }
   }
?>

Закачка файла на сервер

Запостил: AliceGoth AliceGoth, (Updated )

Комментарии (5) RSS

  • >Желаете ли вы получать новости на свой e-mail факультета?
    >на свой e-mail факультета?
    сильно...
    Ответить
  • <input type="hidden" name="bgcolor" value="white">
    Можно же стили в hidden полях передавать! Как я раньше не догадался!!?
    Ответить
  • Форма с одного форума скрипт с другого. Веб - мастер детекд.
    Ответить

Добавить комментарий

Из-за тебя ушел bormand, guest!

    А не использовать ли нам bbcode?


    8