Jump to content
MakeWebGames

Recommended Posts

Posted

I have been reworking this donatorshop mod and would like someone to look over it and make it secure... Also i was wanting to add images of the items the users can buy but have hit a brick wall.

Anyhelp would be appreciated and i will post the finished and secure product in the free mods sections...

AND NO, I DID NOT MAKE THIS MOD!

(I am simply reworking the donatorshop i found on CE so as my users can buy items with their donatordays)

If you have a look at the code, you will see where i want to add the images.

Thanks in advance.

 

<?php
include "globals.php";
if($ir['donatordays'] == 0)
{
echo("Sorry! But You Must Be A Donator To View.

[url="donator.php>[b]<u>Buy"][/url]");
$h->endpage();
exit;
}
if($ir['safehouse'] > 0)
{
       print "You Are In A Safehouse";
       die ("</table><tr><td><image src='bottom1.png'></td></tr></table>");
}
if($ir['jail'] or $ir['hospital']) 
{ 
     print "This Page Cannot be Accessed while in Jail or Hospital."; 
     die ("</table><tr><td><image src='bottom1.png'></td></tr></table>");  
}
print "<h1>DONATORS SHOP</h1>

<h3>THIS IS WHERE YOU CAN TRADE YOUR DONATORDAYS.</h3></br>";
print "<table width=75% cellspacing=1 class='table'>
<tr style='background:gray'>
<th class='h'><font color=black>YOU CURRENTLY HAVE <font color=red>{$ir['donatordays']} </font>DONATORDAYS</th> 
</tr>";
if($_GET['type'] == "")
{
print "[b]Items are listed below.
[/b]
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>ITEM NAME[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>ITEM COST[/b]</font></td>
<th class=\"h\" width=20%>[b]<font color=black>ITEM BUY[/b]</font></td>
</tr>[/b]</table>
<h3>ARMOUR</h3>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Cloak of Invisiblity[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>25 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=cloak'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>ChainMail Armour[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>25 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=chainarm'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<h3>WEAPONS</h3>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Naval Cannon[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>25 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=navalcannon'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Buccaneer Pistol[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>25 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=buccpistol'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<h3>BAR HEALERS</h3>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Will Potion[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>10 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=willpot'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Brave Bar[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>2 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=bravebar'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Power Bar[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>1 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=powerbar'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<h3>OTHER</h3>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>Jail Key[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>5 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=jailkey'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>10 Lucky Box Turns[/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>5 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=luckybox'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>
<table width=100% class=\"table\" border=\"0\" cellspacing=\"1\">
<tr>
<th class=\"h\" width=15%>[b]<font color=black>30 Projection Days [/b]</font></td>
<th class=\"h\" width=10%>[b]<font color=black>ITEM PIC[/b]</font></td>
<th class=\"h\" width=15%>[b]<font color=black>500 Donator Days[/b]</font></td>
<th class=\"h\" width=20%>[url='donatorshop.php?type=projecdays'][b]<font color=black>Buy[/url][/b]</font></td>
</tr>[/b]</table>";
}
else if($_GET['type'] == "cloak")
{
if($ir['donatordays'] <25)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-25 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',139,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 25 Donatordays For A Cloak Of Invisiblity---

<a href=items.php>[b]Check Your Inventory[/b]</a> </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "chainarm")
{
if($ir['donatordays'] <25)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-25 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',73,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 25 Donatordays For A ChainMail Armour---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "navalcannon")
{
if($ir['donatordays'] <25)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-25 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',138,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 25 Donatordays For A Naval Cannon---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "buccpistol")
{
if($ir['donatordays'] <25)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-25 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',75,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 25 Donatordays For A Buccaneer Pistol---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "namehere")
{
if($ir['donatordays'] <85)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-85 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',ITEM NUMBER HERE,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 65 Donatordays For A NAME HERE---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "willpot")
{
if($ir['donatordays'] <10)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-10 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',19,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 10 Donatordays For A Will Potion---

<a href=items.php>[b]Check Your Inventory[/b] </center></td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "powerbar")
{
if($ir['donatordays'] <1)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-1 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',323,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 1 Donatordays For A Power Bar---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "bravebar")
{
if($ir['donatordays'] <2)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-2 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',31,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 2 Donatordays For A Brave Bar---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
//This is type like a function
else if($_GET['type'] == "jailkey")
{
if($ir['donatordays'] <5)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-5 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',33,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 5 Donatordays For A Jail Key---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "luckybox")
{
if($ir['donatordays'] <5)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-5 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',175,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 5 Donatordays For A Lucky Box---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}
else if($_GET['type'] == "projecdays")
{
if($ir['donatordays'] <500)
{
print ("<tr><td>[b]<center>You Don't Have Enough DonatorDays!

[url="donator.php>[b]<u>Buy"][/b][/url]

or

<a href=donatorshop.php>[b]<u>Go Back</u>[/b]</center>[/b]</td></tr></table>");
}
else
{
$db->query("UPDATE users SET donatordays=donatordays-500 WHERE userid=$userid",$c);
$db->query("INSERT INTO inventory VALUES('',210,$userid,1,0)",$c);
print "<tr><td><center>---You Successfully Traded 500 Donatordays For 30 Projection Days---

<a href=items.php>[b]Check Your Inventory[/b] </center> </td></tr></table>

<a href=donatorshop.php>TRADE SOME MORE</a>";
}
}

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