-verion 2.0alpha - Bright Crucible - (2017-01-05)
+version 2.1alpha - Bright Crucible - (tba)
+ * cleanups
+
+version 2.0alpha - Bright Crucible - (2017-01-05)
* This is a not prodction ready version of the complete rewrite.
* It is now written in PHP based on the idea from Luke Reeves
-version 1.6 (tba)
- * code fixes
- * new options in htaccess file
-
version 1.5 (30 Nov. 2012)
* support phantomjs as a screenshot tool for a bookmark
* code updates and cleanup
+ bookmark js snippet
+ snapshots
+ stats
-+
\ No newline at end of file
++ private links
\ No newline at end of file
return $ret;
}
+
+ /**
+ * a very simple HTTP_AUTH authentication.
+ */
+ static function simpleAuth() {
+ if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])
+ || $_SERVER['PHP_AUTH_USER'] !== FRONTEND_USERNAME || $_SERVER['PHP_AUTH_PW'] !== FRONTEND_PASSWORD
+ ) {
+ header('WWW-Authenticate: Basic realm="Insipid edit area"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'No Access.';
+ exit;
+ }
+ }
}
?>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Insipid. Personal bookmarks.</title>
+ <title>Your personal bookmarks - Insipid</title>
<link rel="stylesheet" href="asset/css/foundation.min.css">
<link rel="stylesheet" href="asset/foundation-icons/foundation-icons.css">
<link rel="stylesheet" href="asset/flexdatalist/jquery.flexdatalist.min.css">
--- /dev/null
+<?php
+/**
+ * Insipid
+ * Personal web-bookmark-system
+ *
+ * Copyright 2016-2017 Johannes Keßler
+ *
+ * Development starting from 2011: Johannes Keßler
+ * https://www.bananas-playground.net/projekt/insipid/
+ *
+ * creator:
+ * Luke Reeves <luke@neuro-tech.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
+ *
+ */
+$submitFeedback = false;
+$formData = false;
+
+# very simple security check.
+# can be extended in the future.
+Summoner::simpleAuth();
+
+$_requestMode = false;
+if(isset($_GET['m']) && !empty($_GET['m'])) {
+ $_requestMode = trim($_GET['m']);
+ $_requestMode = Summoner::validate($_requestMode,'nospace') ? $_requestMode : "all";
+}
+
+$_id = false;
+if(isset($_GET['id']) && !empty($_GET['id'])) {
+ $_id = trim($_GET['id']);
+ $_id = Summoner::validate($_id,'nospace') ? $_id : false;
+}
+
+switch ($_requestMode) {
+ case 'link':
+ default:
+ $linkObj = new Link($DB);
+ $link = $linkObj->load($_id);
+ if(empty($link)) {
+ header("HTTP/1.0 404 Not Found");
+ }
+}
+
--- /dev/null
+<?php
+/**
+ * Insipid
+ * Personal web-bookmark-system
+ *
+ * Copyright 2016-2017 Johannes Keßler
+ *
+ * Development starting from 2011: Johannes Keßler
+ * https://www.bananas-playground.net/projekt/insipid/
+ *
+ * creator:
+ * Luke Reeves <luke@neuro-tech.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
+ *
+ */
+?>
* along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
*
*/
- ?>
+?>
<?php if(empty($link)) { ?>
<div class="callout alert">
<h5>Error</h5>
</div>
<div class="row expanded">
<div class="large-12 columns">
- <p class="text-right"><a href="index.php" title="... back to home"><i class="fi-home"></i></a></p>
+ <p class="text-right"><a href="index.php" title="... back to home" class="tiny button"><i class="fi-home"></i></a></p>
</div>
</div>
<div class="row">
?>
</div>
</div>
+<div class="row">
+ <div class="small-12 medium-12 columns text-right">
+ <a href="index.php?p=edit&m=link&id=<?php echo $link['hash']; ?>" class="button tiny alert"><i class="fi-page-edit"></i> edit</a>
+ </div>
+</div>
<div class="row expanded">
<div class="large-12 columns">
<p class="text-right">
- <a href="index.php?p=overview&m=tag" title="all tags"><i class="fi-price-tag"></i></a>
- <a href="index.php?p=overview&m=category" title="all categories"><i class="fi-ticket"></i></a>
- <a href="index.php" title="... back to home"><i class="fi-home"></i></a>
+ <a href="index.php?p=overview&m=tag" title="all tags" class="tiny button"><i class="fi-price-tag"></i></a>
+ <a href="index.php?p=overview&m=category" title="all categories" class="tiny button"><i class="fi-ticket"></i></a>
+ <a href="index.php" title="... back to home" class="tiny button"><i class="fi-home"></i></a>
</p>
</div>
</div>