aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.php b/index.php
index 9e6e2256..d89fa41c 100755
--- a/index.php
+++ b/index.php
@@ -53,7 +53,11 @@ switch ($action) {
53} 53}
54 54
55function url(){ 55function url(){
56 $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; 56 $protocol = "http";
57 if(isset($_SERVER['HTTPS']))
58 if($_SERVER['HTTPS'] != "off")
59 $protocol = "https";
60
57 return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 61 return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
58} 62}
59?> 63?>
@@ -80,7 +84,7 @@ function url(){
80 <li><a href="index.php">home</a></li> 84 <li><a href="index.php">home</a></li>
81 <li><a href="#">favorites</a></li> 85 <li><a href="#">favorites</a></li>
82 <li><a href="#">archive</a></li> 86 <li><a href="#">archive</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> 87 <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>
84 </ul> 88 </ul>
85 <?php 89 <?php
86 $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?"); 90 $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?");