Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.77 KB | None | 0 0
  1. <?php
  2. include('./classes/homepage/IndexHeader.php');
  3.  
  4. $index = 'index';
  5. $ip_check = $mysqli->query("SELECT * FROM users WHERE ip_last = '" . $my->ip . "' ");
  6. if ($ip_check->num_rows < 6) {
  7.  
  8. if (isset($_POST['submit'])) {
  9. if (isset($_SESSION['step2'])) {
  10. $username = protect($_SESSION['username']);
  11. $pw = $_SESSION['password'];
  12.  
  13. $mail = protect($_POST['mail']);
  14. $sicherheitsfrage = protect($_POST['sicherheitsfrage']);
  15. $sicherheitsantwort = protect($_POST['sicherheitsantwort']);
  16. $startroom = '0';
  17. $g_captcha = protect($_POST['g-recaptcha-response']);
  18.  
  19. $check = $mysqli->query("SELECT * FROM users WHERE UPPER(mail) = '" . strtoupper($mail) . "' ");
  20. if ($check->num_rows < 1) {
  21. if (filter_var($mail, FILTER_VALIDATE_EMAIL)) {
  22.  
  23. } else {
  24. $msg = 'E-Mail Adresse ist nicht g&uuml;ltig!';
  25. }
  26. } else {
  27. $msg = 'E-Mail Adresse existiert bereits!';
  28. }
  29.  
  30.  
  31. if (isset($msg)) {
  32. $fehler = 'true';
  33. } else {
  34. if (strlen($sicherheitsantwort) > 2) {
  35.  
  36.  
  37. $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . $register->googlecatpchasecretkey . "&response=" . $$g_captcha . "&remoteip=" . $my->ip);
  38. if ($response . success == false) {
  39. $msg = 'faBitte fülle den Captcha aus!';
  40. $fail = 'true';
  41. } else {
  42.  
  43.  
  44. $mysqli->query("INSERT INTO users (username, password, auth_ticket, rank, credits, activity_points, vip_points, look, motto, mail, account_created, ip_last, ip_reg, home_room, birth, privacy_ownsite, privacy_ownsite_money, privacy_ownsite_rooms, privacy_highscore, startroom, websocket, sicherheitsfrage, sicherheitsantwort, last_online, status, staff_inacc) VALUES
  45. ('" . $username . "', '" . $pw . "', '-/-', '1', '" . $register->credits . "', '" . $register->duckets . "', '" . $register->dias . "', '" . getSettings('register_look1') . "', '" . $register->motto . "', '" . $mail . "', '" . time() . "', '" . $my->ip . "', '" . $my->ip . "', '" . $register->homeroom . "', '0', '1', '1', '1', '1', '" . $startroom . "', '0', '" . $sicherheitsfrage . "', '" . $sicherheitsantwort . "', '0', '1', '0') ");
  46.  
  47. $searchid = $mysqli->query("SELECT * FROM users WHERE username = '" . $username . "' LIMIT 1");
  48. $row = $searchid->fetch_object();
  49.  
  50.  
  51. $mysqli->query("INSERT INTO user_stats (id) VALUES ('" . $row->id . "') ");
  52. $mysqli->query("INSERT INTO hp_modlog (user_id, action, bemerkung, timestamp) VALUES ('" . $row->id . "', 'register', '', '" . time() . "') ");
  53.  
  54. if (isset($_SESSION['ref_name'])) {
  55. $ref_name = protect($_SESSION['ref_name']);
  56.  
  57. $check = $mysqli->query("SELECT * FROM users WHERE username = '" . $ref_name . "' ");
  58. if ($check->num_rows > 0) {
  59. $ref = $check->fetch_object();
  60.  
  61. $mysqli->query("INSERT INTO user_geworben (eingeladen_id, einlader_id, eingeladen_ip) VALUES ('" . $row->id . "', '" . $ref->id . "', '" . $my->ip . "') ");
  62. $mysqli->query("UPDATE users SET credits = credits+4500, vip_points = vip_points+2 WHERE id = '" . $ref->id . "' ");
  63. MUS('addFriend', $ref->einlader_id . ' ' . $row->id);
  64. aktivitaetenstreamown($row->username, '... hat sich mit deinem REF-Link bei uns regisriert!');
  65. }
  66. }
  67.  
  68.  
  69. if (getlogin($row->id, $row->username, $row->password, 'REGISTER', 'keineweiterleitung') == 'true') {
  70. header("location: $path/me");
  71. exit;
  72. } else {
  73. echo 'not logged in';
  74. }
  75. }
  76. } else {
  77. $msg = 'Deine Sicherheitsantwort muss min. 3 Zeichen enthalten!';
  78. }
  79. }
  80. } else {
  81. $username = protect($_POST['username']);
  82. $pw = protect($_POST['pw']);
  83. $pwd = protect($_POST['pwd']);
  84. if (preg_match("/^[a-zA-Z0-9._]{3,15}$/", $username)) {
  85. $check = $mysqli->query("SELECT * FROM users WHERE UPPER(username) = '" . strtoupper($username) . "' ");
  86. if ($check->num_rows < 1) {
  87. if (strlen($username) > 2) {
  88. if (strlen($username) < 21) {
  89. if (substr(strtolower($username), 0, 4) == 'mod-' || substr(strtolower($username), 0, 4) == 'adm-' || substr(strtolower($username), 0, 6) == 'staff-') {
  90. $msg = 'faDieser Benutzername ist nicht zugelassen!';
  91. } else {
  92.  
  93. }
  94. } else {
  95. $msg = 'Der Benutzername ist zulang!';
  96. }
  97. } else {
  98. $msg = 'Username zu kurz!';
  99. }
  100. } else {
  101. $msg = 'Username existiert bereits!';
  102. }
  103. } else {
  104. $msg = 'Es gibt ungültige Zeichen in deinem Username!';
  105. }
  106.  
  107. if (isset($msg)) {
  108. $fehler = 'true';
  109. } else {
  110. if ($pw == $pwd) {
  111. if (strlen($pw) > 7) {
  112. $_SESSION['step2'] = true;
  113. $_SESSION ['password'] = pwhash($pw);
  114. $_SESSION['username'] = $username;
  115. } else {
  116. $msg = 'Dein Passwort muss mindestens 8 Zeichen haben!';
  117. $fehler = 'true';
  118. }
  119. } else {
  120. $msg = 'Passw&ouml;rter stimmen nicht &uuml;berrein';
  121. $fehler = 'true';
  122. }
  123. }
  124. }
  125. }
  126. } else {
  127. $index = 'moreAccounts';
  128. }
  129. ?>
  130.  
  131.  
  132. <div id="header">
  133.  
  134.  
  135. <div id="login">
  136. <div id="avatar">
  137. <div id="onlinebox">
  138. <b><?php echo getServerCount('users'); ?></b> <?php
  139. if (getServerCount('users') == '1') {
  140. echo 'Habbo';
  141. } else {
  142. echo 'Habbos';
  143. }
  144. ?> online
  145.  
  146. </div>
  147. </div>
  148.  
  149. <div id="avatar2"></div>
  150.  
  151. </form>
  152. </div>
  153. <div id="logo"></div>
  154. </div>
  155.  
  156.  
  157. <?php if ($index == 'index') { ?>
  158. <style>
  159. .center {
  160. width: 100%;
  161. margin: 0px auto;
  162. }
  163.  
  164. .input {
  165. float: left;
  166. }
  167.  
  168. .check {
  169. float: left;
  170. margin-left: 20px;
  171. width: 220px;
  172. height: 33px;
  173. line-height: 35px;
  174. text-align: center;
  175. border: 1px solid rgba(0, 0, 0, 0.2);
  176. border-bottom: 2px solid rgba(0, 0, 0, 0.2);
  177. border-radius: 3px;
  178. font-size: 12px;
  179. }
  180.  
  181. .room {
  182.  
  183. height: 167px;
  184. width: 167px;
  185. border: 3px solid rgba(0, 0, 0, 0.2);
  186. border-bottom: 2px solid rgba(0, 0, 0, 0.2);
  187. float: left;
  188. border-radius: 5px;
  189. margin-right: 20px;
  190. cursor: pointer;
  191. }
  192.  
  193. .room.active {
  194. border: 3px solid #2AB8D6;
  195.  
  196. }
  197.  
  198. .room1 {
  199. background: url('<?php echo $path; ?>/public/images/register/room1.png') no-repeat;
  200. background-color: #000;
  201. background-size: 150%;
  202. background-position: 40% 50%;
  203. }
  204.  
  205. .room2 {
  206. background: url('<?php echo $path; ?>/public/images/register/room2.png') no-repeat;
  207. background-color: #000;
  208. background-size: 150%;
  209. background-position: 40% 50%;
  210. }
  211.  
  212. .room3 {
  213. background: url('<?php echo $path; ?>/public/images/register/room3.png') no-repeat;
  214. background-color: #000;
  215. background-size: 150%;
  216. background-position: 48% 50%;
  217. }
  218.  
  219. .small {
  220. float: left;
  221. width: 100%;
  222. height: 20px;
  223. font-size: 12px;
  224. color: rgba(255, 255, 255 0.7);
  225. margin-bottom: 25px;
  226. margin-top: 5px;
  227. margin-left: 10px;
  228. }
  229.  
  230. .preis {
  231. float: left;
  232. background: #A58D57;
  233. width: 345px;
  234. height: 25px;
  235. line-height: 25px;
  236. padding-left: 10px;
  237. margin-bottom: 10px;
  238. border-radius: 4px;
  239. border: 2px solid #E3C47C;
  240. -webkit-box-shadow: 0 0 0 1px #000;
  241. box-shadow: 0 0 0 1px #000;
  242. color: #FFF;
  243. text-shadow: 1px 1px 0 #000;
  244. }
  245.  
  246. .preis .icon{
  247. float:right;
  248. background: url('https://habbo.tl/public/images/me/6.png') no-repeat;
  249. background-position: 35% 50%;
  250. height: 25px;
  251. width: 25px;
  252. border-radius: 4px;
  253. border: 2px solid #E3C47C;
  254. margin-top: -2px;
  255. margin-right: -3px;
  256. -webkit-box-shadow: 0 0 0 1px #000;
  257. box-shadow: 0 0 0 1px #000;
  258. }
  259.  
  260. #msg {
  261. float: left;
  262. width: 1000px;
  263. height: 35px;
  264. line-height: 35px;
  265. text-align: center;
  266. background: #B62B1C;
  267. font-size: 14px;
  268. color: #FFF;
  269. border-bottom: 2px solid rgba(0, 0, 0, 0.2);
  270. border-radius: 4px;
  271.  
  272. margin-top: 10px;
  273. }
  274.  
  275. </style>
  276. <div id="center">
  277.  
  278. <?php if (isset($msg)) { ?>
  279. <?php if ($fehler == 'true') { ?>
  280. <div id="msg" class="red"><?php echo $msg; ?></div>
  281. <?php } else { ?>
  282. <div id="msg" class="green"><?php echo $msg; ?></div>
  283. <?php } ?>
  284. <?php } ?>
  285.  
  286. <?php if (isset($_SESSION['step2'])) {
  287. ?>
  288. <div id="box" class="box register" style="color: #FFF;background: rgba(0, 0, 0, 0.6);float: right;width: 560px;height: 410px;margin-bottom: 10px;">
  289. <form action="" method="post">
  290. <script src='https://www.google.com/recaptcha/api.js'></script>
  291. <b>E-Mail Adresse</b><br>
  292. <input type="text" class="input input-email" name="mail" style="width: 540px;">
  293. <div class="small">Bitte gib eine aktuelle E-Mail Adresse an, mit dieser du dein Passwort jederzeit zur&uuml;cksetzten kannst. </div><br><br>
  294.  
  295.  
  296. <b>Sicherheitsfrage</b><br>
  297. <select name="sicherheitsfrage" class="input input-sicherheitsfrage" style="width: 540px;">
  298. <option value="1">Wie hei&szlig;t dein bester Freund mit Vornamen?</option>
  299. <option value="2">Wie hei&szlig;t die erste Schule die du besucht hast?</option>
  300. <option value="3">Wie hei&szlig;t du mit zweitem Vornamen?</opion>
  301. <option value="4">Wann hat deine Mutter Geburtstag? </option>
  302. <option value="5">Wann hast du deine erste Reise angetreten?</option>
  303. </select><br><br>
  304.  
  305. <input type="text" class="input input-sicherheitsantwort" name="sicherheitsantwort" style="margin-top: 10px;width: 540px;">
  306.  
  307. <div class="small">Die Sicherheitsfrage ist insofern wichtig, damit du dein Passwort sofort bei abhandenkommen &auml;ndern kannst. </div><br><br>
  308.  
  309.  
  310.  
  311.  
  312. <div style="float: right;">
  313. <div class="small" style="float: right;width:220px;margin-top: 20px;">Mit dem abschliessen der Registration, akzeptierst du unsere AGB.</div>
  314. </div>
  315.  
  316. <div style="margin-top: 20px;">
  317. <div class="g-recaptcha" data-sitekey="6LdrqAcTAAAAACoQ0M2wwnWZrVtVGmmgcg-I8wca"></div>
  318. </div>
  319.  
  320.  
  321. <input type="submit" class="submit green" name="submit" value="Account registrieren" style="width: 560px;margin-top: 40px;">
  322. </form>
  323. </div>
  324. <?php } else { ?>
  325. <div id="box" class="box register" style="color: #FFF;background: rgba(0, 0, 0, 0.6);float: right;width: 560px;height: 360px;margin-bottom: 10px;">
  326. <form action="" method="post">
  327. <b>Username</b><br>
  328. <input type="text" class="input input-username" name="username" style="width: 560px;" value="<?php echo $username; ?>">
  329. <div class="small">Bitte gib einen Habbo Nutzernamen an, mit diesem Namen bist du im Hotel sichtbar. </div><br><br>
  330.  
  331.  
  332. <b>Passwort</b><br>
  333. <input type="password" class="input input-password" name="pw" style="width: 560px;">
  334. <div class="small">Bitte gib ein vertrauliches Passwort ein, dieses muss mindestens 8 Zeichen beinhalten.</div><br><br>
  335.  
  336. <b>Passwort wiederholen</b><br>
  337. <input type="password" class="input input-password2" name="pwd" style="width: 560px;">
  338. <div class="small">Nur um sicherzugehen, dass du dein Passwort nicht unabsichtlich falsch geschrieben hast,<br> best&auml;tige es ein weiteres mal.</div><br><br>
  339. <br>
  340.  
  341. <input type="submit" class="submit green" style="width: 560px;" name="submit" value="Weiter zum 2. Schritt">
  342. </form>
  343. </div>
  344. <?php } ?>
  345.  
  346. <div id="box" class="box userinfo" style="width: 360px;float: left;height: 170px;">
  347. <div id="headtitle"">Das bist Du!</div>
  348. <div class="platte" style="float: left;margin-left:-15px;margin-top:-10px;background:url(<?php echo $path; ?>/public/images/me/platte.png) no-repeat;background-position:50% 50%;width:119px;height:195px">
  349. <img src="<?php echo $avatar . getSettings('register_look1'); ?>&head_direction=3&action=wav&gesture=sml" style="margin-top: -5px;position: absolute;margin-left: 25px;">
  350. </div>
  351. <br><span style="font-size: 13px;">Ich hei&#xdf;e im Habbo.tl:</span><br>
  352. &#xbb; <b style="font-size: 14px;"><?php
  353. if (isset($username)) {
  354. echo $username;
  355. } else {
  356. echo 'Unbekannt';
  357. }
  358. ?></b>
  359.  
  360. <br><br>
  361. </div>
  362. <div id="box" class="box userinfo" style="width: 360px;height: 160px;float: left;">
  363. <div id="headtitle">Willkommensgeschenk</div>
  364. <div class="preis">
  365. <div class="icon" style=""></div>
  366. <b><?php echo number_format($register->credits, 0, ',', ' '); ?></b> Taler
  367. </div>
  368.  
  369. <div class="preis" style="background: #A46615;border-color: #E28D1D;">
  370. <div class="icon" style="border-color: #E28D1D;background: url('https://habbo.tl/public/images/me/5.png')30% 50% no-repeat;"></div>
  371. <b><?php echo number_format($register->duckets, 0, ',', ' '); ?></b> Duckets
  372. </div>
  373.  
  374. <div class="preis" style="background: #875989;border-color: #BA7CC2;">
  375. <div class="icon" style="border-color: #BA7CC2;background: url('https://habbo.tl/public/images/me/8.png')50% 50% no-repeat;"></div>
  376. <b><?php echo number_format($register->dias, 0, ',', ' '); ?></b> Diamanten
  377. </div>
  378.  
  379. </div>
  380.  
  381. </div>
  382.  
  383.  
  384.  
  385.  
  386. <?php } ?>
  387.  
  388. <?php if ($index == 'moreAccounts') {
  389. ?>
  390. <div id="box" class="box register" style="float: right;width: 978px;height: 80px;margin-bottom: 10px;">
  391. <div id="headtitle">Multiaccount</div>
  392.  
  393. <center>Du kannst dich nicht mehr im Habbo Hotel registrieren, da du bereits mehr als 2 Accounts hast.</center>
  394. </div>
  395.  
  396. <?php } ?>
  397.  
  398. <?php include('./classes/homepage/IndexFooter.php'); ?>
  399.  
  400. <script>
  401.  
  402. function roomx(id)
  403. {
  404. var id = id;
  405. $(".room").removeClass('active');
  406. $(".room" + id).addClass('active');
  407. $(".startroom").val(id);
  408. }
  409.  
  410.  
  411.  
  412. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement