INACTIVE Habbo Archive - PHP - PDO - MySQL - BCRYPT - MetroUI

Status
Not open for further replies.

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
7vU37DpqQoieqNVSnEEFUg.png

Hey guys, Berk here.

Today I'll be showing my latest project, Habbo Archive. I know that I still suck on PHP but I'm still learning so who cares! :up:

So about name, I know I could find a better name but, I can't as I'm not creative.

So my aim on this project is, making myself more experienced and having some fun.


This has no github at the moment, I might do soon as soon as I learn how to use git.


Code snippets:
Login: (Uses AJAX)
JS:
Code:
$('#btn-login').click(function() {
  var username = $('#login-username').val();
  var password = $('#login-password').val();
 
  new PNotify({
    title: 'Processing...',
    text: 'Logging you in...',
    type: 'info'
  });
 
  $.ajax({
    url : 'system/js/login.php',
    method: 'POST',
    data: {
      username: username,
      password: password
    }
  }).done(function(res) {
    new PNotify({
      title : 'Success!',
      text: 'Logged in! Redirecting in a moment...',
      type:'success'
    });
 
    setTimeout(function() {
      window.location.href = 'index.php';
    }, 2000);
  }).fail(function(err) {
    switch (err) {
      case 'username':
        return new PNotify({
          title: 'Invalid credentials!',
          text: "User doesn't exist!",
          type: 'error'
        });
      case 'password':
        return new PNotify({
          title: 'Invalid credentials!',
          text: 'Password is incorrect!',
          type: 'error'
        });
      default:
        return new PNotify({
          title: 'Error Occurred',
          text: 'An error occurred! Please contact the webmaster.',
          type: 'error'
        });
    }
  });
});
PHP:
PHP:
<?php
if (isset($_POST['username']) && isset($_POST['password'])) {
  include('../config.php');
 
  $username = $_POST['username'];
  $password = $_POST['password'];
 
  $stmt = $db->prepare('SELECT `password` FROM `users` WHERE `username` = :u');
  $stmt->bindParam(':u', $username, PDO::PARAM_STR);
  $stmt->execute();
 
  if ($stmt->rowCount() > 0) {
    $db_password = $stmt->fetchColumn();
 
    if (password_verify($password, $db_password)) {
     $_SESSION['harchive_login'] = true;
      $_SESSION['login'] = true;
      $_SESSION['username'] = $username;
      exit('success');


    } else {
      http_response_code(401);
      exit('password');
    }
  } else {
    http_response_code(401);
    exit('username');
  }
} else {
  http_response_code(403);
  exit('error here that doesnt really matter');
}

Index (Not Logged in):
fx83oaK9SoaBAleWSUfN9g.png

Index (Logged in, have staff abitlities):
PvxDUVvKScS7pOhW__I_NQ.png

Log in & Register:
XtFYx3ySSrW3t8G1EHlQpg.png

qH9Ig8FiRtyZsqGvopTGIw.png

Login in action:

ouf34vy0R9GQtjAg5YQqmQ.gif
Edit: Created a repo, check yourself.
So thats it for today, as soon as I do more things I'll get you guys notified.
 
Last edited:

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
Approved

Oh damn, this looks good. I like the theme, best of luck with this :)
 

yoyok

Member
Apr 24, 2013
197
24
You want people store all their Habbo files online so they don't lose it? This is one of the reason that data hijacking happens. Never store important files online.
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
You want people store all their Habbo files online so they don't lose it? This is one of the reason that data hijacking happens. Never store important files online.
This project is something like sulake.cc FailFish
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
You want people store all their Habbo files online so they don't lose it? This is one of the reason that data hijacking happens. Never store important files online.
I think it's more of a collection of released files (like mirrors) yeah, Sulake.cc or HabboFiles.com does this.
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Nice to nice to see you took inspiration from my old retro archive project man.

Good luck with this
Yeah, I thought this would be useful!

Thanks <3
 
IMPORTANT: Accepting VPS/Domains for a live demo. HMU on skype if you wish to gift!
 
Yeah, I thought this would be useful!

Thanks <3
 
IMPORTANT: Accepting VPS/Domains for a live demo. HMU on skype if you wish to gift!
Putting maintenance mode on in action:
sLcLDDDfSLSpu9cnNMNXDA.gif
 

Pinkman

Posting Freak
Jul 27, 2016
818
194
Well Mr. Developer I have to say this does have some inspiration from @LeChris project. Goodluck and don't listen to user yoyok (he is a bit :confused:)
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Well Mr. Developer I have to say this does have some inspiration from @LeChris project. Goodluck and don't listen to user yoyok (he is a bit :confused:)
Yeah, I spoke to chris already:) and ik,dw lol
 
#UPDATES BOYS!
Login in action:
ouf34vy0R9GQtjAg5YQqmQ.gif


(I know that something shows when page loads, I'm still trying to fix that)

 
Okay, I need ideas to how to show the site alert, thought a modal but that'd be annoying so, give me ideas!
 
Changing background for yourself, I did not code it but It's available for registered users at the moment.

mcW6R4joTTqK_gPCiuIeFg.gif
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Right um, So I don't know what to do anymore lol, everything is done as I see

What'd you guys see on this?
 

Hashh

adam
Apr 17, 2015
799
169
This stuff is really cool! Allot of people come out with extra things for retros, but I bet nobody will use it because they dont know how to set it up haha
 

yoyok

Member
Apr 24, 2013
197
24
Make it possible that other users also can upload files. That's the only way to grow the archive fast.
 
Last edited by a moderator:

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Make it possible that other users also can upload files. That's the only way to grow the archive fast.
yeah,its being implemented.
This stuff is really cool! Allot of people come out with extra things for retros, but I bet nobody will use it because they dont know how to set it up haha
Thanks,appreciate the kind words :)
 

LeChris

https://habbo.codes/
Sep 30, 2013
2,786
1,395
yeah,its being implemented.

Thanks,appreciate the kind words :)
An admin panel would be really important. Make it so you can add moderators to moderate the files and add the ability to comment on files, like them etc
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
An admin panel would be really important. Make it so you can add moderators to moderate the files and add the ability to comment on files, like them etc
Yeah, I'm planning on admin panel but, shall I keep MetroUI or use another panel? I thought would be nice but idk :p
 

LeChris

https://habbo.codes/
Sep 30, 2013
2,786
1,395
Yeah, I'm planning on admin panel but, shall I keep MetroUI or use another panel? I thought would be nice but idk :p
Use a different admin panel skin as it would be easier.

What I did myself tbh was build the admin panel into the main interface, without having a separate area dedicated to administration.

Meaning if you’re used has mod permissions it showed the mod tools as a separate clickable box that popped up a sidebar on each page
 
Status
Not open for further replies.

Users who are viewing this thread

Top