function __construct($locale, $charset = '', $version = '', $prfx = DB_TABLENAME_PREFIX) { parent::__construct(); $this->_locale = $locale; $this->_charset = $charset; $this->_version = $version; $this->tablePrfx = $prfx; }
<?php # So require and include get the right path chdir('../..'); $doing_install = true; require_once '../shared/common.php'; require_once '../classes/InstallQuery.php'; if (!defined('OBIB_TESTS_DESTROY_DB') or OBIB_TESTS_DESTROY_DB != "yes") { die("database_constants: OBIB_TESTS_DESTROY_DB is not 'yes'"); } $installQ = new InstallQuery(); $e = $installQ->connect_e(); if ($e) { echo $e->toStr(); } $installQ->freshInstall('en', true, '0.4.0'); echo 'Installed 0.4.0';
<?php /* This file is part of a copyrighted work; it is distributed with NO WARRANTY. * See the file COPYRIGHT.html for more details. */ $doing_install = true; require_once "../shared/common.php"; require_once "../classes/InstallQuery.php"; require_once "../classes/Settings.php"; $installQ = new InstallQuery(); $version = NULL; $error = $installQ->connect_e(); if (!$error) { $version = $installQ->getCurrentDatabaseVersion(); $installQ->close(); } include "../install/header.php"; // 0.7: CircQuery uses PHP to determine current time, other scripts use MySQL $mysql_date = implode(mysql_fetch_row(mysql_query('select sysdate();'))); $php_date = date('Y-m-d H:i:s'); if ($php_date != $mysql_date) { ?> <font class="error">Mismatch in date and time configuration.</font><br> Recommended: correct before proceeding, else Check Out and Check In might fail temporarily.<br> Current date and time (YYYY-MM-DD HH:MM:SS):<br> <pre> MySQL : <?php echo $mysql_date; ?> PHP : <?php
if (!preg_match('/^[-_a-zA-Z0-9]+$/', $_POST['locale'])) { Fatal::internalError("Bad locale name."); } $locale = $_POST['locale']; } if (isset($_POST['installTestData'])) { $installTestData = $_POST["installTestData"] == "yes"; } include "../install/header.php"; ?> <br> <h1>OpenBiblio Installation:</h1> <?php # testing connection and current version $installQ = new InstallQuery(); $err = $installQ->connect_e(); if ($err) { Fatal::dbError($e->sql, $e->msg, $e->dberror); } $version = $installQ->getCurrentDatabaseVersion(); echo "Database connection is good.<br>\n"; #************************************************************************************ #* show warning message if database exists. #************************************************************************************ if ($version) { if (!isset($_POST["confirm"]) or $_POST["confirm"] != "yes") { ?> <form method="POST" action="../install/install.php"> OpenBiblio (version <?php echo H($version);
?> <br> <h3> <?php echo $loc->getText("install_head"); ?> </h3> <?php echo $loc->getText("install_head"); ?> </br> <?php require_once "../install/create_dir.php"; # testing connection and current version $installQ = new InstallQuery(); $err = $installQ->connect_e(); if ($err) { Fatal::dbError($e->sql, $e->msg, $e->dberror); } $version = $installQ->getCurrentDatabaseVersion(); echo "<br/>" . $loc->getText("form_Database_connection_good") . ": " . $version . "<br>\n"; #************************************************************************************ #* show warning message if database exists. #************************************************************************************ if ($version) { if (!isset($_POST["confirm"]) or $_POST["confirm"] != "yes") { ?> <form method="POST" action="../install/install.php"> <?php echo "<br/>" . $loc->getText("install_wait") . "<br>\n";
function __construct() { # Call query constructor so database connection gets made parent::__construct(); }
print_r($_REQUEST); echo "</pre>"; $tab = "install"; //jalg para uso de multi-idioma $locale = $_POST['locale']; //jalg para uso de multi-idioma $doing_install = true; require_once "../shared/global_constants.php"; require_once "../classes/Settings.php"; require_once "../shared/common.php"; require_once "../classes/InstallQuery.php"; require_once "../classes/Localize.php"; //jalg para uso de multi-idioma $loc = new Localize($locale, $tab); //jalg para uso de multi-idioma $installQ = new InstallQuery(); $version = NULL; $error = $installQ->connect_error; //jalg 5-7-2015 multi if (!$error) { $version = $installQ->getCurrentDatabaseVersion(); $installQ->close(); } include "../install/header.php"; // 0.7: CircQuery uses PHP to determine current time, other scripts use MySQL $mysql_date = implode(mysql_fetch_row(mysql_query('select sysdate();'))); $php_date = date('Y-m-d H:i:s'); if ($php_date != $mysql_date) { if (ini_get('date.timezone') == get_cfg_var('date.timezone')) { echo "<b>Suggestion:</b>"; echo "<ul><li>Using <a href = \"../install/phpinfo.php\">phpinfo</a>, determine the Loaded Configuration File</li>";
*/ $tab = "install"; //jalg para uso de multi-idioma $doing_install = true; $tab = "install"; //jalg para uso de multi-idioma require_once "../shared/global_constants.php"; require_once "../shared/common.php"; require_once "../classes/InstallQuery.php"; require_once "../classes/Settings.php"; $locale = "es"; require_once "../classes/Localize.php"; //jalg para uso de multi-idioma $loc = new Localize($locale, $tab); //jalg para uso de multi-idioma $installQ = new InstallQuery(); $version = NULL; $mysql_date = NULL; if (!$installQ->connect_errno) { $version = $installQ->getCurrentDatabaseVersion(); // 0.7: CircQuery uses PHP to determine current time, other scripts use MySQL $mysql_date = implode($installQ->select('select sysdate();')->fetch_row()); $installQ->close(); } include "../install/header.php"; $php_date = date('Y-m-d H:i:s'); if ($php_date != $mysql_date) { ?> <font class="error">Mismatch in date and time configuration.</font><br> Recommended: correct before proceeding, else Check Out and Check In might fail temporarily.<br> Current date and time (YYYY-MM-DD HH:MM:SS):<br>
<br> <h3> <?php echo $loc->getText("install_head"); ?> </h3> <?php echo $loc->getText("install_head"); ?> </br> <?php require_once "../install/create_dir.php"; # testing connection and current version $installQ = new InstallQuery(NULL); $err = $installQ->connect_error; if ($err) { Fatal::dbError($e->sql, $e->msg, $e->dberror); } $version = $installQ->getCurrentDatabaseVersion(); echo "<br/>" . $loc->getText("form_Database_connection_good") . ": " . $version . "<br>\n"; #************************************************************************************ #* show warning message if database exists. #************************************************************************************ if ($version) { if (!isset($_POST["confirm"]) or $_POST["confirm"] != "yes") { ?> <form method="POST" action="../install/install.php"> <?php echo "<br/>" . $loc->getText("install_wait") . "<br>\n";