From: Development-DLA Date: Fri, 14 Jul 2017 16:41:02 +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 @@ -29,10 +29,10 @@ if(!$notgettingdata[1]){ header("Location: index.php?message=THIS IS ERROR"); } $getToken = json_decode($notgettingdata[1]); - if (isset($getToken->access_token)) { $access_token = $getToken->access_token; } +$file = "xml/hashKey.xml"; if (isset($access_token)) { $doc = new DOMDocument('1.0'); $doc->formatOutput = true; @@ -49,12 +49,12 @@ if (isset($access_token)) { $title = $root->appendChild($title); $text = $doc->createTextNode($access_token); $text = $title->appendChild($text); - $doc->save("xml/hashKey.xml"); + $doc->save($file); } -if (file_exists("xml/hashKey.xml")) { - $xml = (array) simplexml_load_file("xml/hashKey.xml") or die("Error: Cannot create object"); +if (file_exists($file)) { + $xml = (array) simplexml_load_file($file) or die("Error: Cannot create object"); } else { - echo "xml/hashKey.xml file doesnot exists"; + echo $file. " file doesnot exists"; } $access_token = $xml['access_token']; @@ -86,8 +86,9 @@ foreach ($uriRes->items as $uriI) { $uriFiles[] = (array) $uriI; } } +$item = "items"; $uriItems = array_merge($uriDir, $uriFiles); -$uriItemsArray['items'] = $uriItems; +$uriItemsArray[$item] = $uriItems; $dataDirectory['directory'] = $uriRes->directory; $dataF = array_merge($dataDirectory, $uriItemsArray); @@ -144,10 +145,10 @@ include 'header.php'; '; + echo ''; echo ''; - echo($api_detail['name']); + echo $api_detail['name']; echo ""; } if ($api_detail['type'] == "file") { echo ""; echo ''; - echo($api_detail['name']); + echo $api_detail['name']; echo ""; } ?> - + - + "; @@ -211,14 +212,14 @@ include 'header.php'; '; - echo($issued_detail['name']); + echo $issued_detail['name']; ?> - - + + - + --- 'a/header.php' +++ b/header.php @@ -1,5 +1,6 @@ + @@ -115,7 +116,7 @@