authpartner
Clone or download
Modified Files
--- 'a/doc.php'
+++ b/doc.php
@@ -1,7 +1,4 @@
<?php
-if(isset($_GET['error'])){
-header("Location: index.php");
-}
include 'config.php';
$code = $_GET['code'];
$state = $_GET['state'];
@@ -24,9 +21,6 @@ curl_setopt($vh, CURLOPT_RETURNTRANSFER,
$result = curl_exec($vh);
curl_close($vh);
$notgettingdata = explode('¿', $result);
-if(!$notgettingdata[1]){
-header("Location: index.php");
-}
$getToken = json_decode($notgettingdata[1]);
if (isset($getToken->access_token)) {
@@ -160,19 +154,19 @@ include 'header.php';
<?php
if (($api_detail['type']) == "dir") {
echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
- echo '<img src="images/folder.svg" style="margin-right:10px;"></img>';
- echo ($api_detail['name']);
+ echo '<img src="images/folder.svg"></img>';
+ echo($api_detail['name']);
echo "</td>";
}
if ($api_detail['type'] == "file") {
echo "<td>";
- echo '<img src="images/file.svg" style="margin-right:10px;"></img>';
+ echo '<img src="images/file.svg"></img>';
echo($api_detail['name']);
echo "</td>";
}
?>
<td><?php echo($api_detail['size']); ?></td>
- <td><?php echo date("d-m-Y", strtotime($api_detail['date'])); ?></td>
+ <td><?php echo($api_detail['date']); ?></td>
<?php if ($api_detail['type'] == "file") { ?>
<td>
<i onclick="download('<?php echo($api_detail['uri'] . ',' . $api_detail['name']); ?>')" class="fa fa-download"> </i>
@@ -214,7 +208,7 @@ include 'header.php';
?>
<tr><td>
<?php
- echo '<img src="images/issuedfile.png" style="margin-right:10px;"></img>';
+ echo '<img src="images/issuedfile.png"></img>';
echo($issued_detail['name']);
?>
</td>
@@ -268,15 +262,17 @@ function uriData(id, parent) {
$.each(result.items, function (i, l) {
if (result.items[i].type == "file") {
console.log(result.items);
- fileOrFolder = '<img src="images/file.svg" style="margin-right:10px;"></img>';
+ fileOrFolder = '<img src="images/file.svg"></img>';
onclickFnc = "onclick='thisIsNotAFolder()'";
dwnldTd = "<td><i onclick = 'download(\"" + result.items[i].uri + "\",\"" + result.items[i].name + "\");'; class='fa fa-download'> </i></td>";
} else {
- fileOrFolder = '<img src="images/folder.svg" style="margin-right:10px;"></img>';
+ fileOrFolder = '<img src="images/folder.svg"></img>';
onclickFnc = "onclick='uriData(" + result.items[i].id + "," + result.items[i].parent + ")'";
dwnldTd = "<td></td>";
}
- uriDataHtml += "<tr><td " + onclickFnc + ">" + fileOrFolder + result.items[i].name + "</td><td>" + result.items[i].size + "</td><td>" + result.items[i].date + "</td>\n\
+ var date = new Date(result.items[i].date);
+ var dateformate = date.getDate()+'-'+(date.getMonth()+1) + '-' + date.getFullYear();
+ uriDataHtml += "<tr><td " + onclickFnc + ">" + fileOrFolder + result.items[i].name + "</td><td>" + result.items[i].size + "</td><td>" + dateformate + "</td>\n\
<td>" + result.items[i].uri + "</td>" + dwnldTd + "</tr>";
$("#folderPath").html(uriDataHtml);
});
@@ -284,7 +280,7 @@ function uriData(id, parent) {
$(".se-pre-con").hide();
}, "json")
.fail(function () {
- $("#folderPath").html("No Document Available In This Folder");
+ $("#folderPath").html("No document available in this folder");
$(".se-pre-con").hide();
});
}