mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 18:10:54 +00:00
Merged default into lightmap_optimizer_port_to_linux
This commit is contained in:
commit
9cf10a8cf6
7 changed files with 27 additions and 23 deletions
|
@ -129,8 +129,8 @@ go_home = "Go Home"
|
|||
userlist_info = "welcome to the userlist"
|
||||
|
||||
[login]
|
||||
login_info = "Please login with your Username and Password."
|
||||
login_error_message = "The username/password were not correct!"
|
||||
login_info = "Please login with your Email/Username and Password."
|
||||
login_error_message = "The Email/username/password were not correct!"
|
||||
login_register_message ="<strong>Register</strong> If you don't have an account yet, create one"
|
||||
login_here = "here"
|
||||
login_forgot_password_message = "In case you forgot your password, click"
|
||||
|
|
|
@ -119,8 +119,8 @@ go_home = "Allez au main page"
|
|||
userlist_info = "bienvenue sur le userlist page!"
|
||||
|
||||
[login]
|
||||
login_info = "S'il vous plait vous connecter avec votre nom d'utilisateur et mot de passe."
|
||||
login_error_message = "Le remplie nom d'utilisateur / mot de passe ne sont pas correctes!"
|
||||
login_info = "S'il vous plait vous connecter avec votre Email/nom d'utilisateur et mot de passe."
|
||||
login_error_message = "Le remplie Email/nom d'utilisateur / mot de passe ne sont pas correctes!"
|
||||
login_register_message ="<strong> Inscrivez-vous </strong> Si vous n'avez pas encore de compte, creez-en un"
|
||||
login_here = "ici"
|
||||
login_forgot_password_message = "Dans le cas ou vous avez oublie votre mot de passe, cliquez"
|
||||
|
|
|
@ -70,15 +70,15 @@ class WebUsers extends Users{
|
|||
|
||||
|
||||
/**
|
||||
* check if the login username and password match the db.
|
||||
* @param $username the inserted username
|
||||
* check if the login username/email and password match the db.
|
||||
* @param $value the inserted username or email
|
||||
* @param $password the inserted password (unhashed)
|
||||
* @return the logged in user's db row as array if login was a success, else "fail" will be returned.
|
||||
*/
|
||||
public static function checkLoginMatch($username,$password){
|
||||
public static function checkLoginMatch($value,$password){
|
||||
|
||||
$dbw = new DBLayer("web");
|
||||
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username));
|
||||
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:value OR Email:value", array('value' => $value));
|
||||
$row = $statement->fetch();
|
||||
$salt = substr($row['Password'],0,2);
|
||||
$hashed_input_pass = crypt($password, $salt);
|
||||
|
@ -89,9 +89,9 @@ class WebUsers extends Users{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* returns te id for a given username
|
||||
* returns the id for a given username
|
||||
* @param $username the username
|
||||
* @return the user's id linked to the username
|
||||
*/
|
||||
|
@ -104,7 +104,7 @@ class WebUsers extends Users{
|
|||
|
||||
|
||||
/**
|
||||
* returns te id for a given emailaddress
|
||||
* returns the id for a given emailaddress
|
||||
* @param $email the emailaddress
|
||||
* @return the user's id linked to the emailaddress
|
||||
*/
|
||||
|
@ -118,7 +118,7 @@ class WebUsers extends Users{
|
|||
return "FALSE";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* get uId attribute of the object.
|
||||
|
@ -355,4 +355,4 @@ class WebUsers extends Users{
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,15 +9,16 @@ function login(){
|
|||
global $INGAME_WEBPATH;
|
||||
global $WEBPATH;
|
||||
try{
|
||||
$username = filter_var($_POST['Username'],FILTER_SANITIZE_STRING);
|
||||
$login_value = filter_var($_POST['LoginValue'],FILTER_SANITIZE_STRING);
|
||||
$password = filter_var($_POST['Password'],FILTER_SANITIZE_STRING);
|
||||
//check if the filtered sent POST data returns a match with the DB
|
||||
$result = WebUsers::checkLoginMatch($username, $password);
|
||||
|
||||
//check if the filtered sent POST data returns a match with the DB
|
||||
$result = WebUsers::checkLoginMatch($login_value, $password);
|
||||
|
||||
if( $result != "fail"){
|
||||
//handle successful login
|
||||
$_SESSION['user'] = $username;
|
||||
$_SESSION['id'] = WebUsers::getId($username);
|
||||
$_SESSION['user'] = $result['Login'];
|
||||
$_SESSION['id'] = $result['UId'];
|
||||
$_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id']));
|
||||
$user = new WebUsers($_SESSION['id']);
|
||||
$_SESSION['Language'] = $user->getLanguage();
|
||||
|
@ -54,4 +55,4 @@ function login(){
|
|||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
//load required pages and turn error reporting on/off
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 'on');
|
||||
require_once( '../../ams_lib/libinclude.php' );
|
||||
if (!file_exists('../is_installed')) {
|
||||
//if is_installed doesnt exist run setup
|
||||
require( 'installer/libsetup.php' );
|
||||
|
@ -24,6 +23,7 @@ if (!file_exists('../is_installed')) {
|
|||
//if config exists then include it
|
||||
require( '../config.php' );
|
||||
}
|
||||
require_once( $AMS_LIB.'/libinclude.php' );
|
||||
session_start();
|
||||
|
||||
//Running Cron?
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* This script will install all databases related to the Ryzom AMS and it will generate an admin account..
|
||||
* @author Daan Janssens, mentored by Matthew Lagoe
|
||||
*/
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
//set permissions
|
||||
if(is_writable('../../../www/login/logs')) {
|
||||
|
@ -34,7 +37,7 @@
|
|||
if (!isset($_POST['function'])) {
|
||||
//require the pages that are being needed.
|
||||
require_once( '../config.default.php' );
|
||||
require_once( '../../ams_lib/libinclude.php' );
|
||||
require_once( $AMS_LIB.'/libinclude.php' );
|
||||
ini_set( "display_errors", true );
|
||||
error_reporting( E_ALL );
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
</div>
|
||||
<form method="post" action="index.php{if isset($getstring)}{$getstring}{/if}" class="form-horizontal">
|
||||
<fieldset>
|
||||
<div data-rel="tooltip" class="input-prepend" data-original-title="Username">
|
||||
<span class="add-on"><i class="icon-user"></i></span><input type="text" value="" id="Username" name="Username" class="input-large span10" placeholder="Username">
|
||||
<div data-rel="tooltip" class="input-prepend" data-original-title="Username/Email">
|
||||
<span class="add-on"><i class="icon-user"></i></span><input type="text" value="" id="LoginValue" name="LoginValue" class="input-large span10" placeholder="Username or Email">
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue