$end_times = explode(' ', microtime()); $start_times = explode(' ', $_pcpin_log_timer_start); $start = 1 * (substr($start_times[1], -5) . substr($start_times[0], 1, 5)); $end = 1 * (substr($end_times[1], -5) . substr($end_times[0], 1, 5)); $diff = $end - $start; $mysql_usage = $_GET['_pcpin_log_mysql_usage']; $timers = "\n<!--\n" . "===========================================================================\n" . "\tThe page has been generated in total " . number_format($diff, 3, '.', '') . " seconds\n" . "\t\tPHP time:\t" . number_format($diff - $mysql_usage, 3, '.', '') . " seconds\n" . "\t\tMySQL time:\t" . number_format($mysql_usage, 3, '.', '') . " seconds\n" . "===========================================================================\n" . "-->"; $template->addVar('main', 'timers', $timers); } // Send content-type/encoding header if (!headers_sent()) { header('Content-Type: text/html; charset=UTF-8'); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); if (PCPIN_CLIENT_AGENT_NAME == 'IE') { header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); } else { header('Pragma: no-cache'); } } // Display parsed template if (!empty($tpl) && is_object($tpl)) { $template->addVar('main', 'contents', $tpl->getParsedTemplate()); } // Hide "<!DOCTYPE>" declaration, if needed (IE6 bug) $template->addVar('doctype', 'hide', empty($_force_buggy_doctype) && PCPIN_CLIENT_AGENT_NAME == 'IE' && PCPIN_CLIENT_AGENT_VERSION * 1 < 7); // Parse and display results echo ltrim($template->getParsedTemplate()); // Terminate script. // Warning: do not remove next line! die;