0.5
app-cordova
debian/bullseye
debian/jessie
|
Last change
on this file since 5209541 was e62038b, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago |
|
Added construction plans and therefore restructered the folder structure
Signed-off-by: Joachim Langenbach <joachim.langenbach@…>
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | /*
|
|---|
| 3 | Copyright (C) 2016 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
|
|---|
| 4 |
|
|---|
| 5 | This program is free software: you can redistribute it and/or modify
|
|---|
| 6 | it under the terms of the GNU General Public License as published by
|
|---|
| 7 | the Free Software Foundation, either version 3 of the License, or
|
|---|
| 8 | (at your option) any later version.
|
|---|
| 9 |
|
|---|
| 10 | This program is distributed in the hope that it will be useful,
|
|---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 13 | GNU General Public License for more details.
|
|---|
| 14 |
|
|---|
| 15 | You should have received a copy of the GNU General Public License
|
|---|
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | $result["status"] = true;
|
|---|
| 20 | $result["message"] = "";
|
|---|
| 21 |
|
|---|
| 22 | $mapDirectory = __DIR__;
|
|---|
| 23 | if(!array_key_exists("map", $_FILES)){
|
|---|
| 24 | $result["status"] = false;
|
|---|
| 25 | $result["message"] = "No map file recieved";
|
|---|
| 26 | echo json_encode($result);
|
|---|
| 27 | return;
|
|---|
| 28 | }
|
|---|
| 29 | foreach($_FILES["map"]["error"] as $key => $error) {
|
|---|
| 30 | if ($error == UPLOAD_ERR_OK) {
|
|---|
| 31 | $tmpName = $_FILES["map"]["tmp_name"][$key];
|
|---|
| 32 | if(!move_uploaded_file($tmpName, "$mapDirectory/map.mbtiles")){
|
|---|
| 33 | $result["status"] = false;
|
|---|
| 34 | }
|
|---|
| 35 | }
|
|---|
| 36 | }
|
|---|
| 37 | echo json_encode($result);
|
|---|
| 38 |
|
|---|
| 39 | ?>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.