From: maxious Date: Mon, 18 Jul 2011 12:32:55 +0000 Subject: Minify local css overrides X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=1d7869d956bf6c9364a49c8e14896dbe4a00c170 --- Minify local css overrides --- --- /dev/null +++ b/css/local.css.php @@ -1,1 +1,213 @@ - + --- a/include/common-geo.inc.php +++ b/include/common-geo.inc.php @@ -1,7 +1,7 @@ $mapPoint) { - $markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . $markerImage . ($index + 1); + if ($twotone && $index == 0) { + $markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . "iconr" . ($index + 1); + $center = "{$mapPoints[0][0]},{$mapPoints[0][1]}"; + } + else { + $markers.= $mapPoint[0] . "," . $mapPoint[1] . "," . $markerImage . ($index + 1); + } if ($index + 1 != sizeof($mapPoints)) $markers.= "|"; - if ($mapPoint[0] < $minlat) $minlat = $mapPoint[0]; - if ($mapPoint[0] > $maxlat) $maxlat = $mapPoint[0]; - if ($mapPoint[1] < $minlon) $minlon = $mapPoint[1]; - if ($mapPoint[1] > $maxlon) $maxlon = $mapPoint[1]; + $dist = distance($mapPoints[0][0], $mapPoint[0][1], $mapPoint[0], $mapPoint[1]); + $mapwidthinmeters = ($dist > $mapwidthinmeters ? $dist : $mapwidthinmeters); $totalLat+= $mapPoint[0]; $totalLon+= $mapPoint[1]; } if ($zoom == 0) { $mapwidthinmeters = distance($minlat, $minlon, $minlat, $maxlon); foreach (array_reverse($metersperpixel, true) as $zoomLevel => $maxdistance) { - if ($zoom == 0 && $mapwidthinmeters < ($maxdistance + 50)) $zoom = $zoomLevel; + if ($zoom == 0 && $mapwidthinmeters * 1.5 < ($maxdistance)) $zoom = $zoomLevel; } } $center = $totalLat / sizeof($mapPoints) . "," . $totalLon / sizeof($mapPoints); } $output = ""; if ($collapsible) $output.= '

Open Map...

'; - $output.= ''; + $output.= ''; if ($collapsible) $output.= '
'; return $output; } @@ -67,11 +67,11 @@ $c = 2 * atan2(sqrt($a) , sqrt(1 - $a)); $km = $r * $c; if ($roundLargeValues) { - if ($km < 1) return floor($km * 1000); - else return round($km,2)."k"; - } else return floor($km * 1000); + if ($km < 1) return floor($km * 1000); + else return round($km, 2) . "k"; + } + else return floor($km * 1000); } - function decodePolylineToArray($encoded) { // source: http://latlongeeks.com/forum/viewtopic.php?f=4&t=5 --- a/include/common-template.inc.php +++ b/include/common-template.inc.php @@ -77,8 +77,7 @@ }); '; - echo ''; + +echo ''; -} -@media all and (min-width: 750px){ - .type-home .ui-content, - .type-interior .ui-content { - background-position: 39%; - } - .content-secondary { - width: 34%; - } - .content-primary { - width: 56%; - padding-right: 1%; - } - .type-interior .ui-content { - background-position: 34%; - } -} - -@media all and (min-width: 1200px){ - .type-home .ui-content{ - background-position: 38.5%; - } - .type-interior .ui-content { - background-position: 30%; - } - .content-secondary { - width: 30%; - padding-right:6%; - margin: 30px 0 20px 5%; - } - .type-interior .content-secondary { - margin: 0; - padding: 0; - } - .content-primary { - width: 50%; - margin-right: 5%; - padding-right: 3%; - } - .type-interior .content-primary { - width: 60%; - } -} - -'; + if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { echo ' --- a/include/common.inc.php +++ b/include/common.inc.php @@ -6,7 +6,7 @@ "phperror", "awsotp", //"squallotp", - "vanilleotp", + //"vanilleotp", "database", "other" ); --- a/include/db/servicealert-dao.inc.php +++ b/include/db/servicealert-dao.inc.php @@ -2,7 +2,7 @@ function getServiceOverride($date="") { global $conn; $query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1"; - debug($query,"database"); + // debug($query,"database"); $query = $conn->prepare($query); // Create a prepared statement $query->bindParam(":date", date("Ymd",($date != "" ? $date : time()))); $query->execute(); @@ -12,4 +12,42 @@ } return $query->fetch(PDO::FETCH_ASSOC); } + +function getCurrentAlerts() { + global $conn; + $query = "SELECT * from servicealerts_alerts"; + //debug($query, "database"); + $query = $conn->prepare($query); + //if ($stop_sequence != "") $query->bindParam(":stop_sequence", $stop_sequence); + $query->execute(); + if (!$query) { + databaseError($conn->errorInfo()); + return Array(); + } + return $query->fetchAll(); +} +function getInformedAlerts($id,$filter_class,$filter_id) { + + global $conn; + $query = "SELECT * from servicealerts_informed where servicealert_id = :servicealert_id"; + + if ($filter_class != "" && $filter_id != "") { + $query .= " AND (informed_class = :informed_class OR informed_class = 'network') AND informed_id = :informed_id"; + + } + //debug($query, "database"); + $query = $conn->prepare($query); + if ($filter_class != "" && $filter_id != "") { + $query->bindParam(":informed_class", $filter_class); + $query->bindParam(":informed_id", $filter_id); + } + $query->bindParam(":servicealert_id", $id); + $query->execute(); + if (!$query) { + databaseError($conn->errorInfo()); + return Array(); + } + return $query->fetchAll(); +} + ?> --- a/labs/myway_timeliness.php +++ b/labs/myway_timeliness.php @@ -6,17 +6,16 @@ -
+