mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 13:46:13 +00:00
Merged in botanic/rc-botanic-webdev/rc-botanic-webdev (pull request #36)
fixed php warnings and errors
This commit is contained in:
parent
84d5e2d0bd
commit
3a917562ff
7 changed files with 14 additions and 10 deletions
|
@ -29,13 +29,15 @@ class Users{
|
|||
if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success" ) and ( $email == "success" ) and ( isset( $_POST["TaC"] ) ) ){
|
||||
return "success";
|
||||
}else{
|
||||
global $TOS_URL;
|
||||
$pageElements = array(
|
||||
//'GAME_NAME' => $GAME_NAME,
|
||||
// 'WELCOME_MESSAGE' => $WELCOME_MESSAGE,
|
||||
'USERNAME' => $user,
|
||||
'PASSWORD' => $pass,
|
||||
'CPASSWORD' => $cpass,
|
||||
'EMAIL' => $email
|
||||
'EMAIL' => $email,
|
||||
'TOS_URL' => $TOS_URL
|
||||
);
|
||||
if ( $user != "success" ){
|
||||
$pageElements['USERNAME_ERROR'] = 'TRUE';
|
||||
|
@ -344,7 +346,7 @@ class Users{
|
|||
* @param $user the inserted username
|
||||
* @param $pass the inserted password
|
||||
*/
|
||||
protected function checkLoginMatch($user,$pass){
|
||||
protected static function checkLoginMatch($user,$pass){
|
||||
print('This is the base class!');
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class WebUsers extends Users{
|
|||
* @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 function checkLoginMatch($username,$password){
|
||||
public static function checkLoginMatch($username,$password){
|
||||
if(!user_authenticate($username, $password)){
|
||||
return 'fail';
|
||||
}else{
|
||||
|
|
|
@ -71,7 +71,7 @@ $cfg['crypt']['enc_method'] = 'AES-256-CBC';
|
|||
$cfg['crypt']['hash_method'] = "SHA512";
|
||||
|
||||
//terms of service url location
|
||||
$TOS_URL = variable_get('ryzommanage_TOS', 'www.mytosurlhere.com');
|
||||
$TOS_URL = variable_get('ryzommanage_TOS', 'http://www.gnu.org/licenses/agpl-3.0.html');
|
||||
//-----------------------------------------------------------------------------------------
|
||||
// If true= the server will add automatically unknown user in the database
|
||||
// (in nel.user= nel.permission= ring.ring_user and ring.characters
|
||||
|
|
|
@ -75,7 +75,7 @@ class WebUsers extends Users{
|
|||
* @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 function checkLoginMatch($username,$password){
|
||||
public static function checkLoginMatch($username,$password){
|
||||
|
||||
$dbw = new DBLayer("web");
|
||||
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username));
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
*/
|
||||
function register(){
|
||||
global $TOS_URL;
|
||||
$pageElements['tos_url'] = $TOS_URL;
|
||||
$pageElements['TOS_URL'] = $TOS_URL;
|
||||
return $pageElements;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
isset($TAC) and $TAC eq "success"}success{else}{/if}">
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag1}<a href='{$tos_url}'>{$tac_tag2}</a>
|
||||
<input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag1}<a href='{$TOS_URL}'>{$tac_tag2}</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,9 +55,11 @@
|
|||
<label class="control-label">username</label>
|
||||
<div class="controls">
|
||||
<select style="width: 140px;" name="Name">
|
||||
{if isset($users)}
|
||||
{foreach from=$users item=member}
|
||||
<option value="{$member.name}" >{$member.name}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue