authpartner
Clone or download
Modified Files
--- 'a/doc.php'
+++ b/doc.php
@@ -129,7 +129,7 @@ include 'header.php';
<div class="table-responsive">
<table class="table">
<thead style="color:blueviolet;">
- <tr>
+ <tr id="trheading">
<td>Name</td>
<td>Size</td>
<td>Date</td>
@@ -276,11 +276,16 @@ function uriData(id, parent) {
<td>" + result.items[i].uri + "</td>" + dwnldTd + "</tr>";
$("#folderPath").html(uriDataHtml);
});
+ if((result.items).length==0){
+ $(".footer").hide();
+ $("#trheading").hide();
+ $("#folderPath").html("<tr><th colspan='4' style='text-align: center;'><h4>No document uploaded yet</h4></br><p>Upload some of your own documents or certificates!</p></th></tr>");
+ }
$("#parent").html("<span onclick=uriData(" + parent + ",null) >" + result.directory + "</span>");
$(".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 "<div style='background:" . $alert . "' class='alert'>" . $_GET['message'] . "</div>";
echo "<div class='alert' id='alert' style='color:" . $alert . "'> <button type='button' class='close' data-dismiss='alert'>x</button>" . $_GET['message'] . "</div>";
}
?>
@@ -165,7 +164,7 @@ include 'header.php';
<div class="table-responsive">
<table class="table">
<thead style="color:blueviolet;">
- <tr>
+ <tr id="trheading">
<td>Name</td>
<td>Size</td>
<td>Date</td>
@@ -264,12 +263,17 @@ function uriData(id, parent) {
<td>" + result.items[i].uri + "</td>" + dwnldTd + "</tr>";
$("#folderPath").html(uriDataHtml);
});
+ if((result.items).length==0){
+ $(".footer").hide();
+ $("#trheading").hide();
+ $("#folderPath").html("<tr><th colspan='4'style='text-align: center;'><h4>No document uploaded yet</h4></br><p>Upload some of your own documents or certificates!</p></th></tr>");
+ }
$("#filePath").val(result.directory);
$("#parent").html("<span onclick=uriData(" + parent + ",null)>" + result.directory + "</span>");
$(".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));