Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ($_GET['mailbomb'] == "search")
  2. {
  3.     if ($_POST['submit'] == "Yes")
  4.     {
  5.         if ($user_class->money < 300000)
  6.         {
  7.             echo Message("Sorry. You dont have enough money to search for mailbombs.");
  8.             include "footer.php";
  9.             exit();
  10.         }
  11.         else
  12.         {
  13.             $mailbombs = mysql_query("SELECT * FROM `pms` WHERE `to` = {$user_class->id} AND `mailbomb` = 1 AND `mailbombfound` = 0");
  14.             $newmoney = $user_class->money - 300000;
  15.             mysql_query("UPDATE `grpgusers` SET `money` = $newmoney WHERE `id` = {$_SESSION['id']}");
  16.             if (mysql_num_rows($mailbombs))
  17.             {
  18.                 echo Message("You have successfully managed to search for mailbombs, and found a total of <b>".mysql_num_rows($mailbombs)." mailbombs</b>!<br><br>
  19.                 The mails which contained mailbombs have been highlighted in bold red on your mailbox.<br><br>
  20.                 <a href='mailbox.php' />Go Back</a>");
  21.                 mysql_query("UPDATE `pms` SET `mailbombfound` = 1 WHERE `to` = {$_SESSION['id']} AND `mailbomb` = 1");
  22.                 include "footer.php";
  23.                 exit();
  24.             }
  25.             else
  26.             {
  27.                 if (!mysql_num_rows($mailbombs))
  28.                 {
  29.                     echo Message("You have successfully managed to search for mailbombs, but no mailbombs were found.<br><br>
  30.                     <a href='mailbox.php' />Go Back</a>")
  31.                     include "footer.php";
  32.                     exit();
  33.                 }
  34.             }
  35.         }
  36.     }
  37.     else
  38.     {
  39.         echo "
  40.         <tr><td class-'contentcontent'>
  41.         Searching for mail bombs costs $300,000, and has a 90% chance of being successfull. Are you sure you want to continue?<br><br>
  42.         <center>
  43.         <form method='post'>
  44.         <input type='submit' value='Yes' name='submit'>
  45.         </form>
  46.         </center>
  47.         </td></tr>
  48.         ";
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement