* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2021 Johannes Keßler
+ * Copyright 2016-2022 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
# time settings
date_default_timezone_set('Europe/Berlin');
-define('DEBUG',false);
+define('DEBUG',true);
## check request
-$_urlToParse = filter_var($_SERVER['QUERY_STRING'],FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
+$_urlToParse = filter_var($_SERVER['QUERY_STRING'],FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW);
if(!empty($_urlToParse)) {
# see http://de2.php.net/manual/en/regexp.reference.unicode.php
if(preg_match('/[\p{C}\p{M}\p{Sc}\p{Sk}\p{So}\p{Zl}\p{Zp}]/u',$_urlToParse) === 1) {
# header information
header('Content-type: text/html; charset=UTF-8');
-if($Summoner::simpleAuthCheck() === true) {
+if($Summoner::simpleAuthCheck() === true || !empty($TemplateData['nocacheHeader'])) {
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
view.url = "URL"
view.image = "Image"
view.image.provided = "If provided"
+view.image.noimage = "No image provided"
view.date.added = "Date added"
view.edit = "Edit"
view.export = "Export"
view.url = "URL"
view.image = "Bild"
view.image.provided = "Wenn vorhanden"
+view.image.noimage = "Kein Bild vorhanden"
view.date.added = "Hinzugefügt am"
view.edit = "Bearbeiten"
view.export = "Export"
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2021 Johannes Keßler
+ * Copyright 2016-2022 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
* along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
*
*/
-$submitFeedback = false;
-$formData = false;
+$submitFeedback = array();
+$formData = array();
# very simple security check.
# can/should be extended in the future.
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2021 Johannes Keßler
+ * Copyright 2016-2022 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
*
*/
-$submitFeedback = false;
-$formData = false;
+$submitFeedback = array();
+$formData = array();
# very simple security check.
# can/should be extended in the future.
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2021 Johannes Keßler
+ * Copyright 2016-2022 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
</div>
<div class="column">
<p>
- <img class="linkthumbnail" src="<?php echo $linkData['imageToShow']; ?>" alt="<?php echo $T->t('view.image.provided'); ?>">
+ <img class="linkthumbnail" src="<?php echo $linkData['imageToShow']; ?>" alt="<?php echo $T->t('view.image.noimage'); ?>">
</p>
<input class="input" type="text" name="data[image]" value="<?php echo Summoner::ifset($formData, 'image'); ?>" /><br />
<br />
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2021 Johannes Keßler
+ * Copyright 2016-2022 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
* along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
*
*/
-$submitFeedback = false;
-$formData = false;
+$submitFeedback = array();
+$formData = array();
# very simple security check.
# can/should be extended in the future.
* Insipid
* Personal web-bookmark-system
*
- * Copyright 2016-2021 Johannes Keßler
+ * Copyright 2016-2022 Johannes Keßler
*
* Development starting from 2011: Johannes Keßler
* https://www.bananas-playground.net/projekt/insipid/
$searchValue = false;
$isUrl = false;
-$submitFeedback = false;
+$submitFeedback = array();
$queryStr = false;
$searchResult = false;
$showAddForm = false;
-$formData = false;
$honeypotCheck = false;
+$formData = array();
$_requestMode = false;
if(isset($_GET['m']) && !empty($_GET['m'])) {
# show the add form
$showAddForm = true;
$formData['url'] = $searchValue;
+ $formData['categories'] = array();
+ $formData['tags'] = array();
}
elseif(!empty($searchResult)) {
# something has been found
$formData['category'] = trim($fData['category']);
$formData['tag'] = trim($fData['tag']);
+ # categories and tag stuff
+ $catArr = Summoner::prepareTagOrCategoryStr($formData['category']);
+ $tagArr = Summoner::prepareTagOrCategoryStr($formData['tag']);
+ $formData['categories'] = $catArr;
+ $formData['tags'] = $tagArr;
+
$isUrl = Summoner::validate($formData['url'],'url');
if($isUrl === true && !empty($formData['title'])) {
$hash = md5($formData['url']);
- # categories and tag stuff
- $catArr = Summoner::prepareTagOrCategoryStr($formData['category']);
- $tagArr = Summoner::prepareTagOrCategoryStr($formData['tag']);
+
$DB->begin_transaction(MYSQLI_TRANS_START_READ_WRITE);
$randomLink = $Management->randomLink(10);
$randomCategory = $Management->randomCategory(10);
$randomTag = $Management->randomTag(10);
+
+$TemplateData['nocacheHeader'] = true;