<?php

// do not allow this page without the load of wordpress!
if (WCT_PHP_ON !== true) { exit; }

$zusatz = "";

if (strpos($content,"strftime") !== false) {
	if(!function_exists('qtrans_getLanguage')){function qtrans_getLanguage(){}}

	if (qtrans_getLanguage() != '') {
		$lang = substr(qtrans_getLanguage(),0,2);
	}
	else {
		$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
	}

	if ($lang == "en") {
		$zusatz = "putenv('LC_ALL=en_US.utf8');\nsetlocale(LC_ALL, 'en_US.utf8');\n";
	}
	elseif($lang == "de"){
		$zusatz = "putenv('LC_ALL=de_DE.utf8');\nsetlocale(LC_ALL, 'de_DE.utf8');\n";
	}
}

$befehl = str_replace(array("&gt;","&lt;","<br/>"),array(">","<",""),$content);
if (strpos($befehl,";") === false) { $befehl .= ";"; }
if (stripos($befehl,"echo ") === false) { $befehl = "echo ".$befehl; }

// eval is used for the wctphp smarttag
eval($zusatz."\nob_start();\n".$befehl."\n\$out = ob_get_clean();");

?>