Advertisement
Guest User

rework

a guest
Mar 6th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.79 KB | None | 0 0
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Aktivacia Vyhod</title>
  5. </head>
  6. <body>
  7. <?php
  8. $response = "Dekujeme za zaslani SMS.";
  9. Header ('Content-type: text/plain');
  10. Header ('Content-length'.strlen($response));
  11. echo $response . " <br>";
  12. ///////////////
  13. // NASTAVENÍ //
  14. ///////////////
  15. $server = "xx";
  16. $port = "xxx";
  17. $heslo = "xx";
  18. //////////////////////////////
  19. // VYTAŽENÍ INFORMACÍ Z SMS //
  20. //////////////////////////////
  21. $datum = $_GET['timestamp'];
  22.  
  23. $telefon = $_GET['phone'];
  24.  
  25. $player = $_GET['sms'];
  26. $player = str_replace("PM RUSTMANIA VIP"," ",$player);
  27. $player = trim($player);
  28. //echo "player:";
  29. //echo $player;
  30. $price = $_GET['shortcode'];
  31. $price = str_replace("90333"," ",$price);
  32. //echo "price:";
  33. //echo $price;
  34. $stat = $_GET['country'];
  35.  
  36. $operator = $_GET['operator'];
  37.  
  38. $id = $_GET['id'];
  39.  
  40. $commands = array();
  41.  
  42. //////////////////////////////
  43. // JEDNOTLIVÉ CENOVÉ HLADINY//
  44. //////////////////////////////
  45. switch($price) {
  46.  
  47.   case 99:  //cena 99kc
  48.    $commands[] = "serv.premium ".$player." 30";//30dni vip
  49.    $commands[] = "say "Hrac ".$player." si zakoupil VIP na dobu 30 dnu, Dekujeme."";
  50.   break;
  51.  
  52.   case 79:  //cena 50kc
  53.    $commands[] = "serv.premium ".$player." 20";//20dni vip
  54.    $commands[] = "say "Hrac ".$player." si zakoupil VIP na dobu 20 dnu, Dekujeme."";
  55.   break;
  56.  
  57.   case 50:  //cena 50kc
  58.    $commands[] = "serv.premium ".$player." 10";//10dni vip
  59.    $commands[] = "say "Hrac ".$player." si zakoupil VIP na dobu 10 dnu, Dekujeme."";
  60.   break;
  61. }
  62.  
  63. include_once('./rcon.php');
  64. $rcon = new CServerRcon($server,$port,$heslo);
  65. if ($rcon->Auth()) {
  66.    foreach($commands as $command)
  67.     $return = $rcon->rconCommand($command);
  68. }
  69.  
  70. ?>
  71. </body>
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement