Blame view

class_D.inc.php 22.9 KB
Frederick committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php
/**
 *	@filesource 	class_D.inc.php
 *
 * @category losp
 * @copyright Copyright by mensch.coop e.G. 2009
 * @mailto	dev [at] mensch.coop
 * @version 0.4.200901
 * @link http://mensch.coop
 */


/**
 * Klasse ist für Ausgaben zuständig die
 * 	a) nur für die Entwicklung relevant sind, also nicht für das Live System
 *  b) umgeleitet werden können, also nicht einfach nur ausgegeben werden, sondern in eine extra Datei
 */
class D {

20 21
	const ALL = 'ALL';
	
Frederick committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
	private static $echo_count = 0;
	public static $echo_lines = array();

	private static function html2text($param_htmlstring) {

		$html_elements = array();
		$text_elements = array();

		foreach(mcCONST::$HTMLTAGS2TEXT as $htmlstags => $stringels) {
			$html_elements[] = $htmlstags;
			$text_elements[] = $stringels;
		}

//		$param_htmlstring = str_replace(mcCONST::LINEBREAK, '', $param_htmlstring);

		$textstring = str_replace($html_elements, $text_elements, $param_htmlstring);
38 39 40 41
		
		
		$textstring = strip_tags($textstring);
		
Frederick committed
42 43 44 45 46 47 48 49 50 51
		return $textstring;
	}


	public static function e($param_string, $param_print=true, $param_force=false) {
		self::new_echo($param_string, $param_print, $param_force);
	}

	public static function printToFile($param_filename, $param_kindof = null) {

52 53 54
		global $__mc_D_LOGFILE_ONLY_USER;


Frederick committed
55 56 57
		if($param_filename && !empty(self::$echo_lines)) {
			$file_content = '';
			foreach(self::$echo_lines as $line_nr => $line) {
58
				
59
				if($__mc_D_LOGFILE_ONLY_USER === $line['print'] || D::ALL ===$line['print']) {
60 61
					$file_content .= $line_nr.':'.mcCONST::TAB.self::html2text($line['line']).mcCONST::LINEBREAK;
				}
Frederick committed
62 63 64 65 66 67
			}
			
			mcFile::write($param_filename, $file_content, $param_kindof);
		}
	}

sn committed
68
	public static function printToScreen($param_return=false) {
Frederick committed
69

70 71
		global $__mc_D_LOGFILE_ONLY_USER;
		
Frederick committed
72 73 74
		if(!empty(self::$echo_lines)) {
			$screen_content = '<br /><br /><br />';
			foreach(self::$echo_lines as $line_nr => $line) {
75 76 77 78 79
//				echo '$__mc_D_LOGFILE_ONLY_USER = '.$__mc_D_LOGFILE_ONLY_USER.' == '.$line['print'].'<br/>';
//				if($__mc_D_LOGFILE_ONLY_USER === $line['print']) {
					$screen_content .= $line['line'];
//				}
				
Frederick committed
80
			}
sn committed
81 82 83 84 85 86
			if($param_return) {
				return $screen_content;
			} else {
				echo $screen_content;
			}
			
Frederick committed
87 88 89
		}
	}

sn committed
90 91 92 93 94 95 96 97
	
	public static function printToHtmlFile($param_filename, $param_kindof = 'w') {

		$screen_content = D::printToScreen(true);
		mcFile::write($param_filename, $screen_content, $param_kindof);
	}
	
	
Frederick committed
98 99 100 101 102 103
	public static function printPDOQuery($param_query, array $param_bindValueArray=null, $param_print=true, $param_force=false) {
//		$return = '';

		foreach($param_bindValueArray as $string => $value) {
			$param_query = str_replace($string, $value, $param_query);
		}
Frederick d. Maus committed
104 105
//		D::li(highlight_string($param_query, true));
		D::li($param_query, $param_print, $param_force);
Frederick committed
106 107 108 109 110 111 112
		D::show($param_bindValueArray, $param_query);
	}

	private static function new_echo($param_string, $param_print=true, $param_force=false) {


		if(trim($param_string)) {
113 114
//			if($param_htmlentities)
//				$param_string=htmlentities($param_string);
Frederick committed
115 116 117 118 119 120
			self::$echo_lines[self::$echo_count] = array(
				'line'	=> $param_string,
				'print' => $param_print,
				'force' => $param_force
			);
			if($param_force) {
121 122
//				echo 'FORCE:'.mcCONST::TAB.$param_string;
				echo 'FORCE:'.mcCONST::TAB.$param_string.'<br/>';
Frederick committed
123
			}
124
//			echo $param_string;
Frederick committed
125 126 127 128
			self::$echo_count++;
		}
	}

129 130 131 132 133 134 135 136 137 138 139 140 141 142
	/**
	 * function htmlencode a string or array values () 
	 * 
	 * @param array/string $param_val
	 */
	public static function htmlencode_arrayvalues($param_val){
		if(is_array($param_val)){
			foreach($param_val as $key => $value){
				$param_val[$key]=self::htmlencode_arrayvalues($value);
			};
			return $param_val;
		}
		return htmlentities($param_val);
	}
Frederick committed
143 144 145 146
	/**
	 * Funktion zeigt ein Objekt/Array html strukturiert an
	 *	anstelle von var_dump
	 */
147
	public static function show($param_val, $param_string="", $param_print=true, $param_force=false, $param_htmlentities=false) {
Frederick committed
148

sn committed
149 150 151 152 153
		if(is_array($param_string)) {
			$param_string = $param_string[0];
			$print_fullobject = true;
		}
		
Frederick committed
154 155
//		self::new_echo("<br>______________________<br>", $param_print, $param_force);

sn committed
156
		self::printCurrentFunction($param_print,"<br>______________________<br>");
Frederick committed
157 158

//		self::new_echo("<b>show(".$param_string.")</b>", $param_print, $param_force);
sn committed
159
		$string_show = "<br /><b>show(".$param_string.")</b><br />";
Frederick committed
160 161 162 163 164 165 166

		if(is_object($param_val) && get_class($param_val)=='DOMElement') {
			D::showdomelement($param_val, $string_show.$param_string,$param_print, $param_force);
		} else {
			if(is_array($param_val)) {
				$string_show .= "count(".$param_val.") = ".count($param_val)."";
//				self::new_echo("<br/>count(".$param_val.") = ".count($param_val)."", $param_print, $param_force);
sn committed
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
			} else if(is_object($param_val)) {
				$objvars = get_object_vars($param_val);
				sort($objvars);
				$objfncs = get_class_methods(get_class($param_val));
				sort($objfncs);
				
				$parent = get_parent_class($param_val);
				while($parent) {
					$parents .= ' extends <b>'.$parent.'</b>';
					$parent = get_parent_class($parent);
				}
				
				$param_val = array(
					'classname' => '<b>'.get_class($param_val).'</b>'.$parents,
					'objvars' => $objvars, 
					'objfncs' => $objfncs, 
				);
				
sn committed
185 186 187
				if($print_fullobject ) {
					$param_val['obj'] = $param_val;
				}
Frederick committed
188 189 190
			}
//			self::new_echo("<pre>", $param_print, $param_force);
			$string_show .= "<pre>";
191 192 193
			if($param_htmlentities){
				$param_val=self::htmlencode_arrayvalues($param_val);
			}
Frederick committed
194
			self::new_echo($string_show.print_r($param_val, true).'"</pre>"', $param_print, $param_force);
195 196
			
			
Frederick committed
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
//echo '#############################'.print_r($param_val, true).'####################';
			//		if(is_object($param_val)) {
			//			self::new_echo("<b>show(Objekt/Klassen Variablen)</b><pre>", $param_print, $param_force);
			//			self::new_echo(print_r(get_class_vars(get_class($param_val)), true), $param_print, $param_force);
			//
			//
			//
			//			self::new_echo("<b>show(Objekt/Klassen Funktionen)</b><pre>", $param_print, $param_force);
			//			self::new_echo(print_r(get_class_methods($param_val), true), $param_print, $param_force);
			//		}

//			self::new_echo("</pre>", $param_print, $param_force);

			//		self::new_echo("______________________<br>", $param_print, $param_force);
		}


	}

216
	public static function cf($param_string='', $param_print=true, $param_force=false) {
217
		D::printCurrentFunction($param_print, $param_string, true, $param_force);
Frederick d. Maus committed
218 219
	}
	
Frederick committed
220 221 222 223 224
	/**
	 * Funktion zeigt html liste
	 * <li>$param_string</li>
	 */
	public static function li($param_string, $param_print=true, $param_force=false) {
Frederick d. Maus committed
225 226
		D::printCurrentFunction($param_print);
		D::new_echo("<li>".$param_string."</li>", $param_print, $param_force);
Frederick committed
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
	}
	public static function kindof($param_kindof, $param_string="", $param_print=true, $param_force=false) {
		self::printCurrentFunction($param_print);
		self::new_echo("<b>kindof(".$param_string.")</b><pre>", $param_print, $param_force);
		if(is_array($param_kindof)) {
			$var = 'Array count('.count($param_kindof).')';
		} else if(is_object($param_kindof)) {
			$var = 'Object('.get_class($param_kindof).') ';
			if(is_subclass_of($param_kindof, 'MultimediaText')) {
				$var .= ' extends MultimediaText Subject('.$param_kindof->getObjVar('Subject').')';
			} else if(get_class($param_kindof)=='MultimediaText') {
				$var .= ' Subject('.$param_kindof->getObjVar('Subject').')';
			}
		} else if(is_int($param_kindof)) {
			$var = 'Int('.$param_kindof.')';
		} else if(is_bool($param_kindof)) {
			$var = 'Bool('.$param_kindof.')';
		} else if(is_string($param_kindof)) {
			$var = 'String('.$param_kindof.')';
		} else {
			$var = gettype($param_kindof).'';
		}
		$var .= ' = ('.$param_kindof.')';
		if($param_kindof) {
			$var .= ' if('.$param_kindof.' ==> ?true?)';
		} else {
			$var .= ' else if(!'.$param_kindof.') ==> ?false?';
		}
		self::new_echo("<li>".$var."</li>", $param_print, $param_force);
	}
	/**
	 * Funktion zeigt html unter liste
	 * <ul><li>$param_string</li></ul>
	 */
	public static function ulli($param_string, $param_print=true, $param_force=false) {
262
//		self::printCurrentFunction($param_print);
Frederick committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
		self::new_echo("<ul><li>".$param_string."</li></ul>", $param_print, $param_force);
	}
	/**
	 * Funktion zeigt html Überschrift 1 an
	 * <h1>$param_string</h1>
	 */
	public static function h1($param_string, $param_print=true, $param_force=false) {
//		self::new_echo("<br><br>|------------------------------------------------------<br>", $param_print, $param_force);
//		self::backtrace();
		self::new_echo("<h1>".$param_string."</h1>", $param_print, $param_force);
	}
	/**
	 * Funktion zeigt html Überschrift 2 an
	 * <h2>$param_string</h2>
	 */
	public static function h2($param_string, $param_print=true, $param_force=false) {
		self::new_echo("<h2>".$param_string."</h2>", $param_print, $param_force);
	}
	/**
	 * Funktion zeigt html Überschrift 3 an
	 * <h3>$param_string</h3>
	 */
	public static function h3($param_string, $param_print=true, $param_force=false) {
		self::new_echo("<h3>".$param_string."</h3>", $param_print, $param_force);
	}

	/**
	 * Funktion zeigt html Absatz an
	 * <p>$param_string</p>
	 */
	public static function p($param_string, $param_print=true, $param_force=false) {
		self::new_echo("<p>".$param_string."</p>", $param_print, $param_force);
	}

	public static function fe($param_Array, $param_Print=null) {
		$param_Print .= 'count('.count($param_Array).')  || print '.$param_Array;
		D::li($param_Print);
		foreach($param_Array as $var_key => $var_value) {
			D::ulli($var_key.' => '.$var_value);
		}
	}

	/**
	 *	Funktion gibt den Weg zur tatsächliche Funktion zurück
	 *
	 *	@static
	 */

311
	private static function printCurrentFunction($param_print, $param_string='', $param_onlyFunction=false, $param_force=false) {
Frederick committed
312 313 314 315
		if($param_print) {
			$array = debug_backtrace();
			$i=2;

Frederick d. Maus committed
316
			if($param_onlyFunction) {
317
				self::new_echo(''.$array[$i]["class"].$array[$i]["type"].$array[$i]["function"].'(Z'.$array[$i-1]["line"].'): '.$param_string, $param_print, $param_force);
Frederick d. Maus committed
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
			} else {
				if(is_array($array) && array_key_exists($i,$array)){

					//				echo 'hello<br><pre>';
					//				print_r($array[1]);
					//				echo '</pre>';
					$var_depth = 0;
					for($v=0; $v<count($array);$v++){
						if( array_key_exists('class', $array[$v]) && array_key_exists('class', $array[$i])
						&&
						$array[$v]['class'].$array[$v]['type'].$array[$v]['function']==$array[$i]['class'].$array[$i]['type'].$array[$i]['function']
						){
							$var_depth++;
						}
						//	D::ulli($v.': '.$array[$v]['class'].$array[$v]['type'].$array[$v]['function']);
Frederick committed
333
					}
334
//echo $param_string;
sn committed
335
					self::new_echo($param_string."    <i style=\"font-size:12;color:gray;\"><b>".$array[$i]["class"].$array[$i]["type"].$array[$i]["function"]."()</b> <span title='Rekursionstiefe'>(RT:$var_depth)</span> call in row ".$array[$i]["line"]." in <a href=\"".substr($array[$i]["file"],strpos($array[$i]["file"],"httpdocs")+8)."\">".basename($array[$i]["file"])."</a></i> => [<i style=\"font-size:10;color:gray;\">".$array[$i-1]['class'].$array[$i-1]['type'].$array[$i-1]['function']."() call in ".basename($array[$i-1]["file"])." Zeile: ".$array[$i-1]["line"]." </i>]", $param_print);
Frederick d. Maus committed
336 337 338 339
					//echo '___________<pre>';
					//echo	print_r($array[$i], true);
					//echo '</pre>';
				}				
Frederick committed
340 341 342 343 344 345 346 347 348 349
			}
		}
	}

	public static function  backtrace($class=null, $param_print=true, $param_force=false) {
		self::printCurrentFunction($param_print);
		//echo '<h1>backtrace('.$class.')</h1>';
		self::new_echo('<h1>backtrace('.$class.')</h1>', $param_print, $param_force);
		$array = debug_backtrace();
		$k=0;
sn committed
350 351 352 353 354
		
		$table_start = '<table border="1">' ;
		$table_start .= '<tr valign="top"><td align="right">Klasse</td><td>Funktion</td><td>Datei</td></tr>';
		self::new_echo($table_start, $param_print, $param_force);
		
Frederick committed
355 356 357
		for($i=count($array)-1; $i!=0; $i--) {
			$k++;

sn committed
358 359
			$var_string = '<tr valign="top">';
			$var_string .= '<td align="right">';
Frederick committed
360 361

			if(array_key_exists('class', $array[$i]) && array_key_exists('type', $array[$i])) {
sn committed
362
				$var_string .=	"".$array[$i]["class"].$array[$i]["type"].'';
Frederick committed
363
			}
sn committed
364 365
			$var_string .= '</td>';
			$var_string .= '<td>';
Frederick committed
366 367 368

			$var_string .= $array[$i]["function"]."(...) ";

sn committed
369 370 371 372 373
			$var_string .=	" ... fnc call in row ".$array[$i]["line"]." " .
//							"in der Datei <a title=\"".$array[$i]["file"]."\" href=\"".substr($array[$i]["file"],strpos($array[$i]["file"],"httpdocs")+8)."\">".basename($array[$i]["file"])."</a>" .
//					"in der Datei <a title=\"".$array[$i]["file"]."\" href=\"".substr($array[$i]["file"],strpos($array[$i]["file"],"httpdocs")+8)."\">".basename($array[$i]["file"])."</a>" .
//					"in der Datei <a title=\"".$array[$i]["file"]."\" href=\"".$array[$i]["file"]."\">".basename($array[$i]["file"])."</a>" .					
					"";			
Frederick committed
374 375

			//			echo($var_string);
sn committed
376 377 378
			$var_string .= '</td>';
			$var_string .= '<td><span style=\"font-size:6;\">'.  dirname($array[$i]["file"]).'/<b>'.basename($array[$i]["file"]).'</b></span></td>';
			$var_string .= '</tr>';
Frederick committed
379 380
			self::new_echo($var_string, $param_print, $param_force);
		}
sn committed
381 382
		$table_stop = '</table>' ;
		self::new_echo($table_stop, $param_print, $param_force);		
Frederick committed
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
	}

	/**
	 *
	 * @param bool $param_htmltags default false
	 * @param int $param_start default 1
	 * @param int $param_end default 0
	 * @return string
	 */
	public static function getBacktrace($param_htmltags=false, $param_start=1, $param_end=0) {

		if($param_htmltags) {
			$htmltag_li_strong_b = '<li><strong style=\"font-size:8;color:gray;\"><b>';
			$htmltag_b = '</b>';
			$htmltag_strong_li = '</strong></li>';
		} else {
			$htmltag_li_strong_b = '';
			$htmltag_b = '';
			$htmltag_strong_li = '';
		}

		$return_string = '';
		$array = debug_backtrace();
		$k=0;

		$start = count($array)-$param_start;

		if($start <= $param_end) {
			$param_end = $start-1;
		}

		for($i=$start; $i!=$param_end; $i--) {
			$k++;
			$ul_start="";
			$ul_end="";
			if($param_htmltags) {
				for($j=0; $j<$k; $j++) {
					$ul_start .= "<ul>";
					$ul_end .= "</ul>";
				}
				$htmltag_start_a = "<a href=\"".substr($array[$i]["file"],strpos($array[$i]["file"],"httpdocs")+8)."\">";
				$htmltag_end_a = '</a>';
				$tag_endline = '';
			} else {
				$ul_start="* ";
				$htmltag_start_a = '';
				$htmltag_end_a = '';
				$tag_endline = "\n
					".'
						';
			}


			$var_string = $ul_start."" .$htmltag_li_strong_b;

			if(array_key_exists('class', $array[$i]) && array_key_exists('type', $array[$i])) {
				$var_string .=	"".$array[$i]["class"].$array[$i]["type"];
			}


			$var_string .= $array[$i]["function"]."(...) ";

			$var_string .=	$htmltag_b." fnc call in row ".$array[$i]["line"]." " .
							"in file ".$htmltag_start_a.basename($array[$i]["file"]).$htmltag_end_a .
					$htmltag_strong_li.$ul_end.$tag_endline;

			$return_string .= $var_string;
		}
		return $return_string;
	}

	private static $StartTime;

	public static function start() {
		self::$StartTime = time();
	}
	public static function stop($param_startTime=null, $param_string=null, $param_print=true, $param_force=false) {
		if($param_startTime==null) {
			$param_startTime = self::$StartTime;
		}
		$zeit = getdate(time() - $param_startTime);

		self::new_echo("<li><b>".$param_string."</b> ==>> <b>".$zeit["minutes"]."</b> min <b>".$zeit["seconds"]."</b> sec</li>", $param_print, $param_force);
	}


	private static function showdomelement($param_XMLElement, $param_string=null,$param_print=true, $param_force=false) {


		$count_elements=0;
		foreach($param_XMLElement->childNodes as $element) {
			if($element->nodeType == 1) {
				$string .= 'nodeName: '. $element->nodeName ." | Content: ". $element->textContent  . "<br>"  ;
				$test= $element->nodeName ;
				$count_elements++;
			}
		}
		$var_label = $param_XMLElement->getAttribute('label');
		if($var_label) {
			$string_init = '<br/><b>'.$param_XMLElement->tagName.'</b>  label('.$var_label.') ';
		}
		$string_init .=  'Number of Elements: ' .$count_elements.'<br>';
		self::new_echo("$string_init <pre>", $param_print, $param_force);
		self::new_echo($string.'</pre>',$param_print, $param_force);





	}

	public static function showdomdoc($param_XMLElement, $param_string=null,$param_print=true, $param_force=false) {
		$count_elements=0;
		foreach($param_XMLElement->childNodes as $element) {
			if($element->nodeType == 1) {
				$string .= 'nodeName: '. $element->nodeName ." | Content: ". $element->textContent  . "<br>"  ;
				$test= $element->nodeName ;
				$count_elements++;
			}
		}


		$string .=  'Number of Elements: ' .$count_elements.'<br>';
		self::new_echo("<b>showdomdoc(".$param_string.")</b><pre>", $param_print, $param_force);
		self::new_echo('</pre>'.$string,$param_print, $param_force);
	}

	public static function showdomxpath($param_DOMDOC, $param_query,$param_string=null,$param_print=true, $param_force=false) {
		$xp = new domxpath($param_DOMDOC);
		$titles = $xp->query("/". $param_query ."");
		$count_elements=0;
		$string = get_class($param_DOMDOC).': => ';
		foreach ($titles as $node) {
			$string .= '<b> NodeName: </b> <br>'.$node->nodeName .'</b><br><b> NodeContent: </b><br>'.$node->textContent . " <br>";
			//    		$string .= "<br>{$node->previousSibling->previousSibling->previousSibling->previousSibling->previousSibling->previousSibling->previousSibling->previousSibling->nodeValue},<br>";

			$count_elements++;
		}
		$string .=  'Number of Elements: ' .$count_elements.'<br>';
		self::new_echo("<b>showdomxpath(".$param_string.")</b><b>query(".'/'.$param_query.")</b><pre>", $param_print, $param_force);
		self::new_echo('</pre>'.$string,$param_print, $param_force);
	}

	/**
	 *	@todo irgendwie muss das anders ....
	 *		alles was mcClasses ist in @see D::showStats und den Rest ganz raus
	 *
	 * @global <type> $time_index
	 * @global <type> $var_ErrorWarnString
	 * @global <type> $_TREE
	 */
	public static function showGeneralSoftwareAbstractInfos() {
		global $time_index;
		global $var_ErrorWarnString;
		global $_TREE;
		echo '__ <p><br /></p><div class=\'AbstractInfos\'>';
		D::stop($time_index, $var_ErrorWarnString.' ###  index ('.$_TREE.') komplett mit Temp Ausgabe');
		D::p('' .
				'TreeManipulator: runTree('.TreeManipulator::$count_runTree.') cb_getBasisClipboard('.TreeManipulator::$count_runTreeCallback_getBasisClipboard.') || runDBTree('.TreeManipulator::$count_runDBTree.')   cb_catchInfoboxData('.CatchInfoboxDataTMC::$count_callbackFunction.')<br>' .
				'MultimediaText(<b>'.MultimediaText::$counter_____construct.' / '.count(MultimediaText::$MTextArray).'[!!!'.MultimediaText::$DoppeltGeladen.'!!!]</b>) loadObject('.MySql::$count_loadObject.') getObjDOMElement(<b>'.BasisElement::$getObjDOMElement_counter.'</b>['.BasisElement::$getObjDOMElement_counter_diff.']) runTree('.Controller::$count_runTree.')<br>' .
				'Mysql(<b>'.BasicMySql::$count___construct.'</b>):  query(<b>'.BasicMySql::$MySql_count_query.'</b>/ SR<b>'.BasicMySql::$PDOSRequest_count_query.'</b>) nextRow(<b>'.BasicMySql::$count_nextRow.'</b>) checkAuthorisationQuery(<b>'.Mysql::$count_checkAuthorisationQuery.'</b>)<br> ' .
				'getMultimediaTextData('.MySql::$count_getMultimediaTextData.') => getClassNameFromMTextID('.MySql::$count_getClassNameFromMTextID.') => getPrefsBE_SQL_Data('.CONFIG::$count_getSQL_Data.')  ==>> Infobox('.Infobox::$count_Infobox.')'.
				'CONFIG transformStringToArray('.CONFIG::$count_transformStringToArray.') '.
			'');

		D::li('geladene MultimediaTexte (index.php)');
		$index=1;
		foreach(MultimediaText::$MTextArray as $key => $value) {
			$index++;

			if(!is_array($value->getObjVar('LoadLevel')) || $var_key_LoadLevel = array_keys($value->getObjVar('LoadLevel'))) {
				$var_key_LoadLevel = array();
			}
			if(!is_array($var_key_LoadLevel)) {
				$var_key_LoadLevel = array();
			}
			D::ulli($index.' $key('.$key.') ID('.$value->getObjVar('ID').')  Subject('.$value->getObjVar('Subject').') LoadLevel('.Form::arrayToVarchar($var_key_LoadLevel).')');
		}
		echo '</div>';
	}

