Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.76 KB | None | 0 0
  1.  
  2. <html <?php session_start(); language_attributes(); ?>>
  3.  
  4. <head>
  5.  
  6. <link rel="icon" href="<?php echo get_template_directory_uri() . '/img/favicon2.png'; ?>">
  7.  
  8. <meta charset="utf-8">
  9.  
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11.  
  12. <meta name="viewport" content="width=device-width, initial-scale=1">
  13.  
  14. <title>
  15.  
  16. <?php
  17.  
  18. if (strpos($_SERVER['REQUEST_URI'], 'users') !== false && isset($_GET['user']) && $_GET['user'] > "0") {
  19.  
  20. $user = get_user_by('id', $_GET['user']);
  21.  
  22. echo $user->display_name; ?> | <?php echo bloginfo( 'name' );
  23.  
  24. } else {
  25.  
  26. if ( is_front_page() ) {
  27.  
  28. echo bloginfo( 'name' );
  29.  
  30. } else {
  31.  
  32. echo bloginfo( 'name' ); ?> | <?php the_title();
  33.  
  34. }
  35.  
  36. }
  37.  
  38. ?></title>
  39.  
  40. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  41.  
  42. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.3/css/bulma.min.css">
  43.  
  44. <style>
  45.  
  46. .field{
  47.  
  48. flex: 1!important;
  49.  
  50. }
  51. form{
  52. margin: 0;
  53. padding-bottom: 13px;
  54. }
  55.  
  56. </style>
  57.  
  58. <!--[if lt IE 9]>
  59.  
  60. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
  61.  
  62. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  63.  
  64. <![endif]-->
  65.  
  66. <?php
  67. wp_head();
  68.  
  69. /* Zoznam serverov */
  70. $servers = array('Jailbreak', 'Dust2', 'Surf', 'SurfRPG', '1v1Arena', 'Bhop', 'AwpNoscope', 'Retakes1', 'Retakes2', 'Retakes3', 'CoD', 'OldDust2Mirage');
  71.  
  72. ?>
  73.  
  74. </head>
  75.  
  76. <body>
  77. <!-- Horny navbar -->
  78. <nav class="navbar">
  79. <div class="container">
  80. <div class="navbar-brand">
  81. <a class="navbar-item" href="../">
  82. <img src="http://games-town.eu/wp-content/themes/gamestown/img/logo.png" alt="Logo">
  83. </a>
  84. <span class="navbar-burger burger" data-target="navbarMenu">
  85. <span></span>
  86. <span></span>
  87. <span></span>
  88. </span>
  89. </div>
  90. <div id="navbarMenu" class="navbar-menu">
  91. <div class="navbar-end">
  92. <?php
  93.  
  94. if ( is_user_logged_in() ) { ?>
  95. <div class="navbar-item has-dropdown is-hoverable">
  96. <a class="navbar-link">
  97. <span class="fa fa-user"></span>&nbsp;&nbsp;<?php echo wp_get_current_user()->display_name; ?>
  98. </a>
  99.  
  100. <div class="navbar-dropdown">
  101. <a class="navbar-item" href="<?php echo get_site_url() . '/users/?user=' . wp_get_current_user()->ID;?>"><span class="glyphicon glyphicon-user"></span> Profil</a>
  102. <a class="navbar-item" href="<?php echo get_edit_user_link(); ?>"><span class="glyphicon glyphicon-wrench"></span> Nastavení</a>
  103. <a class="navbar-item" href="<?php echo wp_logout_url( home_url() ); ?>"><span class="glyphicon glyphicon-log-out"></span> Odhlásit se</a>
  104. <?php
  105.  
  106. if ( is_user_logged_in() && !wpsap_is_user_synced() ) {
  107.  
  108. echo '<hr class="navbar-divider"><a class="navbar-item" href="'.wpsap_button_sync_url().'"><span class="glyphicon glyphicon-refresh"></span> STEAM Synchronizace</a>';
  109.  
  110. }
  111.  
  112. ?>
  113. </div>
  114. <?php } else { ?>
  115.  
  116. <div class="navbar-item">
  117.  
  118. <?php echo '<a href="http://games-town.eu/login/">Prihlásiť sa &nbsp;&nbsp;<span class="fa fa-sign-in"></span></a>';?>
  119.  
  120. </div>
  121.  
  122. <?php } ?>
  123. </div>
  124.  
  125. </div>
  126. </div>
  127. </div>
  128. </nav>
  129.  
  130.  
  131. <?php
  132.  
  133. function toSteamID($id) {
  134.  
  135. if (is_numeric($id) && strlen($id) >= 16) {
  136.  
  137. $z = bcdiv(bcsub($id, '76561197960265728'), '2');
  138.  
  139. } elseif (is_numeric($id)) {
  140.  
  141. $z = bcdiv($id, '2'); // Actually new User ID format
  142.  
  143. } else {
  144.  
  145. return $id; // We have no idea what this is, so just return it.
  146.  
  147. }
  148.  
  149. $y = bcmod($id, '2');
  150.  
  151. return 'STEAM_1:' . $y . ':' . floor($z);
  152.  
  153. };
  154.  
  155.  
  156.  
  157. $steamcommunityid = get_user_meta(get_current_user_id(), 'steam_steamid', true);
  158.  
  159.  
  160.  
  161. $steamid64 = toSteamID($steamcommunityid);
  162. $_SESSION['steamid'] = $steamid;
  163.  
  164. /* <?php echo $steamid64; ?> Pre vypisanie STEAMID */
  165.  
  166.  
  167.  
  168. ?>
  169.  
  170.  
  171. <!-- Hlavna stranka -->
  172. <?php if ( is_user_logged_in() ) { ?>
  173.  
  174.  
  175.  
  176. <section class="section">
  177.  
  178. <div class="container content is-centered">
  179.  
  180. <div class="columns is-centered">
  181.  
  182. <div class="column is-half">
  183.  
  184. <form method="post" class="form-horizontal" action="" >
  185.  
  186. <div class="field has-addons">
  187.  
  188. <div class="control has-icons-left is-expanded">
  189.  
  190. <div class="select is-fullwidth">
  191. <!-- Vyber platby -->
  192. <select name="serverSMS" id="serverSMS" onchange='this.form.submit()'>
  193.  
  194. <option value="">Spôsob platby..</option>
  195.  
  196. <option value="SMS SK" <?php if(isset($_POST['serverSMS'])) $serverSMS = $_POST['serverSMS']; if($serverSMS == 'SMS SK') echo 'selected';?>>SMS SK</option>
  197.  
  198. <option value="SMS CZ" <?php if(isset($_POST['serverSMS'])) $serverSMS = $_POST['serverSMS']; if($serverSMS == 'SMS CZ') echo 'selected';?>>SMS CZ</option>
  199.  
  200. <option value="Paypal" <?php if(isset($_POST['serverSMS'])) $serverSMS = $_POST['serverSMS']; if($serverSMS == 'Paypal') echo 'selected';?>>Paypal</option>
  201.  
  202. <option value="PSC" <?php if(isset($_POST['serverSMS'])) $serverSMS = $_POST['serverSMS']; if($serverSMS == 'PSC') echo 'selected';?>>PaySafeCard</option>
  203.  
  204. <option value="CSGO" <?php if(isset($_POST['serverSMS'])) $serverSMS = $_POST['serverSMS']; if($serverSMS == 'CSGO') echo 'selected';?>>CSGO Skiny</option>
  205.  
  206. </select>
  207.  
  208. </div>
  209.  
  210. <div class="icon is-small is-left">
  211.  
  212. <i class="fa fa-globe"></i>
  213.  
  214. </div>
  215.  
  216. </div>
  217.  
  218. </div>
  219.  
  220. <?php
  221.  
  222.  
  223.  
  224. if($serverSMS != '' && $serverSMS != 'Paypal' && $serverSMS != 'CSGO' && $serverSMS != 'PSC'):
  225.  
  226. ?>
  227.  
  228. <div class="field">
  229.  
  230. <div class="control has-icons-left is-expanded">
  231.  
  232. <div class="select is-fullwidth">
  233. <!-- Vyber servera -->
  234.  
  235. <select name="serverName" id="serverName" onchange='this.form.submit()'>
  236.  
  237. <option value="">Server..</option>
  238. <?php
  239. foreach($servers as &$server):
  240. ?>
  241. <option <?php if(isset($_POST['serverName'])){$serverName = $_POST['serverName'];} if($serverName == $server){echo "selected";}?>><?php echo $server?></option>
  242. <?php
  243. endforeach;
  244. ?>
  245. </select>
  246.  
  247. </div>
  248.  
  249. <div class="icon is-small is-left ">
  250.  
  251. <i class="fa fa-server"></i>
  252.  
  253. </div>
  254.  
  255. </div>
  256.  
  257. </div>
  258.  
  259. <?php
  260.  
  261. endif;
  262.  
  263. if(isset($_POST['serverName']) == true && isset($_POST['serverSMS']) == true){
  264.  
  265. $serverName = $_POST['serverName'];
  266.  
  267. $serverSMS = $_POST['serverSMS'];
  268.  
  269. }
  270.  
  271. if($serverSMS == 'SMS SK' && $serverName != ''):
  272.  
  273. ?>
  274.  
  275. <div class="field">
  276.  
  277. <div class="control has-icons-left is-expanded">
  278.  
  279. <div class="select is-fullwidth">
  280. <!-- Vyber sumy pre SMS SK -->
  281.  
  282. <select name="serverPrice" onchange='this.form.submit()'>
  283.  
  284. <option selected>Suma..</option>
  285.  
  286. <option value="5" <?php if(isset($_POST['serverPrice'])){$serverPrice = $_POST['serverPrice'];} if($serverPrice == '5'){echo "selected";}?>>Navždy 5,00 €</option>
  287.  
  288. <option value="2" <?php if(isset($_POST['serverPrice'])){$serverPrice = $_POST['serverPrice'];} if($serverPrice == '2'){echo "selected";}?>>Mesiac 2,00 €</option>
  289.  
  290. </select>
  291.  
  292. </div>
  293.  
  294. <div class="icon is-small is-left">
  295.  
  296. <i class="fa fa-<?php if($serverSMS == 'SMS SK') echo 'euro'; else echo 'dollar'; ?>"></i>
  297.  
  298. </div>
  299.  
  300. </div>
  301.  
  302. </div>
  303.  
  304. <?php
  305.  
  306. endif;
  307.  
  308. if($serverSMS == 'SMS CZ' && $serverName != ''):
  309.  
  310. ?>
  311.  
  312. <div class="field">
  313.  
  314. <div class="control has-icons-left is-expanded">
  315.  
  316. <div class="select is-fullwidth">
  317. <!-- Vyber sumy pre CZ -->
  318.  
  319. <select name="serverPrice" onchange='this.form.submit()'>
  320.  
  321. <option selected>Suma..</option>
  322.  
  323. <option value="120" <?php if(isset($_POST['serverPrice'])){$serverPrice = $_POST['serverPrice'];} if($serverPrice == '120'){echo "selected";}?>>Navždy 120 Kč</option>
  324.  
  325. <option value="69" <?php if(isset($_POST['serverPrice'])){$serverPrice = $_POST['serverPrice'];} if($serverPrice == '69'){echo "selected";}?>>Mesiac 69 Kč</option>
  326.  
  327. </select>
  328.  
  329. </div>
  330.  
  331. <div class="icon is-small is-left">
  332.  
  333. <i class="fa fa-dollar"></i>
  334.  
  335. </div>
  336.  
  337. </div>
  338.  
  339. </div>
  340.  
  341. <?php endif; ?>
  342.  
  343. </form>
  344. <!-- Paypal -->
  345. <?php
  346. if($serverSMS == 'Paypal'):
  347. ?>
  348. <div align="center"><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
  349. <input type="hidden" name="cmd" value="_s-xclick">
  350. <input type="hidden" name="hosted_button_id" value="DQQRX38TQ2HYJ">
  351. <div class="field">
  352. <div class="control has-icons-left is-expanded">
  353. <div class="select is-fullwidth">
  354. <input type="hidden" name="on2" value="Server"><select name="os2">
  355. <option disabled selected>Server..</option>
  356. <?php
  357. foreach($servers as &$server):
  358. ?>
  359. <option value="<?php echo $server ?>"><?php echo $server ?></option>
  360. <?php
  361. endforeach;
  362. ?>
  363. </select>
  364. <?php if(isset($_POST['on2'])){$paypalServer = $_POST['paypalServer'];} $_SESSION['paypalServer'] = $paypalServer;?>
  365. </div>
  366. <div class="icon is-small is-left">
  367. <i class="fa fa-server"></i>
  368. </div>
  369. </div>
  370. </div>
  371. <div class="field">
  372. <div class="control has-icons-left is-expanded">
  373. <div class="select is-fullwidth">
  374. <input type="hidden" name="on0" value="VIP"><select name="os0">
  375. <option disabled selected>Suma..</option>
  376. <option value="VIP-FOREVER">VIP-FOREVER €5,00 EUR</option>
  377. <option value="VIP-MONTH">VIP-MONTH €2,00 EUR</option>
  378. </select>
  379. </div>
  380. <div class="icon is-small is-left">
  381. <i class="fa fa-euro"></i>
  382. </div>
  383. </div>
  384. </div>
  385.  
  386. <input type="hidden" name="on1" value="SteamID"><input class="is-hidden" type="text" name="os1" value="<?php echo $steamid64 ?>">
  387.  
  388. <input type="hidden" name="currency_code" value="EUR">
  389. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  390. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  391. </form></div>
  392. <?php
  393. endif; ?>
  394. <!-- PaySafeCard -->
  395. <?php
  396. if($serverSMS == 'PSC'):
  397. ?>
  398. <div class="has-text-centered" style="background-color: #ededed">
  399. <br>
  400. <p style="font-size: 23px;">
  401. Pre túto platbu je potreba si pridať majiteľa <a href='http://steamcommunity.com/id/respawnofficial/' target='_blank'>TU</a>
  402. </p>
  403. <h5>Cena je <strong>5,00 €</strong> <strong>navždy</strong>.</h5>
  404. <h5>Cena je <strong>2,00 €</strong> na <strong>mesiac</strong>.</h5><br><br>
  405. </div>
  406. <?php
  407. endif; ?>
  408. <!-- CSGO Skiny -->
  409. <?php
  410. if($serverSMS == 'CSGO'):
  411. ?>
  412. <div class="has-text-centered" style="background-color: #ededed">
  413. <br>
  414. <h3>VIP <strong></strong> pomocou <strong>CSGO SKINY</strong></h3>
  415. <h2><p style="font-size: 23px;">
  416. Pošlite itemy na tento <a href='https://steamcommunity.com/tradeoffer/new/?partner=164653530&token=8iDKHZ3M' target='_blank'><h2>TradeOffer</h2></a>
  417. <h5>Cena je <strong>5,00 €</strong> <strong>navždy</strong>.</h5>
  418. <h5>Cena je <strong>2,00 €</strong> na <strong>mesiac</strong>.</h5><br><br>
  419. </div>
  420. <?php
  421. endif; ?>
  422. </div>
  423.  
  424.  
  425. </div>
  426. <!-- Text pre SMS SK -->
  427. <?php
  428.  
  429. if($serverSMS == 'SMS SK' && $serverPrice == '5' || $serverPrice == '2'):
  430.  
  431. ?>
  432.  
  433. <div class="column has-text-centered is-half is-offset-one-quarter" style="background-color: #ededed">
  434.  
  435. <br>
  436.  
  437. <h4>VIP <strong><?php if($serverPrice == '5'){echo 'navždy';}elseif($serverPrice == '2'){echo 'na mesiac';} ?></strong> pomocou <strong><?php echo $serverSMS ?></strong>.</h4>
  438.  
  439. <p style="font-size: 23px;"><small style="font-size: 12px;">Tvar: </small> <span style="color:#007bff ;display: inline-block; padding: 3px 5px;">SERVER PRO 71633 <?php echo $serverPrice;?> <?php echo $serverName; ?> <?php echo $steamid64; ?></span> <small style="font-size: 12px;">na číslo</small> <span style="color:#007bff ;display: inline-block; padding: 3px 5px;">8866</span></p>
  440.  
  441. <h5>Cena SMS je <strong><?php if($serverPrice == '5'){echo '5,00 €';}elseif($serverPrice == '2'){echo '2,00 €';} ?></strong> vrátane <strong>DPH</strong>.<br><br></h5>
  442.  
  443. </div>
  444. <!-- Text pre SMS CZ-->
  445.  
  446. <?php
  447.  
  448. endif;
  449.  
  450. if($serverSMS == 'SMS CZ' && $serverPrice == '120' || $serverPrice == '69'):
  451.  
  452. ?>
  453.  
  454. <div class="column has-text-centered is-half is-offset-one-quarter" style="background-color: #ededed">
  455.  
  456. <br>
  457.  
  458. <h4>VIP <strong><?php if($serverPrice == '120'){echo 'navždy';}elseif($serverPrice == '69'){echo 'na mesiac';} ?></strong> pomocou <strong><?php echo $serverSMS ?></strong>.</h4>
  459.  
  460. <p style="font-size: 23px;"><small style="font-size: 12px;">Tvar: </small> <span style="color:#007bff ;display: inline-block; padding: 3px 5px;">GSP 71633 <?php echo $serverPrice;?> PRO <?php echo $serverName; ?> <?php echo $steamid64; ?></span> <small style="font-size: 12px;">na číslo</small> <span style="color:#007bff ;display: inline-block; padding: 3px 5px;">90106</span></p>
  461.  
  462. <h5>Cena SMS je <strong><?php if($serverPrice == '120'){echo '120 Kč';}elseif($serverPrice == '69'){echo '69 Kč';} ?></strong> vrátane <strong>DPH</strong>.<br><br></h5>
  463.  
  464. </div>
  465.  
  466. <?php
  467. endif; ?>
  468.  
  469.  
  470. </div>
  471.  
  472. </section>
  473.  
  474. <div class="container">
  475. <div class="columns is-mobile">
  476. <div class="column is-half is-offset-one-quarter">
  477. <article class="message is-warning">
  478. <div class="message-header">
  479. <p>Dôležité informácie</p>
  480. </div>
  481. <div class="message-body">
  482. Platba bude spracovaná najneskôr do <strong>24h</strong> od zakúpenia.<br>
  483. V prípade akýchkoľvek problémov, kontakujte nás E-Mailom <a href="mailto:contact@games-town.eu?Subject=VIP" target="_top">contact@games-town.eu</a> alebo na našom fóre <a href="http://forum.games-town.eu">forum.games-town.eu</a><br><br>
  484. <strong>UPOZORNENIE:</strong><i> Kúpou VIP súhlasite, že peniaze, ktorými je platba uskutočnená, sú legálne získané a nie je možné požiadať o ich vrátenie.</i>
  485. </div>
  486. </article>
  487. </div>
  488. </div>
  489.  
  490. <!-- Ak uživateľ nie je prihlásený zobrazí sa toto -->
  491. <?php } else { ?>
  492.  
  493. <br>
  494. <br>
  495. <div class="container">
  496. <div class="columns is-mobile">
  497. <div class="column is-half is-offset-one-quarter">
  498. <article class="message is-danger">
  499. <div class="message-header">
  500. <p>Zabudli ste sa prihlásiť!</p>
  501. </div>
  502. <div class="message-body">
  503. Pre zobrazenie VIP platieb sa prosím <a href="http://games-town.eu/login/">prihláste</a>.
  504. </div>
  505. </article>
  506. </div>
  507. </div>
  508.  
  509. </div>
  510.  
  511. <?php }; ?>
  512.  
  513. <!-- Otváranie menu na mobiloch -->
  514. <script>
  515. document.addEventListener('DOMContentLoaded', function () {
  516.  
  517. // Get all "navbar-burger" elements
  518. var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
  519.  
  520. // Check if there are any navbar burgers
  521. if ($navbarBurgers.length > 0) {
  522.  
  523. // Add a click event on each of them
  524. $navbarBurgers.forEach(function ($el) {
  525. $el.addEventListener('click', function () {
  526.  
  527. // Get the target from the "data-target" attribute
  528. var target = $el.dataset.target;
  529. var $target = document.getElementById(target);
  530.  
  531. // Toggle the class on both the "navbar-burger" and the "navbar-menu"
  532. $el.classList.toggle('is-active');
  533. $target.classList.toggle('is-active');
  534.  
  535. });
  536. });
  537. }
  538.  
  539. });
  540. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement