<?php |
<?php |
// Copyright 2009 Google Inc. All Rights Reserved. |
// Copyright 2009 Google Inc. All Rights Reserved. |
$GA_ACCOUNT = "MO-22173039-1"; |
$GA_ACCOUNT = "MO-22173039-1"; |
$GA_PIXEL = "/lib/ga.php"; |
$GA_PIXEL = "/lib/ga.php"; |
function googleAnalyticsGetImageUrl() |
function googleAnalyticsGetImageUrl() |
{ |
{ |
global $GA_ACCOUNT, $GA_PIXEL; |
global $GA_ACCOUNT, $GA_PIXEL; |
//if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') return ""; |
//if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') return ""; |
$url = ""; |
$url = ""; |
$url.= $GA_PIXEL . "?"; |
$url.= $GA_PIXEL . "?"; |
$url.= "utmac=" . $GA_ACCOUNT; |
$url.= "utmac=" . $GA_ACCOUNT; |
$url.= "&utmn=" . rand(0, 0x7fffffff); |
$url.= "&utmn=" . rand(0, 0x7fffffff); |
$referer = $_SERVER["HTTP_REFERER"]; |
$referer = $_SERVER["HTTP_REFERER"]; |
$query = $_SERVER["QUERY_STRING"]; |
$query = $_SERVER["QUERY_STRING"]; |
$path = $_SERVER["REQUEST_URI"]; |
$path = $_SERVER["REQUEST_URI"]; |
if (empty($referer)) { |
if (empty($referer)) { |
$referer = "-"; |
$referer = "-"; |
} |
} |
$url.= "&utmr=" . urlencode($referer); |
$url.= "&utmr=" . urlencode($referer); |
if (!empty($path)) { |
if (!empty($path)) { |
$url.= "&utmp=" . urlencode($path); |
$url.= "&utmp=" . urlencode($path); |
} |
} |
$url.= "&guid=ON"; |
$url.= "&guid=ON"; |
return str_replace("&", "&", $url); |
return str_replace("&", "&", $url); |
} |
} |
function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) |
function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) |
{ |
{ |
global $labsPath,$serviceAlertsEnabled; |
global $labsPath,$serviceAlertsEnabled; |
echo ' |
echo ' |
<!DOCTYPE html> |
<!DOCTYPE html> |
<html lang="en"> |
<html lang="en"> |
<head> |
<head> |
<meta charset="UTF-8"> |
<meta charset="UTF-8"> |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
<title>' . $pageTitle . '</title> |
<title>' . $pageTitle . '</title> |
<meta name="google-site-verification" content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" /> |
<meta name="google-site-verification" content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" /> |
<link rel="dns-prefetch" href="//code.jquery.com"> |
<link rel="dns-prefetch" href="//code.jquery.com"> |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> |
<link rel="stylesheet" href="' . $labsPath . 'css/jquery-ui-1.8.12.custom.css" />'; |
<link rel="stylesheet" href="' . $labsPath . 'css/jquery-ui-1.8.12.custom.css" />'; |
if (isDebugServer()) { |
if (isDebugServer()) { |
$jqmcss = $labsPath . 'css/jquery.mobile-1.0b2.css'; |
$jqmcss = $labsPath . 'css/jquery.mobile-1.0b2.css'; |
$jqjs = $labsPath . 'js/jquery-1.6.2.min.js'; |
$jqjs = $labsPath . 'js/jquery-1.6.2.min.js'; |
$jqmjs = $labsPath . 'js/jquery.mobile-1.0b2.js'; |
$jqmjs = $labsPath . 'js/jquery.mobile-1.0b2.js'; |
} |
} |
else { |
else { |
$jqmcss = "//code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css"; |
$jqmcss = "//code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css"; |
$jqjs = "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"; |
$jqjs = "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"; |
$jqmjs = "//code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"; |
$jqmjs = "//code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"; |
} |
} |
echo '<link rel="stylesheet" href="' . $jqmcss . '" /> |
echo '<link rel="stylesheet" href="' . $jqmcss . '" /> |
<script src="'.$jqjs.'"></script> |
<script src="'.$jqjs.'"></script> |
<script>$(document).bind("mobileinit", function(){ |
<script>$(document).bind("mobileinit", function(){ |
$.mobile.ajaxEnabled = false; |
$.mobile.ajaxEnabled = false; |
}); |
}); |
</script> |
</script> |
<script src="'.$jqmjs.'"></script> |
<script src="'.$jqmjs.'"></script> |
|
|
<script src="' . $labsPath . 'js/jquery.ui.core.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.core.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.position.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.position.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.widget.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.widget.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.autocomplete.min.js"></script> |
<script src="' . $labsPath . 'js/jquery.ui.autocomplete.min.js"></script> |
<script> |
<script> |