	public static function showStats(array $__mc_Report, $__BASEPATH_EX, $__mc_D_LOGFILE) {
		$var_ErrorWarnString = date('d. m. Y  G:i:s').': ';

sn committed
567 568 569 570 571 572 573 574
		if(array_key_exists('REMOTE_HOST', $_SERVER))  {
			$HOST = $_SERVER['REMOTE_HOST'];
		} else {
			$HOST = '';
		}
		
		
		$a_start = '<a href="'.$HOST.'/'.$__mc_D_LOGFILE.'" >';
Frederick committed
575 576 577 578 579 580
		$a_end = '</a>';
		$var_ErrorWarnString .= ' '.$a_start.'D('.count(self::$echo_lines).')'.$a_end.' ';


		if(mcNoticeEvent::$count) {
			if(array_key_exists('mcNoticeEvent', $__mc_Report) && is_array($__mc_Report['mcNoticeEvent']) && array_key_exists('toFile', $__mc_Report['mcNoticeEvent']) && is_array($__mc_Report['mcNoticeEvent']['toFile'])) {
sn committed
581
				$a_start = '<a href="'.$HOST.'/'.$__mc_Report['mcNoticeEvent']['toFile']['file'].'" style=\"font-size:15;color:orange;\">';
Frederick committed
582 583 584 585 586 587 588 589 590 591 592
				$a_end = '</a>';
			} else {
				$a_start = $a_end = '';
			}
			$var_ErrorWarnString .=  ' '.$a_start.'mcNoticeEvent('.mcNoticeEvent::$count.')'.$a_end.' ';
		} else {
			$var_ErrorWarnString .= ' '.'mcNoticeEvent(0) ';
		}

		if(Error::$Quantity) {
			if(array_key_exists('Error', $__mc_Report) && is_array($__mc_Report['Error']) && array_key_exists('toFile', $__mc_Report['Error']) && is_array($__mc_Report['Error']['toFile'])) {
sn committed
593
				$a_start = '<a href="'.$HOST.'/'.$__mc_Report['Error']['toFile']['file'].'" style=\"font-size:15;color:red;\">';
Frederick committed
594 595 596 597 598 599 600 601 602 603 604
				$a_end = '</a>';
			} else {
				$a_start = $a_end = '';
			}
			$var_ErrorWarnString .=  ' '.$a_start. 'Error('.Error::$Quantity.')'.$a_end.' ';
		} else {
			$var_ErrorWarnString .= ' '.'Error(0) ';
		}

		if(mcException::$count) {
			if(array_key_exists('mcException', $__mc_Report) && is_array($__mc_Report['mcException']) && array_key_exists('toFile', $__mc_Report['mcException']) && is_array($__mc_Report['mcException']['toFile'])) {
sn committed
605
				$a_start = '<a href="'.$HOST.'/'.$__mc_Report['mcException']['toFile']['file'].'" style=\"font-size:15;color:red;\">';
Frederick committed
606 607 608 609 610 611 612 613 614 615 616 617
				$a_end = '</a>';
			} else {
				$a_start = $a_end = '';
			}
			$var_ErrorWarnString .=  ' '.$a_start.'mcException('.mcException::$count.')'.$a_end.' ';
		} else {
			$var_ErrorWarnString .= ' '.'mcException(0) ';
		}


		if(mcErrorEvent::$count) {
			if(array_key_exists('mcErrorEvent', $__mc_Report) && is_array($__mc_Report['mcErrorEvent']) && array_key_exists('toFile', $__mc_Report['mcErrorEvent']) && is_array($__mc_Report['mcErrorEvent']['toFile'])) {
sn committed
618
				$a_start = '<a href="'.$HOST.'/'.$__mc_Report['mcErrorEvent']['toFile']['file'].'" style=\"font-size:15;color:red;\">';
Frederick committed
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
				$a_end = '</a>';
			} else {
				$a_start = $a_end = '';
			}
			$var_ErrorWarnString .= $a_start.'ErrorEvent('.mcErrorEvent::$count.')'.$a_end.' ';
		} else {
			$var_ErrorWarnString .= 'ErrorEvent(0) ';
		}

		D::stop(null, $var_ErrorWarnString);
	}


}

?>