accesslevel != 'Admin'){ header('Location: ../login.php'); exit; } $database = new Database(DB_HOST, DB_NAME, DB_USER, DB_PASS, DB_PORT, DB_SCMA); $map = ['name' => '','description' => '']; $map_acc_ids = array(); $use_dt = false; if(!empty($_GET['id'])){ $map_obj = new map_Class($database->getConn(), $_SESSION['user']->id); $result = $map_obj->getById($_GET['id']); if(!$result){ $_GET['error'] = 'Error: No such map!'; exit; } $map = pg_fetch_assoc($result); pg_free_result($result); $map_acc_grps = $map_obj->getAccessGroups($_GET['id']); $map_acc_ids = array_keys($map_acc_grps); list($dss,$lys,$use_dt) = App::parseDatasources(APPS_DIR.'/'.$map['id']); }else{ $upload_dir = App::upload_dir($_SESSION['user']->ftp_user); $app_names = App::getApps($upload_dir); } $acc_obj = new access_group_Class($database->getConn(), $_SESSION['user']->id); $acc_grps = $acc_obj->getRowsArr(); ?>