From: indresh singh bhadoria Date: Tue, 04 Jul 2017 17:46:27 +0530 Subject: change UI view design --- change UI view design --- --- 'a/doc.php' +++ b/doc.php @@ -129,7 +129,7 @@ include 'header.php';
- + @@ -276,11 +276,16 @@ function uriData(id, parent) { " + dwnldTd + ""; $("#folderPath").html(uriDataHtml); }); + if((result.items).length==0){ + $(".footer").hide(); + $("#trheading").hide(); + $("#folderPath").html(""); + } $("#parent").html("" + result.directory + ""); $(".se-pre-con").hide(); }, "json") .fail(function () { - $("#folderPath").html("No document available in this folder"); + $("#folderPath").html("some error found!"); $(".se-pre-con").hide(); }); } --- 'a/uploaddoc.php' +++ b/uploaddoc.php @@ -126,7 +126,6 @@ include 'header.php'; if ($_GET['message'] == "File Uploaded Successfully") { $alert = "green"; } - //echo "
" . $_GET['message'] . "
"; echo "
" . $_GET['message'] . "
"; } ?> @@ -165,7 +164,7 @@ include 'header.php';
Name Size Date" + result.items[i].uri + "

No document uploaded yet


Upload some of your own documents or certificates!

- + @@ -264,12 +263,17 @@ function uriData(id, parent) { " + dwnldTd + ""; $("#folderPath").html(uriDataHtml); }); + if((result.items).length==0){ + $(".footer").hide(); + $("#trheading").hide(); + $("#folderPath").html(""); + } $("#filePath").val(result.directory); $("#parent").html("" + result.directory + ""); $(".se-pre-con").hide(); }, "json") .fail(function () { - $("#folderPath").html("No document available in this folder"); + $("#folderPath").html("some error found!"); $(".se-pre-con").hide(); }); } --- 'a/uri.php' +++ b/uri.php @@ -21,13 +21,7 @@ $resFileNew = explode('¿', $uriResissued $uriRes = json_decode($resFileNew[1]); $uriDir = array(); $uriFiles = array(); -if ($uriRes->items == 'null') { - $uriItemsArray['items'] = "Data not available"; - $dataDirectory['directory'] = $uriRes->directory; - $dataF = json_encode(array_merge($dataDirectory, $uriItemsArray)); - print_r($dataF); - exit(); -} + foreach ($uriRes->items as $uriI) { if ($uriI->type == "dir") { $uriDir[] = (array) $uriI; @@ -35,16 +29,8 @@ foreach ($uriRes->items as $uriI) { $uriFiles[] = (array) $uriI; } } -if ($uriDir == NULL || $uriFiles == NULL) { - $x = array_merge($uriDir, $uriFiles); - foreach ($x as $y) { - if ($y != NULL) { - $uriItems[] = $y; - } - } -} else { - $uriItems = array_merge($uriDir, $uriFiles); -} + +$uriItems = array_merge($uriDir, $uriFiles); $uriItemsArray['items'] = $uriItems; $dataDirectory['directory'] = $uriRes->directory; $dataF = json_encode(array_merge($dataDirectory, $uriItemsArray));
Name Size Date" + result.items[i].uri + "

No document uploaded yet


Upload some of your own documents or certificates!