text.php.tmpl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head itemscope itemtype="http://schema.org/Website">
  4. <?php
  5. //Gets file name from url
  6. if(empty(\$_REQUEST["report"])) {
  7. //if empty then grab the latest years report
  8. \$year = date("Y");
  9. \$report = "NOAA/NOAA-".\$year.".txt";
  10. } else {
  11. \$report = filter_var(\$_REQUEST["report"],FILTER_SANITIZE_URL);
  12. }
  13. //Get labels for meta and page titles
  14. \$labels = split("[-.]", \$report);
  15. \$count = count(\$labels);
  16. if (\$count == 3){
  17. \$title = \$labels[1];
  18. }
  19. if (\$count == 4){
  20. \$title = date("F Y", mktime(0, 0, 0, \$labels[2], 1, \$labels[1]));
  21. }
  22. ?>
  23. <meta charset="utf-8">
  24. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  25. <meta http-equiv="Refresh" content="180">
  26. <meta name="description" content="$station.location Weather Station ($Extras.cwop) - weather web site powered by WeeWX">
  27. <meta name="viewport" content="width=device-width, initial-scale=1">
  28. <link rel="profile" href="http://gmpg.org/xfn/11" />
  29. #if $Extras.has_key('web_url')
  30. <link rel="canonical" href="$Extras.web_url/summary.html"/>
  31. #end if
  32. <?php
  33. echo"<title>$station.location ($Extras.cwop) Climate Summary for \$title </title>";
  34. ?>
  35. <!-- Open Graph -->
  36. <meta property="og:site_name" content="$station.location Summaries and Records" />
  37. <meta property="og:title" content="Climate Summaries"/>
  38. #if $Extras.has_key('web_url')
  39. <meta property="og:url" content="$Extras.web_url/summary.html"/>
  40. #end if
  41. <meta property="og:description" content="Climate Summaries for $station.location - weather web site powered by WeeWX" />
  42. <meta property="og:type" content="website" />
  43. <!-- Icons -->
  44. <link rel="icon" href="favicon.ico" type="image/png">
  45. <link rel="apple-touch-icon" href="touch-icon.png"/>
  46. <!-- Styles -->
  47. <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
  48. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  49. <link rel="stylesheet" href="css/main.css">
  50. <!-- Skripte -->
  51. <script src="js/modernizr-2.6.2.min.js"></script>
  52. <script src="js/checkdiff.js"></script>
  53. </head>
  54. <body>
  55. <!-- Menu navbar -->
  56. <header>
  57. <div class="container-fix" >
  58. <div class="h-left" >
  59. <h1><i class="fa fa-cloud" ></i> $station.location </h1>
  60. <p>$station.latitude[0]&deg; $station.latitude[1]' $station.latitude[2] | $station.longitude[0]&deg; $station.longitude[1]' $station.longitude[2] | $station.altitude | <a href="https://www.google.com/maps/?q=$station.location" target="_blank" ><i class="fa fa-map-marker" ></i> Show on map</a></p>
  61. <?php
  62. echo "<h2>Climate Summary \$title</h2>";
  63. ?>
  64. <p><i class="fa fa-clock-o" ></i> $current.dateTime $current.dateTime.format("%Z")</p>
  65. <p id="freshweather" class="m-orange"></p>
  66. <script type="text/javascript">
  67. window.onload = checkDiff("$current.dateTime ($current.dateTime.format('%Z'))");
  68. </script>
  69. </div>
  70. <div class="h-right" >
  71. <table>
  72. <tr><td><b>Station:</b></td><td>$station.hardware</td></tr>
  73. <tr><td><b>Software:</b></td><td><a href="http://weewx.com/" target="_blank" >WeeWX v$station.version</a></td></tr>
  74. <tr><td><b>Weewx uptime:</b></td><td>$station.uptime</td></tr>
  75. <tr><td><b>Server uptime:</b></td><td>$station.os_uptime</td></tr>
  76. <tr><td><b>Station IDs:</b></td><td><a href="http://www.findu.com/cgi-bin/wxpage.cgi?call=$Extras.cwop&last=24" >$Extras.cwop</a> | <a href="http://www.wunderground.com/cgi-bin/findweather/getForecast?query=pws:$Extras.wunderground&MR=1" >$Extras.wunderground</a></td></tr>
  77. </table>
  78. </div>
  79. <nav>
  80. <ul class="topnav" id="myTopnav">
  81. <li class="icon"><a href="javascript:void(0);" onclick="myFunction()"><i class="fa fa-bars" ></i></a></li>
  82. <li><a href="/" >Current</a></li>
  83. <li><a href="week.html" >Week</a></li>
  84. <li><a href="month.html" >Month</a></li>
  85. <li><a href="year.html" >Year</a></li>
  86. <li><a href="station.html" >Station</a></li>
  87. <li class="active" ><a href="summary.html" >Summaries</a></li>
  88. <li><a href="RSS/weewx_rss.xml" ><i class="fa fa-rss" ></i></a></li>
  89. </ul>
  90. </nav>
  91. </div>
  92. </header>
  93. <!-- Main container -->
  94. <div class="main" >
  95. <div class="container" >
  96. <div class="center" >
  97. <div class="card">
  98. <?php
  99. if(file_exists(\$report)){
  100. //echo "<p>";
  101. echo "<pre class=\"noaareport\">";
  102. echo file_get_contents(\$report);
  103. echo "</pre>";
  104. //echo "</p>";
  105. }
  106. ?>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <footer>
  112. <div class="container-fix">
  113. <center>
  114. #if $Extras.has_key('you')
  115. <i class="fa fa-pied-piper-pp"> </i><a href=mailto:$Extras.email> $Extras.you</a>
  116. #end if
  117. &sdot;
  118. Copyright <i class="fa fa-copyright"></i> $latest.dateTime.format("%Y")
  119. <br>
  120. Design by <a href="http://blauesledersofa.de">blaues Ledersofa</a>
  121. &sdot;
  122. Powered by<i class="fa fa-cog fa-spin fa-fw" aria-hidden="true"></i><a href="http://weewx.com/" target="_blank">WeeWX</a>
  123. &sdot;
  124. Icons from <i class="fa fa-font-awesome" aria-hidden="true"></i><a href="http://fontawesome.io" target="_blank"> Font Awesome</a>
  125. </center>
  126. </div>
  127. </footer>
  128. #if $Extras.has_key('googleAnalyticsId')
  129. <!-- Google Analytics -->
  130. <script>
  131. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  132. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  133. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  134. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  135. ga('create', '$Extras.googleAnalyticsId', 'auto');
  136. ga('send', 'pageview');
  137. </script>
  138. #end if
  139. <!-- Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon -->
  140. <script>
  141. function myFunction() {
  142. var x = document.getElementById("myTopnav");
  143. if (x.className === "topnav") {
  144. x.className += " responsive";
  145. } else {
  146. x.className = "topnav";
  147. }
  148. }
  149. </script>
  150. </body>
  151. </html>