diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -51,6 +51,11 @@ switch ($action) { | |||
51 | default: | 51 | default: |
52 | break; | 52 | break; |
53 | } | 53 | } |
54 | |||
55 | function url(){ | ||
56 | $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; | ||
57 | return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | ||
58 | } | ||
54 | ?> | 59 | ?> |
55 | <!DOCTYPE html> | 60 | <!DOCTYPE html> |
56 | <!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]--> | 61 | <!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="en"> <![endif]--> |
@@ -75,7 +80,7 @@ switch ($action) { | |||
75 | <li><a href="index.php">home</a></li> | 80 | <li><a href="index.php">home</a></li> |
76 | <li><a href="#">favorites</a></li> | 81 | <li><a href="#">favorites</a></li> |
77 | <li><a href="#">archive</a></li> | 82 | <li><a href="#">archive</a></li> |
78 | <li><a href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('http://localhost/poche/index.php?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">bookmarklet</a></li> | 83 | <li><a href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('<? echo url()?>index.php?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li> |
79 | </ul> | 84 | </ul> |
80 | <?php | 85 | <?php |
81 | $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?"); | 86 | $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?"); |
@@ -91,7 +96,7 @@ switch ($action) { | |||
91 | </ul> | 96 | </ul> |
92 | </div> | 97 | </div> |
93 | <footer class="mr2 mt3"> | 98 | <footer class="mr2 mt3"> |
94 | <p class="smaller">poche is a read it later open source system, based on <a href="http://www.memiks.fr/readityourself/">ReadItYourself</a>. poche is developed by <a href="http://nicolas.loeuillet.org">Nicolas LÅ“uillet</a> under the <a href="http://www.wtfpl.net/">Do What the Fuck You Want to Public License</a></p> | 99 | <p class="smaller"><a href="http://github.com/nicosomb/poche">poche</a> is a read it later open source system, based on <a href="http://www.memiks.fr/readityourself/">ReadItYourself</a>. poche is developed by <a href="http://nicolas.loeuillet.org">Nicolas LÅ“uillet</a> under the <a href="http://www.wtfpl.net/">Do What the Fuck You Want to Public License</a></p> |
95 | </footer> | 100 | </footer> |
96 | </body> | 101 | </body> |
97 | </html> \ No newline at end of file | 102 | </html> \ No newline at end of file |