Jump to content
MakeWebGames

help me plz


slipknot

Recommended Posts

<?php
include "globals.php";
if(!$_GET['spend'])
{
print "Welcome to the crystal temple!

You have [b]{$ir['crystals']}[/b] crystals.

What would you like to spend your crystals on?



[url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url]

[url='crystaltemple.php?spend=IQ']IQ - {$set['ct_iqpercrys']} IQ per crystal[/url]

[url='crystaltemple.php?spend=money']Money - \$".number_format($set['ct_moneypercrys'])." per crystal[/url]
"
[url='crystaltemple.php?spend=will']Will Refill - 50 Crystals[/url]
"
[url='crystaltemple.php?spend=brave']Brave Refill - 50 Crystals[/url]
;
}
else
{
if($_GET['spend'] == 'refill')
{
if($ir['crystals'] <$set['ct_refillprice'])
{
print "You don't have enough crystals!";
}
else if($ir['energy'] == $ir['maxenergy'])
{
print "You already have full energy.";
}
else
{
$db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid");
print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar.";
if($_GET['spend'] == 'will')
{
if($ir['crystals'] < 100)
{
print "You don't have enough crystals!";
}
else if($ir['will'] == $ir['maxwill'])
{
print "You already have full will.";
}
else
{
$db->query("UPDATE users SET will=maxwill,crystals=crystals-100 WHERE userid=$userid");
print "You have paid 100 crystals to refill your will bar.";
}
}
}
}
else if($_GET['spend'] == 'IQ')
{
print "Type in the amount of crystals you want to swap for IQ.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'IQ2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=IQ']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_iqpercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid");
$db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for $iqgain IQ.";
}
}
else if($_GET['spend'] == 'money')
{
print "Type in the amount of crystals you want to swap for money.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'money2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=money']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_moneypercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for \$".number_format($iqgain).".";
}
}
}

$h->endpage();
?>

 

it comes up with

Parse error: syntax error, unexpected T_STRING in /home/scatter1/public_html/crystaltemple.php on line 12

 

