Online Shop [RELEASE 1]

Status
Not open for further replies.

Ulan Hafiz

Member
Oct 20, 2011
139
7
Hey Devbest :p

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:
onlineshopR2.jpg




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:

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'");
}
}
}
?>


 

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
How secured is this? If any PHP coders out there.. could you please check for any exploits that could be existing? I'd be happy to implement this on HabPro Hotel once tested and is proven to be secured. Thanks.

@Thread starter: Good release. Is this exploit-free? :D
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
this looks like a good release, be a nice addition to the hotels that use another currency other than credits & pixels
 

Thom

You can't touch this
Oct 1, 2010
1,305
386
Its a nice idea but looks like you still have some styling things to do.

Hope the next release is even better :D
 
Status
Not open for further replies.

Users who are viewing this thread

Top