Grouping of identical stops on trip view
[busui.git] / common-template.inc.php
blob:a/common-template.inc.php -> blob:b/common-template.inc.php
--- a/common-template.inc.php
+++ b/common-template.inc.php
@@ -1,28 +1,26 @@
 <?php
-function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false)
+function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false)
 {
 	echo '
 <!DOCTYPE html> 
 <html> 
 	<head> 
 	<title>' . $pageTitle . '</title>';
+	if ($datepicker) echo '<link rel="stylesheet"  href="css/jquery.ui.datepicker.mobile.css" />';
 	if (isDebugServer()) echo '<link rel="stylesheet"  href="css/jquery-mobile-1.0a3.css" />
          <script type="text/javascript" src="js/jquery-1.5.js"></script>
         <script type="text/javascript" src="js/jquery-mobile-1.0a3.js"></script>';
-	else echo '<link rel="stylesheet"  href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.css" />
-        <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script>
-        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.js"></script>';
-	echo '
-<link rel="stylesheet"  href="css/jquery.ui.datepicker.mobile.css" />
-	<script> 
+	else echo '<link rel="stylesheet"  href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />
+        <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
+        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>';
+	if ($datepicker) echo '<script> 
 		//reset type=date inputs to text
 		$( document ).bind( "mobileinit", function(){
 			$.mobile.page.prototype.options.degradeInputs.date = true;
 		});	
 	</script> 
-	<script src="js/jQuery.ui.datepicker.js"></script> 
-	<script src="js/jquery.ui.datepicker.mobile.js"></script> 
-     <style type="text/css">
+	<script src="js/jQuery.ui.datepicker.js"></script>';
+echo '<style type="text/css">
      .ui-navbar {
      width: 100%;
      }
@@ -73,17 +71,6 @@
 	echo '</head>
 <body>
  ';
-	if (isMetricsOn()) {
-		require_once ('owa/owa_env.php');
-		require_once (OWA_DIR . 'owa_php.php');
-		$owa = new owa_php();
-		global $owaSiteID;
-		$owa->setSiteId($owaSiteID);
-		$owa->setPageTitle($pageTitle);
-		$owa->setPageType($pageType);
-		$owa->trackPageView();
-		$owa->placeHelperPageTags();
-	}
 	if ($opendiv) {
 		echo '<div data-role="page"> 
  <script>
@@ -122,7 +109,7 @@
         or enter an address/co-ordinates in the box below.</div>';
 	}
 	echo '<div data-role="collapsible" data-collapsed="' . !$geoerror . '">
-        <h3>Change Time/Place...</h3>
+        <h3>Change Time/Place (' . (isset($_SESSION['time']) ? $_SESSION['time'] : "Current Time,") . ' '.ucwords(service_period()).')...</h3>
         <form action="" method="post">
         <div class="ui-body"> 
 		<div data-role="fieldcontain">
@@ -148,3 +135,4 @@
             </div></div>';
 }
 ?>
+