--- a/busui/common.inc.php +++ b/busui/common.inc.php @@ -30,20 +30,26 @@ return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME']; } +function isMetricsOn() +{ + return true; +} + function debug($msg) { if (isDebug()) echo ""; } function isFastDevice() { + $fastDevices = Array("Mozilla/5.0 (X11;", "Mozilla/5.0 (Windows;", "Mozilla/5.0 (iP", "Mozilla/5.0 (Linux; U; Android", "Mozilla/4.0 (compatible; MSIE"); + $slowDevices = Array("J2ME","MIDP","Opera/","Mozilla/2.0 (compatible;","Mozilla/3.0 (compatible;"); return true; } -function include_header($pageTitle, $opendiv = true, $geolocate = false) { +function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false) { echo ' - busness time - '.$pageTitle.' - '; + '.$pageTitle.''; if (isDebug()) echo ' '; @@ -104,19 +110,34 @@ "; } -echo ' - +echo ' + '; + if (isMetricsOn()) { + require_once('owa/owa_env.php'); + require_once(OWA_DIR.'owa_php.php'); + $owa = new owa_php(); + $owa->setSiteId('bus.lambdacomplex.org'); + $owa->setPageTitle($pageTitle); + $owa->setPageType($pageType); + $owa->trackPageView(); + $owa->placeHelperPageTags(); + } + if ($opendiv) { echo '
- +

'.$pageTitle.'

'; } } - function include_footer() { if ($geolocate && isset($_SESSION['lat'])) {