Added CreatePermissions + handling it while syncing + changed image path to refer to the image locations dir + other fixes
This commit is contained in:
parent
91c9c04dc3
commit
1b2475281f
11 changed files with 125 additions and 174 deletions
|
@ -23,6 +23,17 @@ class Sync{
|
|||
$db = new DBLayer($record['db']);
|
||||
switch($record['type']) {
|
||||
case 'createPermissions':
|
||||
$decode = json_decode($record['query']);
|
||||
$values = array('username' => $decode[0]);
|
||||
//make connection with and put into shard db & delete from the lib
|
||||
$sth = $db->execute("SELECT UId FROM user WHERE Login= :username;", $values);
|
||||
$result = $sth->fetchAll();
|
||||
foreach ($result as $UId) {
|
||||
$ins_values = array('id' => $UId['UId']);
|
||||
$db->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id, 'r2', 'OPEN');", $ins_values);
|
||||
$db->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id , 'ryzom_open', 'OPEN');", $ins_values);
|
||||
}
|
||||
break;
|
||||
case 'change_pass':
|
||||
$decode = json_decode($record['query']);
|
||||
$values = array('user' => $decode[0], 'pass' => $decode[1]);
|
||||
|
@ -47,7 +58,7 @@ class Sync{
|
|||
print('Syncing completed');
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
print('Something went wrong!');
|
||||
print('Something went wrong! The shard is probably still offline!');
|
||||
print_r($e);
|
||||
}
|
||||
|
||||
|
|
|
@ -308,6 +308,30 @@ class Users{
|
|||
|
||||
}
|
||||
|
||||
public static function createPermissions($pvalues) {
|
||||
|
||||
try {
|
||||
$values = array('username' => $pvalues[0]);
|
||||
$dbs = new DBLayer("shard");
|
||||
$sth = $dbs->execute("SELECT UId FROM user WHERE Login= :username;", $values);
|
||||
$result = $sth->fetchAll();
|
||||
foreach ($result as $UId) {
|
||||
$ins_values = array('id' => $UId['UId']);
|
||||
$dbs->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id, 'r2', 'OPEN');", $ins_values);
|
||||
$dbs->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id , 'ryzom_open', 'OPEN');", $ins_values);
|
||||
}
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
//oh noooz, the shard is offline! Put it in query queue at ams_lib db!
|
||||
$dbl = new DBLayer("lib");
|
||||
$dbl->execute("INSERT INTO ams_querycache (type, query, db) VALUES (:type, :query, :db)",array("type" => "createPermissions",
|
||||
"query" => json_encode(array($pvalues[0])), "db" => "shard"));
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected function checkLoginMatch($user,$pass){
|
||||
print('This is the base class!');
|
||||
|
|
|
@ -64,31 +64,31 @@
|
|||
<table cellpadding="3" width="100%">
|
||||
<tr><td></td><td></td></tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/shard.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/shard.png"/></td>
|
||||
<td><font color="{$info_color}">Shard ID: </font>{$shard_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/user.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/user.png"/></td>
|
||||
<td><font color="{$info_color}">User_Id: </font>{$user_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/position.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/position.png"/></td>
|
||||
<td><font color="{$info_color}">User Position: </font>{$user_position}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/view.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/view.png"/></td>
|
||||
<td><font color="{$info_color}">View Position: </font>{$view_position}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/client.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/client.png"/></td>
|
||||
<td><font color="{$info_color}">Client_Version: </font>{$client_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/patch.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/patch.png"/></td>
|
||||
<td><font color="{$info_color}">Patch_Version: </font>{$patch_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/server.png"/></td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/server.png"/></td>
|
||||
<td><font color="{$info_color}"> Server_Tick: </font>{$server_tick}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -102,31 +102,31 @@
|
|||
<table cellpadding="3" width="100%">
|
||||
<tr><td></td><td></td></tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/memory.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/memory.png"/></td>
|
||||
<td><font color="{$info_color}">Memory: </font>{$memory}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/processor.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/processor.png"/></td>
|
||||
<td><font color="{$info_color}">Processor: </font>{$processor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/cpuid.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/cpuid.png"/></td>
|
||||
<td><font color="{$info_color}">Cpu_Id: </font>{$cpu_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/mask.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/mask.png"/></td>
|
||||
<td><font color="{$info_color}">Cpu_Mask: </font>{$cpu_mask}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/ht.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/ht.png"/></td>
|
||||
<td><font color="{$info_color}">HT: </font>{$ht}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/os.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/os.png"/></td>
|
||||
<td><font color="{$info_color}">OS: </font>{$os}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/nel.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/nel.png"/></td>
|
||||
<td><font color="{$info_color}">NeL3D: </font>{$nel3d}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -140,11 +140,11 @@
|
|||
<table cellpadding="3" width="100%">
|
||||
<tr><td></td><td></td></tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/connect.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/connect.png"/></td>
|
||||
<td><font color="{$info_color}">Connect_State: </font>{$connect_state}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/local.png"/></td>
|
||||
<td width=30><img src="{$IMAGELOC_WEBPATH}/info/local.png"/></td>
|
||||
<td><font color="{$info_color}">Local_Address: </font>{$local_address}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -15,8 +15,8 @@ $cfg['db']['web']['pass'] = variable_get('ryzommanage_webpassword', 'lol123')
|
|||
$cfg['db']['lib']['host'] = variable_get('ryzommanage_libserverurl', 'localhost');
|
||||
$cfg['db']['lib']['port'] = variable_get('ryzommanage_libmysqlport', '3306');
|
||||
$cfg['db']['lib']['name'] = variable_get('ryzommanage_libdbname', 'ryzom_ams_lib');
|
||||
$cfg['db']['lib']['user'] = variable_get('ryzommanage_libusername', 'shard');
|
||||
$cfg['db']['lib']['pass'] = variable_get('ryzommanage_libpassword', '');
|
||||
$cfg['db']['lib']['user'] = variable_get('ryzommanage_libusername', 'root');
|
||||
$cfg['db']['lib']['pass'] = variable_get('ryzommanage_libpassword', 'lol123');
|
||||
|
||||
$cfg['db']['shard']['host'] = variable_get('ryzommanage_shardserverurl', 'localhost');
|
||||
$cfg['db']['shard']['port'] = variable_get('ryzommanage_shardmysqlport', '3306');
|
||||
|
@ -74,7 +74,7 @@ $AMS_TRANS = $AMS_LIB . '/translations';
|
|||
$AMS_CACHEDIR = $AMS_LIB . '/cache';
|
||||
$SITEBASE = dirname( __FILE__ );
|
||||
$BASE_WEBPATH = 'http://localhost:40917/drupal';
|
||||
$IMAGELOC_WEBPATH = $BASE_WEBPATH. '/sites/all/modules/ryzommanage/' ;
|
||||
$IMAGELOC_WEBPATH = $BASE_WEBPATH. '/sites/all/modules/ryzommanage/ams_lib/img' ;
|
||||
$WEBPATH = $BASE_WEBPATH .'/ams';
|
||||
$INGAME_WEBPATH = $BASE_WEBPATH . '/ingame';
|
||||
$CONFIG_PATH = dirname( __FILE__ );
|
||||
|
|
|
@ -29,11 +29,11 @@ global $BASE_WEBPATH;
|
|||
global $INGAME_LAYOUT;
|
||||
global $FORCE_INGAME;
|
||||
|
||||
require 'config.php';
|
||||
|
||||
require 'ams_lib/libinclude.php';
|
||||
spl_autoload_register('__autoload');
|
||||
|
||||
require 'config.php';
|
||||
|
||||
/*
|
||||
Drupal 7 ryzom core module
|
||||
Copyright (C) 2013 Matthew Lagoe (Botanic) & Paige Offerdahl (Tobi)
|
||||
|
@ -354,12 +354,13 @@ function _ams_handler($ingame = false)
|
|||
*/
|
||||
function _collect_register($nids, $collection)
|
||||
{
|
||||
syncdata();
|
||||
Sync::syncdata();
|
||||
//if not using ryzom core client show registration page
|
||||
if (Helpers::check_if_game_client()) {
|
||||
return_client_httpdata();
|
||||
} else {
|
||||
//redirect to registration page
|
||||
global $BASE_WEBPATH;
|
||||
header("Location: ".$BASE_WEBPATH. "/user/register");
|
||||
}
|
||||
}
|
||||
|
@ -368,7 +369,7 @@ function _collect_register($nids, $collection)
|
|||
|
||||
/**
|
||||
*
|
||||
* Function _collect_register
|
||||
* Function _collect_ingame_ams
|
||||
*
|
||||
* @takes
|
||||
* @return Nothing
|
||||
|
@ -486,10 +487,10 @@ function createUser($values, $user_id)
|
|||
//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, $user_id);
|
||||
createPermissions(array($login));
|
||||
Users::createPermissions(array($login));
|
||||
}
|
||||
|
||||
function createPermissions($values) {
|
||||
/*function createPermissions($values) {
|
||||
|
||||
try {
|
||||
$hostname = variable_get('ryzommanage_serverurl', 'localhost');
|
||||
|
@ -536,7 +537,7 @@ function createPermissions($values) {
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
|
||||
function ryzommanage_user_login(&$edit, $account){
|
||||
$_SESSION['user'] = $account->name;
|
||||
|
@ -683,118 +684,15 @@ function user_edit($values) {
|
|||
$username = $values[0];
|
||||
$newpassword = $values[1];
|
||||
|
||||
$salt = generateSALT();
|
||||
$salt = WebUsers::generateSALT();
|
||||
$pass = crypt($newpassword, $salt);
|
||||
|
||||
try {
|
||||
$hostname = variable_get('ryzommanage_serverurl', 'localhost');
|
||||
$port = variable_get('ryzommanage_mysqlport', '3306');
|
||||
$dbname = variable_get('ryzommanage_dbname', 'nel');
|
||||
$ryusername = variable_get('ryzommanage_username', 'root');
|
||||
$password = variable_get('ryzommanage_password', '');
|
||||
$dbh = new PDO("mysql:host=$hostname;port=$port;dbname=$dbname", $ryusername, $password);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
watchdog('ryzommanage', $e->getMessage(), NULL, WATCHDOG_ERROR);
|
||||
$nid = db_insert('ryzommanage_querycache')->fields(array(
|
||||
"SID" => NULL,
|
||||
"type" => "user_edit",
|
||||
"query" => json_encode(array(
|
||||
$username,
|
||||
$newpassword
|
||||
))
|
||||
))->execute();
|
||||
return true;
|
||||
}
|
||||
|
||||
$sql = "UPDATE `nel`.`user` SET `Password` = ? WHERE `user`.`Login` = ?";
|
||||
|
||||
try {
|
||||
$q = $dbh->prepare($sql);
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
watchdog('ryzommanage', $e->getMessage(), NULL, WATCHDOG_ERROR);
|
||||
$nid = db_insert('ryzommanage_querycache')->fields(array(
|
||||
"SID" => NULL,
|
||||
"type" => "user_edit",
|
||||
"query" => json_encode(array(
|
||||
$username,
|
||||
$newpassword
|
||||
))
|
||||
))->execute();
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
$q->execute(array( $pass, $username));
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
watchdog('ryzommanage', $e->getMessage(), NULL, WATCHDOG_ERROR);
|
||||
$nid = db_insert('ryzommanage_querycache')->fields(array(
|
||||
"SID" => NULL,
|
||||
"type" => "user_edit",
|
||||
"query" => json_encode(array(
|
||||
$username,
|
||||
$newpassword
|
||||
))
|
||||
))->execute();
|
||||
return true;
|
||||
}
|
||||
|
||||
$webUser = new WebUsers();
|
||||
$webUser->setAmsPassword($username,$pass);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Function syncdata
|
||||
*
|
||||
* @takes Nothing
|
||||
* @return array $values
|
||||
*
|
||||
* Info: Runs functions to finish syncing data when shard is offline
|
||||
*
|
||||
*/
|
||||
function syncdata () {
|
||||
|
||||
try {
|
||||
$hostname = variable_get('ryzommanage_serverurl', 'localhost');
|
||||
$port = variable_get('ryzommanage_mysqlport', '3306');
|
||||
$dbname = variable_get('ryzommanage_dbname', 'nel');
|
||||
$ryusername = variable_get('ryzommanage_username', 'root');
|
||||
$password = variable_get('ryzommanage_password', '');
|
||||
$dbh = new PDO("mysql:host=$hostname;port=$port;dbname=$dbname", $ryusername, $password);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
watchdog('ryzommanage', $e->getMessage(), NULL, WATCHDOG_ERROR);
|
||||
return true;
|
||||
}
|
||||
|
||||
$query = db_select('ryzommanage_querycache', 'q')
|
||||
->fields('q', array('SID', 'type', 'query'));
|
||||
|
||||
$result = $query->execute();
|
||||
|
||||
foreach ($result as $record) {
|
||||
watchdog('ryzommanage_usersync', $record->query, NULL, WATCHDOG_ERROR);
|
||||
|
||||
switch($record->type) {
|
||||
case 'createPermissions':
|
||||
case 'user_edit':
|
||||
case 'createUser':
|
||||
watchdog('ryzommanage_usersync', $record->type, NULL, WATCHDOG_INFO);
|
||||
$SID = $record->SID;
|
||||
$num_deleted = db_delete('ryzommanage_querycache')
|
||||
->condition('SID', $SID)
|
||||
->execute();
|
||||
$func = $record->type;
|
||||
$func(json_decode($record->query));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Function ryzommanage_cron
|
||||
|
@ -807,7 +705,7 @@ function syncdata () {
|
|||
*/
|
||||
function ryzommanage_cron() {
|
||||
|
||||
syncdata();
|
||||
Sync::syncdata();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,61 +16,61 @@
|
|||
<td><center><strong> Ingame related </strong></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/shard.png"/><strong> Shard ID: </strong>{$shard_id}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/shard.png"/><strong> Shard ID: </strong>{$shard_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/user.png"/><strong> User_Id: </strong>{$user_id}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/user.png"/><strong> User_Id: </strong>{$user_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/position.png"/><strong> User Position: </strong>{$user_position}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/position.png"/><strong> User Position: </strong>{$user_position}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/view.png"/><strong> View Position: </strong>{$view_position}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/view.png"/><strong> View Position: </strong>{$view_position}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/client.png"/><strong> Client_Version: </strong> {$client_version}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/client.png"/><strong> Client_Version: </strong> {$client_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/patch.png"/><strong> Patch_Version: </strong>{$patch_version}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/patch.png"/><strong> Patch_Version: </strong>{$patch_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/server.png"/><strong> Server_Tick: </strong>{$server_tick}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/server.png"/><strong> Server_Tick: </strong>{$server_tick}</td>
|
||||
</tr>
|
||||
<tr class="alert alert-info">
|
||||
<td><center><strong> Hardware & Software related </strong></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/memory.png"/> Memory: </strong>{$memory}</td>
|
||||
<td><strong><img src="{$IMAGELOC_WEBPATH}/info/memory.png"/> Memory: </strong>{$memory}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/processor.png"/><strong> Processor: </strong>{$processor}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/processor.png"/><strong> Processor: </strong>{$processor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/cpuid.png"/><strong> Cpu_Id: </strong>{$cpu_id}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/cpuid.png"/><strong> Cpu_Id: </strong>{$cpu_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/mask.png"/><strong> Cpu_Mask: </strong>{$cpu_mask}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/mask.png"/><strong> Cpu_Mask: </strong>{$cpu_mask}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/ht.png"/><strong> HT: </strong>{$ht}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/ht.png"/><strong> HT: </strong>{$ht}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/os.png"/><strong> OS: </strong>{$os}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/os.png"/><strong> OS: </strong>{$os}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/nel.png"/><strong> NeL3D: </strong>{$nel3d}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/nel.png"/><strong> NeL3D: </strong>{$nel3d}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="alert alert-info">
|
||||
<td><center><strong> Network related </strong></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/connect.png"/><strong> Connect_State: </strong>{$connect_state}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/connect.png"/><strong> Connect_State: </strong>{$connect_state}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/local.png"/><strong> Local_Address: </strong>{$local_address}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/local.png"/><strong> Local_Address: </strong>{$local_address}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
|
|
@ -76,7 +76,7 @@ $AMS_CACHEDIR = $AMS_LIB . '/cache';
|
|||
$SITEBASE = dirname( __FILE__ ) . '/html/' ;
|
||||
|
||||
$BASE_WEBPATH = 'http://localhost:40917/www/html';
|
||||
$IMAGELOC_WEBPATH = 'http://localhost:40917';
|
||||
$IMAGELOC_WEBPATH = 'http://localhost:40917/ams_lib/img';
|
||||
$WEBPATH = $BASE_WEBPATH . '/index.php';
|
||||
$INGAME_WEBPATH = $BASE_WEBPATH . '/index.php';
|
||||
$CONFIG_PATH = dirname( __FILE__ );
|
||||
|
|
|
@ -55,6 +55,7 @@ function write_user($newUser){
|
|||
//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, $user_id);
|
||||
Users::createPermissions(array($newUser["name"]));
|
||||
|
||||
|
||||
}catch (PDOException $e) {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
$sql = "
|
||||
CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`;
|
||||
USE `" . $cfg['db']['lib']['name'] ."`;
|
||||
DROP TABLE IF EXISTS ams_querycache;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ams_querycache`;
|
||||
|
||||
CREATE TABLE ams_querycache (
|
||||
`SID` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
|
||||
|
@ -48,6 +48,26 @@
|
|||
`db` VARCHAR( 80 ) NOT NULL
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------------------------------------------------------------------------
|
||||
-- -----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_log` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`tagged` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`tag` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`in_support_group` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`in_group` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_group` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_info` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`email` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`forwarded` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`assigned` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_reply` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_content` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`support_group` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_category` ;
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ticket_user` ;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `" . $cfg['db']['lib']['name'] ."`.`ticket_category`
|
||||
|
@ -415,9 +435,6 @@
|
|||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION)
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
|
||||
";
|
||||
$dbl->executeWithoutParams($sql);
|
||||
print "The Lib & Web database were correctly installed! <br />";
|
||||
|
|
|
@ -17,61 +17,61 @@
|
|||
<td><center><strong> Ingame related </strong></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/shard.png"/><strong> Shard ID: </strong>{$shard_id}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/shard.png"/><strong> Shard ID: </strong>{$shard_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/user.png"/><strong> User_Id: </strong>{$user_id}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/user.png"/><strong> User_Id: </strong>{$user_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/position.png"/><strong> User Position: </strong>{$user_position}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/position.png"/><strong> User Position: </strong>{$user_position}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/view.png"/><strong> View Position: </strong>{$view_position}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/view.png"/><strong> View Position: </strong>{$view_position}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/client.png"/><strong> Client_Version: </strong> {$client_version}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/client.png"/><strong> Client_Version: </strong> {$client_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/patch.png"/><strong> Patch_Version: </strong>{$patch_version}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/patch.png"/><strong> Patch_Version: </strong>{$patch_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/server.png"/><strong> Server_Tick: </strong>{$server_tick}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/server.png"/><strong> Server_Tick: </strong>{$server_tick}</td>
|
||||
</tr>
|
||||
<tr class="alert alert-info">
|
||||
<td><center><strong> Hardware & Software related </strong></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/memory.png"/> Memory: </strong>{$memory}</td>
|
||||
<td><strong><img src="{$IMAGELOC_WEBPATH}/info/memory.png"/> Memory: </strong>{$memory}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/processor.png"/><strong> Processor: </strong>{$processor}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/processor.png"/><strong> Processor: </strong>{$processor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/cpuid.png"/><strong> Cpu_Id: </strong>{$cpu_id}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/cpuid.png"/><strong> Cpu_Id: </strong>{$cpu_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/mask.png"/><strong> Cpu_Mask: </strong>{$cpu_mask}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/mask.png"/><strong> Cpu_Mask: </strong>{$cpu_mask}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/ht.png"/><strong> HT: </strong>{$ht}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/ht.png"/><strong> HT: </strong>{$ht}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/os.png"/><strong> OS: </strong>{$os}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/os.png"/><strong> OS: </strong>{$os}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/nel.png"/><strong> NeL3D: </strong>{$nel3d}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/nel.png"/><strong> NeL3D: </strong>{$nel3d}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="alert alert-info">
|
||||
<td><center><strong> Network related </strong></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/connect.png"/><strong> Connect_State: </strong>{$connect_state}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/connect.png"/><strong> Connect_State: </strong>{$connect_state}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/ams_lib/img/info/local.png"/><strong> Local_Address: </strong>{$local_address}</td>
|
||||
<td><img src="{$IMAGELOC_WEBPATH}/info/local.png"/><strong> Local_Address: </strong>{$local_address}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue