Re: PUB
lol ill redo it for you!
When "'s are in Print sections so it says something like:
Print "Suzie said "hello" to Tom";
it basicly is saying
Print "Suzie said "
and then it wont work because it hasnt got ; at the end of said.
lol get me?
here is the code like it should be:
<?php
/*-----------------------------------------------------
-- Pub house
-- Twist_killer Entertainment
-----------------------------------------------------*/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
if(!$_GET['spend'])
{
print "<h2 align='left'>[i]<u>Dogmans shack</u>[/i]</h2>
<p align='left'>Welcome, we have many different varieties of wine and beers here.
Prices and payment options are listed below.
</p>
<h3 align='left'><font color='#008000'>The drinks</font></h3>
<table border='1' width='625' bordercolor='#939393' height='120'><tr background='header.jpg'>
<th height='19' width='221'><font color='#FF0000'><u>Drinks</u></font></th>
<th height='19' width='2'></th>
<th height='19' width='218'><font color='#FF0000'><u>Price</u></font></th>
<th height='19' width='156'><center><font color='#FF0000'><u>Buy</u></font></th></tr><tr>
<td height='19' width='221'><center>gin $ tonic</td>
<td height='19' width='2'><center>
</p>
</td><td height='19' width='218'><center>$100000</td>
<td height='19' width='156'><center>
Purchase</p>
</td></tr><tr>
<td height='19' width='221'><center>Red Wine</td>
<td height='19' width='2'><center>
</p>
</td><td height='19' width='218'><center>$500000</td>
<td height='19' width='156'><center>Purchase</td></tr><tr>
<td height='19' width='221'><center>White Wine</td>
<td height='19' width='2'><center>
</p>
</td><td height='19' width='218'><center>$700000</td>
<td height='19' width='156'><center>Purchase</td></tr><tr>
<td height='16' align='center' width='221'>Vodka</td>
<td height='16' align='center' width='2'></td>
<td height='16' align='center' width='218'>$1000000</td>
<td height='16' align='center' width='156'>
<p align='center'>Purchase</td></tr><tr>
<td height='16' align='center' width='221'>Stella</td>
<td height='16' align='center' width='2'></td>
<td height='16' align='center' width='218'>$7000000</td>
<td height='16' align='center' width='156'>Purchase</td></tr><tr>
<td height='16' align='center' width='221'>Smirnoff</td>
<td height='16' align='center' width='2'></td>
<td height='16' align='center' width='218'>$10000000</td>
<td height='16' align='center' width='156'>Purchase</td></tr><tr>
<td height='16' align='center' width='221'>Heinekens</td>
<td height='16' align='center' width='2'></td>
<td height='16' align='center' width='218'>$20000000</td>
<td height='16' align='center' width='156'>Purchase</td></tr><tr>
<td height='16' align='center' width='221'>Carlsberg</td>
<td height='16' align='center' width='2'></td>
<td height='16' align='center' width='218'>$30000000</td>
<td height='16' align='center' width='156'>Purchase</td></tr></table>";
print "
";
else
{
if($_GET['spend'] == 'gun and tonic')
{
if($ir['money'] <3000000)
{
print "You don't have enough money to buy gin and tonic!";
}
else
{
mysql_query("UPDATE users SET brave=brave+5,energy=0,money=money-300000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$300,000 you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'Red Wine')
{
if($ir['money'] <300000)
{
print "You don't have enough money to buy Red Wine!";
}
else
{
mysql_query("UPDATE users SET brave=brave+10,energy=0,money=money-500000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$500,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'White Wine')
{
if($ir['money'] <700000)
{
print "You don't have enough money to buy White Wine!";
}
else
{
mysql_query("UPDATE users SET brave=brave+20,energy=0,money=money-700000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$700,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'Vodka')
{
if($ir['money'] <1000000)
{
print "You don't have enough money to buy Vodka!";
}
else
{
mysql_query("UPDATE users SET brave=brave+25,energy=0,money=money-1000000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$1,000,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'Stella')
{
if($ir['money'] <7000000)
{
print "You don't have enough money to buy Stella!";
}
else
{
mysql_query("UPDATE users SET brave=brave+35,energy=0,money=money-7000000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$7,000,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'Smirnof')
{
if($ir['money'] <10000000)
{
print "You don't have enough money to buy Smirnof!";
}
else
{
mysql_query("UPDATE users SET brave=brave+70,energy=0,money=money-10000000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$10,000,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'Hieniken')
{
if($ir['money'] <20000000)
{
print "You don't have enough money to buy Hieniken!";
}
else
{
mysql_query("UPDATE users SET brave=brave+140,energy=0,money=money-20000000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$20,000,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
else if($_GET['spend'] == 'Carlsberg')
{
if($ir['money'] <300000000)
{
print "You don't have enough money to buy Carlsberg!";
}
else
{
mysql_query("UPDATE users SET brave=brave+250,energy=0,money=money-30000000 WHERE userid=$userid",$c);
mysql_query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave",$c);
print "<center>You payed \$30,000,000, you drink it down .
You feel some of your brave
coming back to you.
[url='index.php']>Home[/url]</center>";
}
}
$h->endpage();
?>