text.php.tmpl 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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" itemprop="url"/>
  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. </head>
  53. <body>
  54. <!-- Menu navbar -->
  55. <header>
  56. <div class="container-fix" >
  57. <div class="h-left" >
  58. <h1><i class="fa fa-cloud" ></i> $station.location </h1>
  59. <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>
  60. <?php
  61. echo "<h2>\$title Climate Summary</h2>";
  62. ?>
  63. <p><i class="fa fa-clock-o" ></i> $current.dateTime $current.dateTime.format("%Z")</p>
  64. </div>
  65. <div class="h-right" >
  66. <table>
  67. <tr><td><b>Station:</b></td><td>$station.hardware</td></tr>
  68. <tr><td><b>Software:</b></td><td><a href="http://weewx.com/" target="_blank" >WeeWX v$station.version</a></td></tr>
  69. <tr><td><b>Weewx uptime:</b></td><td>$station.uptime</td></tr>
  70. <tr><td><b>Server uptime:</b></td><td>$station.os_uptime</td></tr>
  71. <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>
  72. </table>
  73. </div>
  74. <nav>
  75. <ul class="topnav" id="myTopnav">
  76. <li class="icon"><a href="javascript:void(0);" onclick="myFunction()"><i class="fa fa-bars" ></i></a></li>
  77. <li><a href="index.html" >Current</a></li>
  78. <li><a href="week.html" >Week</a></li>
  79. <li><a href="month.html" >Month</a></li>
  80. <li><a href="year.html" >Year</a></li>
  81. <li><a href="station.html" >Station</a></li>
  82. <li class="active" ><a href="summary.html" >Summaries</a></li>
  83. <li><a href="RSS/weewx_rss.xml" ><i class="fa fa-rss" ></i></a></li>
  84. </ul>
  85. </nav>
  86. </div>
  87. </header>
  88. <!-- Main container -->
  89. <div class="main" >
  90. <div class="container" >
  91. <div class="card" id="tablefix">
  92. <?php
  93. if(file_exists(\$report)){
  94. echo "<p>";
  95. echo "<PRE>";
  96. echo file_get_contents(\$report);
  97. echo "</PRE>";
  98. echo "</p>";
  99. }
  100. ?>
  101. </div>
  102. </div>
  103. </div>
  104. <footer>
  105. <div class="container-fix">
  106. <center>
  107. #if $Extras.has_key('you')
  108. <i class="fa fa-pied-piper-pp"> </i><a href=mailto:$Extras.email> $Extras.you</a>
  109. #end if
  110. &sdot;
  111. Copyright <i class="fa fa-copyright"></i> $latest.dateTime.format("%Y")
  112. <br>
  113. Design by <a href="http://blauesledersofa.de">blaues Ledersofa</a>
  114. &sdot;
  115. Powered by<i class="fa fa-cog fa-spin fa-fw" aria-hidden="true"></i><a href="http://weewx.com/" target="_blank">WeeWX</a> and
  116. <!-- Raspberry Pi icon by Icons8 --> <img src="https://maxcdn.icons8.com/Color/PNG/24/Logos/raspberry_pi-24.png" title="Raspberry Pi" height="18" width="18"> <a href="https://www.raspberrypi.org/" target="_blank"> Raspberry Pi 2 Model B</a>.
  117. </center>
  118. </div>
  119. </footer>
  120. #if $Extras.has_key('googleAnalyticsId')
  121. <!-- Google Analytics -->
  122. <script>
  123. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  124. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  125. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  126. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  127. ga('create', '$Extras.googleAnalyticsId', 'auto');
  128. ga('send', 'pageview');
  129. </script>
  130. #end if
  131. <!-- Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon -->
  132. <script>
  133. function myFunction() {
  134. var x = document.getElementById("myTopnav");
  135. if (x.className === "topnav") {
  136. x.className += " responsive";
  137. } else {
  138. x.className = "topnav";
  139. }
  140. }
  141. </script>
  142. </body>
  143. </html>