diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -53,7 +53,11 @@ switch ($action) { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | function url(){ | 55 | function 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=?"); |