File size: 5.54Kb
<?php
include("head.php");
////////////////////////////////////////MAIN PAGE
if($action=="shop")
{
addvisitor();
addonline(getuid_sid($sid),"Shop","");
//saveuinfo($sid);
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
$asset = "plusses";
$plussid = mysql_fetch_array(mysql_query("SELECT gold, name FROM ibwf_users WHERE id='".$uid."'"));
Echo "<b>Welcome To Wapirate Shop</b><br/><br/> Here You Can Spend Your Hard Earned Gold To Get Special Features On Wapirate<br/>";
echo "<br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<img src=\"images/shopkeeper.jpg\" alt=\"*\"/><br/>";
echo "The Items You Can Buy Are Listed Below:</p>";
echo "<p align=\"left\">";
echo "<b>$plussid[1]</b><br/>You currently have <b>$plussid[0] </b>Gold<br/><br/>";
echo "Change your username to a new username<br/>";
echo "Cost: 50 Gold<br/>";
echo "<a href=\"shop.php?action=newname&who=$plussid[1]&whoid=$uid\">Buy Now</a>";
echo "</p>";
$who = $plussid[1];
echo "<p align=\"left\">";
echo "New Status<br/>";
echo "Cost: 500 Gold<br/>";
echo "<a href=\"shop.php?action=status&uid=$uid\">Buy Now</a>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "</card>";
}
else if($action=="newname")
{
echo "<card id=\"main\" title=\"Wapirate\">";
echo "<p align=\"center\">";
$who=$_GET["who"];
// $uid=$_GET["uid"];
echo "Type New Name<br/><br/>";
if(getgold(getuid_sid($sid))<50){
echo "You Currently dont have 50 Gold your Name will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank\">bank</a><br/>";
}else{
echo "Name: <input name=\"name\" maxlength=\"50\"/><br/>";
echo "<anchor>[BUY]";
echo "<go href=\"shop.php?action=newname2&who=$who&uid=$uid\" method=\"post\">";
echo "<postfield name=\"name\" value=\"$(name)\"/>";
echo "</go></anchor>";
}
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
else if($action=="newname2")
{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
$cap=407;
$ulti=1;
$rojo=10;
$name = $_POST["name"];
$plussid = mysql_fetch_array(mysql_query("SELECT gold, name FROM ibwf_users WHERE id='".$uid."'"));
$who = $plussid[1];
if(getgold(getuid_sid($sid))<50){
echo "You Currently dont have 50 Gold. your name change will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank\">bank</a><br/>";
}else{
$remainplus = $plussid[0] - 50;
$plussupdate = mysql_query("UPDATE ibwf_users SET gold='".$remainplus."' WHERE id='".$uid."'");
$message = "[b] $who [/b]Has visited The Shop and Bought a new Name. [br/] $who would like to change their Name to [b] $name [/b][br/]Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $cap);
autopm($message, $ulti);
autopm($message, $rojo);
echo "Your new name ($name) will be updated within the next 24 hours.<br/> Thank you for your purchase! <br/> You have $remainplus Gold remaining!";
echo "<br/>";
}
echo "</p><p align=\"center\">";
echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "</card>";
}
///////////////////////////////////status
else if($action=="status")
{
echo "<card id=\"main\" title=\"Wapirate\">";
echo "<p align=\"center\">";
$who=$_GET["who"];
// $uid=$_GET["uid"];
echo "Type New Status<br/><br/>";
if(getgold(getuid_sid($sid))<500){
echo "You Currently dont have 500 Gold your status will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank\">bank</a><br/>";
}else{
echo "Status: <input name=\"status\" maxlength=\"50\"/><br/>";
echo "<anchor>[BUY]";
echo "<go href=\"shop.php?action=status2&who=$who&uid=$uid\" method=\"post\">";
echo "<postfield name=\"status\" value=\"$(status)\"/>";
echo "</go></anchor>";
}
echo "<br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
else if($action=="status2")
{
echo "<card id=\"main\" title=\"wapirate\">";
echo "<p align=\"center\">";
$cap=407;
$ulti=1;
$rojo=10;
$status = $_POST["status"];
$plussid = mysql_fetch_array(mysql_query("SELECT gold, name FROM ibwf_users WHERE id='".$uid."'"));
$who = $plussid[1];
if(getgold(getuid_sid($sid))<500){
echo "You Currently dont have 500 Gold your status will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank\">bank</a><br/>";
}else{
$remainplus = $plussid[0] - 500;
$plussupdate = mysql_query("UPDATE ibwf_users SET gold='".$remainplus."' WHERE id='".$uid."'");
$message = "[b] $who [/b]Has visited The Shop and Bought a new status. [br/] $who would like to change their Status to [b] $status [/b][br/]Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $cap);
autopm($message, $ulti);
autopm($message, $rojo);
echo "Your new status ($status) will be updated within the next 24 hours.<br/> Thank you for your purchase! <br/> You have $remainplus Gold remaining!";
echo "<br/>";
}
echo "</p><p align=\"center\">";
echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "</card>";
}
?>
</wml>