commit
fea7487a77
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
require( '../libinclude.php' );
|
||||
require( '../../www/config.php' );
|
||||
|
||||
Sync::syncdata();
|
@ -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."
|
@ -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();
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 725 B |
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();
|
||||
}
|
@ -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}
|
||||
|
@ -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 New Issue