Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.32 KB | None | 0 0
  1. <?
  2. include 'header.php';
  3. if (isset($_POST['submit'])) {
  4.  
  5. $msg = $_POST['msg'];
  6.  
  7. $msg = str_replace("[center]", "<center>", $msg);
  8.  
  9. $msg = str_replace("[/center]", "</center>", $msg);
  10.  
  11. $msg = str_replace("[b]", "<b>", $msg);
  12.  
  13. $msg = str_replace("[/b]", "</b>", $msg);
  14.  
  15. $msg = str_replace("[i]", "<i>", $msg);
  16.  
  17. $msg = str_replace("[/i]", "</i>", $msg);
  18.  
  19. $msg = str_replace("[u]", "<u>", $msg);
  20.  
  21. $msg = str_replace("[/u]", "</u>", $msg);
  22.  
  23. $msg = str_replace("[move]", "<marquee>", $msg);
  24.  
  25. $msg = str_replace("[/move]", "</marquee>", $msg);
  26.  
  27. $msg = str_replace("[hr]", "<hr>", $msg);
  28.  
  29. $msg = str_replace("[url]", "<a href=leave.php?site=$msg", $msg);
  30.  
  31. $msg = str_replace("[*url]", ">", $msg);
  32.  
  33. $msg = str_replace("[/url]", "</a>", $msg);
  34.  
  35. $msg = str_replace("[img]", "<img border=0 src=", $msg);
  36.  
  37. $msg = str_replace("[/img]", ">", $msg);
  38.  
  39. $msg = str_replace("[IMG]", "<img border=0 src=", $msg);
  40.  
  41. $msg = str_replace("[/IMG]", ">", $msg);
  42.  
  43. $msg = str_replace("[quote]", "<div id=quote><b>QUOTE:</b><br>", $msg);
  44.  
  45. $msg = str_replace("[/quote]", "</div>", $msg);
  46.  
  47. $msg = str_replace("[code]", "<div id=code>", $msg);
  48.  
  49. $msg = str_replace("[/code]", "</div>", $msg);
  50.  
  51. $msg = str_replace(array("\r\n", "\n", "\r"), '<br>', $msg);
  52.  
  53. $msg = str_replace("[b]", "<b>", $msg);
  54.  
  55. $msg = str_replace("[h1]", "<h1>", $msg);
  56.  
  57. $msg = str_replace("[h2]", "<h2>", $msg);
  58.  
  59. $msg = str_replace("[h3]", "<h3>", $msg);
  60.  
  61. $msg = str_replace("[h3]", "<h3>", $msg);
  62.  
  63. $msg = str_replace("[h4]", "<h4>", $msg);
  64.  
  65. $msg = str_replace("[h5]", "<h5>", $msg);
  66.  
  67.  
  68.  
  69.  
  70. $error = ($_POST['msg'] == "") ? "You need to have a message!" : $error;
  71. if($user_class->shoutban == 1) {
  72. echo '
  73. <tr><td class="contenthead">Shoutban</td></tr>
  74. <tr><td class="contentcontent">
  75. <b style="font-size:12px"><center>You have been banned from chat<span style="color:#FF0000;">';
  76. ?>
  77. </span></b>
  78. <link href="style.css" rel="stylesheet" type="text/css" />
  79. <title>}</title><br><br>
  80. </center>
  81. <?
  82. die();
  83. }
  84. if($error == ""){
  85. $time = time();
  86. $chat = $user_class->chat + 1;
  87.  
  88. $result = mysql_query("UPDATE `grpgusers` SET `chat` = '".$chat."' WHERE `id` = '".$user_class->id."'");
  89.  
  90. ?>
  91. <?
  92. $result = mysql_query("INSERT INTO `ads` VALUES('".$time."', '$user_class->id', '".$time."', '".$msg."')");
  93. echo Message("You have posted a classified");
  94. } else {
  95. echo Message($error);
  96. }
  97. }
  98. if ($_GET['delete'] != ""){
  99.  
  100. $deletemsg = $_GET['delete'];
  101.  
  102. $result = mysql_query("DELETE FROM `ads` WHERE `when`='".$deletemsg."'");
  103.  
  104. echo Message("Message Deleted!");
  105.  
  106. }
  107. ?>
  108. <?
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. ?>
  116. <link href="style.css" rel="stylesheet" type="text/css" />
  117.  
  118. <tr><td class="contenthead"><marquee scrollamount='4'>Welcome to MESSY MAFIA chat. Here you can chat about anything you like, keep it reasonable. If you're gonna cry about another member using your real life information. It's quite simple keep your private life PRIVATE !! The odd swear word is tolerable we should all be adults here. If you cant agree to any of this then you should avoid it like the plague... Thank you for playing ENJOY you're stay...</marquee></tr>
  119.  
  120.  
  121.  
  122. <tr><td class="contentcontent">
  123. <form method='post'><table width='100%' border="0" class="contentcontent">
  124. <tr>
  125. <td align="center"><strong>MESSY CHAT.. Keep it clean LoL !! <? echo $user_class->formattedname; ?> IDIOT ....</strong></td>
  126. </tr>
  127. <tr>
  128. <td height="86" align="center"><textarea class='areatest' name='msg' cols="80" rows="6" style="font-size: 12px; color: <? echo $user_class->chatcolor; ?>" id='message' style="width: 510px"></textarea></td>
  129. </tr>
  130.  
  131.  
  132. <tr>
  133. <td width='25%' height="33" align="center"><input class='leftmenu' type='submit' name='submit' value='Post'><p> <a class="leftmenu" href="classifieds.php">Refresh</a>
  134. <p>
  135.  
  136. </p>
  137. <p>&nbsp; </p></td>
  138. </tr></table>
  139. </form></td></tr>
  140.  
  141. <?
  142. $result = mysql_query("SELECT * from `ads` ORDER BY `when` DESC LIMIT 30");
  143. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  144. $user_ads = New User($row['poster']);
  145.  
  146.  
  147. ?>
  148. <tr>
  149. <td class="contentcontent">
  150. <table width='100%' class="contentcontent">
  151. <tr>
  152. <td colspan="2" valign="top"><?= $user_ads->formattedname ?>
  153. Posted <?php echo date(g.":".i.":".sa,$row['when']) ?><strong>
  154. <?
  155. if($user_ads->id == $user_class->id){
  156. ?>
  157. [<a href="classifieds.php?delete=<?= $row['when'] ?>">Delete]
  158. <?
  159. }
  160. ?>
  161. <?
  162. if($user_class->id == $user_class->id){
  163. ?>
  164. </a>[<a href="slap.php?slap=<? echo $user_ads->id?>">Poke </a>][<a href="mail.php?to=<? echo $user_ads->username ?>">Mail </a>]
  165. <?
  166. }
  167. ?>
  168. <?
  169. if($user_class->admin == 1){
  170. ?>
  171. [<a href="classifieds.php?delete=<?= $row['when'] ?>">Admin Delete]
  172. <?
  173. }
  174. ?>
  175.  
  176. <?
  177. if($user_class->admin == 1 || $user_class->admin == 2){
  178. ?>
  179. [</a><a href="chat.php?ban=<? echo $user_ads->id ?>">Chat Ban</a>][<a href="classifieds.php?delete=<?= $row['when'] ?>">] <?
  180. }
  181. ?></a></strong></td>
  182.  
  183. </tr>
  184. <tr>
  185. <td width='7%' height="70" valign="top"><p><img src="<? echo $user_ads->avatar ?>" alt="" name="" width="60" height="60" /></p></td>
  186. <td width="93%" height="70" align="left" valign="bottom"><font color='<? echo $user_ads->chatcolor ?>'><?= $row['message'] ?></font></td>
  187. </tr>
  188. <tr>
  189. <td height="1" colspan="0" align="center" valign="middle" class="pos"></p></td>
  190. </tr>
  191.  
  192. </table>
  193. </td></tr>
  194. <?
  195. }
  196. ?>
  197.  
  198.  
  199. <?
  200.  
  201. include 'footer.php';
  202. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement