if ($_POST ["keep_img"] == "yes") {
$imgpath = $feature->imgpath;
} else {
+ error_request ();
$imgpath = save_uploaded_file ($_FILES ["image_file"], $con);
}
success_feature ($new_feature, "update");
break;
case "add":
+ error_request ();
$imgpath = save_uploaded_file ($_FILES ["image_file"], $con);
$lon = $_POST ["lon"];
success_feature ($feature, "add");
break;
case "del":
+ error_request ();
$id = $_POST ["fid"];
$feature = $con->getfeature ($id);
if (!isset ($feature)) {
success_delete_feature ($feature);
case "changepass":
+ error_request ();
$currpass = unquote ($_POST ["pass_current"]);
if (!$con->checkpwdmd5 ($user, md5 ($currpass))) {
error_wrongpass ();
success_changepass ($user);
break;
case "newuser":
+ error_request ();
if ($user != "admin") {
error_unauthorized ();
}
changePassSuccess: "<?php ptrans('Password successfully changed.')?>",
newUserNonameError: "<?php ptrans('User name has not been set.')?>",
newUserExistsError: "<?php ptrans('User already exists in database.')?>",
- newUserSuccess: "<?php ptrans('User successfully added.')?>"
+ newUserSuccess: "<?php ptrans('User successfully added.')?>",
+ DisabledForDemo: "<?php ptrans('This feature is not enabled on demo site')?>"
};
var sypSettings = {
addNewFeature: function () {
userMgr.close();
-
function cancel() {
$(document).unbind("keydown");
Admin.reset()
},
add: function(evt) {
+ alert (SypStrings.DisabledForDemo);
+ $(document).unbind("keydown");
+ Admin.reset()
+ return;
var map = Admin.map;
var pos = map.getLonLatFromViewPortPx(evt.xy);
feature = this.update (null, pos, "", "", "");
},
del: function (feature) {
+ alert (SypStrings.DisabledForDemo);
+ return;
var form = $("#feature_delete");
form.find('input[name="fid"]').val(feature.fid);
AjaxMgr.add({
this.commError("");
+ this.disableForms();
+ alert (SypStrings.DisabledForDemo);
+ return;
+
AjaxMgr.add({
form: $("#changepass"),
oncomplete: OpenLayers.Function.bind(this.ajaxReply, this),
}
this.commError("");
+ this.disableForms();
+ alert (SypStrings.DisabledForDemo);
+ return;
AjaxMgr.add({
form: $("#newuser"),
return false;
});
$("#image_delete").click(function() {
+ alert (SypStrings.DisabledForDemo);
+ return;
$("#img").removeAttr('src');
// needs to rebuild element otherwise some browsers still
// display image.