• 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!

[Modern Acc] Choose player debug

Jaac

[PHP] *Linux*
Joined
Dec 15, 2010
Messages
180
Reaction score
9
Hello every one, i have a shop offer system, but i have an issue, when you select to send an items or vip to other player it, the item sends, but the points doesnt take away the points i will repp ++

PHP:
 <?php
///////////////////////////////////////
// Character Select
///////////////////////////////////////
// Make sure we're still logged in.
if(!$logged) {
	echo 'Please login first.';
	exit;
}
// If we are, then here we go!
else
	{
		$buy_id = (int) $_REQUEST['buy_id'];
		//$buy_id = 9;
		if(empty($buy_id))
			{
				echo 'Please <a href="/index.php/p/v/shop">select item</a> first.';
			}
		else {
			{
				//$buy_offer = getItemByID($buy_id);
				foreach($SQL->query('SELECT * FROM z_shop_offer WHERE id = '.$buy_id) as $buy_offer)
				if(isset($buy_offer['id'])) //item exists in the database
				{
					if($premiumPoints >= $buy_offer['points'])
					{
						echo '<h2>Select player</h2>
						<table border="0" cellpadding="1" cellspacing="1" width="100%">
						<tr bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="2"><font color="'.$offerTypeTextColor.'" size="4"><b>&nbsp;Selected Offer</b></font></td></tr>
						<tr bgcolor="'.$offerMainBackgroundColor.'"><td width="20%"><font color="'.$offerMainTextColor.'"><b>Name:</b></font></td><td width="80%"><font color="'.$offerMainTextColor.'">'.$buy_offer['offer_name'].'</font></td></tr>
						<tr bgcolor="'.$offerMainBackgroundColor.'"><td width="20%"><font color="'.$offerMainTextColor.'"><b>Description:</b></font></td><td width="80%"><font color="'.$offerMainTextColor.'">'.$buy_offer['offer_description'].'</font></td></tr>
						</table><br />
						<form action="/index.php/p/v/shop/confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'">
						<input type="hidden" name="buy_from" value="OTShop">
						<table border="0" cellpadding="1" cellspacing="1" width="100%">
						<tr bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="2"><font color="'.$offerTypeTextColor.'" size="4"><b>Which character will recieve the offer*?</b></font></td></tr>
						<tr bgcolor="'.$offerMainBackgroundColor.'"><td width="20%"><font color="'.$offerMainTextColor.'"><b>Name:</b></font></td><td width="80%"><select name="buy_name">';
						if ($totalChars != 0)
							{
								$aaa=0;
								while ($aaa < $totalChars){
									$aaa++;
									echo '<option>'.$charName[$aaa].'</option>';
								}
							}
						else
						{
							echo 'You don\'t have any character on your account.';
						}
						echo '</select>&nbsp;<input type="submit" value="Give"></td></tr>
						</table>
						</form><br /><form action="/index.php/p/v/shop/confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'">
							<table border="0" cellpadding="1" cellspacing="1" width="100%">
							<tr bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="2"><font color="'.$offerTypeTextColor.'" size="4"><b>Give the offer* to a friend?</b></font></td></tr>
							<tr bgcolor="'.$offerMainBackgroundColor.'"><td width="20%"><font color="'.$offerMainTextColor.'"><b>To player:</b></font></td><td width="550"><input type="text" name="buy_name"><font color="'.$offerMainTextColor.'"> - name of player</font></td></tr>
							<tr bgcolor="'.$offerMainBackgroundColor.'"><td width="20%"><font color="'.$offerMainTextColor.'"><b>From:</b></font></td><td width="550"><input type="text" name="buy_from">&nbsp;<input type="submit" value="Give"><font color="'.$offerMainTextColor.'"> - your nickname, \'empty\' = Anonymous</font></td></tr>
							</table><br />
							</form>';

						echo '*Premium Account is for all characters from account of the selected player name!';
					}
					else
					{
						echo 'To get this offer you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$premiumPoints.'</b> premium points. Please <a href="/index.php/p/v/shop/">select another item</a> or buy more premium points.';
					}
				}
				else
				{
					echo 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="/index.php/p/v/shop/">select item</a> again.';
				}
			}
}
}
?>
 
Back
Top