• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior ACC] History offer on character view

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,557
Solutions
8
Reaction score
957
Location
Spain
Hello, I made this simple script that shows the last 4 items a player bought!
*Note: table style will change depending on your layout

- Image -

Untitled-2.jpg

- Install -

Open characters.php and add this code!

PHP:
$namer = $player->getName();
			$query = $SQL->query("SELECT `id`, `to_name`, `price`, `offer_id`, `trans_state` FROM `z_shop_history_item` WHERE `to_name` = '$namer' ORDER BY `id` DESC LIMIT 4") or die(mysql_error());
			$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><B>Item</B></TD><TD CLASS=white><B>Status</B></TD><TD CLASS=white><B>Price</B></TD></TR>';
			foreach($query as $result) {
			$ide = $result['offer_id'];
			$query2 = $SQL->query("SELECT `id`, `itemid1` FROM `z_shop_offer` WHERE `id` = '$ide' ORDER BY `id` DESC LIMIT 4") or die(mysql_error());
			foreach ($query2 as $esult) {
			$itemid = $esult['itemid1'];	
			}
			$bgcolor = $config['site']['darkborder'];
			$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td><img src="images/items/'.$itemid.'.gif"></td><td>'.$result['trans_state'].'</td><td>'.$result['price'].'</td>';
			
			}
			$main_content .= '</TABLE>';
			$main_content .= '</br>';

And we are done! hope you like it!
 
Yes i know and i change the folder of the image items too and still dont work when i click on the square dont show the id of the item like the shop offer :/ please look the image i hope can help mescript.jpg

- - - Updated - - -

Yes i know and i change the folder of the image items too and still dont work when i click on the square dont show the id of the item like the shop offer :/ please look the image i hope can help me look the image i put here please thanksURL="http://imageshack.us/f/27/scriptqb.png/"]http://imageshack.us/f/27/scriptqb.png/[/URL]
 
I cant even see the image, are you using the folder I added ? then it should be okay place... add a bigger photo So I can even read it
 
Yes i change <img src="images/items/'.$itemid.'.gif"> for this images/items/'.$list[$pid].'.gif and now show image but all are the same item look here is the link
Imageshack - php.png
 
The code is
PHP:
<img src="images/items/'.$itemid.'.gif">

No

images/items/'.$list[$pid].'.gif
 
Ok, add that code are you sure you have in folder /images/items/ the itemds ids.gif?..
 
Yes if i copy exactly u have dont show the images please help me i really want this script :(
 
Just send me your teamviewer credentials in a PM I will connect and try to fix it,
 
Back
Top