doOnTheStart.php
3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?
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');
}
}
if($__mc_PDO_LOGFILE) {
if($__mc_PDO_LOGFILE_RESET) {
$var_message = '-- ['.date('d. m. Y G:i').'] DEVMODE: logfile wurde zurvor geloescht';
unlink ( $__mc_PDO_LOGFILE );
mcFile::write($__mc_PDO_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_PDO_LOGFILE, $var_message, 'a');
}
}
if($__mc_INPUT_LOGFILE) {
$INPUTtext = print_r(array( '_GET' => $_GET, '_POST' => $_POST ), true);
if($__mc_INPUT_LOGFILE_RESET) {
$var_message = '-- ['.date('d. m. Y G:i').'] DEVMODE: logfile wurde zurvor geloescht';
unlink ( $__mc_INPUT_LOGFILE );
mcFile::write($__mc_INPUT_LOGFILE, $var_message.mcCONST::LINEBREAK.$INPUTtext, '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_INPUT_LOGFILE, $var_message.mcCONST::LINEBREAK.$INPUTtext, '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');
if(is_array($__mc_Report)) {
foreach($__mc_Report as $Report) {
foreach($Report as $kindofDistribute => $params) {
if($kindofDistribute == 'toFile') {
if(array_key_exists('reset', $params) && $params['reset']) {
unlink ( $params['file'] );
mcFile::write($params['file'], $var_message, 'w');
}
}
}
}
}
D::start();
}
?>