示例#1
0
ini_set('log_errors', $config->phpSettings->log_errors);
ini_set('error_log', $config->phpSettings->error_log);

//after config is loaded - do auth
require_once($include_dir . 'sys/include/include_auth.php');

include_once("sys/include/class/db.php");
include_once("sys/include/class/index.php");
$db = db::getInstance();

include_once("sys/include/sql_queries.php");

$install_tables_exists = SimpleInvoices_Db::tableExists("biller");
if ($install_tables_exists == true)
{
	$install_data_exists = SimpleInvoices_Db::dataExists();
}

//TODO - add this as a function in sql_queries.php or a class file
//if ( ($install_tables_exists != false) AND ($install_data_exists != false) )
if ( $install_tables_exists != false )
{
	if (SimpleInvoices_Db_Table_SQLPatchManager::getNumberOfDoneSQLPatches() > "196")
	{
        $SI_EXTENSIONS = new SimpleInvoices_Db_Table_Extensions();
        // ToDo: Watch out! This get's translated while the original doesn't!!!
        $extensions = $SI_EXTENSIONS->fetchAll();
        $DB_extensions = array();
        foreach($extensions as $this_extension) {
            $DB_extensions[$this_extension['name']] = $this_extension;
        }