Ulan Hafiz
Member
- Oct 20, 2011
- 139
- 7
Hey Devbest
This is my First version of the Online shop.
This new version includes the following:
Here is a preview of the new shop below:
Download here
>
Download file (Instructions in file)
Woooops:
Forgot something.
Download this, and extract it to your Htdocs folder:
>
Make a new php file called "Purchase" (Without the "")
and add this to it:
This is my First version of the Online shop.
This new version includes the following:
- Tells you if the page is new
Tells you whether Furniture is new
New Credits popup
Most recent purchases
FIXED CREDITS ISSUE
Here is a preview of the new shop below:
Download here
>
You must be registered for see links
<Download file (Instructions in file)
Woooops:
Forgot something.
Download this, and extract it to your Htdocs folder:
>
You must be registered for see links
<Make a new php file called "Purchase" (Without the "")
and add this to it:
Code:
<script type="text/javascript">
alert ("You have successfully bought this piece of furniture. Please check your inventory")
</SCRIPT><?php
require_once('global.php');
$find = dbquery("SELECT * FROM pixel_shop_furni WHERE id='$_GET[item]'");
while($row = mysql_fetch_array($find))
{
$id2 = dbquery("SELECT id FROM pixel_shop");
$furni = $row['furni_id'];
// Subtract the coins from the user like a foo does to a foo foo
$h = dbquery("SELECT item_price FROM pixel_shop_furni");
$usercred = dbquery("SELECT credits FROM users WHERE username='$_SESSION[UBER_USER_N]'");
$g = $usercred - $row['item_price'];
$tt = dbquery("SELECT * FROM users WHERE username='$_SESSION[UBER_USER_N]' AND credits >= 'item_price'");
while($t = mysql_fetch_array($tt))
{
$creds = $t['credits'];
$credsafter = $creds - $row['item_price'];
dbquery("UPDATE users SET credits='$credsafter' WHERE username='$_SESSION[UBER_USER_N]'");
$ee = dbquery("SELECT * FROM item_id_generator");
while($e = mysql_fetch_array($ee))
{
$geni = $e[id_generator];
dbquery("INSERT INTO user_items (id, user_id, base_item, extra_data, timestamp) VALUES ('$geni', '$t[id]', '$row[furni_id]', '','" . time() . "')");
$geni = $e[id_generator] + 1;
dbquery("UPDATE item_id_generator SET id_generator='$geni'");
}
}
}
?>