authpartner
Clone or download
Merge branch 'develop' of https://openforge.gov.in/plugins/git/digitallocker/development_auth_partner_sm_app
Modified Files
--- 'a/doc.php'
+++ b/doc.php
@@ -22,7 +22,7 @@ $result = curl_exec($vh);
curl_close($vh);
$notgettingdata = explode('¿', $result);
if(!$notgettingdata[1]){
-header("Location: index.php");
+header("Location: index.php?message=THIS IS ERROR");
}
$getToken = json_decode($notgettingdata[1]);
@@ -69,8 +69,9 @@ $resFile = curl_exec($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
$uriRes = json_decode($resFileNew[1]);
-if(isset($uriRes->error)){
- header("Location: index.php");
+if(isset($uriRes->error) || !$resFileNew){
+ header("Location: index.php?message=".$uriRes->error_description);
+ exit;
}
$uriDir = array();
$uriFiles = array();
@@ -163,7 +164,7 @@ include 'header.php';
}
?>
<td><?php echo($api_detail['size']); ?></td>
- <td><?php echo($api_detail['date']); ?></td>
+ <td><?php echo date("d-m-Y", strtotime($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>
--- 'a/index.php'
+++ b/index.php
@@ -1,5 +1,18 @@
-<?php include 'header.php' ?>
+<?php include 'header.php' ;
+?>
<!-- Marketing Icons Section -->
+<div class="col-lg-12">
+ <div class="container">
+ <?php
+ if (isset($_GET['message'])) {
+ $message=$_GET['message'];
+ $alert = "red";
+
+ echo "<div class='alert' id='alert' style='color:" . $alert . "'> <button type='button' class='close' data-dismiss='alert'>x</button>" . $message . "</div>";
+ }
+ ?>
+ </div>
+</div>
<div class="container">
<div class="kt-heading-wrapper">
<h3 class="kt-heading-title">ABOUT COMMON SERVICES CENTERS</h3>
@@ -54,7 +67,12 @@
<!-- /.row -->
<?php include 'footer.php' ?>
<script>
- $("#alert").fadeTo(2000, 500).slideUp(500, function () {
- $("#alert").slideUp(5000);
- });
+ <?php
+ if(isset($_GET['message'])){
+ echo 'setTimeout(function () {
+ window.location.href = "index.php";
+ }, 3000);
+ ';
+ }
+ ?>
</script>
\ No newline at end of file
--- 'a/uploaddoc.php'
+++ b/uploaddoc.php
@@ -25,10 +25,9 @@ $result = curl_exec($vh);
curl_close($vh);
$notgettingdata = explode('¿', $result);
if(!$notgettingdata[1]){
-header("Location: index.php");
+header("Location: index.php?message=THIS IS ERROR");
}
$getToken = json_decode($notgettingdata[1]);
-
if (isset($getToken->access_token)) {
$access_token = $getToken->access_token;
}
@@ -72,8 +71,9 @@ $resFile = curl_exec($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
$uriRes = json_decode($resFileNew[1]);
-if(isset($uriRes->error)){
- header("Location: index.php");
+if(isset($uriRes->error) || !$resFileNew){
+ header("Location: index.php?message=".$uriRes->error_description);
+ exit;
}
$uriDir = array();
$uriFiles = array();