- <header>
- <h1>poche, a read it later open source system</h1>
- </header>
- <div id="main" class="w800p">
- <ul id="links">
- <li><a href="index.php">home</a></li>
- <li><a href="#">favorites</a></li>
- <li><a href="#">archive</a></li>
- <li><a href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('<?php echo url()?>?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li>
- </ul>
- <?php
- $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?");
- $query->execute(array('FALSE'));
- $entries = $query->fetchAll();
- ?>
- <ul id="entries">
- <?php
- foreach ($entries as $entry) {
- echo '<li><a href="readityourself.php?url='.urlencode($entry['url']).'">' . $entry['title'] . '</a> <a href="#" title="toggle delete" class="tool">✓</a> <a href="#" title="toggle favorite" class="tool">☆</a> <a href="#" title="toggle mark as read" class="tool">⨯</a></li>';
- }
- ?>
- </ul>
- </div>
- <footer class="mr2 mt3">
+ <header>
+ <h1>poche, a read it later open source system</h1>
+ </header>
+ <div id="main" class="w800p">
+ <ul id="links">
+ <li><a href="index.php">home</a></li>
+ <li><a href="?view=fav">favorites</a></li>
+ <li><a href="?view=archive">archive</a></li>
+ <li><a title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('<?php echo url()?>?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li>
+ </ul>
+ <ul id="entries">
+ <?php
+ foreach ($entries as $entry) {
+ echo '<li><a href="readityourself.php?url='.urlencode($entry['url']).'">' . $entry['title'] . '</a> <a href="?action=toggle_archive&id='.$entry['id'].'" title="toggle mark as read" class="tool">✓</a> <a href="?action=toggle_fav&id='.$entry['id'].'" title="toggle favorite" class="tool">'.(($entry['is_fav'] == 0) ? '☆' : '★' ).'</a> <a href="#" title="toggle delete" class="tool">⨯</a></li>';
+ }
+ ?>
+ </ul>
+ </div>
+ <footer class="mr2 mt3">