Advertisement
Guest User

PHP ApiGetShopData API

a guest
Jul 18th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.71 KB | None | 0 0
  1. <?php
  2. require("includes/config.inc.php");
  3. header("Content-type: text/xml");
  4.  
  5. echo "<?xml version=\"1.0\"?>\n";
  6. echo "<shopInfo>\n";
  7.  
  8. $qry = mysql_query("SELECT * from DataSkill2Price");
  9. echo "<skills>";
  10. while($skill = mysql_fetch_array($qry))
  11. {
  12.     echo "<sk SkillID=\"".$skill['SkillID']."\" Lv1=\"".$skill['Lv1']."\" Lv2=\"".$skill['Lv2']."\" Lv3=\"".$skill['Lv3']."\" Lv4=\"".$skill['Lv4']."\" Lv5=\"".$skill['Lv5']."\"></sk>\n";
  13. }
  14. echo "</skills>";
  15.  
  16. echo "<items>";
  17.  
  18. $qry = mysql_query("SELECT * FROM Items_Gear");
  19. while($gear = mysql_fetch_array($qry))
  20. {
  21.     echo "<si itemId=\"".$gear['ItemID']."\" price1d=\"".$gear['Price1']."\" price7d=\"".$gear['Price7']."\" price30d=\"".$gear['Price30']."\" pricePerm=\"".$gear['PriceP']."\" gd_price1d=\"".$gear['GPrice1']."\" gd_price7d=\"".$gear['GPrice7']."\" gd_price30d=\"".$gear['GPrice30']."\" gd_pricePerm=\"".$gear['GPriceP']."\"></si>\n"; 
  22. }
  23.  
  24. $qry = mysql_query("SELECT * FROM Items_Weapons");
  25. while($gear = mysql_fetch_array($qry))
  26. {
  27.     echo "<si itemId=\"".$gear['ItemID']."\" price1d=\"".$gear['Price1']."\" price7d=\"".$gear['Price7']."\" price30d=\"".$gear['Price30']."\" pricePerm=\"".$gear['PriceP']."\" gd_price1d=\"".$gear['GPrice1']."\" gd_price7d=\"".$gear['GPrice7']."\" gd_price30d=\"".$gear['GPrice30']."\" gd_pricePerm=\"".$gear['GPriceP']."\"></si>\n"; 
  28. }
  29.  
  30. $qry = mysql_query("SELECT * FROM Items_Generic");
  31. while($gear = mysql_fetch_array($qry))
  32. {
  33.     echo "<si itemId=\"".$gear['ItemID']."\" price1d=\"".$gear['Price1']."\" price7d=\"".$gear['Price7']."\" price30d=\"".$gear['Price30']."\" pricePerm=\"".$gear['PriceP']."\" gd_price1d=\"".$gear['GPrice1']."\" gd_price7d=\"".$gear['GPrice7']."\" gd_price30d=\"".$gear['GPrice30']."\" gd_pricePerm=\"".$gear['GPriceP']."\"></si>\n"; 
  34. }
  35.  
  36. $qry = mysql_query("SELECT * FROM Items_Attachments");
  37. while($gear = mysql_fetch_array($qry))
  38. {
  39.     echo "<si itemId=\"".$gear['ItemID']."\" price1d=\"".$gear['Price1']."\" price7d=\"".$gear['Price7']."\" price30d=\"".$gear['Price30']."\" pricePerm=\"".$gear['PriceP']."\" gd_price1d=\"".$gear['GPrice1']."\" gd_price7d=\"".$gear['GPrice7']."\" gd_price30d=\"".$gear['GPrice30']."\" gd_pricePerm=\"".$gear['GPriceP']."\"></si>\n"; 
  40. }
  41.  
  42. $qry = mysql_query("SELECT * from Items_Packages");
  43. while($pack = mysql_fetch_array($qry))
  44. {
  45.     if($pack['IsEnabled'] == 0)
  46.         continue;
  47.     echo "<package itemId=\"".$pack['ItemID']."\" price1d=\"".$pack['Price1']."\" price7d=\"".$pack['Price7']."\" price30d=\"".$pack['Price30']."\" pricePerm=\"".$pack['PriceP']."\" gd_price1d=\"".$pack['GPrice1']."\" gd_price7d=\"".$pack['GPrice7']."\" gd_price30d=\"".$pack['GPrice30']."\" gd_pricePerm=\"".$pack['GPriceP']."\"></package>\n";   
  48. }
  49. echo "</items>";
  50.  
  51. echo "</shopInfo>";
  52.  
  53. /*echo "WO_0";*/
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement