Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. <?php
  2.  
  3. ############################################################################
  4. # #
  5. # _ _ _ _ _______ __ ___ ___ #
  6. # | | | | | | | | |__ __| /_ |/ _ \ / _ \ #
  7. # | |__| | __ _| |__ | |__ ___ | | ___ _ __ | | | | | | | | #
  8. # | __ |/ _` | '_ \| '_ \ / _ \| |/ _ \| '_ \| | | | | | | | #
  9. # | | | | (_| | |_) | |_) | (_) | | (_) | |_) | | |_| | |_| | #
  10. # |_| |_|\__,_|_.__/|_.__/ \___/|_|\___/| .__/|_|\___/ \___/ #
  11. # | | #
  12. # |_| #
  13. # #
  14. # PHP - MySQLi - OOP by Mike #
  15. ############################################################################
  16.  
  17. date_default_timezone_set('Europe/Amsterdam');
  18.  
  19. $sterren = 10; // Je speler krijgt nu 0 sterren bij het stemmen
  20. $pixels = 100; //Je speler krijgt 100 pixels
  21. $credits = 1000; //Je speler krijgt 1000 credits
  22. $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
  23. $username = $_SESSION['user']['username'];
  24. $apikey = '7707';
  25. $server = 'r63'; // R63B kan ook. !
  26.  
  27. $db = new mysqli("localhost", "root", "db", "ww"); // VERGEET DIT NIET IN TE VULLEN !
  28.  
  29. ?>
  30. <style>
  31. body
  32. {
  33. background-image: url(http://img15.hostingpics.net/pics/279302summer1.png) ;
  34. background-size: cover; /* <------ */
  35. background-repeat: no-repeat;
  36. background-position: center center; /* optionally, center the image */
  37. }
  38. #box
  39. {
  40. margin:0 auto;
  41. margin-top:10%;
  42. border: 1px solid #ebeff6;
  43. padding: 20px;
  44. border-radius: 3px;
  45. margin-bottom: 15px;
  46. background: #FFF;
  47. width: 300px;
  48. height:auto;
  49. font-size: 16px;
  50. }
  51. input[type="submit"]{
  52. border: 1px solid #ebeff6;
  53. border-radius:4px;
  54. width:100%;
  55. padding:20px;
  56. background-color:grey;
  57. }
  58. </style>
  59. <div id="box">He jij!<br />
  60. Dus jij wilt stemmen op ons hotel?
  61. <br />
  62. Klik dan snel op de onderstaande button !
  63. <?php if(isset($_POST['stemmen'])){
  64. $check = file_get_contents("http://habbotop.net/vote/vote_controle.php?apikey=".$apikey."&ip=".$ip."");
  65. if($check == '1'){
  66. header("Location: /client");
  67. }else{?>
  68. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
  69. <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
  70. <script>
  71. $(document).ready(function() {
  72. var imessage = $('test').val();
  73. post_data = {'apikey':'<?php echo $apikey; ?>','ip':'<?php echo $ip ?>'};
  74. $.post('http://habbotop.net/vote/vote.client.php', post_data,
  75. function(data) {
  76. });
  77. });
  78. </script>
  79.  
  80. <?php
  81. header("Location: /client");
  82. if($server == 'r63'){
  83. $db->query("UPDATE users SET vip_points = vip_points + ".$sterren.", credits = credits + ".$credits.", activity_points = activity_points + ".$pixels." WHERE username = '".$_SESSION['user']['username']."'");
  84. }else{
  85. $db->query("UPDATE users SET vip_points = vip_points + ".$sterren.", credits = credits + ".$credits.", activity_points = activity_points + ".$pixels." WHERE username = '".$_SESSION['user']['username']."'");
  86. }
  87. }
  88. }
  89. ?>
  90. <form action="" method="POST">
  91. <input type="submit" name="stemmen" value="Stem op ons hotel">
  92. </form>
  93. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement