getModule()) {
$shine->setValue('strModule', 'mainpage');
$strFinalOutput = $shine->displayPage('mainpage');
}
else {
$strFinalOutput = $shine->displayPage();
}
// try to output valid XHTML
// "& " -> "& "
$strFinalOutput = str_replace('& ', '& ', $strFinalOutput);
$strFinalOutput = str_replace('', '', $strFinalOutput);
$strFinalOutput = str_replace('
', '
', $strFinalOutput);
$strFinalOutput = str_replace('
', '
', $strFinalOutput);
$strFinalOutput = str_replace('', '', $strFinalOutput);
$strFinalOutput = str_replace('', '', $strFinalOutput);
$strFinalOutput = str_replace(' TARGET=', ' target=', $strFinalOutput);
// ... content generated with HTMLTextArea
$strFinalOutput = str_replace('', '
', $strFinalOutput);
$strFinalOutput = str_replace('
Documente oficiale:', '
Documente oficiale:
', $strFinalOutput);
$strFinalOutput = str_replace('Linkuri:', '
Linkuri:
', $strFinalOutput);
if ($_APP[smartURLs] == 1) {
$URLMatch = "/$_PATH[script]\/([a-zA-Z_\/]*)([|a-zA-Z]*)(\?*)((&?)([\w\[\]]*)(=?)([\w-%\.]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)((&?)([\w\[\]]*)(=?)([\w-]*)?)/";
preg_match_all($URLMatch, $strFinalOutput, $arrMatches);
// print_r($arrMatches);
if (is_array($arrMatches[0]))
foreach ($arrMatches[0] as $key => $strMatch) {
$strRewrittenURL = $_PATH[script].'/'.$arrMatches[1][$key].($arrMatches[2][$key] ? $arrMatches[2][$key] : '').'/';
for($i = 0; $i < 10; $i++) {
$paramNameIndex = ($i * 5) + 6;
// if(strpos($strRewrittenURL, 'displayAgendaPage') !== FALSE)
// echo "aici ...
";
if ($arrMatches[$paramNameIndex][$key])
$strRewrittenURL .= $arrMatches[$paramNameIndex][$key].'_'.$arrMatches[$paramNameIndex + 2][$key].'/';
}
$_strMatch = $strMatch;
$_strMatch = str_replace('/', '\/', $_strMatch);
$_strMatch = str_replace('|', '\|', $_strMatch);
$_strMatch = str_replace('?', '\?', $_strMatch);
preg_match_all("/$_strMatch".'([\w =\"\'\(\)\-\+]*)>([\w\d -"\';&=\/\.\-\+<>:\?%,!\(\)]*)<\/a>/', $strFinalOutput, $arrStringMatches);
if (strlen($arrStringMatches[2][0])) {
$helpVar = strip_tags($arrStringMatches[2][0]);
if (strstr($arrStringMatches[2][0], 'db->Close();
if($_REQUEST[printPage])
$strFinalOutput = getPrintPage($strFinalOutput);
//echo preg_replace('!\s+!', ' ', $strFinalOutput);
ob_start("ob_gzhandler");
if($_APP[version] == 'mobile')
echo loadMobileVersion($strFinalOutput);
else
echo $strFinalOutput;
$User->setValue('PageRand', $_APP['rand']);
//echo $REMOTE_ADDR;
//$shine->action != 'getFlyOutContent' &&
if ($_APP[debugLevel] > 0 && !$_REQUEST[printPage] && !$_REQUEST[recomendedUrl] && strstr($REMOTE_ADDR, '192.168') && $shine->getModule() != 'news') {
echo '
======debug info======
';
echo 'User: '.$User->getValue('Name').'
';
echo 'Auto-logout: '.date('d.m.y H:i', $User->getValue('ValidUntil')).'
';
echo 'Module: '.$shine->getModule().'
';
echo 'Execution time: '.$shine->getExecutionTime(). ' seconds.
';
echo 'DB queries: '.$shine->noQueries. '
';
echo '$_SESSION : ';
print_r($_SESSION);
echo '
';
echo '$_REQUEST : ';
print_r($_REQUEST);
echo '
';
}
/*
* /Main
*/
?>