Jump to content
MakeWebGames

Recommended Posts

Posted

It takes cash even if u have 0 and then u go into negative amount please help me fix

 

<?php
include("globals.php");
echo '<h1>Brothel</h1>';
####  Prices  ##############Bellow is females ok   ############Bellow is the males    ###
$prices = array("##FEMALES##",'50000','70000','90000','40000',"##MALES##",'50000','60000','80000','70000');
if($_GET['act'])
{
   $will = rand(1,5);
   $cost = abs(@intval($_POST['price']));
   mysql_query("UPDATE users SET will=will+".$will.",money=money-".$cost." WHERE userid=".$ir['userid']) or die(mysql_error());
   mysql_query("UPDATE users SET will=maxwill WHERE will>maxwill") or die(mysql_error());
   echo 'You payed '.$_POST['who'].' '.money_formatter($cost).' to sleep with them, you gain '.$will.'% will.';
   $h->endpage();
   exit;
}
else
{
   echo '<h3>Woman:</h3>
  <table border="1" cellspacing="0" class="table" width="50%">
   <tr>
    <th>Name</th>
    <th>Price</th>
    <th>Rent</th>
   </tr>
   <tr>
    <td>Roxy</td>
    <td>'.money_formatter($prices[1]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="roxy"><input type="hidden" name="price" value="'.$prices[1].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Kelly</td>
    <td>'.money_formatter($prices[2]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Kelly"><input type="hidden" name="price" value="'.$prices[2].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Shanique</td>
    <td>'.money_formatter($prices[3]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Shanique"><input type="hidden" name="price" value="'.$prices[3].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Rhonda</td>
    <td>'.money_formatter($prices[4]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Rhonda"><input type="hidden" name="price" value="'.$prices[4].'"><input type="submit" value="Rent"></form></td>
   </tr>
  </table>



  <h3>Men:</h3>
  <table border="1" cellspacing="0" class="table" width="50%">
   <tr>
    <th>Name</th>
    <th>Price</th>
    <th>Rent</th>
   </tr>
   <tr>
    <td>Bill</td>
    <td>'.money_formatter($prices[6]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Bill"><input type="hidden" name="price" value="'.$prices[6].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Marcus</td>
    <td>'.money_formatter($prices[7]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Marcus"><input type="hidden" name="price" value="'.$prices[7].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Greg</td>
    <td>'.money_formatter($prices[8]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Greg"><input type="hidden" name="price" value="'.$prices[8].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Sam</td>
    <td>'.money_formatter($prices[9]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Sam"><input type="hidden" name="price" value="'.$prices[9].'"><input type="submit" value="Rent"></form></td>
   </tr>
  </table>';
}
$h->endpage();
?>
Posted

Re: Help Fix brothel

To tired to explain...

<?php
include("globals.php");
echo '<h1>Brothel</h1>';
####  Prices  ##############Bellow is females ok   ############Bellow is the males    ###
$prices = array("##FEMALES##",'50000','70000','90000','40000',"##MALES##",'50000','60000','80000','70000');
if($_GET['act'] && $ir['money'] < intval($_POST['price'])) {
   echo ('You have insufficient funds.');
   $h->endpage();
   exit;
}
elseif ($_GET['act']) {
   $will = rand(1,5);
   $cost = abs(@intval($_POST['price']));
   mysql_query("UPDATE users SET will=will+".$will.",money=money-".$cost." WHERE userid=".$ir['userid'] . " AND money >= " . $cost) or die(mysql_error());
   mysql_query("UPDATE users SET will=maxwill WHERE will>maxwill") or die(mysql_error());
   echo 'You payed '.$_POST['who'].' '.money_formatter($cost).' to sleep with them, you gain '.$will.'% will.';
   $h->endpage();
   exit;
}
else
{
   echo '<h3>Woman:</h3>
  <table border="1" cellspacing="0" class="table" width="50%">
   <tr>
    <th>Name</th>
    <th>Price</th>
    <th>Rent</th>
   </tr>
   <tr>
    <td>Roxy</td>
    <td>'.money_formatter($prices[1]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="roxy"><input type="hidden" name="price" value="'.$prices[1].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Kelly</td>
    <td>'.money_formatter($prices[2]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Kelly"><input type="hidden" name="price" value="'.$prices[2].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Shanique</td>
    <td>'.money_formatter($prices[3]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Shanique"><input type="hidden" name="price" value="'.$prices[3].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Rhonda</td>
    <td>'.money_formatter($prices[4]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Rhonda"><input type="hidden" name="price" value="'.$prices[4].'"><input type="submit" value="Rent"></form></td>
   </tr>
  </table>



  <h3>Men:</h3>
  <table border="1" cellspacing="0" class="table" width="50%">
   <tr>
    <th>Name</th>
    <th>Price</th>
    <th>Rent</th>
   </tr>
   <tr>
    <td>Bill</td>
    <td>'.money_formatter($prices[6]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Bill"><input type="hidden" name="price" value="'.$prices[6].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Marcus</td>
    <td>'.money_formatter($prices[7]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Marcus"><input type="hidden" name="price" value="'.$prices[7].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Greg</td>
    <td>'.money_formatter($prices[8]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Greg"><input type="hidden" name="price" value="'.$prices[8].'"><input type="submit" value="Rent"></form></td>
   </tr>
   <tr>
    <td>Sam</td>
    <td>'.money_formatter($prices[9]).'</td>
    <td><form action="'.$_SERVER['PHP_SELF'].'?act=buy" method="post"><input type="hidden" name="who" value="Sam"><input type="hidden" name="price" value="'.$prices[9].'"><input type="submit" value="Rent"></form></td>
   </tr>
  </table>';
}
$h->endpage();
?>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...