name) { $app->restoreParams(); } else { $app->getParams(); } if ($app->action!='' && $app->action!='docs') { $fake_doc=''; } if ($fake_doc!="" && file_exists(DIR_MODULES.'cms_docs/cms_docs.class.php')) { $tmp=SQLSelectOne("SELECT ID FROM cms_docs WHERE NAME='$fake_doc'"); if (IsSet($tmp['ID'])) { $app->action="docs"; $app->doc=$tmp['ID']; } elseif (file_exists(DIR_TEMPLATES.$fake_doc.".html")) { $app->action=$fake_doc; } else { $tmp1=SQLSelectOne("SELECT ID FROM cms_docs WHERE NAME='404'"); if ($tmp1['ID']) { $app->action="docs"; $app->doc=$tmp1['ID']; } else { header ("HTTP/1.0 404 Not Found"); echo "The page cannot be found. Please use this link to continue browsing."; exit; } } } $result=$app->run(); $result=str_replace("nf.php", "index.php", $result); } else { $result=$cached_result; // show cached result } // BEGIN: begincut endcut placecut if (preg_match_all('//is', $result, $matches)) { for($i=0;$i(.*?)/is', $result, $matches2)) { $result=str_replace($matches[0][$i], $matches2[1], $result); $result=str_replace($matches2[0], '', $result); } } } // END: begincut endcut placecut // BEGIN: filter output if ($filterblock!='') { preg_match('/(.*?)/is', $result, $match); $result=$match[1]; } // END: filter output if (!headers_sent()) { header ("HTTP/1.0: 200 OK\n"); header ('Content-Type: text/html; charset=windows-1251'); } function echobig($string, $bufferSize = 8192) { $chars=strlen($string)-1; for ($start=0;$start <= $chars;$start += $bufferSize) { echo substr($string,$start,$bufferSize); } } // ob_start("ob_gzhandler"); startMeasure('echo_big'); echobig($result); endMeasure('echo_big'); $session->save(); $db->Disconnect(); // closing database connection endMeasure('TOTAL'); // end calculation of execution time performanceReport(); // print performance report // ob_end_flush(); ?>