Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Loop through and check to make sure items are valid, also get item price.
- $Money = 0.00;
- foreach($Items as $key => $value)
- {
- $res = mysql_query("SELECT * FROM rewards WHERE id='{$value->Id}' AND server='{$value->Server}'",$Con);
- if(mysql_num_rows($res)==0)
- {
- $value->Error.="No reward with ID {$value->Id} exists on server ID {$value->Server}. ";
- }
- else
- {
- $rew = mysql_fetch_array($res);
- $value->Rewardname = $rew['name'];
- $Money+=(float)$rew['price'];
- $value->Price = $rew['price'];
- $value->RewardInfo = $rew;
- if($Money>(float)$_POST['mc_gross'])
- {
- $value->Error.="Did not pay enough to include this item. Item cost: {$rew['price']} Money spent: {$_POST['mc_gross']} Total money used up: {$Money}. ";
- }
- }
- }
Add Comment
Please, Sign In to add comment