Added code tags -- Tezza`

Link to comment
Share on other sites

Re: help me plz

 

<?php
include "globals.php";
if(!$_GET['spend'])
{
print "Welcome to the crystal temple!

You have [b]{$ir['crystals']}[/b] crystals.

What would you like to spend your crystals on?



[url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url]

[url='crystaltemple.php?spend=IQ']IQ - {$set['ct_iqpercrys']} IQ per crystal[/url]

[url='crystaltemple.php?spend=money']Money - \$'.number_format($set['ct_moneypercrys']).' per crystal[/url]

[url='crystaltemple.php?spend=will']Will Refill - 50 Crystals[/url]

[url='crystaltemple.php?spend=brave']Brave Refill - 50 Crystals[/url]
";
}
else
{
if($_GET['spend'] == 'refill')
{
if($ir['crystals'] <$set['ct_refillprice'])
{
print "You don't have enough crystals!";
}
else if($ir['energy'] == $ir['maxenergy'])
{
print "You already have full energy.";
}
else
{
$db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid");
print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar.";
if($_GET['spend'] == 'will')
{
if($ir['crystals'] < 100)
{
print "You don't have enough crystals!";
}
else if($ir['will'] == $ir['maxwill'])
{
print "You already have full will.";
}
else
{
$db->query("UPDATE users SET will=maxwill,crystals=crystals-100 WHERE userid=$userid");
print "You have paid 100 crystals to refill your will bar.";
}
}
}
}
else if($_GET['spend'] == 'IQ')
{
print "Type in the amount of crystals you want to swap for IQ.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'IQ2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=IQ']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_iqpercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid");
$db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for $iqgain IQ.";
}
}
else if($_GET['spend'] == 'money')
{
print "Type in the amount of crystals you want to swap for money.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'money2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=money']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_moneypercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for \$".number_format($iqgain).".";
}
}
}

$h->endpage();
?>

 

There you go. Didn't look through the rest though...

Link to comment
Share on other sites

Re: help me plz

 

<?php
include "globals.php";
if(!$_GET['spend'])
{
print "Welcome to the crystal temple!

You have [b]{$ir['crystals']}[/b] crystals.

What would you like to spend your crystals on?



[url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url]

[url='crystaltemple.php?spend=IQ']IQ - {$set['ct_iqpercrys']} IQ per crystal[/url]

[url='crystaltemple.php?spend=money']Money - \$($set['ct_moneypercrys']) per crystal[/url]

[url='crystaltemple.php?spend=will']Will Refill - 50 Crystals[/url]

[url='crystaltemple.php?spend=brave']Brave Refill - 50 Crystals[/url]
";
}
else
{
if($_GET['spend'] == 'refill')
{
if($ir['crystals'] <$set['ct_refillprice'])
{
print "You don't have enough crystals!";
}
else if($ir['energy'] == $ir['maxenergy'])
{
print "You already have full energy.";
}
else
{
$db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid");
print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar.";
if($_GET['spend'] == 'will')
{
if($ir['crystals'] < 100)
{
print "You don't have enough crystals!";
}
else if($ir['will'] == $ir['maxwill'])
{
print "You already have full will.";
}
else
{
$db->query("UPDATE users SET will=maxwill,crystals=crystals-100 WHERE userid=$userid");
print "You have paid 100 crystals to refill your will bar.";
}
}
}
}
else if($_GET['spend'] == 'IQ')
{
print "Type in the amount of crystals you want to swap for IQ.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'IQ2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=IQ']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_iqpercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid");
$db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for $iqgain IQ.";
}
}
else if($_GET['spend'] == 'money')
{
print "Type in the amount of crystals you want to swap for money.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'money2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=money']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_moneypercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for \$".number_format($iqgain).".";
}
}
}

$h->endpage();
?>
Link to comment
Share on other sites

Re: help me plz

Try this:

 

<?php
include "globals.php";
if(!$_GET['spend'])
{
print "Welcome to the crystal temple!

You have [b]{$ir['crystals']}[/b] crystals.

What would you like to spend your crystals on?



[url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url]

[url='crystaltemple.php?spend=IQ']IQ - {$set['ct_iqpercrys']} IQ per crystal[/url]

[url='crystaltemple.php?spend=money']Money - \${$set['ct_moneypercrys']} per crystal[/url]

[url='crystaltemple.php?spend=will']Will Refill - 50 Crystals[/url]

[url='crystaltemple.php?spend=brave']Brave Refill - 50 Crystals[/url]
";
}
else
{
if($_GET['spend'] == 'refill')
{
if($ir['crystals'] <$set['ct_refillprice'])
{
print "You don't have enough crystals!";
}
else if($ir['energy'] == $ir['maxenergy'])
{
print "You already have full energy.";
}
else
{
$db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid");
print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar.";
if($_GET['spend'] == 'will')
{
if($ir['crystals'] < 100)
{
print "You don't have enough crystals!";
}
else if($ir['will'] == $ir['maxwill'])
{
print "You already have full will.";
}
else
{
$db->query("UPDATE users SET will=maxwill,crystals=crystals-100 WHERE userid=$userid");
print "You have paid 100 crystals to refill your will bar.";
}
}
}
}
else if($_GET['spend'] == 'IQ')
{
print "Type in the amount of crystals you want to swap for IQ.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'IQ2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=IQ']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_iqpercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid");
$db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for $iqgain IQ.";
}
}
else if($_GET['spend'] == 'money')
{
print "Type in the amount of crystals you want to swap for money.

You have [b]{$ir['crystals']}[/b] crystals.

One crystal = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' />
<input type='submit' value='Swap' /></form>";
}
else if($_GET['spend'] == 'money2')
{
$_POST['crystals']=(int) $_POST['crystals'];
if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals'])
{
print "Error, you either do not have enough crystals or did not fill out the form.

[url='crystaltemple.php?spend=money']Back[/url]";
}
else
{
$iqgain=$_POST['crystals']*$set['ct_moneypercrys'];
$db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid");
print "You traded {$_POST['crystals']} crystals for \$".number_format($iqgain).".";
}
}
}

$h->endpage();
?>

 

I haven't looked through all of it yet.

Link to comment
Share on other sites

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...