--- nfo/site/htdocs/inc/common/common.php.inc 2004/08/30 02:16:19 1.2 +++ nfo/site/htdocs/inc/common/common.php.inc 2004/08/30 10:42:20 1.4 @@ -4,12 +4,13 @@ --- Setup and common functions include file. -------------------------------------------------------------------------------- --- rabit, 04:31 24.08.2004 ---- $$id$$ +--- $Id: common.php.inc,v 1.4 2004/08/30 10:42:20 bd Exp $ ------------------------------------------------------------------------------*/ //------------------------------------------------------------------------------ //- Benchmarking: +// Create the benchmark steps array inside "$common": $common['benchmark'] = array(); function common_benchmark_addstep($caption) { @@ -162,9 +163,12 @@ $timestamp = date('YmdHis', $common_sessiondata['birthtime']); $useragent = $_SERVER['HTTP_USER_AGENT']; - $sql = "INSERT INTO hits (id, timestamp, address, entryurl, referer, sessionid, useragent, requestcount) VALUES (DEFAULT, FROM_UNIXTIME('$unixtime'), '$address', '$entryurl', '$referer', '$sessionid', '$useragent', '1');"; + $sql = "INSERT INTO hits (id, timestamp, address, entryurl, referer, sessionid, useragent, requestcount) VALUES (NULL, FROM_UNIXTIME('$unixtime'), '$address', '$entryurl', '$referer', '$sessionid', '$useragent', '1');"; $res = mysql_query($sql); + if ($errstr = mysql_error()) { + print $errstr . "\n"; + } if(!$res) return false; @@ -334,7 +338,11 @@ common_benchmark_addstep('COMMON: PAGE: start'); - $contentdata = cms_getcontent('xmlpage', $keyname); + $list = cms_getlist('xmlpage', $keyname); + + common_benchmark_addstep('COMMON: PAGE: CMS get list'); + + $contentdata = cms_getcontent('xmlpage', $keyname, $language_id); common_benchmark_addstep('COMMON: PAGE: CMS get content'); @@ -346,13 +354,24 @@ if($xml) { - common_pagetitle($contentdata['description']); + $titledata = ''; + + for($i = 0; $i < count($list); $i++) { + + $titledata .= ($i ? ' · ' : '') . '' . $list[$i][4] . ''; + + } + + common_pagetitle($contentdata['description'], $titledata); xmlcp_xmlpage2html($xml); common_benchmark_addstep('COMMON: PAGE: xmlpage2html'); /* + common_headline('$list array, readable:'); + common_codeparagraph('$list = ' . nl2br(htmlentities(print_r($list, true)))); + common_headline('$contentdata array, readable:'); common_codeparagraph('$contentdata = ' . nl2br(htmlentities(print_r($contentdata, true))));