* Handles the database connections. It uses PDO to connect to the different databases. It will use the argument of the constructor to setup a connection to the database
* with the matching entry in the $cfg global variable.
* @author Daan Janssens, mentored by Matthew Lagoe
* Handles the database connections. It uses PDO to connect to the different databases. It will use the argument of the constructor to setup a connection to the database
* with the matching entry in the $cfg global variable.
*
* @author Daan Janssens, mentored by Matthew Lagoe
*/
class DBLayer {
private $PDO;
/**
* *<ThePDOobject,instantiatedbytheconstructor
*/
/**
* The constructor.
* Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var)
* @param $db String, the name of the databases entry in the $cfg global var.
*/
function __construct($db, $dbn = null)
{
if ($db != "install"){
* The constructor.
* Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var)
*
* @param $db String, the name of the databases entry in the $cfg global var.
*/
function __construct( $db, $dbn = null )
{
if ( $db != "install" ) {
global $cfg;
$dsn = "mysql:";
$dsn .= "host=". $cfg['db'][$db]['host'].";";
$dsn .= "dbname=". $cfg['db'][$db]['name'].";";
$dsn .= "port=". $cfg['db'][$db]['port'].";";
$opt = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$this->PDO = new PDO($dsn,$cfg['db'][$db]['user'],$cfg['db'][$db]['pass'], $opt);
} else {
$dsn = "mysql:";
$dsn .= "host=" . $cfg['db'][$db]['host'] . ";";
$dsn .= "dbname=". $cfg['db'][$db]['name'].";";
$dsn .= "port=" . $cfg['db'][$db]['port'] . ";";
$opt = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$this->PDO = new PDO($dsn,$cfg['db'][$db]['user'],$cfg['db'][$db]['pass'], $opt);
} else {
global $cfg;
$dsn = "mysql:";
$dsn .= "host=". $cfg['db'][$dbn]['host'].";";
$dsn .= "port=". $cfg['db'][$dbn]['port'].";";
$opt = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$this->PDO = new PDO($dsn,$_POST['Username'],$_POST['Password'], $opt);
login_info="Please enter your MySQL Username and Password to install the database.<br>This is being loaded because the is_installed file is missing.<br>This process will take about 30 seconds."
login_here="here"
[ams_content]
ams_title="Ryzom Account Mangement System"
[dashboard]
home_title="Introduction"
home_info="Welcome to the Ryzom Core - Account Management System"
@ -66,11 +69,12 @@ plugin_status = "Status"
ip_success="Plugin added succesfuly."
plugin_actions="Actions"
dp_success="Plugin deleted successfuly"
dp_error="Error in deleting plugin.Please try again later"
ac_success="Plugin Activated successfuly"
ac_error="Plugin facing some error in activating. Please try again later"
dc_success="Plugin de-Activated successfuly"
dc_error="Plugin facing some error in de-activating. Please try again later"
dp_error="Error in deleting plugin.Please try again later."
ac_success="Plugin Activated successfuly."
ac_error="Plugin facing some error in activating. Please try again later."
dc_success="Plugin de-Activated successfuly."
dc_error="Plugin facing some error in de-activating. Please try again later."
up_success="Update added successfully. Go to Updates page for installing updates."
[install_plugin]
ip_title="Install a new Plugin"
@ -79,6 +83,15 @@ ip_support = "Upload the plugin archieve to install.</br>The following file exte
ip_info_nfound="Info file not found in the Plugin.Please recheck"
ip_file_nfnd="Please upload a plugin before clicking on install button"
[plugins_update]
up_title="Updates for Plugins"
up_info="Here you can see the entire list of available updates for plugins."
up_serial="Serial No."
plugin_name="Name"
plugin_version="Version"
up_updated_version="New Version"
up_action="Actions"
[show_ticket]
t_title="Ticket"
title="Title"
@ -152,8 +165,8 @@ go_home = "Go Home"
userlist_info="welcome to the userlist"
[login]
login_info="Please login with your Username and Password."
login_error_message="The username/password were not correct!"
login_info="Please login with your Email/Username and Password."
login_error_message="The Email/username/password were not correct!"
login_register_message="<strong>Register</strong> If you don't have an account yet, create one"
login_here="here"
login_forgot_password_message="In case you forgot your password, click"