Facebook
From Stained Parakeet, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 246
  1.                         <table width="548" border="0" align="center" cellpadding="0" cellspacing="0">                                                                                                          
  2.                         <tr>                                                           
  3.                                 <td><h2 class="text2"><center>SMS Shop</center></h2></td>                                                      
  4.                         </tr>                                                  
  5.                         <tr>                                                           
  6.                                 <td>
  7.                 <table style="margin-left:2px;">
  8.  
  9.                         <tr>
  10.                                 <td>
  11.  
  12.                                 <br />
  13. <center style="width: 545px;">
  14. <!--
  15. Biznes-Host Shop API
  16. By Baabuseek
  17. -->
  18. <script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
  19. <script type="text/javascript">
  20. $(document).ready(function() {
  21.         var first_imageSource = $("select[name=offer] option:first").val();
  22.       window.name = first_imageSource;
  23.  
  24.         $('select[name=offer]').keyup(function() {
  25.         var imageSource = $("select[name=offer]").val();
  26.       $cos = "#" + window.name;
  27.       $($cos).fadeOut(10);
  28.         $name = "#" + $('#offer').val();
  29.        $($name).fadeIn();
  30.         window.name = imageSource;
  31.         });
  32.  
  33.     $("select[name=offer]").change(function() {
  34.         var imageSource = $("select[name=offer]").val();
  35.       $cos = "#" + window.name;
  36.       $($cos).fadeOut(10);
  37.         $name = "#" + $('#offer').val();
  38.        $($name).fadeIn();
  39.         window.name = imageSource;
  40.     });
  41. });
  42. </script>
  43.  
  44.  
  45. <?php
  46. include("config.php");
  47. /**
  48.  * Shop Script Configuration
  49.  */
  50.  
  51. $offer = array(array());
  52.  
  53. $shop['id'] = 49699; //ID klienta dotpay
  54.  
  55. if($_GET['buy'] == "thing"){ // konfiguracja dla przedmiotow
  56.  
  57. $offer[1]['offer_type'] = "item";
  58. $offer[1]['item_id'] = 2640;
  59. $offer[1]['item_name'] = "Soft Boots";
  60. $offer[1]['desc'] = "Regeneruje 300000 many i hp. <br>Zwiekszają szybkość chodzenia.";
  61. $offer[1]['number'] = 74068; //numer na ktory trzeba wyslac sms
  62. $offer[1]['code'] = "WMK1"; //tresc smsa(bez AP.)
  63. $offer[1]['price'] = "4,92"; //koszt smsa
  64.  
  65. $offer[2]['offer_type'] = "item";
  66. $offer[2]['item_id'] = 2159;
  67. $offer[2]['count'] = "100";
  68. $offer[2]['item_name'] = "100 ScarabCoins";
  69. $offer[2]['desc'] = "Najwieksza waluta na serwerze.";
  70. $offer[2]['number'] = 71068; //numer na ktory trzeba wyslac sms
  71. $offer[2]['code'] = "GRE7"; //tresc smsa(bez AP.)
  72. $offer[2]['price'] = "1,22"; //koszt smsa
  73.  
  74. $offer[3]['offer_type'] = "item";
  75. $offer[3]['item_id'] = 2453;
  76. $offer[3]['item_name'] = "Sprite Wand";
  77. $offer[3]['desc'] = "You see a sprite wand (Atk:250 Def:250).";
  78. $offer[3]['number'] = 72068; //numer na ktory trzeba wyslac sms
  79. $offer[3]['code'] = "CRV4"; //tresc smsa(bez AP.)
  80. $offer[3]['price'] = "2,46"; //koszt smsa
  81.  
  82. $offer[4]['offer_type'] = "item";
  83. $offer[4]['item_id'] = 2663;
  84. $offer[4]['item_name'] = "Mystic Turban";
  85. $offer[4]['desc'] = "Zwieksza szybkość chodzenia. <br>Zmniejsza otrzymywane obrażenia o 25% <br>Zwiększa o 70 magic level.";
  86. $offer[4]['number'] = 74068; //numer na ktory trzeba wyslac sms
  87. $offer[4]['code'] = "WMK1"; //tresc smsa(bez AP.)
  88. $offer[4]['price'] = "4,92"; //koszt smsa
  89.  
  90. $offer[5]['offer_type'] = "item";
  91. $offer[5]['item_id'] = 2361;
  92. $offer[5]['item_name'] = "Frozen Starlight";
  93. $offer[5]['desc'] = "Zmniejsza otrzymywane obrażenia o 50%. <br> Przy uzyciu dodaje mane oraz hp.";
  94. $offer[5]['number'] = 71068; //numer na ktory trzeba wyslac sms
  95. $offer[5]['code'] = "GRE7"; //tresc smsa(bez AP.)
  96. $offer[5]['price'] = "1,22"; //koszt smsa
  97.  
  98. $offer[6]['offer_type'] = "item";
  99. $offer[6]['item_id'] = 2433;
  100. $offer[6]['item_name'] = "Magic Staff";
  101. $offer[6]['desc'] = "You see a magic staff (Atk:100 Def:50).";
  102. $offer[6]['number'] = 72068; //numer na ktory trzeba wyslac sms
  103. $offer[6]['code'] = "CRV4"; //tresc smsa(bez AP.)
  104. $offer[6]['price'] = "2,46"; //koszt smsa
  105.  
  106. $offer[7]['offer_type'] = "item";
  107. $offer[7]['item_id'] = 2656;
  108. $offer[7]['item_name'] = "Joes Jersey";
  109. $offer[7]['desc'] = "Daje 50% szansy respawnu/odrodzenia zabitego potwora.";
  110. $offer[7]['number'] = 72068; //numer na ktory trzeba wyslac sms
  111. $offer[7]['code'] = "CRV4"; //tresc smsa(bez AP.)
  112. $offer[7]['price'] = "2,46"; //koszt smsa
  113.  
  114. $offer[8]['offer_type'] = "item";
  115. $offer[8]['item_id'] = 2196;
  116. $offer[8]['item_name'] = "Amulet Of Life";
  117. $offer[8]['desc'] = "Zabezpiecza przed stratą ekwipunku, doświadczenia i umiejętności w przypadku śmierci. <br>Zwiększa zadawane obrażenia o 25%.<br>Dodaje 10000 maxhealth oraz maxmana.<br>Zwiększa o 50 magic level.";
  118. $offer[8]['number'] = 74068; //numer na ktory trzeba wyslac sms
  119. $offer[8]['code'] = "WMK1"; //tresc smsa(bez AP.)
  120. $offer[8]['price'] = "4,92"; //koszt smsa
  121.  
  122. } if($_GET['buy'] == "premium"){ // konfiguracja dla premium
  123.  
  124. $offer[1]['offer_type'] = 'unban';
  125. $offer[1]['item_name'] = "Unban";
  126. $offer[1]['desc'] = "Usunięcie bana z postaci.";
  127. $offer[1]['number'] = 73068; //numer na ktory trzeba wyslac sms
  128. $offer[1]['code'] = "JTL8"; //tresc smsa(bez AP.)
  129. $offer[1]['price'] = "3,60"; //koszt smsa
  130.  
  131. $offer[2]['offer_type'] = 'skull';
  132. $offer[2]['item_name'] = "Usunięcie skull";
  133. $offer[2]['desc'] = "Usunięcie skull'a (Red, White) oraz fragów z postaci.";
  134. $offer[2]['number'] = 72068; //numer na ktory trzeba wyslac sms
  135. $offer[2]['code'] = "CRV4"; //tresc smsa(bez AP.)
  136. $offer[2]['price'] = "2,46"; //koszt smsa
  137.  
  138. }
  139.  
  140.  
  141. /**
  142.  * Shop main Script
  143.  */
  144.  
  145. $erno = 0;
  146. $offer[0]['offer_type'] = 'error';
  147.  
  148. if($_GET['buy'] == "premium")
  149.     $offer[0]['item_name'] = "Wybierz z listy..";
  150. else
  151.     $offer[0]['item_name'] = "Wybierz przedmiot..";
  152.  
  153. $offerId = $_POST['offer'];
  154. $players_folder = $todata.'/players/';
  155. $acc_folder = $todata.'/accounts/';
  156.  
  157. if( $offer[$offerId]['offer_type'] == 'unban' )
  158. {
  159.     $nick = $_POST['nick'];
  160.     $check = $_POST['check'];
  161.     $file = $players_folder.$nick.'.xml';
  162.        
  163.     if( file_exists($file) )
  164.     {
  165.         //Sprawdzacz kodu
  166.         $id   = $shop['id'];
  167.         $code = $offer[$offerId]['code'];
  168.         $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=sms&del=1", "r");
  169.         $status = fgets($handle, 8);
  170.         fclose($handle);
  171.  
  172.         if( empty($check) || empty($nick) )
  173.             $message = "Please fill all fields.";
  174.         else if( preg_match('/[^0-9A-Za-z]/', $check) )
  175.             $message = "Entered code is not valid.";
  176.         else if( $status == 0 )
  177.             $message = "Entered code is not valid.";
  178.         else
  179.         {
  180.             $xml = simplexml_load_file($file);
  181.             $xml['banned'] = 0;
  182.             $xml->ban['banned'] = 0;
  183.             $xml->ban['banstart'] = 0;
  184.             $xml->ban['banend'] = 0;
  185.             $xml->ban['reason'] = "";
  186.             $xml->ban['action'] = "";
  187.             $xml->ban['deleted'] = 0;
  188.             $xml->ban['finalwarning'] = 0;
  189.             $xml->ban['namelock'] = 0;
  190.             $xml->asXML($file);
  191.             $message = "You have been unbanned.";
  192.         }
  193.     }
  194.     else
  195.         $message = "<font color='red'><b>This character do not exists!</b></font>";
  196. }
  197.  
  198. else if( $offer[$offerId]['offer_type'] == 'access' )
  199. {
  200.     $nick = $_POST['nick'];
  201.     $check = $_POST['check'];
  202.     $file = $players_folder.$nick.'.xml';
  203.        
  204.     if( file_exists($file) )
  205.     {
  206.         //Sprawdzacz kodu
  207.         $id   = $shop['id'];
  208.         $code = $offer[$offerId]['code'];
  209.         $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=sms&del=1", "r");
  210.         $status = fgets($handle, 8);
  211.         fclose($handle);
  212.  
  213.         if( empty($check) || empty($nick) )
  214.             $message = "Please fill all fields.";
  215.         else if( preg_match('/[^0-9A-Za-z]/', $check) )
  216.             $message = "Entered code is not valid.";
  217.         else if( $status == 0 )
  218.             $message = "Entered code is not valid.";
  219.         else
  220.         {
  221.             $xml = simplexml_load_file($file);
  222.             $xml['access'] = 3;
  223.             $xml->asXML($file);
  224.             $message = "Dostałeś pozycję GM.";
  225.         }
  226.     }
  227.     else
  228.         $message = "<font color='red'><b>This character do not exists!</b></font>";
  229. }
  230.  
  231. else if( $offer[$offerId]['offer_type'] == 'skull' )
  232. {
  233.     $nick = $_POST['nick'];
  234.     $check = $_POST['check'];
  235.     $file = $players_folder.$nick.'.xml';
  236.        
  237.     if( file_exists($file) )
  238.     {
  239.         //Sprawdzacz kodu
  240.         $id   = $shop['id'];
  241.         $code = $offer[$offerId]['code'];
  242.         $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=sms&del=1", "r");
  243.         $status = fgets($handle, 8);
  244.         fclose($handle);
  245.  
  246.         if( empty($check) || empty($nick) )
  247.             $message = "Please fill all fields.";
  248.         else if( preg_match('/[^0-9A-Za-z]/', $check) )
  249.             $message = "Entered code is not valid.";
  250.         else if( $status == 0 )
  251.             $message = "Entered code is not valid.";
  252.         else
  253.         {
  254.             $xml = simplexml_load_file($file);
  255.             $xml->skull['type'] = 0;
  256.             $xml->skull['kills'] = 0;
  257.             $xml->skull['ticks'] = 0;
  258.             $xml->skull['absolve'] = 0;
  259.             $xml->asXML($file);
  260.             $message = "Skull'e oraz fragi zostały usunięte.";
  261.         }
  262.     }
  263.     else
  264.         $message = "<font color='red'><b>This character do not exists!</b></font>";
  265. }
  266.  
  267. else if( $offer[$offerId]['offer_type'] == 'item' )
  268. {
  269.     $nick = $_POST['nick'];
  270.     $check = $_POST['check'];
  271.     $file = $players_folder.$nick.'.xml';
  272.     $item_id = $offer[$offerId]['item_id'];
  273.        
  274.     if( file_exists($file) )
  275.     {
  276.         //Sprawdzacz kodu
  277.         $id   = $shop['id'];
  278.         $code = $offer[$offerId]['code'];
  279.         $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=sms&del=1", "r");
  280.         $status = fgets($handle, 8);
  281.         fclose($handle);
  282.  
  283.         if( empty($check) || empty($nick) )
  284.             $message = "Please fill all fields.";
  285.         else if( preg_match('/[^0-9A-Za-z]/', $check) )
  286.             $message = "Entered code is not valid.";
  287.         else if( $status == 0 )
  288.             $message = "Entered code is not valid.";
  289.         else
  290.         {
  291.                         $xml = simplexml_load_file($file);
  292.                         $character = $xml->depots->depot->item->inside->addChild('item');
  293.                         $character->addAttribute('id', $item_id);
  294.                         if(isset($offer[$offerId]['count'])){
  295.                             $character->addAttribute('count', $count); //fix
  296.                         }
  297.                         $newplayerFile = $xml->asXML();
  298.                         $open_file = fopen($file, 'w');
  299.                         fwrite($open_file, $newplayerFile);
  300.                         fclose($open_file);
  301.                        
  302.                         $message = "Wybrany przedmiot został dodany do Twojego depo.";
  303.         }
  304.     }
  305.     else
  306.         $message = "<font color='red'><b>Taka postać nie istnieje!</b></font>";
  307. }
  308.  
  309. else if( $offer[$offerId]['offer_type'] == 'error' )
  310.     $message = "Błąd! Prawdopodobnie nie wybrałeś żadnej rzeczy!<br>";
  311.  
  312. if( isset($message) )
  313. {
  314.     echo "<center>".$message."</center>";
  315.     $erno = 1;
  316. }
  317.  
  318. ?>
  319. <?php
  320. if($_GET['buy'] != "" && $erno == 0){
  321. ?>
  322. <center><b>
  323. Pamiętaj, że twoja postać musi być wylogowana!
  324. </b><br><br>
  325. <?php if($_GET['buy'] == "premium"){ ?>
  326. <form action="index.php?subtopic=shop&buy=premium" method="post">
  327. <?php } else { ?>
  328. <form action="index.php?subtopic=shop&buy=thing" method="post">
  329. <?php } ?>
  330.         <table cellspacing="0" cellpadding="5" border="0">
  331.         <tr>
  332.                 <td><?php if($_GET['buy'] == "premium"){ ?>Ilość dni:<?php } else {?>Przedmiot:<?php } ?></td>
  333.             <td>
  334.                 <select class="input1" id="offer" name="offer" size="1">
  335. <?php
  336. $from = "0";
  337. $to = count($offer);
  338. while($from < $to){
  339. echo '<option value="'.$from.'">'.$offer[$from]['item_name'].'</option>';
  340. $from++;
  341. }
  342. ?>
  343.  
  344.                 </select>
  345.             </td>
  346.         </tr>
  347.         <tr>
  348.                 <td>Nick Postaci:</td>
  349.             <td><input class="input1" type="text" name="nick" /></td>
  350.         </tr>
  351.                 <tr>
  352.                 <td>Kod który otrzymałeś:</td>
  353.             <td><input class="input1" type="text" name="check" maxlenght="8" /></td>
  354.         </tr>
  355.         <tr>
  356.                 <td colspan="2"><input class="input3" type="submit" onclick="return confirm('UWAGA! Jeśli jesteś pewien, że postac jest [Wylogowana] kliknij OK.')" value="Zamów!" /></td>
  357.         </tr>
  358.         </table>
  359.  
  360. </form>
  361. <br><br>
  362.  
  363. <?php
  364. $from = "1";
  365. $to = count($offer);
  366. while($from < $to){
  367. ?>
  368. <div style="display:none;" id="<?=$from;?>">
  369.  
  370. <TABLE WIDTH="450" CELLSPACING="1" CELLPADDING="5" BORDER="0" bgcolor="#D2A96A">
  371. <TR style="background: #AD7C34;" height="25">
  372. <TD ROWSPAN="2" ALIGN="center" VALIGN="middle"><b><?php if($_GET['buy'] == "premium"){ ?>Premium<?php } else {?>Nazwa Przedmiotu<?php } ?></b></TD>
  373. <TD COLSPAN="3" ALIGN="center" VALIGN="middle"><b>Opis</b></TD>
  374. </TR>
  375. <TR style="background: #C89548;">
  376. <TD ALIGN="center" VALIGN="middle"><b>Numer SMS</b></TD>
  377. <TD ALIGN="center" VALIGN="middle"><b>Treść SMS</b></TD>
  378. <TD ALIGN="center" VALIGN="middle"><b>Koszt (PLN)</b></TD>
  379. </TR>
  380. <TR style="background: #D2A96A;">
  381. <TD ALIGN="center" VALIGN="middle">
  382. <?php if($_GET['buy'] == "premium"){ ?>
  383. <img src="images/premium.png" alt="" /><br><?=$offer[$from]['item_name'];?>
  384. <?php }
  385.  else if($_GET['buy'] == "outfit") { ?>
  386. <img src="outfits/<?=$offer[$from]['outfit_id'];?>.gif" alt="" /><br><?=$offer[$from]['item_name'];?>
  387. <?php }
  388.  else {?>
  389. <img src="img/<?=$offer[$from]['item_id'];?>.gif" alt="" /><br><?=$offer[$from]['item_name'];?>
  390. <?php } ?>
  391. </TD>
  392. <TD COLSPAN="3" ALIGN="center" VALIGN="middle"><small><br><?=$offer[$from]['desc'];?><br></small></TD>
  393. </TR>
  394. <TR style="background: #D0A564;">
  395. <TD ALIGN="center" VALIGN="middle"></TD>
  396. <TD ALIGN="center" VALIGN="middle"><b><?=$offer[$from]['offer_number'];?></b></TD>
  397. <TD ALIGN="center" VALIGN="middle"><b>AP.<?=$offer[$from]['code'];?></b></TD>
  398. <TD ALIGN="center" VALIGN="middle"><b><?=$offer[$from]['offer_price'];?></b></TD>
  399. </TR>
  400. </TABLE>
  401. <small><i>Aby otrzymać kod
  402. <?php if($_GET['buy'] == "premium"){ ?>
  403. na wybraną ilość dni premium
  404. <?php } else { ?>
  405. do tego unikalnego przedmiotu
  406. <?php } ?>
  407. wyślij sms o treści AP.<?=$offer[$from]['code'];?> na numer <?=$offer[$from]['number'];?></i></small><br>
  408. <br><br>
  409. </div>
  410. <?php
  411. $from++;
  412. }
  413. ?>
  414. <br>
  415. <p>Usługa dostępna jest w sieciach: T-Mobile, Plus GSM, Orange oraz Play.</p>
  416. <p><strong>Usługi SMS dostarcza i obsługuje serwis Dotpay.pl</strong></p>
  417. <?php
  418. }
  419. if($_GET['buy'] == "" && $erno == 0){
  420. ?>
  421. <center> <!-- <img src='images/icon-shops.gif'> --> <br><br>
  422. <b><a href="index.php?subtopic=shop&buy=premium"><font color="brown"><u>Unban, Usunięcie RS</font></u><font color="red"> [SMS]</font></b></a>
  423. <br>
  424. <br><font color="black">----------------------------------------------</font>
  425. <br>
  426. <br><b><a href="index.php?subtopic=shop&buy=thing"><font color="brown"><u>Kup Przedmioty</u></font><font color="red"> [SMS]</font></b></a>
  427. <br>
  428. <br><font color="black">----------------------------------------------</font>
  429. </center></b>
  430. <?php
  431. }
  432. ?>
  433. </center>
  434.              </td>
  435.             </tr>
  436.           </table>