if (!$m) { $error = true; $_RESPONSE['success'] = false; $_RESPONSE['message'] = "Map not found!"; } } if (!$error) { if (!userHasMapAccess($user['id'], $mapId)) { $error = true; $_RESPONSE['success'] = false; $_RESPONSE['message'] = "You dont have access to the Map."; } } if (!$error) { $map['layerId'] = (int) $map['layerId']; if ($map['layerId'] != 1 && !getLayerByIdAndUserId($user['id'], $map['layerId'])) { $error = true; $_RESPONSE['success'] = false; $_RESPONSE['message'] = "Base Layer with given Id not found!"; } } if (!$error) { $map['groupId'] = (int) $map['groupId']; if ($map['groupId'] != 0 && !getGroupById($user['id'], $map['groupId'])) { $error = true; $_RESPONSE['success'] = false; $_RESPONSE['message'] = "Base Layer Group with given Id not found!"; } } if (!$error) { $map['projectId'] = (int) $map['projectId'];
redirect("login.php"); } $error = ""; $success = ""; if (strlen($_SESSION['response']['layers-edit']['error']) > 0) { $error = '<div ng-show="authMsg" class="alert alert-danger text-center ng-binding">' . $_SESSION['response']['layers-edit']['error'] . '</div>'; } else { if (strlen($_SESSION['response']['layers-edit']['success']) > 0) { $success = '<div ng-show="authMsg" class="alert alert-success text-center ng-binding">' . $_SESSION['response']['layers-edit']['success'] . '</div>'; } } unset($_SESSION['response']['layers-edit']['error']); unset($_SESSION['response']['layers-edit']['success']); $PAGE = "EDIT_LAYERS"; $user = $_SESSION['user']; $layer = getLayerByIdAndUserId($user['id'], (int) $_GET['id']); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Edit Layer</title> <?php require_once dirname(__FILE__) . "/../include/header.tpl.php"; ?> <!-- =============== VENDOR STYLES ===============--> <!-- FONT AWESOME-->