diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php
index 091a07c64..182f014cf 100644
--- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php
+++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php
@@ -1,7 +1,7 @@
$value ){
$smarty -> assign( $key, $value );
}
- if($vars['permission'] == 1){
- $inherited = "layout_admin.tpl";
- }else{
- $inherited = "layout_user.tpl";
- }
- //extends:' . $inherited .'|register.tpl
- $smarty -> display( $template.'.tpl' );
+ if( $vars['permission'] == 1 ){
+ $inherited = "layout_admin.tpl";
+ }else{
+ $inherited = "layout_user.tpl";
+ }
+ // extends:' . $inherited .'|register.tpl
+ $smarty -> display( $template . '.tpl' );
}
static public function create_folders(){
global $AMS_LIB;
global $SITEBASE;
- $arr = array( $AMS_LIB . '/ingame_templates/',
- $AMS_LIB . '/configs',
- $AMS_LIB . '/cache',
- $SITEBASE . '/cache/',
- $SITEBASE . '/templates/',
- $SITEBASE . '/templates_c/',
- $SITEBASE . '/configs'
- );
- foreach ( $arr as & $value ){
+ $arr = array( $AMS_LIB . '/ingame_templates/',
+ $AMS_LIB . '/configs',
+ $AMS_LIB . '/cache',
+ $SITEBASE . '/cache/',
+ $SITEBASE . '/templates/',
+ $SITEBASE . '/templates_c/',
+ $SITEBASE . '/configs'
+ );
+ foreach ( $arr as & $value ){
if ( !file_exists( $value ) ){
mkdir( $value );
}
- }
+ }
}
- static public function check_if_game_client()
+ static public function check_if_game_client()
{
// if HTTP_USER_AGENT is not set then its ryzom core
if ( !isset( $_SERVER['HTTP_USER_AGENT'] ) ){
diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sql.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sql.php
index f64122f7c..609ed8740 100644
--- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sql.php
+++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sql.php
@@ -1,11 +1,10 @@
$_POST["Username"],
'pass' => $_POST["Password"],
'mail' => $_POST["Email"],
@@ -31,7 +31,7 @@ class Users{
header( 'Location: email_sent.php' );
exit;
}else{
- $pageElements = array(
+ $pageElements = array(
'GAME_NAME' => variable_get( 'ryzommanage_game-name', '' ),
'WELCOME_MESSAGE' => variable_get( 'ryzommanage_register-welcome', '' ),
'USERNAME' => $user,
@@ -44,7 +44,7 @@ class Users{
}else{
$pageElements['USERNAME_ERROR'] = 'FALSE';
}
-
+
if ( $pass != "success" ){
$pageElements['PASSWORD_ERROR'] = 'TRUE';
}else{
@@ -68,10 +68,10 @@ class Users{
return $pageElements;
}
}
-
+
/**
* Function checkUser
- *
+ *
* @takes $username
* @return string Info: Returns a string based on if the username is valid, if valid then "success" is returned
*/
@@ -84,7 +84,7 @@ class Users{
return "Username must be 5 or more characters.";
}elseif ( !preg_match( '/^[a-z0-9\.]*$/', $username ) ){
return "Username can only contain numbers and letters.";
- }elseif ( sql :: db_query( "SELECT COUNT(*) FROM {users} WHERE name = :name", array(
+ }elseif ( sql :: db_query( "SELECT COUNT(*) FROM {users} WHERE name = :name", array(
':name' => $username
) ) -> fetchField() ){
return "Username " . $username . " is in use.";
@@ -98,7 +98,7 @@ class Users{
}
/**
* Function checkPassword
- *
+ *
* @takes $pass
* @return string Info: Returns a string based on if the password is valid, if valid then "success" is returned
*/
@@ -117,7 +117,7 @@ class Users{
}
/**
* Function confirmPassword
- *
+ *
* @takes $pass
* @return string Info: Verify's $_POST["Password"] is the same as $_POST["ConfirmPass"]
*/
@@ -132,16 +132,16 @@ class Users{
}
/**
* Function checkEmail
- *
+ *
* @takes $email
- * @return
+ * @return
*/
public function checkEmail( $email )
{
if ( isset( $email ) ){
if ( !validEmail( $email ) ){
return "Email address is not valid.";
- }elseif ( db_query( "SELECT COUNT(*) FROM {users} WHERE mail = :mail", array(
+ }elseif ( db_query( "SELECT COUNT(*) FROM {users} WHERE mail = :mail", array(
':mail' => $email
) ) -> fetchField() ){
return "Email is in use.";
@@ -230,4 +230,3 @@ class Users{
}
}
-
\ No newline at end of file
diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/libinclude.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/libinclude.php
index 86e7d3dbf..0d8606488 100644
--- a/code/ryzom/tools/server/ryzom_ams/ams_lib/libinclude.php
+++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/libinclude.php
@@ -3,6 +3,6 @@
// Base include file for library functions for AMS
// ***********************************************
function __autoload( $className ){
- require_once 'autoload/' . strtolower ($className) . '.php';
- }
+ require_once 'autoload/' . strtolower ( $className ) . '.php';
+ }
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/register.php b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/register.php
index 3821ccc3d..668b6a7a5 100644
--- a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/register.php
+++ b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/register.php
@@ -16,7 +16,7 @@ if ( isset( $_POST["Username"] ) and isset( $_POST["Password"] ) and isset( $_PO
}
// if all are good then create user
if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success" ) and ( $email == "success" ) and ( isset( $_POST["TaC"] ) ) ){
- $edit = array(
+ $edit = array(
'name' => $_POST["Username"],
'pass' => $_POST["Password"],
'mail' => $_POST["Email"],
@@ -29,7 +29,7 @@ if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success"
header( 'Location: email_sent.php' );
exit;
}else{
- $pageElements = array(
+ $pageElements = array(
'GAME_NAME' => $GAME_NAME,
'WELCOME_MESSAGE' => $WELCOME_MESSAGE,
'USERNAME' => $user,
@@ -42,7 +42,7 @@ if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success"
}else{
$pageElements['USERNAME_ERROR'] = 'FALSE';
}
-
+
if ( $pass != "success" ){
$pageElements['PASSWORD_ERROR'] = 'TRUE';
}else{
@@ -64,7 +64,7 @@ if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success"
$pageElements['TAC_ERROR'] = 'TRUE';
}
if ( helpers :: check_if_game_client() ){
- helpers :: loadtemplate( '../../ams_lib/ingame_templates/register.phtml', $pageElements );
+ helpers :: loadtemplate( '../../ams_lib/ingame_templates/register.phtml', $pageElements );
}else{
helpers :: loadtemplate( 'templates/register.phtml', $pageElements );
}
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css b/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css
new file mode 100644
index 000000000..fe0debbf4
--- /dev/null
+++ b/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css
@@ -0,0 +1,17 @@
+.login-header
+{
+ height:190px;
+}
+
+.brand img
+{
+ height:100%;
+ margin-bottom:-18px;
+ margin-top:-15px;
+ width:100%;
+}
+
+#for-is-ajax
+{
+ display:none;
+}
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/add_user.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/add_user.php
index 4010619f7..41284659e 100644
--- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/add_user.php
+++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/add_user.php
@@ -1,12 +1,12 @@
1, 'no_visible_elements' => 'TRUE');
+ }
+
+// temporary set permission to 1 which = admin mode
+$return = array( 'permission' => 1, 'no_visible_elements' => 'TRUE' );
helpers :: loadTemplate( $page , $return );
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/js/charisma.js b/code/ryzom/tools/server/ryzom_ams/www/html/js/charisma.js
index 6445ef69a..579174176 100644
--- a/code/ryzom/tools/server/ryzom_ams/www/html/js/charisma.js
+++ b/code/ryzom/tools/server/ryzom_ams/www/html/js/charisma.js
@@ -1,7 +1,7 @@
$(document).ready(function(){
//themes, change CSS with JS
//default theme(CSS) is cerulean, change it if needed
- var current_theme = $.cookie('current_theme')==null ? 'spacelab' :$.cookie('current_theme');
+ var current_theme = $.cookie('current_theme')==null ? 'cerulean' :$.cookie('current_theme');
switch_theme(current_theme);
$('#themes a[data-value="'+current_theme+'"]').find('i').addClass('icon-ok');
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/home.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/home.tpl
index adbb04939..ae7cabbfa 100644
--- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/home.tpl
+++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/home.tpl
@@ -11,7 +11,7 @@
-
+
-
+
-
+
@@ -53,7 +53,7 @@
-
+
-
+
Warning!
You need to have JavaScript enabled to use this site.
-
+
-
+
-
-
-
+
+
+
-
+
{/block}
diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl
index 3cda0b11b..56c8fe732 100644
--- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl
+++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl
@@ -51,7 +51,9 @@
-
+
+
+
@@ -66,7 +68,7 @@
-
+
-
+
-
+
Warning!
You need to have JavaScript enabled to use this site.
-
+
{/if}
@@ -231,7 +233,7 @@
-
-
+
+