From 73c295a58b328efe7d9c47448994c93d55fa093a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 14 May 2018 09:46:28 +0200 Subject: [PATCH] [#401] Extract JS code from viewAreas.php (2/2) In this step, we extract the php code from the .js file we just renamed to a new file. The history of that file will be empty. We also take advantage to rename the page with a better name. --- config/permissions.php | 2 +- web/areaManagement.php | 40 ++++++++++++++++++++++++++++++++++++++++ web/include/menubar.php | 2 +- web/js/areaManagement.js | 31 +------------------------------ 4 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 web/areaManagement.php diff --git a/config/permissions.php b/config/permissions.php index 8aef68baa..e7c0cbf6c 100644 --- a/config/permissions.php +++ b/config/permissions.php @@ -106,7 +106,7 @@ '/services/createSectorsService.php', '/services/deleteSectorsService.php', //areas management '/services/createAreasService.php', '/services/deleteAreasService.php', - '/services/updateAreasService.php', '/viewAreas.php', + '/services/updateAreasService.php', '/areaManagement.php', //calendar management '/calendarManagement.php', '/services/getCommonEventsByCityIdJsonService.php', '/services/getCommonEventsByCityIdService.php', '/services/createCommonEventsService.php', diff --git a/web/areaManagement.php b/web/areaManagement.php new file mode 100644 index 000000000..4a2b8ee15 --- /dev/null +++ b/web/areaManagement.php @@ -0,0 +1,40 @@ + + * + * This file is part of PhpReport. + * + * PhpReport is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PhpReport is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpReport. If not, see . + */ + +define('PHPREPORT_ROOT', __DIR__ . '/../'); + +/* We check authentication and authorization */ +require_once(PHPREPORT_ROOT . '/web/auth.php'); + +/* Include the generic header and sidebar*/ +define('PAGE_TITLE', "PhpReport - Areas Management"); +include_once("include/header.php"); + +?> + + + +
+
+
+ diff --git a/web/include/menubar.php b/web/include/menubar.php index 576929f79..3bd385cfb 100644 --- a/web/include/menubar.php +++ b/web/include/menubar.php @@ -107,7 +107,7 @@ Clients - + Areas diff --git a/web/js/areaManagement.js b/web/js/areaManagement.js index 542ec6aef..10910178b 100644 --- a/web/js/areaManagement.js +++ b/web/js/areaManagement.js @@ -1,6 +1,5 @@ - + * Copyright (C) 2009-2018 Igalia, S.L. * * This file is part of PhpReport. * @@ -18,25 +17,6 @@ * along with PhpReport. If not, see . */ -define('PHPREPORT_ROOT', __DIR__ . '/../'); - -$sid = $_GET["sid"]; - -/* We check authentication and authorization */ -require_once(PHPREPORT_ROOT . '/web/auth.php'); - -/* Include the generic header and sidebar*/ -define('PAGE_TITLE', "PhpReport - Areas Management"); -include_once("include/header.php"); -include_once(PHPREPORT_ROOT . '/util/ConfigurationParametersManager.php'); -include_once(PHPREPORT_ROOT . '/util/UnknownParameterException.php'); -include_once(PHPREPORT_ROOT . '/util/LoginManager.php'); -include_once(PHPREPORT_ROOT . '/web/services/WebServicesFunctions.php'); - -?> - - - -
-
-
-