missing ". $tutos['base'] ."/config.pinc or ". $tutos['base'] ."/config.php
\n".
"
You can try to create one with this script. create_config.php\n"
);
}
# set again the value from config_default
# some uses simply copy the whole config_default
# and thus we dont get real version numbers in bug reports
$tutos[version] = $x;
unset($x);
include_once $calpath .'db/table.pinc';
#include_once $calpath .'modules.pinc';
if ( file_exists($tutos['base'] .'/db/table_custom.pinc') && is_readable($tutos['base'] .'/db/table_custom.pinc') ) {
include_once $calpath .'db/table_custom.pinc';
}
# There was some output (= errors)
/*if (!isset($tutos['nocheck']) && headers_sent()) {
$included_files = get_included_files();
$files = "
";
$files .= "Filename | Modification Date |
";
foreach($included_files as $filename) {
$files .= "";
$files .= "". $filename ." | ". Date("Y-m-d H:i:s", filemtime($filename)) ." | \n";
$files .= "
";
}
$files .= "
";
die("there was unwanted output (characters or whitespace outside of the '<?php' .... '?>' brackets or some syntax error)
check which of the following files was modified
". $files ."
\n ===> Please FIX ERRORS !
\n\n");
}*/
error_reporting(0);
# disable debug == error_log in safe_mode
if ( (ini_get("safe_mode") == "On") || (ini_get("safe_mode") == "1") ) {
$tutos[debug] = 0;
}
//disable error log
$tutos[debug] = 0;
#set_error_handler('PHP_Error');
if ( $tutos[debug] != 0 ) {
# $tutos['error_reporting'] = E_ERROR|E_WARNING|E_PARSE;
$tutos['error_reporting'] = E_ERROR|E_WARNING|E_PARSE|E_NOTICE|E_ALL;
@error_log(Date("d.m.Y H:i:s T") ."\t". $_SERVER['REMOTE_ADDR']." \t". $_SERVER['REQUEST_METHOD'] ." ". $_SERVER['REQUEST_URI'] ."\n" ,3,$tutos[errlog].".log");
@chmod ($tutos[errlog].".log",0666);
if ( @filesize($tutos[errlog].".log") > 1024000) {
@rename($tutos[errlog].".log",$tutos[errlog].".log.". Date("YmdHi"));
}
@chmod ($tutos[errlog],0666);
if ( @filesize($tutos[errlog]) > 1024000) {
$fd = fopen($tutos[errlog],"w+");
if ($fd) {
fwrite($fd,"--- END ---\r\n");
fclose($fd);
}
@rename($tutos[errlog],$tutos[errlog] .".". Date("YmdHi") );
@unlink($tutos[errlog]);
}
ini_set('display_errors','On');
} else {
$tutos['error_reporting'] = 0;
$tutos[debugConsole] = 0;
ini_set('display_errors','Off');
}
error_reporting($tutos['error_reporting']);
set_error_handler('PHP_Error');
define('FPDF_FONTPATH',$tutos['base'] ."/". $tutos[fpdfpath].'/font/');
include_once $calpath .'database.pinc';
# (this was moved from config to static)
# Permission levels (do not change this !)
#
$tutos[seeok] = 1;
$tutos[useok] = 5;
$tutos[modok] = 10;
$tutos[delok] = 20;
if ($tutos[useacl] != 1) {
$tutos[use_check_dbacl] = 0;
}
# a software called tutos should do this
$tutos[useteams] = 1;
$tutos[useuser] = 1;
$tutos[usedbs] = 1;
$tutos[usecompany] = 1;
$tutos[usedepartment] = 1;
$tutos[uselocation] = 1;
#
$tutos[activemodules] = array();
$g_hash['hits'] = 0;
$g_hash['hits2'] = 0;
$tutos['dateformat'] = array();
/* ---------------------------------------------------------------------------
* Open the Database
*/
Function DB_Open ($id,$update = true) {
if ( ! isset($id) ) {
Fatal_Error("Missing DB ID","DB_OPEN needs an non empty argument");
}
$db = new database();
$db = $db->read($id,$db);
$dbc = $db->getConnection();
$db->dbconn = &$dbc;
if ( $update == true ) {
$db->read_update();
}
return $dbc;
}
?>