Advertisement
Guest User

forum in php

a guest
Apr 23rd, 2021
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. <html>
  2. <title>FraChan</title>
  3.  
  4. <head>
  5. <style>
  6. body {
  7. background: #EEF2FF url('//media.8kun.top/stylesheets/img/fade-blue.png') repeat-x 50% 0%;
  8. color: black;
  9. font-family: arial,helvetica,sans-serif;
  10. font-size: 10pt;
  11. margin: 0 4px;
  12. padding-left: 4px;
  13. padding-right: 4px;
  14. font-size. 16px;
  15. font-family: monospace;
  16. }
  17.  
  18. a,a:visited {
  19. text-decoration: underline;
  20. color: #34345C;
  21. font-family: monospace;
  22. }
  23.  
  24. a:hover,.intro a.post_no:hover {
  25. color: #ff0000;
  26. font-family: monospace;
  27. }
  28.  
  29. hr {
  30. border: none;
  31. background: #2E304B;
  32. height: 1px;
  33. }
  34.  
  35.  
  36. }
  37. table,tr,th,td {
  38.  
  39. border: 1px solid #000333;
  40. padding: 4px 15px 5px 5px;
  41.  
  42. background: #98E;
  43. color: #000333;
  44. text-align: left;
  45. white-space: nowrap;
  46. font-family: monospace;
  47. }
  48.  
  49. #pulsante {
  50. outline: none;
  51. cursor: pointer;
  52. text-align: center;
  53. text-decoration: none;
  54. font: bold 12px Arial, Helvetica, sans-serif;
  55. color: #fff;
  56. padding: 10px 20px;
  57. border: solid 1px #0076a3;
  58. background: #0095cd;
  59. }
  60. rules {
  61. /*font-size:0.7em;*/
  62. width: 468px;
  63. font-size: 13px;
  64.  
  65. }
  66.  
  67.  
  68. reply {
  69.  
  70. background: #D6DAF0;
  71. margin: 0.2em 4px;
  72. padding: 0.5em 0.3em 0.5em 0.6em;
  73. border-width: 1px;
  74. border-style: none solid solid none;
  75. border-color: #B7C5D9;
  76. display: inline-block;
  77. max-width: 94%!important;
  78. font-family: monospace;
  79. }
  80. h1,h2,h3,h4 {
  81. color: #AF0A0F;
  82.  
  83. font-family: monospace;
  84. margin: 0;
  85. padding: 0;
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. }
  94.  
  95. spoiler {
  96. background: black;
  97. color: black;
  98. }
  99. spoiler:hover {
  100. background: black;
  101. color: white;
  102. font-family: monospace;
  103. }
  104.  
  105.  
  106. quote {
  107. padding:10px;
  108.  
  109. font-family: monospace;
  110. color: green;
  111. }
  112. input, textarea {
  113. text-align: left;
  114. float: center;
  115. padding: 3px;
  116. padding-top: 0px;
  117. border: 1px solid black;
  118. margin: 2px
  119.  
  120. }
  121. rules {
  122. /*font-size:0.7em;*/
  123. width: 468px;
  124. font-size: 13px;
  125. font-family: monospace;
  126. }
  127. </style>
  128. <body>
  129.  
  130. <center>
  131.  
  132. <form action="tuoforum.php" method="post">
  133.  
  134. <br><strong>Titolo(obbligatorio)</strong>:
  135. <br><input type="text" name="title" size="34" required>
  136.  
  137. <br><strong>Messaggio</strong>:
  138. <br><textarea name="msg" cols="66" rows="15"></textarea>
  139. <p><input type="submit" name="invio" id="pulsante" value="Nuovo filo"></p>
  140. </form>
  141. <h2>Regole</h2>
  142. <li>Inserisci le regole del tuo forum</li>
  143.  
  144. </center>
  145.  
  146. <?php
  147.  
  148.  
  149.  
  150. $title = $_POST["title"];
  151.  
  152. $msg = $_POST["msg"];
  153.  
  154. $data = date('Y-m-d');
  155.  
  156. function rispondi() {
  157. echo "<strong>Rispondi al filo</strong>\n";
  158. echo "<form action=\"tuoforum.php\" method=\"post\">\n";
  159.  
  160.  
  161.  
  162.  
  163. echo "<strong>Messaggio</strong>:<br>\n";
  164. echo "<textarea name=\"testo\" cols=\"66\" rows=\"15\">";
  165. echo "</textarea><br><br>\n\n";
  166.  
  167. echo "<input type=\"submit\" value=\"Rispondi\" name=\"rispondi\">\n";
  168. echo "</form>\n";
  169.  
  170. $testo = $_POST["testo"];
  171.  
  172. if(isset($_POST["rispondi"])) {
  173.  
  174. echo '<reply>' .$testo. '</reply>';
  175. }
  176. }
  177.  
  178.  
  179. if(isset($_POST["invio"])) {
  180.  
  181. echo '<h1>' .$title. '</h1>' .'<p>' .$data. '</p>' .$msg ;
  182. echo rispondi();
  183. }
  184. ?>
  185. </body>
  186. </head>
  187. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement