mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 09:49:05 +00:00
Merge with quitta-gsoc-2013
This commit is contained in:
parent
1ae434bed6
commit
d22fe6aa84
30 changed files with 1078 additions and 305 deletions
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
class DBLayer{
|
||||
|
||||
private $PDO;
|
||||
|
||||
function __construct($db)
|
||||
{
|
||||
try{
|
||||
$dsn = "mysql:";
|
||||
$dsn .= "host=". $db['host'].";";
|
||||
$dsn .= "dbname=". $db['name'].";";
|
||||
$dsn .= "port=". $db['port'].";";
|
||||
|
||||
$opt = array(
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
|
||||
);
|
||||
$this->PDO = new PDO($dsn,$db['user'],$db['pass'], $opt);
|
||||
}catch (PDOException $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function executeWithoutParams($query){
|
||||
try{
|
||||
$statement = $this->PDO->prepare($query);
|
||||
$statement->execute();
|
||||
return $statement;
|
||||
}catch (PDOException $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function execute($query,$params){
|
||||
try{
|
||||
$statement = $this->PDO->prepare($query);
|
||||
$statement->execute($params);
|
||||
return $statement;
|
||||
}catch (PDOException $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -25,21 +25,34 @@ class Helpers{
|
|||
$smarty -> setConfigDir( $SITEBASE . '/configs' );
|
||||
}
|
||||
|
||||
foreach ( $vars as $key => $value ){
|
||||
foreach ( $vars as $key => $value ){
|
||||
$smarty -> assign( $key, $value );
|
||||
}
|
||||
if ( isset( $_GET["language"] ) ){
|
||||
$language = $_GET["language"];
|
||||
if ( file_exists( $AMS_TRANS . '/' . $language . '.ini' ) ){
|
||||
|
||||
}else{
|
||||
global $DEFAULT_LANGUAGE;
|
||||
$language = $DEFAULT_LANGUAGE;
|
||||
}
|
||||
}else{
|
||||
global $DEFAULT_LANGUAGE;
|
||||
$language = $DEFAULT_LANGUAGE;
|
||||
}
|
||||
|
||||
global $DEFAULT_LANGUAGE;
|
||||
//if language get param is given = set cookie
|
||||
//else if no get param is given and a cookie is set, use that language, else use default.
|
||||
if ( isset( $_GET['language'] ) ) {
|
||||
//check if the language is supported
|
||||
if ( file_exists( $AMS_TRANS . '/' . $_GET['language'] . '.ini' ) ){
|
||||
//if it's supported, set cookie!
|
||||
setcookie( 'language',$_GET['language'], time() + 60*60*24*30 );
|
||||
$language = $_GET['language'];
|
||||
}else{
|
||||
//the language is not supported, use the default.
|
||||
$language = $DEFAULT_LANGUAGE;
|
||||
}
|
||||
}else{
|
||||
//if no get param is given, check if a cookie value for language is set
|
||||
if ( isset( $_COOKIE['language'] ) ) {
|
||||
$language = $_COOKIE['language'];
|
||||
}
|
||||
//else use the default
|
||||
else{
|
||||
$language = $DEFAULT_LANGUAGE;
|
||||
}
|
||||
}
|
||||
|
||||
$variables = parse_ini_file( $AMS_TRANS . '/' . $language . '.ini', true );
|
||||
foreach ( $variables[$template] as $key => $value ){
|
||||
$smarty -> assign( $key, $value );
|
||||
|
|
45
code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sync.php
Normal file
45
code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sync.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
class Sync{
|
||||
|
||||
/**
|
||||
*
|
||||
* Function syncdata
|
||||
*
|
||||
* @takes Nothing
|
||||
* @return array $values
|
||||
*
|
||||
* Info: Runs functions to finish syncing data when shard is offline
|
||||
*
|
||||
*/
|
||||
static public function syncdata () {
|
||||
|
||||
global $cfg;
|
||||
|
||||
try {
|
||||
$dbl = new DBLayer($cfg['db']['lib']);
|
||||
$statement = $dbl->executeWithoutParams("SELECT * FROM ams_querycache");
|
||||
$rows = $statement->fetchAll();
|
||||
$dbs = new DBLayer($cfg['db']['shard']);
|
||||
foreach ($rows as $record) {
|
||||
|
||||
switch($record['type']) {
|
||||
case 'createPermissions':
|
||||
case 'user_edit':
|
||||
case 'createUser':
|
||||
$decode = json_decode($record['query']);
|
||||
$query = array('login' => $decode[0], 'pass' => $decode[1], 'mail' => $decode[2] );
|
||||
//make connection with and put into shard db & delete from the lib
|
||||
$dbs->execute("INSERT INTO user (Login, Password, Email) VALUES (:login, :pass, :mail)",$query);
|
||||
$dbl->execute("DELETE FROM ams_querycache WHERE SID=:SID",array('SID' => $record['SID']));
|
||||
}
|
||||
}
|
||||
print('Syncing completed');
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
print('Something went wrong!');
|
||||
print_r($e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
class Users{
|
||||
|
||||
public function add_user(){
|
||||
|
||||
helpers :: loadtemplate( 'register', $pageElements );
|
||||
|
||||
}
|
||||
|
||||
public function check_Register(){
|
||||
|
||||
/**
|
||||
* Function check_register
|
||||
*
|
||||
* @takes $array with username,password and email
|
||||
* @return string Info: Returns a string, if input data is valid then "success" is returned, else an array with errors
|
||||
*/
|
||||
public function check_Register($values){
|
||||
// check values
|
||||
if ( isset( $_POST["Username"] ) and isset( $_POST["Password"] ) and isset( $_POST["Email"] ) ){
|
||||
$user = Users :: checkUser( $_POST["Username"] );
|
||||
$pass = Users :: checkPassword( $_POST["Password"] );
|
||||
$cpass = Users :: confirmPassword($pass);
|
||||
$email = Users :: checkEmail( $_POST["Email"] );
|
||||
if ( isset( $values["Username"] ) and isset( $values["Password"] ) and isset( $values["Email"] ) ){
|
||||
$user = Users::checkUser( $values["Username"] );
|
||||
$pass = Users::checkPassword( $values["Password"] );
|
||||
$cpass = Users::confirmPassword($pass);
|
||||
$email = Users::checkEmail( $values["Email"] );
|
||||
}else{
|
||||
$user = "";
|
||||
$pass = "";
|
||||
|
@ -62,6 +62,9 @@ class Users{
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function checkUser
|
||||
|
@ -69,37 +72,46 @@ class Users{
|
|||
* @takes $username
|
||||
* @return string Info: Returns a string based on if the username is valid, if valid then "success" is returned
|
||||
*/
|
||||
public function checkUser( $username )
|
||||
{
|
||||
if ( isset( $username ) ){
|
||||
if ( strlen( $username ) > 12 ){
|
||||
return "Username must be no more than 12 characters.";
|
||||
}elseif ( strlen( $username ) < 5 ){
|
||||
return "Username must be 5 or more characters.";
|
||||
}elseif ( !preg_match( '/^[a-z0-9\.]*$/', $username ) ){
|
||||
return "Username can only contain numbers and letters.";
|
||||
}elseif ( $username == "" ){
|
||||
return "You have to fill in a username";
|
||||
|
||||
/*}elseif ( sql :: db_query( "SELECT COUNT(*) FROM {users} WHERE name = :name", array(
|
||||
':name' => $username
|
||||
) ) -> fetchField() ){
|
||||
return "Username " . $username . " is in use.";*/
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
return "fail";
|
||||
}
|
||||
private function checkUser( $username )
|
||||
{
|
||||
if ( isset( $username ) ){
|
||||
if ( strlen( $username ) > 12 ){
|
||||
return "Username must be no more than 12 characters.";
|
||||
}else if ( strlen( $username ) < 5 ){
|
||||
return "Username must be 5 or more characters.";
|
||||
}else if ( !preg_match( '/^[a-z0-9\.]*$/', $username ) ){
|
||||
return "Username can only contain numbers and letters.";
|
||||
}else if ( $username == "" ){
|
||||
return "You have to fill in a username";
|
||||
}elseif ($this->checkUserNameExists($username)){
|
||||
return "Username " . $username . " is in use.";
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
return "fail";
|
||||
}
|
||||
|
||||
/**
|
||||
* Function checkUserNameExists
|
||||
*
|
||||
* @takes $username
|
||||
* @return string Info: Returns true or false if the user is in the www db.
|
||||
*/
|
||||
protected function checkUserNameExists($username){
|
||||
//You should overwrite this method with your own version!
|
||||
print('this is the base class!');
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function checkPassword
|
||||
*
|
||||
* @takes $pass
|
||||
* @return string Info: Returns a string based on if the password is valid, if valid then "success" is returned
|
||||
*/
|
||||
public function checkPassword( $pass )
|
||||
private function checkPassword( $pass )
|
||||
{
|
||||
if ( isset( $pass ) ){
|
||||
if ( strlen( $pass ) > 20 ){
|
||||
|
@ -114,13 +126,15 @@ class Users{
|
|||
}
|
||||
return "fail";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function confirmPassword
|
||||
*
|
||||
* @takes $pass
|
||||
* @return string Info: Verify's $_POST["Password"] is the same as $_POST["ConfirmPass"]
|
||||
*/
|
||||
public function confirmPassword($pass_result)
|
||||
private function confirmPassword($pass_result)
|
||||
{
|
||||
if ( ( $_POST["Password"] ) != ( $_POST["ConfirmPass"] ) ){
|
||||
return "Passwords do not match.";
|
||||
|
@ -133,34 +147,51 @@ class Users{
|
|||
}
|
||||
return "fail";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function checkEmail
|
||||
*
|
||||
* @takes $email
|
||||
* @return
|
||||
*/
|
||||
public function checkEmail( $email )
|
||||
private function checkEmail( $email )
|
||||
{
|
||||
if ( isset( $email ) ){
|
||||
if ( !Users::validEmail( $email ) ){
|
||||
return "Email address is not valid.";
|
||||
}else if($email == ""){
|
||||
return "You have to fill in an email address";
|
||||
}else if ($this->checkEmailExists($email)){
|
||||
return "Email is in use.";
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
/*}elseif ( db_query( "SELECT COUNT(*) FROM {users} WHERE mail = :mail", array(
|
||||
':mail' => $email
|
||||
) ) -> fetchField() ){
|
||||
return "Email is in use.";}*/
|
||||
else{
|
||||
return "success";
|
||||
}
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
return "fail";
|
||||
}
|
||||
|
||||
public function validEmail( $email ){
|
||||
|
||||
/**
|
||||
* Function checkEmailExists
|
||||
*
|
||||
* @takes $username
|
||||
* @return string Info: Returns true or false if the user is in the www db.
|
||||
*/
|
||||
protected function checkEmailExists($email){
|
||||
//TODO: You should overwrite this method with your own version!
|
||||
print('this is the base class!');
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function validEmail
|
||||
*
|
||||
* @takes $email
|
||||
* @return true or false depending on if its a valid email format.
|
||||
*/
|
||||
private function validEmail( $email ){
|
||||
$isValid = true;
|
||||
$atIndex = strrpos( $email, "@" );
|
||||
if ( is_bool( $atIndex ) && !$atIndex ){
|
||||
|
@ -203,6 +234,14 @@ class Users{
|
|||
return $isValid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function generateSALT
|
||||
*
|
||||
* @takes $length, which is by default 2
|
||||
* @return a random salt of 2 chars
|
||||
*/
|
||||
public function generateSALT( $length = 2 )
|
||||
{
|
||||
// start with a blank salt
|
||||
|
@ -236,56 +275,28 @@ class Users{
|
|||
return $salt;
|
||||
}
|
||||
|
||||
function create_Server_User($params)
|
||||
{
|
||||
try {
|
||||
$hostname = 'localhost';
|
||||
$port = '3306';
|
||||
$dbname = 'nel';
|
||||
$username = 'shard';
|
||||
$password = '';
|
||||
$dbh = new PDO("mysql:host=$hostname;port=$port;dbname=$dbname", $username, $password);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$statement = $dbh->prepare("INSERT INTO user (Login, Password, Email) VALUES (?, ?, ?)");
|
||||
$statement->execute($params);
|
||||
return "success";
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
return "fail";
|
||||
}
|
||||
// createPermissions(array($login));
|
||||
}
|
||||
|
||||
function createUser($values){
|
||||
|
||||
$libhost = $values["libhost"];
|
||||
$libport = $values["libport"];
|
||||
$libdbname = $values["libdbname"];
|
||||
$libusername = $values["libusername"];
|
||||
$libpassword = $values["libpassword"];
|
||||
|
||||
$shardhost = $values["shardhost"];
|
||||
$shardport = $values["shardport"];
|
||||
$sharddbname = $values["sharddbname"];
|
||||
$shardusername = $values["shardusername"];
|
||||
$shardpassword = $values["shardpassword"];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function create
|
||||
*
|
||||
* @takes $array with name,pass and mail
|
||||
* @return ok if it's get correctly added to the shard, else return lib offline and put in libDB, if libDB is also offline return liboffline.
|
||||
*/
|
||||
public function createUser($values){
|
||||
try {
|
||||
//make connection with and put into shard db
|
||||
$dbs = new PDO("mysql:host=$shardhost;port=$shardport;dbname=$sharddbname", $shardusername, $shardpassword);
|
||||
$dbs->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$statement = $dbs->prepare("INSERT INTO user (Login, Password, Email) VALUES (:name, :pass, :mail)");
|
||||
$statement->execute($values["params"]);
|
||||
global $cfg;
|
||||
$dbs = new DBLayer($cfg['db']['shard']);
|
||||
$dbs->execute("INSERT INTO user (Login, Password, Email) VALUES (:name, :pass, :mail)",$values["params"]);
|
||||
return "ok";
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
//oh noooz, the shard is offline! Put in query queue at ams_lib db!
|
||||
try {
|
||||
$dbl = new PDO("mysql:host=$libhost;port=$libport;dbname=$libdbname", $libusername, $libpassword);
|
||||
$dbl->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$params = array("type" => "createUser","query" => json_encode(array($values["params"]["name"],$values["params"]["pass"],$values["params"]["mail"])));
|
||||
$statement = $dbl->prepare("INSERT INTO ams_querycache (type, query) VALUES (:type, :query)");
|
||||
$statement->execute($params);
|
||||
$dbl = new DBLayer($cfg['db']['lib']);
|
||||
$dbl->execute("INSERT INTO ams_querycache (type, query) VALUES (:type, :query)",array("type" => "createUser",
|
||||
"query" => json_encode(array($values["name"],$values["pass"],$values["mail"]))));
|
||||
return "shardoffline";
|
||||
}catch (PDOException $e) {
|
||||
print_r($e);
|
||||
|
@ -293,8 +304,7 @@ class Users{
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
require( '../libinclude.php' );
|
||||
require( '../../www/config.php' );
|
||||
|
||||
Sync::syncdata();
|
|
@ -2,10 +2,33 @@
|
|||
; Comments start with ';', as in php.ini
|
||||
|
||||
[home]
|
||||
home_title = "Introduction"
|
||||
home_info = "Welcome to the Ryzom Core - Account Management System"
|
||||
|
||||
[settings]
|
||||
|
||||
[libuserlist]
|
||||
libuserlist_title = "LibDB-Query List"
|
||||
libuserlist_info = "Here you can see the entire list of elements in the LibDB-Query table. You can easily remove elements and by pressing 'Synchronize' you can start the syncing process manually!"
|
||||
libuserlist_sync = "Synchronize"
|
||||
shard_online = "The shard seems to be <strong>online</strong>, manually syncing is possible: "
|
||||
shard_offline = "The shard seems to be <strong>offline</strong>, manually syncing is not possible!"
|
||||
members = "Members"
|
||||
id = "ID"
|
||||
type = "Type"
|
||||
name = "Name"
|
||||
email = "Email"
|
||||
action = "Action"
|
||||
|
||||
|
||||
[userlist]
|
||||
userlist_info = "welcome to the userlist"
|
||||
|
||||
[login]
|
||||
login_info = "Please login with your Username and Password."
|
||||
login_error_message = "The filled in username/password were not correct!"
|
||||
login_register_message ="<strong>Register</strong>If you dont have an account yet, create one"
|
||||
login_register_message_here = "here"
|
||||
|
||||
[logout]
|
||||
logout_message = "You've been logged out successfully!"
|
||||
|
|
|
@ -1,21 +1,70 @@
|
|||
; This is a sample configuration file
|
||||
; Comments start with ';', as in php.ini
|
||||
|
||||
[home]
|
||||
home_title = "Presentation"
|
||||
home_info = "Bienvenue sur le Ryzom Core - Account Management System"
|
||||
|
||||
[settings]
|
||||
|
||||
[libuserlist]
|
||||
libuserlist_title = "LibDB-Query Liste"
|
||||
libuserlist_info = "Ici vous pouvez voir la liste complete des elements dans le tableau libdb-Query. Vous pouvez facilement supprimer des elements et appuyant sur 'Synchroniser', vous pouvez commencer le processus de synchronisation manuellement!"
|
||||
libuserlist_sync = "Synchroniser"
|
||||
shard_online = "Le shard semble etre <strong> ligne </strong>, la synchronisation manuellement est possible: "
|
||||
shard_offline = "Le shard semble etre <strong> deconnecte </strong>, la synchronisation manuellement n' est pas possible!"
|
||||
members = "Membres"
|
||||
id = "ID"
|
||||
type = "Categorie"
|
||||
name = "Nom"
|
||||
email = "Email"
|
||||
action = "Action"
|
||||
|
||||
[userlist]
|
||||
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_register_message ="<strong> Inscrivez-vous </strong> Si vous n'avez pas encore de compte, creez-en un"
|
||||
login_register_message_here = "ici"
|
||||
|
||||
[logout]
|
||||
logout_message = "Vous avez été déconnecté avec succès!"
|
||||
login_title = "Identifier"
|
||||
login_timer = "Vous serez redirigé vers la page de connexion à "
|
||||
login_text = "Ou cliquez ici si vous ne voulez pas attendre!"
|
||||
|
||||
[register_feedback]
|
||||
status_ok = "Vous vous êtes inscrit comme un patron!"
|
||||
status_shardoffline = "Il semble que le shard est déconnecté, vous pouvez utiliser le web-compte, mais vous devrez attendre pour le tesson."
|
||||
status_liboffline = "Vous ne pouvez pas enregistrer un compte à l'heure actuelle"
|
||||
login_title = "Identifier"
|
||||
login_timer = "Vous serez redirigé vers la page de connexion à "
|
||||
login_text = "Ou cliquez ici si vous ne voulez pas attendre!"
|
||||
|
||||
[register]
|
||||
title = "RYZOM base dans ENREGISTREMENT DU JEU"
|
||||
welcome_message = "Bienvenue! S'il vous plaît remplissez les champs ci-dessous pour obtenir votre nouveau compte de base de Ryzom:"
|
||||
welcome_message = "Bienvenue! S'il vous plait remplissez les champs ci-dessous pour obtenir votre nouveau compte de base de Ryzom:"
|
||||
|
||||
username_tag = "Nom d'utilisateur désiré:"
|
||||
username_tag = "Nom d'utilisateur desire:"
|
||||
username_tooltip = "5-12 caractères et de chiffres minuscules. Le login (nom d'utilisateur) que vous créez ici sera votre nom de connexion. Le nom de vos personnages de jeu sera choisi plus tard."
|
||||
username_default = "Nom d'utilisateur"
|
||||
|
||||
password_tag = "désiré Mot de passe:"
|
||||
password_tag = "desire Mot de passe:"
|
||||
password_tooltip = "Prendre un mot de passe dificille, il faut etre 5-20 caracteres"
|
||||
password_message = "mot de passe doit être 5-20 caractères."
|
||||
password_default = "Mot de passe"
|
||||
|
||||
cpassword_tag = "Confirmer le mot de passe:"
|
||||
cpassword_message = "Retapez votre mot de passe"
|
||||
cpassword_tooltip = "Retapez votre mot de passe"
|
||||
cpassword_default = "Re-entrer mot de passe"
|
||||
|
||||
email_tag = "Adresse de courriel (pour qui un email de confirmation vous sera envoyé):"
|
||||
email_tag= "email adresse"
|
||||
email_tooltip = "Adresse de courriel (pour qui un email de confirmation vous sera envoyé):"
|
||||
email_message = "Veuillez vérifier que l'adresse e-mail que vous entrez ici est valable et restera valable à l'avenir. Elle ne sera utilisée que pour gérer votre compte de base de Ryzom."
|
||||
email_default = "email"
|
||||
|
||||
tac_tag = "OUI, j'accepte les termes de service."
|
||||
tac_message = "Vous devez accepter les Conditions d'utilisation."
|
||||
tac_message = "Vous devez accepter les Conditions d'utilisation."
|
|
@ -7,26 +7,23 @@
|
|||
// where we can find the mysql database
|
||||
//-----------------------------------------------------------------------------------------
|
||||
|
||||
//the www db
|
||||
$WEBDBHOST = 'localhost';
|
||||
$WEBDBPORT = '3306';
|
||||
$WEBDBNAME = 'ryzom_ams';
|
||||
$WEBDBUSERNAME = 'root';
|
||||
$WEBDBPASSWORD = '' ;
|
||||
$cfg['db']['web']['host'] = 'localhost';
|
||||
$cfg['db']['web']['port'] = '3306';
|
||||
$cfg['db']['web']['name'] = 'ryzom_ams';
|
||||
$cfg['db']['web']['user'] = 'root';
|
||||
$cfg['db']['web']['pass'] = '';
|
||||
|
||||
//the ams_lib db
|
||||
$LIBDBHOST = 'localhost';
|
||||
$LIBDBPORT = '3306';
|
||||
$LIBDBNAME = 'ryzom_ams_lib';
|
||||
$LIBDBUSERNAME = 'root';
|
||||
$LIBDBPASSWORD = '' ;
|
||||
$cfg['db']['lib']['host'] = 'localhost';
|
||||
$cfg['db']['lib']['port'] = '3306';
|
||||
$cfg['db']['lib']['name'] = 'ryzom_ams_lib';
|
||||
$cfg['db']['lib']['user'] = 'root';
|
||||
$cfg['db']['lib']['pass'] = '';
|
||||
|
||||
//the shard db
|
||||
$SHARDDBHOST = 'localhost' ;
|
||||
$SHARDDBPORT = '3306';
|
||||
$SHARDDBNAME = 'nel' ;
|
||||
$SHARDDBUSERNAME = 'shard' ;
|
||||
$SHARDDBPASSWORD = '' ;
|
||||
$cfg['db']['shard']['host'] = 'localhost';
|
||||
$cfg['db']['shard']['port'] = '3306';
|
||||
$cfg['db']['shard']['name'] = 'nel';
|
||||
$cfg['db']['shard']['user'] = 'shard';
|
||||
$cfg['db']['shard']['pass'] = '';
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
// If true= the server will add automatically unknown user in the database
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?php
|
||||
|
||||
session_unset();
|
||||
session_destroy();
|
||||
$pageElements['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'logout', $pageElements);
|
||||
exit();
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
class WebUsers extends Users{
|
||||
|
||||
/**
|
||||
* Function checkUserNameExists
|
||||
*
|
||||
* @takes $username
|
||||
* @return string Info: Returns true or false if the user is in the web db.
|
||||
*/
|
||||
protected function checkUserNameExists($username){
|
||||
global $cfg;
|
||||
$dbw = new DBLayer($cfg['db']['web']);
|
||||
return $dbw->execute("SELECT * FROM ams_user WHERE Login = :name",array('name' => $username))->rowCount();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function checkEmailExists
|
||||
*
|
||||
* @takes $username
|
||||
* @return string Info: Returns true or false if the user is in the www db.
|
||||
*/
|
||||
protected function checkEmailExists($email){
|
||||
global $cfg;
|
||||
$dbw = new DBLayer($cfg['db']['web']);
|
||||
return $dbw->execute("SELECT * FROM ams_user WHERE Email = :email",array('email' => $email))->rowCount();
|
||||
}
|
||||
}
|
|
@ -4451,3 +4451,4 @@ i[class^="icon-"] {
|
|||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,3 +19,17 @@
|
|||
.navbar {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
.flags {
|
||||
display: block;
|
||||
position:relative;
|
||||
left:290px;
|
||||
top:28px;
|
||||
}
|
||||
|
||||
.flags_no_visible_elements{
|
||||
display: block;
|
||||
position:relative;
|
||||
left:67%;
|
||||
top:210px;
|
||||
}
|
67
code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php
Normal file
67
code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
function add_user(){
|
||||
|
||||
$params = Array('Username' => $_POST["Username"], 'Password' => $_POST["Password"], 'Email' => $_POST["Email"]);
|
||||
$webUser = new WebUsers;
|
||||
$result = $webUser->check_Register($params);
|
||||
|
||||
// if all are good then create user
|
||||
if ( $result == "success"){
|
||||
$edit = array(
|
||||
'name' => $_POST["Username"],
|
||||
'pass' => $_POST["Password"],
|
||||
'mail' => $_POST["Email"],
|
||||
'init' => $_POST["Email"],
|
||||
'unhashpass' => $_POST["Password"],
|
||||
'status' => 1,
|
||||
'access' => $_SERVER['REQUEST_TIME']
|
||||
);
|
||||
$status = write_user( $edit );
|
||||
$pageElements['status'] = $status;
|
||||
$pageElements['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
||||
exit;
|
||||
}else{
|
||||
// pass error
|
||||
$result['prevUsername'] = $_POST["Username"];
|
||||
$result['prevPassword'] = $_POST["Password"];
|
||||
$result['prevConfirmPass'] = $_POST["ConfirmPass"];
|
||||
$result['prevEmail'] = $_POST["Email"];
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'register', $result);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function write_user($newUser){
|
||||
|
||||
//create salt here, because we want it to be the same on the web/server
|
||||
$hashpass = crypt($newUser["pass"], WebUsers::generateSALT());
|
||||
|
||||
$params = array(
|
||||
'name' => $newUser["name"],
|
||||
'pass' => $hashpass,
|
||||
'mail' => $newUser["mail"]
|
||||
);
|
||||
|
||||
//Create the user on the shard + in case shard is offline put copy of query in query db
|
||||
//returns: ok, shardoffline or liboffline
|
||||
$result = WebUsers::createUser($params);
|
||||
|
||||
try{
|
||||
//make connection with web db and put it in there
|
||||
global $cfg;
|
||||
$dbw = new DBLayer($cfg['db']['web']);
|
||||
$dbw->execute("INSERT INTO ams_user (Login, Password, Email) VALUES (:name, :pass, :mail)",$params);
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print_r($e);
|
||||
exit;
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
|
@ -2,18 +2,11 @@
|
|||
|
||||
function login(){
|
||||
|
||||
global $WEBDBHOST;
|
||||
global $WEBDBPORT;
|
||||
global $WEBDBNAME;
|
||||
global $WEBDBUSERNAME;
|
||||
global $WEBDBPASSWORD;
|
||||
global $cfg;
|
||||
|
||||
try{
|
||||
$dbw = new PDO("mysql:host=$WEBDBHOST;port=$WEBDBPORT;dbname=$WEBDBNAME", $WEBDBUSERNAME, $WEBDBPASSWORD);
|
||||
$dbw->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$statement = $dbw->prepare("SELECT * FROM ams_user WHERE Login=:user");
|
||||
$statement->execute(array('user' => $_POST['Username']));
|
||||
$dbw = new DBLayer($cfg['db']['web']);
|
||||
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $_POST['Username']));
|
||||
|
||||
$row = $statement->fetch();
|
||||
$salt = substr($row['Password'],0,2);
|
BIN
code/ryzom/tools/server/ryzom_ams/www/html/img/en.png
Normal file
BIN
code/ryzom/tools/server/ryzom_ams/www/html/img/en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 725 B |
BIN
code/ryzom/tools/server/ryzom_ams/www/html/img/fr.png
Normal file
BIN
code/ryzom/tools/server/ryzom_ams/www/html/img/fr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 675 B |
|
@ -1,102 +0,0 @@
|
|||
<?php
|
||||
|
||||
function add_user(){
|
||||
$result = Users :: check_Register();
|
||||
//print_r($result);
|
||||
// if all are good then create user
|
||||
if ( $result == "success"){
|
||||
$edit = array(
|
||||
'name' => $_POST["Username"],
|
||||
'pass' => $_POST["Password"],
|
||||
'mail' => $_POST["Email"],
|
||||
'init' => $_POST["Email"],
|
||||
'unhashpass' => $_POST["Password"],
|
||||
'status' => 1,
|
||||
'access' => $_SERVER['REQUEST_TIME']
|
||||
);
|
||||
//header( 'Location: email_sent.php' );
|
||||
$status = write_user( $edit );
|
||||
$pageElements['status'] = $status;
|
||||
//TODO: perhaps send email!
|
||||
$pageElements['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
||||
exit;
|
||||
}else{
|
||||
// pass error
|
||||
$result['prevUsername'] = $_POST["Username"];
|
||||
$result['prevPassword'] = $_POST["Password"];
|
||||
$result['prevConfirmPass'] = $_POST["ConfirmPass"];
|
||||
$result['prevEmail'] = $_POST["Email"];
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'register', $result);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function write_user($newUser){
|
||||
|
||||
//get the db specifics out of the config file
|
||||
global $WEBDBHOST;
|
||||
global $WEBDBPORT;
|
||||
global $WEBDBNAME;
|
||||
global $WEBDBUSERNAME;
|
||||
global $WEBDBPASSWORD;
|
||||
|
||||
global $LIBDBHOST;
|
||||
global $LIBDBPORT;
|
||||
global $LIBDBNAME;
|
||||
global $LIBDBUSERNAME;
|
||||
global $LIBDBPASSWORD;
|
||||
|
||||
global $SHARDDBHOST;
|
||||
global $SHARDDBPORT;
|
||||
global $SHARDDBNAME;
|
||||
global $SHARDDBUSERNAME;
|
||||
global $SHARDDBPASSWORD;
|
||||
|
||||
//create salt here, because we want it to be the same on the web/server
|
||||
$hashpass = crypt($newUser["pass"], Users::generateSALT());
|
||||
|
||||
$params = array(
|
||||
'name' => $newUser["name"],
|
||||
'pass' => $hashpass,
|
||||
'mail' => $newUser["mail"]
|
||||
);
|
||||
|
||||
//print_r($params);
|
||||
//make a $values array for passing all data to the Users::createUser() function.
|
||||
$values["params"] = $params;
|
||||
$values["libhost"] = $LIBDBHOST;
|
||||
$values["libport"] = $LIBDBPORT;
|
||||
$values["libdbname"] = $LIBDBNAME;
|
||||
$values["libusername"] = $LIBDBUSERNAME;
|
||||
$values["libpassword"] = $LIBDBPASSWORD ;
|
||||
|
||||
$values["shardhost"] = $SHARDDBHOST;
|
||||
$values["shardport"] = $SHARDDBPORT;
|
||||
$values["sharddbname"] = $SHARDDBNAME;
|
||||
$values["shardusername"] = $SHARDDBUSERNAME;
|
||||
$values["shardpassword"] = $SHARDDBPASSWORD;
|
||||
|
||||
|
||||
//Create the user on the shard + in case shard is offline put copy of query in query db
|
||||
//returns ok, shardoffline or liboffline
|
||||
$result = Users :: createUser($values);
|
||||
|
||||
try{
|
||||
//make connection with web db and put it in there
|
||||
$dbw = new PDO("mysql:host=$WEBDBHOST;port=$WEBDBPORT;dbname=$WEBDBNAME", $WEBDBUSERNAME, $WEBDBPASSWORD);
|
||||
$dbw->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$statement = $dbw->prepare("INSERT INTO ams_user (Login, Password, Email) VALUES (:name, :pass, :mail)");
|
||||
$statement->execute($params);
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print_r($e);
|
||||
exit;
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
|
||||
function libuserlist(){
|
||||
|
||||
//This checks to see if there is a page number. If not, it will set it to page 1
|
||||
if (!(isset($_GET['pagenum']))){
|
||||
$pagenum = 1;
|
||||
}else{
|
||||
$pagenum = $_GET['pagenum'];
|
||||
}
|
||||
|
||||
//Here we count the number of results
|
||||
global $cfg;
|
||||
$dbl = new DBLayer($cfg['db']['lib']);
|
||||
$rows = $dbl->executeWithoutParams("SELECT * FROM ams_querycache")->rowCount();
|
||||
|
||||
//the array hat will contain all users
|
||||
$pageResult['liblist'] = Array();
|
||||
if($rows > 0){
|
||||
//This is the number of results displayed per page
|
||||
$page_rows = 2;
|
||||
|
||||
//This tells us the page number of our last page
|
||||
$last = ceil($rows/$page_rows);
|
||||
|
||||
//this makes sure the page number isn't below one, or more than our maximum pages
|
||||
if ($pagenum < 1)
|
||||
{
|
||||
$pagenum = 1;
|
||||
}else if ($pagenum > $last) {
|
||||
$pagenum = $last;
|
||||
}
|
||||
|
||||
//This sets the range to display in our query
|
||||
$max = 'limit ' .($pagenum - 1) * $page_rows .',' .$page_rows;
|
||||
|
||||
//This is your query again, the same one... the only difference is we add $max into it
|
||||
$data = $dbl->executeWithoutParams("SELECT * FROM ams_querycache $max");
|
||||
|
||||
//This is where we put the results in a resultArray to be sent to smarty
|
||||
|
||||
$i = 0;
|
||||
while($row = $data->fetch(PDO::FETCH_ASSOC)){
|
||||
$decode = json_decode($row['query']);
|
||||
$pageResult['liblist'][$i]['id'] = $row['SID'];
|
||||
$pageResult['liblist'][$i]['type'] = $row['type'];
|
||||
$pageResult['liblist'][$i]['name'] = $decode[0];
|
||||
$pageResult['liblist'][$i]['mail'] = $decode[2];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
//check if shard is online
|
||||
try{
|
||||
$dbs = new DBLayer($cfg['db']['shard']);
|
||||
$pageResult['shard'] = "online";
|
||||
}catch(PDOException $e) {
|
||||
$pageResult['shard'] = "offline";
|
||||
}
|
||||
return $pageResult;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
function logout(){
|
||||
session_unset();
|
||||
session_destroy();
|
||||
}
|
|
@ -5,35 +5,35 @@ require( '../config.php' );
|
|||
require( '../../ams_lib/libinclude.php' );
|
||||
session_start();
|
||||
|
||||
//print_r($_SESSION);
|
||||
|
||||
//perform an action in case one is specified
|
||||
if ( isset( $_POST["function"] ) ){
|
||||
require( "inc/" . $_POST["function"] . ".php" );
|
||||
$return = $_POST["function"]();
|
||||
}
|
||||
|
||||
//Decide what page to load
|
||||
if(isset($_SESSION['user'])){
|
||||
$page = 'home';
|
||||
$return['username'] = $_SESSION['user'];
|
||||
}else{
|
||||
//default page
|
||||
$page = 'login';
|
||||
}
|
||||
|
||||
if ( isset( $_GET["page"] ) ){
|
||||
$page = $_GET["page"];
|
||||
}
|
||||
|
||||
function loadpage ( $page ){
|
||||
$filename = 'autoload/' . $page . '.php';
|
||||
//perform an action in case one is specified
|
||||
//else check if a php page is included in the inc folder, else just set page to the get param
|
||||
if ( isset( $_POST["function"] ) ){
|
||||
require( "func/" . $_POST["function"] . ".php" );
|
||||
$return = $_POST["function"]();
|
||||
}else if ( isset( $_GET["page"] ) ){
|
||||
$filename = 'inc/' . $_GET["page"] . '.php';
|
||||
if(is_file($filename)){
|
||||
require_once($filename);
|
||||
$return = $_GET["page"]();
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
}
|
||||
|
||||
loadpage($page);
|
||||
//add username to the return array in case logged in.
|
||||
if(isset($_SESSION['user'])){
|
||||
$return['username'] = $_SESSION['user'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Set permission
|
||||
if(isset($_SESSION['permission'])){
|
||||
|
|
|
@ -25,3 +25,4 @@ function show_help(help_tip)
|
|||
|
||||
}
|
||||
|
||||
$("#sync").click(function() {alert("Handler for .click() called.");});
|
|
@ -1,21 +1,15 @@
|
|||
<?php
|
||||
require( '../../config.php' );
|
||||
require( '../../../ams_lib/libinclude.php' );
|
||||
ini_set( "display_errors", true );
|
||||
error_reporting( E_ALL );
|
||||
|
||||
global $WEBDBHOST;
|
||||
global $WEBDBUSERNAME;
|
||||
global $WEBDBPASSWORD;
|
||||
|
||||
global $LIBDBHOST;
|
||||
global $LIBDBUSERNAME;
|
||||
global $LIBDBPASSWORD;
|
||||
global $cfg;
|
||||
|
||||
|
||||
try{
|
||||
//SETUP THE WWW DB
|
||||
$dbw = new PDO("mysql:host=$WEBDBHOST;", $WEBDBUSERNAME, $WEBDBPASSWORD);
|
||||
$dbw->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbw = new DBLayer($cfg['db']['web']);
|
||||
$sql = "
|
||||
CREATE DATABASE IF NOT EXISTS `ryzom_ams`;
|
||||
USE `ryzom_ams`;
|
||||
|
@ -32,12 +26,10 @@
|
|||
|
||||
);
|
||||
";
|
||||
$statement = $dbw->prepare($sql);
|
||||
$statement->execute();
|
||||
$dbw->executeWithoutParams($sql);
|
||||
|
||||
//SETUP THE AMS_LIB DB
|
||||
$dbl = new PDO("mysql:host=$LIBDBHOST;", $LIBDBUSERNAME, $LIBDBPASSWORD);
|
||||
$dbl->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbl = new DBLayer($cfg['db']['lib']);
|
||||
$sql = "
|
||||
CREATE DATABASE IF NOT EXISTS `ryzom_ams_lib`;
|
||||
USE `ryzom_ams_lib`;
|
||||
|
@ -49,16 +41,34 @@
|
|||
`query` VARCHAR( 512 ) NOT NULL
|
||||
);
|
||||
";
|
||||
$statement = $dbl->prepare($sql);
|
||||
$statement->execute();
|
||||
print('Install completed successful!');
|
||||
$dbl->executeWithoutParams($sql);
|
||||
print "The Lib & Web database were correctly installed! <br />";
|
||||
|
||||
//Now create an admin account!
|
||||
$hashpass = crypt("admin", Users::generateSALT());
|
||||
$params = array(
|
||||
'name' => "admin",
|
||||
'pass' => $hashpass,
|
||||
'mail' => "admin@admin.com",
|
||||
);
|
||||
Users::createUser($params);
|
||||
try{
|
||||
$params['permission'] = 2;
|
||||
$dbw = new DBLayer($cfg['db']['web']);
|
||||
$dbw->execute("INSERT INTO ams_user (Login, Password, Email, Permission) VALUES (:name, :pass, :mail, :permission)",$params);
|
||||
print "The admin account is created, you can login with id: admin, pass: admin!";
|
||||
}catch (PDOException $e){
|
||||
print "There was an error while creating the admin account! ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print('There was an error while installing');
|
||||
print "There was an error while installing";
|
||||
print_r($e);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<div class="row-fluid">
|
||||
<div class="box span12">
|
||||
<div class="box-header well">
|
||||
<h2><i class="icon-info-sign"></i> Introduction</h2>
|
||||
<h2><i class="icon-info-sign"></i> {$home_title}</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
|
||||
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
|
||||
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p><strong>Welcome to the Ryzom Core - Account Management System</strong></p>
|
||||
<p><strong>{$home_info}</strong></p>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
|
|
@ -102,9 +102,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="btn-group pull-right">
|
||||
<div class="flags">
|
||||
<img src="img/en.png" onclick="document.cookie='language=en';document.location.reload(true);"/>
|
||||
<img src="img/fr.png" onclick="document.cookie='language=fr';document.location.reload(true);"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- user dropdown ends -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -118,7 +122,8 @@
|
|||
<ul class="nav nav-tabs nav-stacked main-menu">
|
||||
{block name=menu}{/block}
|
||||
</ul>
|
||||
<label id="for-is-ajax" class="hidden-tablet" for="is-ajax" style="visibility:hidden;"><div id="uniform-is-ajax" class="checker"><span class="checked"><input style="opacity: 0;" id="is-ajax" type="checkbox"></span></div> Ajax on menu</label>
|
||||
<label id="for-is-ajax" class="hidden-tablet" for="is-ajax"><input id="is-ajax" type="checkbox"> Ajax on menu</label>
|
||||
<!--<label id="for-is-ajax" class="hidden-tablet" for="is-ajax" style="visibility:hidden;"><div id="uniform-is-ajax" class="checker"><span class="checked"><input style="opacity: 0;" id="is-ajax" type="checkbox"></span></div> Ajax on menu</label>--!>
|
||||
</div><!--/.well -->
|
||||
</div><!--/span-->
|
||||
<!-- left menu ends -->
|
||||
|
@ -133,6 +138,15 @@
|
|||
<div id="content" class="span10">
|
||||
<!-- content starts -->
|
||||
{/if}
|
||||
|
||||
{if isset($no_visible_elements) and $no_visible_elements eq "TRUE"}
|
||||
|
||||
<div class="flags_no_visible_elements">
|
||||
<img src="img/en.png" onclick="document.cookie='language=en';document.location.reload(true);"/>
|
||||
<img src="img/fr.png" onclick="document.cookie='language=fr';document.location.reload(true);"/>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
{block name=content}{/block}
|
||||
|
||||
|
@ -240,6 +254,7 @@
|
|||
<script src="js/charisma.js"></script>
|
||||
<!-- help script for page help -->
|
||||
<script src="js/help.js"></script>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
{extends file="layout.tpl"}
|
||||
{block name=menu}
|
||||
<li class="nav-header hidden-tablet">Main</li>
|
||||
<li><a class="ajax-link" href="index.php"><i class="icon-home"></i><span class="hidden-tablet"> Dashboard</span></a></li>
|
||||
<li><a class="ajax-link" href="settings.php"><i class="icon-cog"></i><span class="hidden-tablet"> Settings</span></a></li>
|
||||
<li><a href="logout.php"><i class="icon-lock"></i><span class="hidden-tablet"> Logout</span></a></li>
|
||||
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php"><i class="icon-home"></i><span class="hidden-tablet"> Dashboard</span></a></li>
|
||||
<li class="nav-header hidden-tablet">Admin</li>
|
||||
<li><a class="ajax-link" href="checkuser.php"><i class="icon-user"></i><span class="hidden-tablet">UserList</span></a></li>
|
||||
<li><a class="ajax-link" href="banlist.php"><i class="icon-remove"></i><span class="hidden-tablet"> BanList</span></a></li>
|
||||
<li class="nav-header hidden-tablet">Ticketing</li>
|
||||
<li><a class="ajax-link" href="generalqueue.php"><i class="icon-th-list"></i><span class="hidden-tablet"> General Queue</span></a></li>
|
||||
<li><a class="ajax-link" href="personalQueue.php"><i class="icon-tag"></i><span class="hidden-tablet"> Personal Queue</span></a></li>
|
||||
<li><a class="ajax-link" href="archive.php"><i class="icon-folder-open"></i><span class="hidden-tablet"> Ticket Archive</span></a></li>
|
||||
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php?page=libuserlist"><i class="icon-th-list"></i><span class="hidden-tablet"> Liblist</span></a></li>
|
||||
<li class="nav-header hidden-tablet">Actions</li>
|
||||
<li style="margin-left: -2px;"><a href="?page=logout"><i class="icon-off"></i><span class="hidden-tablet"> Logout </span></a></li>
|
||||
|
||||
{/block}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{extends file="layout.tpl"}
|
||||
{block name=menu}
|
||||
<li class="nav-header hidden-tablet">Main</li>
|
||||
<li style="margin-left: -2px;" class="active"><a class="ajax-link" href="?page=home"><i class="icon-home"></i><span class="hidden-tablet"> Dashboard</span></a></li>
|
||||
<li class="nav-header hidden-tablet">Sample Section</li>
|
||||
<li style="margin-left: -2px;"><a href="?page=login"><i class="icon-lock"></i><span class="hidden-tablet"> Login Page</span></a></li>
|
||||
<li style="margin-left: -2px;" class="active"><a class="ajax-link" href="index.php"><i class="icon-home"></i><span class="hidden-tablet"> Dashboard</span></a></li>
|
||||
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php?page=userlist"><i class="icon-home"></i><span class="hidden-tablet"> Demo Userlist</span></a></li>
|
||||
<li class="nav-header hidden-tablet">Actions</li>
|
||||
<li style="margin-left: -2px;"><a href="?page=logout"><i class="icon-off"></i><span class="hidden-tablet"> Logout </span></a></li>
|
||||
{/block}
|
||||
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
{block name=content}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="box span12">
|
||||
<div class="box-header well">
|
||||
<h2><i class="icon-info-sign"></i>{$libuserlist_title}</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
|
||||
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
|
||||
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<center>
|
||||
<p>{$libuserlist_info}</p>
|
||||
{if $shard eq "online"}
|
||||
<div class="alert alert-success">
|
||||
<i class="icon-refresh icon-white"></i>{$shard_online}<a href="#" id="sync" onclick="sync()">{$libuserlist_sync}</a>
|
||||
<script>
|
||||
function sync(){
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
xmlhttp.open("POST","../../../ams_lib/cron/sync_cron.php",true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
{else}
|
||||
<div class="alert alert-error">
|
||||
<strong><i class="icon-refresh icon-white"></i></strong> {$shard_offline}
|
||||
</div>
|
||||
{/if}
|
||||
</center>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid sortable">
|
||||
<div class="box span12">
|
||||
<div class="box-header well" data-original-title>
|
||||
<h2><i class="icon-user"></i> {$members}</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
|
||||
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<table class="table table-striped table-bordered bootstrap-datatable datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$id}</th>
|
||||
<th>{$type}</th>
|
||||
<th>{$name}</th>
|
||||
<th>{$email}</th>
|
||||
<th>{$action}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$liblist item=element}
|
||||
<tr>
|
||||
<td>{$element.id}</td>
|
||||
<td class="center">{$element.type}</td>
|
||||
<td class="center">{$element.name}</td>
|
||||
<td class="center">{$element.mail}</td>
|
||||
<td class="center">
|
||||
<a class="btn btn-danger" href="index.php?page=libuserlist&action=remove&id={$element.id}"><i class="icon-trash icon-white"></i>Delete</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!--/span-->
|
||||
|
||||
</div><!--/row-->
|
||||
{/block}
|
||||
|
|
@ -43,8 +43,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
<div class="alert alert-info">
|
||||
<strong>Register</strong>
|
||||
If you dont have an account yet, create one <a href="?page=register">here</a>!
|
||||
{$login_register_message} <a href="?page=register">{$login_register_message_here}</a>!
|
||||
</div>
|
||||
</div><!--/span-->
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,400 @@
|
|||
{block name=content}
|
||||
<div class="row-fluid">
|
||||
<div class="box span12">
|
||||
<div class="box-header well">
|
||||
<h2><i class=" icon-user"></i> Settings</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#info">Change Password</a></li>
|
||||
<li><a href="#custom">Change Email</a></li>
|
||||
<li><a href="#messages">Change Info</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane active" id="info">
|
||||
<form id="changePassword" class="form-vertical" method="post" action="index.php">
|
||||
<legend>Change Password</legend>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Current Password</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on" style="margin-left:5px;"><i class="icon-lock"></i></span>
|
||||
<input type="password" class="input-xlarge" id="CurrentPass" name="CurrentPass" placeholder="Your current password">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">New Password</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on" style="margin-left:5px;"><i class="icon-tag"></i></span>
|
||||
<input type="password" class="input-xlarge" id="NewPass" name="NewPass" placeholder="Your new password">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Confirm New Password</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on" style="margin-left:5px;"><i class="icon-tags"></i></span>
|
||||
<input type="password" class="input-xlarge" id="ConfirmNewPass" name="ConfirmNewPass" placeholder="Re-enter the new password">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="function" value="change_password">
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:5px; margin-top:10px;">Change Password</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-pane" id="custom">
|
||||
<form id="changeEmail" class="form-vertical" method="post" action="index.php">
|
||||
<legend>Change Email</legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label">New Email</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on" style="margin-left:5px;"><i class="icon-envelope"></i></span>
|
||||
<input type="text" class="input-xlarge" id="NewEmail" name="NewEmail" placeholder="Your new email">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="function" value="change_email">
|
||||
<div class="control-group">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:5px; margin-top:10px;">Change Email</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-pane" id="messages">
|
||||
<form id="changeEmail" class="form-vertical" method="post" action="index.php">
|
||||
<legend>Change Info</legend>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Firstname</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on" style="margin-left:5px;"><i class="icon-user"></i></span>
|
||||
<input type="text" class="input-xlarge" id="Firstname" name="Firstname" placeholder="Your firstname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Lastname</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on" style="margin-left:5px;"><i class="icon-user"></i></span>
|
||||
<input type="text" class="input-xlarge" id="Lastname" name="Lastname" placeholder="Your lastname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Country</label>
|
||||
<div class="controls">
|
||||
<select>
|
||||
<option value="AF">Afghanistan</option>
|
||||
<option value="AX">Åland Islands</option>
|
||||
<option value="AL">Albania</option>
|
||||
<option value="DZ">Algeria</option>
|
||||
<option value="AS">American Samoa</option>
|
||||
<option value="AD">Andorra</option>
|
||||
<option value="AO">Angola</option>
|
||||
<option value="AI">Anguilla</option>
|
||||
<option value="AQ">Antarctica</option>
|
||||
<option value="AG">Antigua and Barbuda</option>
|
||||
<option value="AR">Argentina</option>
|
||||
<option value="AM">Armenia</option>
|
||||
<option value="AW">Aruba</option>
|
||||
<option value="AU">Australia</option>
|
||||
<option value="AT">Austria</option>
|
||||
<option value="AZ">Azerbaijan</option>
|
||||
<option value="BS">Bahamas</option>
|
||||
<option value="BH">Bahrain</option>
|
||||
<option value="BD">Bangladesh</option>
|
||||
<option value="BB">Barbados</option>
|
||||
<option value="BY">Belarus</option>
|
||||
<option value="BE">Belgium</option>
|
||||
<option value="BZ">Belize</option>
|
||||
<option value="BJ">Benin</option>
|
||||
<option value="BM">Bermuda</option>
|
||||
<option value="BT">Bhutan</option>
|
||||
<option value="BO">Bolivia, Plurinational State of</option>
|
||||
<option value="BQ">Bonaire, Sint Eustatius and Saba</option>
|
||||
<option value="BA">Bosnia and Herzegovina</option>
|
||||
<option value="BW">Botswana</option>
|
||||
<option value="BV">Bouvet Island</option>
|
||||
<option value="BR">Brazil</option>
|
||||
<option value="IO">British Indian Ocean Territory</option>
|
||||
<option value="BN">Brunei Darussalam</option>
|
||||
<option value="BG">Bulgaria</option>
|
||||
<option value="BF">Burkina Faso</option>
|
||||
<option value="BI">Burundi</option>
|
||||
<option value="KH">Cambodia</option>
|
||||
<option value="CM">Cameroon</option>
|
||||
<option value="CA">Canada</option>
|
||||
<option value="CV">Cape Verde</option>
|
||||
<option value="KY">Cayman Islands</option>
|
||||
<option value="CF">Central African Republic</option>
|
||||
<option value="TD">Chad</option>
|
||||
<option value="CL">Chile</option>
|
||||
<option value="CN">China</option>
|
||||
<option value="CX">Christmas Island</option>
|
||||
<option value="CC">Cocos (Keeling) Islands</option>
|
||||
<option value="CO">Colombia</option>
|
||||
<option value="KM">Comoros</option>
|
||||
<option value="CG">Congo</option>
|
||||
<option value="CD">Congo, the Democratic Republic of the</option>
|
||||
<option value="CK">Cook Islands</option>
|
||||
<option value="CR">Costa Rica</option>
|
||||
<option value="CI">Côte d'Ivoire</option>
|
||||
<option value="HR">Croatia</option>
|
||||
<option value="CU">Cuba</option>
|
||||
<option value="CW">Curaçao</option>
|
||||
<option value="CY">Cyprus</option>
|
||||
<option value="CZ">Czech Republic</option>
|
||||
<option value="DK">Denmark</option>
|
||||
<option value="DJ">Djibouti</option>
|
||||
<option value="DM">Dominica</option>
|
||||
<option value="DO">Dominican Republic</option>
|
||||
<option value="EC">Ecuador</option>
|
||||
<option value="EG">Egypt</option>
|
||||
<option value="SV">El Salvador</option>
|
||||
<option value="GQ">Equatorial Guinea</option>
|
||||
<option value="ER">Eritrea</option>
|
||||
<option value="EE">Estonia</option>
|
||||
<option value="ET">Ethiopia</option>
|
||||
<option value="FK">Falkland Islands (Malvinas)</option>
|
||||
<option value="FO">Faroe Islands</option>
|
||||
<option value="FJ">Fiji</option>
|
||||
<option value="FI">Finland</option>
|
||||
<option value="FR">France</option>
|
||||
<option value="GF">French Guiana</option>
|
||||
<option value="PF">French Polynesia</option>
|
||||
<option value="TF">French Southern Territories</option>
|
||||
<option value="GA">Gabon</option>
|
||||
<option value="GM">Gambia</option>
|
||||
<option value="GE">Georgia</option>
|
||||
<option value="DE">Germany</option>
|
||||
<option value="GH">Ghana</option>
|
||||
<option value="GI">Gibraltar</option>
|
||||
<option value="GR">Greece</option>
|
||||
<option value="GL">Greenland</option>
|
||||
<option value="GD">Grenada</option>
|
||||
<option value="GP">Guadeloupe</option>
|
||||
<option value="GU">Guam</option>
|
||||
<option value="GT">Guatemala</option>
|
||||
<option value="GG">Guernsey</option>
|
||||
<option value="GN">Guinea</option>
|
||||
<option value="GW">Guinea-Bissau</option>
|
||||
<option value="GY">Guyana</option>
|
||||
<option value="HT">Haiti</option>
|
||||
<option value="HM">Heard Island and McDonald Islands</option>
|
||||
<option value="VA">Holy See (Vatican City State)</option>
|
||||
<option value="HN">Honduras</option>
|
||||
<option value="HK">Hong Kong</option>
|
||||
<option value="HU">Hungary</option>
|
||||
<option value="IS">Iceland</option>
|
||||
<option value="IN">India</option>
|
||||
<option value="ID">Indonesia</option>
|
||||
<option value="IR">Iran, Islamic Republic of</option>
|
||||
<option value="IQ">Iraq</option>
|
||||
<option value="IE">Ireland</option>
|
||||
<option value="IM">Isle of Man</option>
|
||||
<option value="IL">Israel</option>
|
||||
<option value="IT">Italy</option>
|
||||
<option value="JM">Jamaica</option>
|
||||
<option value="JP">Japan</option>
|
||||
<option value="JE">Jersey</option>
|
||||
<option value="JO">Jordan</option>
|
||||
<option value="KZ">Kazakhstan</option>
|
||||
<option value="KE">Kenya</option>
|
||||
<option value="KI">Kiribati</option>
|
||||
<option value="KP">Korea, Democratic People's Republic of</option>
|
||||
<option value="KR">Korea, Republic of</option>
|
||||
<option value="KW">Kuwait</option>
|
||||
<option value="KG">Kyrgyzstan</option>
|
||||
<option value="LA">Lao People's Democratic Republic</option>
|
||||
<option value="LV">Latvia</option>
|
||||
<option value="LB">Lebanon</option>
|
||||
<option value="LS">Lesotho</option>
|
||||
<option value="LR">Liberia</option>
|
||||
<option value="LY">Libya</option>
|
||||
<option value="LI">Liechtenstein</option>
|
||||
<option value="LT">Lithuania</option>
|
||||
<option value="LU">Luxembourg</option>
|
||||
<option value="MO">Macao</option>
|
||||
<option value="MK">Macedonia, the former Yugoslav Republic of</option>
|
||||
<option value="MG">Madagascar</option>
|
||||
<option value="MW">Malawi</option>
|
||||
<option value="MY">Malaysia</option>
|
||||
<option value="MV">Maldives</option>
|
||||
<option value="ML">Mali</option>
|
||||
<option value="MT">Malta</option>
|
||||
<option value="MH">Marshall Islands</option>
|
||||
<option value="MQ">Martinique</option>
|
||||
<option value="MR">Mauritania</option>
|
||||
<option value="MU">Mauritius</option>
|
||||
<option value="YT">Mayotte</option>
|
||||
<option value="MX">Mexico</option>
|
||||
<option value="FM">Micronesia, Federated States of</option>
|
||||
<option value="MD">Moldova, Republic of</option>
|
||||
<option value="MC">Monaco</option>
|
||||
<option value="MN">Mongolia</option>
|
||||
<option value="ME">Montenegro</option>
|
||||
<option value="MS">Montserrat</option>
|
||||
<option value="MA">Morocco</option>
|
||||
<option value="MZ">Mozambique</option>
|
||||
<option value="MM">Myanmar</option>
|
||||
<option value="NA">Namibia</option>
|
||||
<option value="NR">Nauru</option>
|
||||
<option value="NP">Nepal</option>
|
||||
<option value="NL">Netherlands</option>
|
||||
<option value="NC">New Caledonia</option>
|
||||
<option value="NZ">New Zealand</option>
|
||||
<option value="NI">Nicaragua</option>
|
||||
<option value="NE">Niger</option>
|
||||
<option value="NG">Nigeria</option>
|
||||
<option value="NU">Niue</option>
|
||||
<option value="NF">Norfolk Island</option>
|
||||
<option value="MP">Northern Mariana Islands</option>
|
||||
<option value="NO">Norway</option>
|
||||
<option value="OM">Oman</option>
|
||||
<option value="PK">Pakistan</option>
|
||||
<option value="PW">Palau</option>
|
||||
<option value="PS">Palestinian Territory, Occupied</option>
|
||||
<option value="PA">Panama</option>
|
||||
<option value="PG">Papua New Guinea</option>
|
||||
<option value="PY">Paraguay</option>
|
||||
<option value="PE">Peru</option>
|
||||
<option value="PH">Philippines</option>
|
||||
<option value="PN">Pitcairn</option>
|
||||
<option value="PL">Poland</option>
|
||||
<option value="PT">Portugal</option>
|
||||
<option value="PR">Puerto Rico</option>
|
||||
<option value="QA">Qatar</option>
|
||||
<option value="RE">Réunion</option>
|
||||
<option value="RO">Romania</option>
|
||||
<option value="RU">Russian Federation</option>
|
||||
<option value="RW">Rwanda</option>
|
||||
<option value="BL">Saint Barthélemy</option>
|
||||
<option value="SH">Saint Helena, Ascension and Tristan da Cunha</option>
|
||||
<option value="KN">Saint Kitts and Nevis</option>
|
||||
<option value="LC">Saint Lucia</option>
|
||||
<option value="MF">Saint Martin (French part)</option>
|
||||
<option value="PM">Saint Pierre and Miquelon</option>
|
||||
<option value="VC">Saint Vincent and the Grenadines</option>
|
||||
<option value="WS">Samoa</option>
|
||||
<option value="SM">San Marino</option>
|
||||
<option value="ST">Sao Tome and Principe</option>
|
||||
<option value="SA">Saudi Arabia</option>
|
||||
<option value="SN">Senegal</option>
|
||||
<option value="RS">Serbia</option>
|
||||
<option value="SC">Seychelles</option>
|
||||
<option value="SL">Sierra Leone</option>
|
||||
<option value="SG">Singapore</option>
|
||||
<option value="SX">Sint Maarten (Dutch part)</option>
|
||||
<option value="SK">Slovakia</option>
|
||||
<option value="SI">Slovenia</option>
|
||||
<option value="SB">Solomon Islands</option>
|
||||
<option value="SO">Somalia</option>
|
||||
<option value="ZA">South Africa</option>
|
||||
<option value="GS">South Georgia and the South Sandwich Islands</option>
|
||||
<option value="SS">South Sudan</option>
|
||||
<option value="ES">Spain</option>
|
||||
<option value="LK">Sri Lanka</option>
|
||||
<option value="SD">Sudan</option>
|
||||
<option value="SR">Suriname</option>
|
||||
<option value="SJ">Svalbard and Jan Mayen</option>
|
||||
<option value="SZ">Swaziland</option>
|
||||
<option value="SE">Sweden</option>
|
||||
<option value="CH">Switzerland</option>
|
||||
<option value="SY">Syrian Arab Republic</option>
|
||||
<option value="TW">Taiwan, Province of China</option>
|
||||
<option value="TJ">Tajikistan</option>
|
||||
<option value="TZ">Tanzania, United Republic of</option>
|
||||
<option value="TH">Thailand</option>
|
||||
<option value="TL">Timor-Leste</option>
|
||||
<option value="TG">Togo</option>
|
||||
<option value="TK">Tokelau</option>
|
||||
<option value="TO">Tonga</option>
|
||||
<option value="TT">Trinidad and Tobago</option>
|
||||
<option value="TN">Tunisia</option>
|
||||
<option value="TR">Turkey</option>
|
||||
<option value="TM">Turkmenistan</option>
|
||||
<option value="TC">Turks and Caicos Islands</option>
|
||||
<option value="TV">Tuvalu</option>
|
||||
<option value="UG">Uganda</option>
|
||||
<option value="UA">Ukraine</option>
|
||||
<option value="AE">United Arab Emirates</option>
|
||||
<option value="GB">United Kingdom</option>
|
||||
<option value="US">United States</option>
|
||||
<option value="UM">United States Minor Outlying Islands</option>
|
||||
<option value="UY">Uruguay</option>
|
||||
<option value="UZ">Uzbekistan</option>
|
||||
<option value="VU">Vanuatu</option>
|
||||
<option value="VE">Venezuela, Bolivarian Republic of</option>
|
||||
<option value="VN">Viet Nam</option>
|
||||
<option value="VG">Virgin Islands, British</option>
|
||||
<option value="VI">Virgin Islands, U.S.</option>
|
||||
<option value="WF">Wallis and Futuna</option>
|
||||
<option value="EH">Western Sahara</option>
|
||||
<option value="YE">Yemen</option>
|
||||
<option value="ZM">Zambia</option>
|
||||
<option value="ZW">Zimbabwe</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Gender</label>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<div id="uniform-optionsRadios2" class="radio"><span class=""><input style="opacity: 0;" name="optionsRadios" id="optionsRadios2" value="option2" checked="" type="radio"></span></div>
|
||||
Secret
|
||||
</label>
|
||||
<div style="clear:both"></div>
|
||||
<label class="radio">
|
||||
<div id="uniform-optionsRadios1" class="radio"><span class="checked"><input style="opacity: 0;" name="optionsRadios" id="optionsRadios1" value="option1" type="radio"></span></div>
|
||||
Male
|
||||
</label>
|
||||
<div style="clear:both"></div>
|
||||
<label class="radio">
|
||||
<div id="uniform-optionsRadios2" class="radio"><span class=""><input style="opacity: 0;" name="optionsRadios" id="optionsRadios2" value="option2" type="radio"></span></div>
|
||||
Female
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="function" value="change_info">
|
||||
<div class="control-group">
|
||||
<label class="control-label"></label>
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:5px; margin-top:10px;">Change Info</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--/span-->
|
||||
</div>
|
||||
{/block}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{block name=content}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="box span12">
|
||||
<div class="box-header well">
|
||||
<h2><i class="icon-info-sign"></i> {$userlist_info}</h2>
|
||||
<div class="box-icon">
|
||||
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
|
||||
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
|
||||
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<p><strong>The shard/lib/web db user list</strong> You are about to see it here!</p>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
Loading…
Reference in a new issue