doOnTheStart.php 1.73 KB
<?
require_once $__PATH_to_mcClasses .'include.php';
require_once $__PATH_to_mcClasses .'config.php';

/**
 * dinge die am Ende noch ausgeführt werden sollen
 *
 * (nur für Dinge die unter mcClasses sind)
 * 
 * @author f@mensch.coop @since 2010-12-17
 */
if($__mc_ERRORHANDLER) {
	require_once $__PATH_to_mcClasses.'ReportHandling/fnc_mcErrorHandler.inc.php';
	set_error_handler('mcErrorHandler');
}

if($_LOSP_DEV) {
	error_reporting(E_ALL);

	

	if($__mc_D_LOGFILE) {
		if($__mc_D_LOGFILE_RESET) {
			$var_message = '['.date('d. m. Y  G:i').'] DEVMODE: logfile wurde zurvor geloescht';
			unlink ( $__mc_D_LOGFILE );
			mcFile::write($__mc_D_LOGFILE, $var_message, 'w');			
		} else {
			$var_message =	mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK
							.'################################################'.mcCONST::LINEBREAK
							.'################################################'.mcCONST::LINEBREAK
							.'################################################'.mcCONST::LINEBREAK
							.'# ['.date('d. m. Y  G:i').'] DEVMODE                #'.mcCONST::LINEBREAK
							.'################################################'.mcCONST::LINEBREAK;

			mcFile::write($__mc_D_LOGFILE, $var_message, 'a');			
		}
	}
//mcFile::write('log/tmp.bla',  date('d.m.Y  G:i:s').': '.$_SERVER['SCRIPT_NAME'].' -- '.$_SERVER['REQUEST_URI'].mcCONST::TAB.($_SERVER['SCRIPT_NAME']==$_SERVER['REQUEST_URI']).mcCONST::LINEBREAK, 'a');
	foreach($__mc_Report as $Report) {
		foreach($Report as $kindofDistribute => $params) {
			if($kindofDistribute == 'toFile') {
				if($params['reset']) {
					unlink ( $params['file'] );
					mcFile::write($params['file'], $var_message, 'w');
				}
			}
		}
	}

	D::start();
}

?>