authpartner
Clone or download
Modified Files
--- /dev/null
+++ b/Downloads/Documents
@@ -0,0 +1 @@
+{"error":"invalid_uri","error_description":"Please provide document URI"}
\ No newline at end of file
Binary files /dev/null and b/Downloads/IMG_2063.JPG differ
Binary files /dev/null and b/Downloads/salnewajito.pdf differ
Binary files /dev/null and b/Downloads/testimage1 (2).jpg differ
--- /dev/null
+++ b/download.php
@@ -0,0 +1,20 @@
+<?php
+$headers = array(
+ 'Authorization: Bearer ' . $_GET['accessToken']
+ //'Authorization: Basic '. base64_encode("$username:$password")
+);
+
+$uriFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/file/'.$_GET['uri'];
+$uri = curl_init($uriFile);
+curl_setopt($uri, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
+curl_setopt($uri, CURLOPT_HTTPHEADER, $headers);
+curl_setopt($uri, CURLOPT_SSL_VERIFYPEER, 0);
+curl_setopt($uri, CURLOPT_SSL_VERIFYHOST, 0);
+curl_setopt($uri, CURLOPT_RETURNTRANSFER, true);
+$urFile = curl_exec($uri);
+curl_close($uri);
+//$file = file_put_contents($_GET['fileName'],$urFile);
+$file = file_put_contents("Downloads/".$_GET['fileName'],$urFile);
+return $file;
+
+?>
\ No newline at end of file
--- 'a/loanapproval.php'
+++ b/loanapproval.php
@@ -44,6 +44,7 @@ $resFile = curl_exec($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
$dataF = json_decode($resFileNew[1], TRUE);
+//print_r($dataF);die();
@@ -65,7 +66,6 @@ curl_close($vhi);
$issuedNew = explode('¿', $resissued);
$dataI = json_decode($issuedNew[1], TRUE);
-
$fileContent = file_get_contents('C:/img/digi.png');
$client_secret = 'DQ3pWgCtB0I3EhSrtTXU';
$hk = hash_hmac('sha256', $fileContent, $client_secret, true);
@@ -107,252 +107,241 @@ $output = curl_exec($ch);
</head>
<body>
<div class="row">
- <div class="col-md-1">
- </div>
+ <div class="col-md-1"> </div>
<div class="col-md-10 outerborder">
- <div class="panel panel-default">
- <p class="para">
- Important security information:
- </p>
- </div>
- <div class="row">
- <ul class="custom-bullet">
- <li class="formrow">
- Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">digilockerservicecenter.gov.in.</a>
- </li>
- <li class="formrow">
- Never provide your User ID or password to any one on phone or in response to a mail.<a href="#"> Report a suspicious mail</a>.
- </li>
- <li class="formrow">
- Do not enter login or other sensitive information in any pop up window.
- </li>
- <li class="formrow">
- Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, <a href="#">click here</a>.
- </li>
- </ul>
- </div>
+ <p class="para">
+ Important security information:
+ </p>
+ </div>
+ <div class="row">
+ <ul class="custom-bullet">
+ <li class="formrow">
+ Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">digilockerservicecenter.gov.in.</a>
+ </li>
+ <li class="formrow">
+ Never provide your User ID or password to any one on phone or in response to a mail.<a href="#"> Report a suspicious mail</a>.
+ </li>
+ <li class="formrow">
+ Do not enter login or other sensitive information in any pop up window.
+ </li>
+ <li class="formrow">
+ Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, <a href="#">click here</a>.
+ </li>
+ </ul>
</div>
</div>
- <div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question">
- <button type="button" class="btn btn-primary">Proceed</button>
+
+ <div style="text-align: center;">
+ <button class="btn btn-primary panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question" type="button">Proceed</button>
</div>
<div id="question" class="panel-collapse collapse" style="height: 0px;">
- <div class="panel-body">
- <div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question0">
- <button type="button" class="btn btn-primary">Share</button>
- <div id="question0" class="panel-collapse collapse" style="height: 0px;">
- <div class="panel-body">
- <div id="wrapper">
- <div id="page-wrapper">
- <div class="container-fluid">
- <!-- Page Heading -->
- <div class="row">
- <div class="col-lg-12">
- <div class="container">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
- <li><a data-toggle="tab" href="#issueddocument">Issued Document</a></li>
- </ul>
- <div class="tab-content">
- <div id="uploadeddocument" class="tab-pane fade in active">
- <section class="content">
- <div class="row">
- <div class="col-md-12">
- <div class="box box-primary">
- <div class="box box-body col-sm-12">
- <div class="table-responsive">
- <table class="table">
+ <div class="panel-body">
+ <div style="display: inline-flex; text-align: center;">
+ <button type="button" class="btn btn-primary panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question1" type="button">Share</button>
+ <button style="margin-left:30px; " type="button" class="btn btn-primary panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question2" type="button">Upload Document</button>
+ </div>
+ <div id="question1" class="panel-collapse collapse" style="height: 0px;">
+ <div class="panel-body">
+ <div id="wrapper">
+ <div id="page-wrapper">
+ <div class="container-fluid">
+ <!-- Page Heading -->
+ <div class="row">
+ <div class="col-lg-12">
+ <div class="container">
+ <ul class="nav nav-tabs">
+ <li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
+ <li><a data-toggle="tab" href="#issueddocument">Issued Document</a></li>
+ </ul>
+ <div class="tab-content">
+ <div id="uploadeddocument" class="tab-pane fade in active">
+ <section class="content">
+ <div class="row">
+ <div class="col-md-12">
+ <div class="box box-primary">
+ <div class="box box-body col-sm-12">
+ <div class="table-responsive">
+ <table class="table">
+ <tr>
+ <th>Name</th>
+ <th>Size</th>
+ <th>Date</th>
+ <th>Action</th>
+ </tr>
+ <?php
+ foreach ($dataF['items'] as $api_detail):
+ ?>
<tr>
- <th>Name</th>
- <th>Size</th>
- <th>Date</th>
- </tr>
- <?php
- foreach ($dataF['items'] as $api_detail):
- ?>
- <tr>
- <?php /**
- <a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&id=<?php echo($api_detail['id']); ?>"></a>
- * * */ ?>
- <td onclick="FolderItems()">
- <?php
- if ($api_detail['type'] == "dir") {
- echo "<i class='fa fa-folder-o'></i> ";
- echo($api_detail['name']);
- } elseif ($api_detail['type'] == "file") {
- echo "<i class='fa fa-file-o'></i> ";
- echo($api_detail['name']);
- }
- ?>
- <div id="div1"></div></td>
- <td><?php echo($api_detail['size']); ?></td>
- <td><?php echo($api_detail['date']); ?></td>
- <td><?php if ($api_detail['type'] == "file") { ?>
- <input type="radio" id="getval" class="getval" name="grp"><?php } ?>
- <?php
- endforeach;
+ <?php /**
+ <a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&id=<?php echo($api_detail['id']); ?>"></a>
+ * * */ ?>
+ <td onclick="uriData(<?php echo $api_detail['id']; ?>)" id="<?php echo $api_detail['id']; ?>">
+ <?php
+ if ($api_detail['type'] == "dir") {
+ echo "<i class='fa fa-folder-o'></i> ";
+ echo($api_detail['name']);
+ } elseif ($api_detail['type'] == "file") {
+ echo "<i class='fa fa-file-o'></i> ";
+ echo($api_detail['name']);
+ }
?>
- </table>
- <div class="footer">
- <button id="share_it" value="" onclick='sharedata1();' style=" float:right;display: inline-block; background-color: rgb(51, 122, 183); color: rgb(255, 255, 255);">Share </button>
- </div>
+ <div id="div_<?php echo $api_detail['id']; ?>"></div></td>
+ <td><?php echo($api_detail['size']); ?></td>
+ <td><?php echo($api_detail['date']); ?></td>
+ <?php if ($api_detail['type'] == "file") { ?>
+ <td>
+ <input type="radio" id="getval" class="getval" name="grp">
+ </td>
+ <td>
+ <a href="download.php?accessToken=<?php echo $access_token; ?>&uri=<?php echo $api_detail['uri']; ?>&fileName=<?php echo $api_detail['name']; ?>" download="<?php echo $api_detail['name']; ?>"> <i class="fa fa-download"> </i></a>
+ </td>
+ <?php } ?>
+ <?php
+ endforeach;
+ ?>
+ </table>
+ <div class="footer">
+ <button id="share_it" value="" onclick='sharedata1();' style=" float:right;display: inline-block; background-color: rgb(51, 122, 183); color: rgb(255, 255, 255);">Share </button>
</div>
</div>
</div>
- </div>
- </div>
- </section>
- </div>
- <div id="issueddocument" class="tab-pane fade">
- <section class="content">
- <div class="row">
- <div class="col-md-12">
- <div class="box box-primary">
- <div class="box box-body col-sm-12">
- <div class="table-responsive">
- <table class="table">
- <tr>
- <th>Name</th>
- <th>Size</th>
- <th>Date</th>
-
+ </div>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div id="issueddocument" class="tab-pane fade">
+ <section class="content">
+ <div class="row">
+ <div class="col-md-12">
+ <div class="box box-primary">
+ <div class="box box-body col-sm-12">
+ <div class="table-responsive">
+ <table class="table">
+ <tr>
+ <th>Name</th>
+ <th>Size</th>
+ <th>Date</th>
+
+ </tr>
+ <?php
+ foreach ($dataI['items'] as $issued_detail):
+ ?>
+ <tr><td>
+ <?php
+ echo "<i class='fa fa-file-o'></i> ";
+ echo($issued_detail['name']);
+ ?>
+ </td>
+ <td><?php echo($issued_detail['size']); ?></td>
+ <td><?php echo($issued_detail['date']); ?></td>
+ <td><?php if ($api_detail['type'] == "file") { ?>
+ <input type="radio" id="getval" class="getval" name="grp"><?php } ?>
</tr>
<?php
- foreach ($dataI['items'] as $issued_detail):
- ?>
- <tr><td>
- <?php
- echo "<i class='fa fa-file-o'></i> ";
- echo($issued_detail['name']);
- ?>
- </td>
- <td><?php echo($issued_detail['size']); ?></td>
- <td><?php echo($issued_detail['date']); ?></td>
- <td><?php if ($api_detail['type'] == "file") { ?>
- <input type="radio" id="getval" class="getval" name="grp"><?php } ?>
- </tr>
- <?php
- endforeach;
- ?>
- </table>
- <div class="footer">
- <button id="button_share" value="" onclick='sharedata1();' style=" float:right;display: inline-block; background-color: rgb(51, 122, 183); color: rgb(255, 255, 255);">Share </button>
- </div>
+ endforeach;
+ ?>
+ </table>
+ <div class="footer">
+ <button id="button_share" value="" onclick='sharedata1();' style=" float:right;display: inline-block; background-color: rgb(51, 122, 183); color: rgb(255, 255, 255);">Share </button>
</div>
</div>
</div>
- </div>
- </div>
- </section>
- </div>
+ </div>
+ </div>
+ </div>
+ </section>
</div>
</div>
</div>
</div>
</div>
- <!-- /.container-fluid -->
</div>
- </div>
+ <!-- /.container-fluid -->
+ </div>
</div>
</div>
</div>
- <div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question1">
- <button type="button" class="btn btn-primary">Upload Document</button>
- <div id="question1" class="panel-collapse collapse" style="height: 0px;">
- <div class="panel-body">
+ <div id="question2" class="panel-collapse collapse" style="height: 0px;">
+ <div class="panel-body">
+ <div class="col-md-10 outerborder">
+ <div class="panel panel-default">
+ <p class="para">
+ Important security information:
+ </p>
+ </div>
<div class="row">
- <div class="col-md-1">
- </div>
- <div class="col-md-10 outerborder">
- <div class="panel panel-default">
- <p class="para">
- Important security information:
- </p>
- </div>
- <div class="row">
- <ul class="custom-bullet">
- <li class="formrow">
- Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">digilockerservicecenter.gov.in.</a>
- </li>
- <li class="formrow">
- Never provide your User ID or password to any one on phone or in response to a mail.<a href="#"> Report a suspicious mail</a>.
- </li>
- <li class="formrow">
- Do not enter login or other sensitive information in any pop up window.
- </li>
- <li class="formrow">
- Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, <a href="#">click here</a>.
- </li>
- </ul>
- </div>
- <button type="submit" class="btn btn-primary">Upload</button>
- </div>
+ <ul class="custom-bullet">
+ <li class="formrow">
+ Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">digilockerservicecenter.gov.in.</a>
+ </li>
+ <li class="formrow">
+ Never provide your User ID or password to any one on phone or in response to a mail.<a href="#"> Report a suspicious mail</a>.
+ </li>
+ <li class="formrow">
+ Do not enter login or other sensitive information in any pop up window.
+ </li>
+ <li class="formrow">
+ Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, <a href="#">click here</a>.
+ </li>
+ </ul>
</div>
+ <button id="upload" value="" onclick='alertmsg();' style=" margin-right:30px;">Upload </button>
</div>
</div>
</div>
+
</div>
-
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-4715900-1");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
- <script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
- <script>
- function share_its(seluri)
- {
- var uridata = seluri;
- $("#button_share").val(uridata);
- alert("share successfully");
- window.location = "http://localhost/digibank/index.php";
- }
- function sharedata1()
- {
- var uri = $("#button_share").val();
-
- alert("share successfully");
- }
-
- function uriData(id) {
- var id = id;
- var accessTocken = "<?php echo $access_token; ?>";
- var uri = "<?php echo $api_detail['uri']; ?>";
- if (id != null) {
- $.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
- alert(result.items[0].name);
- $("#div1").val(result.directory);
- }, "json")
- .fail(function () {
- alert("error");
- });
- }
+ </div>
+ <div class="col-md-1"> </div>
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-4715900-1");
+ pageTracker._initData();
+ pageTracker._trackPageview();
+ </script>
+ <script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
+ <script>
+ function share_its(seluri)
+ {
+ var uridata = seluri;
+ $("#button_share").val(uridata);
+ alert("share successfully");
+ window.location = "http://localhost/digibank/index.php";
+ }
+ function sharedata1()
+ {
+ var uri = $("#button_share").val();
+
+ alert("share successfully");
+ }
+ function alertmsg()
+ {
+ var msg = $("#upload").val();
+
+ alert("upload successfully");
+ }
+
+ function uriData(id) {
+ var id = id;
+ var accessTocken = "<?php echo $access_token; ?>";
+ var uri = "<?php echo $api_detail['uri']; ?>";
+ if (id != null) {
+ $.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
+ alert(result.items[0].name);
+ $("#div_"+id).html(result.directory);
+ }, "json")
+ .fail(function () {
+ alert("error");
+ });
}
+ }
- function FolderItems() {
- var accessTocken = "<?php echo $access_token; ?>";
- //if (id != null) {
-
- $.ajax({
- url: "https://developers.digitallocker.gov.in/public/oauth2/1/files/1307",
- header: "Äuthorization: Bearer " + accessTocken,
- type: "GET",
- beforeSend: function (xhr) {
- xhr.setRequestHeader('Äuthorization: Bearer', accessTocken);
- },
- success: function () {
- alert('Success!' + authHeader);
- }
- });
-
-
- }
- </script>
+ </script>
</body>
<?php include 'footer.php' ?>
</html>
\ No newline at end of file