From 538e9c7fc6b55272d4599e05d1bc4bb25f17f849 Mon Sep 17 00:00:00 2001 From: arno Date: Sun, 26 Jul 2009 18:40:31 +0200 Subject: [PATCH] forbird creation or deletion of item; forbids adding or deleting an image --- api.php | 3 +++ inc/templates_admin.php | 3 ++- js/admin.js | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/api.php b/api.php index 39c6319..76eef43 100644 --- a/api.php +++ b/api.php @@ -195,6 +195,7 @@ function main ($con) { if ($_POST ["keep_img"] == "yes") { $imgpath = $feature->imgpath; } else { + request_error (); $imgpath = save_uploaded_file ($_FILES ["image_file"], $con); } @@ -235,6 +236,7 @@ function main ($con) { success_feature ($new_feature, "update"); break; case "add": + request_error (); $imgpath = save_uploaded_file ($_FILES ["image_file"], $con); $lon = $_POST ["lon"]; @@ -254,6 +256,7 @@ function main ($con) { success_feature ($feature, "add"); break; case "del": + request_error (); $id = $_POST ["fid"]; $feature = $con->getfeature ($id); if (!isset ($feature)) { diff --git a/inc/templates_admin.php b/inc/templates_admin.php index b02e5a8..983e80b 100644 --- a/inc/templates_admin.php +++ b/inc/templates_admin.php @@ -62,7 +62,8 @@ if (!$usrtblexists || !$itemstblexists) { UnconsistentError: "", UnknownError: "", DelSucces: "", - UpdateSucces: "" + UpdateSucces: "", + DisabledForDemo: "" };