From: Development-DLA Date: Thu, 06 Jul 2017 17:27:19 +0530 Subject: Merge branch 'develop' of https://openforge.gov.in/plugins/git/digitallocker/development_auth_partner_sm_app --- Merge branch 'develop' of https://openforge.gov.in/plugins/git/digitallocker/development_auth_partner_sm_app --- --- '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'; } ?> - + --- 'a/index.php' +++ b/index.php @@ -1,5 +1,18 @@ - + +
+
+ " . $message . "
"; + } + ?> +
+

ABOUT COMMON SERVICES CENTERS

@@ -54,7 +67,12 @@ \ 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();