Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('./inc/hotel_core.php');
- session_start();
- if(isset($_get['registercancel']) && filtertext($_get['registercancel'] == "true")){
- session_unset();
- }
- if(!session_is_registered(username)){
- if(isset($_post['username']) && isset($_post['password'])){
- $username = filtertext($_post['username']);
- $password = holohash($_post['password'], $username);
- $password2 = holohashmd5($_post['password'], $username);
- if(empty($username) || empty($_post['password'])){
- $login_error = "<center>usuário/senha incorretos!</center>";
- } else {
- $sql = mysql_query("select id from users where username = '".$username."' and password = '".$password."' or username = '".$username."' and password = '".$password2."' limit 1") or die(mysql_error());
- if(mysql_num_rows($sql) < 1){
- $login_error = "usuário/senha incorretos!";
- } else {
- $userdata = mysql_fetch_assoc($sql);
- $userid = $userdata['id'];
- if(mysql_num_rows($ban) < 1){
- mysql_query("update users set password = '".$password2."', ip_last = '".$remote_ip."' where username = '".$username."'");
- $_session['username'] = $username;
- $_session['password'] = $password2;
- if ($_post['_login_remember_me'] == "true"){
- setcookie("remember", "remember", time()+60*60*24*100, "/");
- setcookie("rusername", $_session['username'], time()+60*60*24*100, "/");
- setcookie("rpassword", $_session['password'], time()+60*60*24*100, "/");
- }
- header("location: $path/me"); exit;
- } else {
- $bandata = mysql_fetch_assoc($ban);
- $timestamp = time();
- if($bandata['expire'] > $timestamp){
- $login_error = "você foi banido por: \"" . $bandata['reason'] . "\" e acaba em: " . date('d/m/y - h:i:s', $bandata['expire']) . ".";
- } else {
- mysql_query("delete from bans where value = '".$username."' and bantype = 'user' or value = '".$remote_ip."' and bantype = 'ip' limit 1") or die(mysql_error());
- mysql_query("update users set password = '".$password2."', ip_last = '".$remote_ip."' where username = '".$username."'");
- $_session['username'] = $username;
- $_session['password'] = $password2;
- if ($_post['_login_remember_me'] == "true"){
- setcookie("remember", "remember", time()+60*60*24*100, "/");
- setcookie("rusername", $_session['username'], time()+60*60*24*100, "/");
- setcookie("rpassword", $_session['password'], time()+60*60*24*100, "/");
- }
- header("location: $path/me"); exit;
- }
- }
- }
- }
- }
- $body_id = "index";
- ?>
- <!doctype html>
- <!--================================================================================
- fwk - content management system
- versão: 0.6.89a - versão privada
- autor: matheus silva
- web-site: www.wamper.top/fwk
- ================================================================================ -->
- <html lang="en">
- <head><meta http-equiv="content-type" content="text/html; charset=windows-1252">
- <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1">
- <title><?php echo $shortname; ?>: seu novo mundo de pixels!</title>
- <link href="http://bootswatch.com/lumen/bootstrap.min.css" rel="stylesheet" type="text/css" />
- <link href="http://bootswatch.com/lumen/bootstrap.css" rel="stylesheet" type="text/css" />
- <link href="../css/_style.css?4" rel="stylesheet" type="text/css" />
- <body>
- <style>
- .putaria {
- color: #fff;
- font-family: segoe ui;
- font-weight: 300;
- margin-top: 200px;
- }
- body {
- background: url("../_images/bg-left.png") bottom left, url("../_images/bg-right.png") bottom right, -webkit-linear-gradient(#2b8ae8, #1831cf);
- background: url("../_images/bg-left.png") bottom left, url("../_images/bg-right.png") bottom right, -o-linear-gradient(#2b8ae8, #1831cf);
- background: url("../_images/bg-left.png") bottom left, url("../_images/bg-right.png") bottom right, -moz-linear-gradient(#2b8ae8, #1831cf);
- background: url("../_images/bg-left.png") bottom left, url("../_images/bg-right.png") bottom right, linear-gradient(#2b8ae8, #1831cf);
- background-repeat: no-repeat;
- background-attachment: fixed;
- color: #fff;
- }
- .text-shadow {
- text-shadow: 0 3px rgba(0, 0, 0, 0.1);
- }
- </style>
- <body>
- <div class="container" style="width: 1100px!important;margin-top:10px;">
- <div class="logo-texto" style=" margin-left: 0px;"><?php echo $shortname; ?></div>
- <div id="navbar" class="navbar-collapse collapse" style="margin-top:5px">
- <form name="logindd" id="logindd" role="form" action="<?php echo $path; ?>" method="post" class="navbar-form navbar-right">
- <div class="form-group">
- <input type="text" placeholder="usuário" class="form-control" name="username" id="credentials-email" value="">
- </div>
- <div class="form-group">
- <input type="password" placeholder="senha" class="form-control" name="password" id="credentials-password">
- </div>
- <button type="submit" name="submit" class="btn btn-default" style="margin-left: 0px;">login</button>
- <a href="/registro" class="btn btn-warning">registro</a></form>
- <?php if(isset($login_error)){ ?>
- <div class="row">
- <div class="col-md-7" style="float:right" >
- <div class="alert alert-dismissible alert-danger">
- <button type="button" class="close" data-dismiss="alert">×</button>
- usuário ou senha incorretos, tente novamente! =(
- </div></div></div>
- <?php } ?>
- </div>
- <div class="putaria"><div class="row">
- <div class="col-md-9">
- <h1 style="color:#fff; margin: 10px 0;" class="text-shadow">crie sua conta, jogue e divirta-se!</h1>
- <h2 style="color:#fff; margin: 10px 0;" class="text-shadow">bem-vind@s ao <?php echo $shortname; ?> </h2>
- <p class="lead text-shadow" style="color:#fff;">o <?php echo $shortname; ?> hotel é um mundo virtual para jogadores maiores de 8
- anos, onde você pode criar seu próprio personagem e projetar seu
- quarto do jeito que quiser. você poderá conhecer novos amigos, organizar
- festas, cuidar de mascotes virtuais, jogar e criar seus próprios
- jogos e completar tarefas.</p></div>
- <div class="col-md-3">
- <img src="../_images/creditsindex.gif" />
- </div>
- <?php
- } else {
- header("location:me.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement