update links and .htaccess for SSL
[dylansserver.git] / view / archive.php
index 2829668..4231b17 100644 (file)
@@ -22,8 +22,9 @@
       SyntaxHighlighter.all();
     }
   </script>
-  <script type='text/javascript' src='http://www.google.com/recaptcha/api/js/recaptcha_ajax.js'></script>
+  <script type='text/javascript' src='https://www.google.com/recaptcha/api/js/recaptcha_ajax.js'></script>
   <script type='text/javascript' src='/includes/comment.js'></script>
+  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 </head>
 
 <body onload="return typeof highlight == 'function' ? highlight() : true">
 
     <div id="content">
       <div id='notes'>
-        <?php $this->display_notes() ?>
-    <div id='navigation'>
-    <h1>
-    <?php
-    if($this->page > 1){
-      $previous_page = $this->page - 1;
-      echo "<a href='/notes/page/$previous_page'>prev</a>";
-    }
-    if($this->page < $this->number_of_pages) {
-    $forward_page = $this->page + 1;
-    echo " <a href='/notes/page/$forward_page'>next</a>";
-    } ?>
-    </h1>
-    </div>
+        <?php
+          if (count($this->notes) >= 1) {
+            foreach ($this->notes as $note) {
+              echo "<div class='note'>";
+              echo "<h1><span class='date'>";
+              echo $note['year_posted'] . "/";
+              echo $note['month_posted'] . "/";
+              echo $note['day_posted'] . "/";
+              echo "</span><a href='" . $note['url'] . "'>";
+              echo $note['title'] . "</a></h1>";
+              echo $note['text'];
+              echo "</div>";
+            }
+          } else {
+            echo "<br>";
+            echo "<h1>sorry, nothing here</h2>";
+            echo "<pre>Empty set (0.00 sec)</pre>";
+          }
+        ?>
+      </div>
       <div id="contact_me"><h1><a href=
       "mailto:dylan@psu.edu">dylan</a></h1><a href=
       "mailto:dylan@psu.edu">@psu.edu</a>