authpartner
Clone or download
Modified Files
--- 'a/accountstatement.php'
+++ b/accountstatement.php
@@ -1,106 +1,183 @@
-<?php include 'header.php' ?>
-<div class="container">
+<?php
+include 'header.php';
+$access_token = $_GET['accesstoken'];
+$headers = array(
+ 'Authorization: Bearer ' . $access_token
+ //'Authorization: Basic '. base64_encode("$username:$password")
+);
+$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/';
+$vhf = curl_init($urlFile);
+//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST");
+//curl_setopt($vhf, CURLOPT_POST, true);
+curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
+curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
+//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post);
+//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true);
+curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0);
+curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0);
+curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true);
+$resFile = curl_exec($vhf);
+curl_close($vhf);
+$resFileNew = explode('¿', $resFile);
+$dataF = json_decode($resFileNew[1], TRUE);
- <div class="col-lg-1"></div>
- <div class="col-lg-10">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4><i class="fa fa-fw fa-bars"></i> Account Statement</h4>
- </div>
- <div class="panel-body">
-
- <form role="form">
-
- <div class="col-lg-12">
- <button class="btn btn-default pull-right" type="submit" style="margin-left:5px;">Print</button>
- <button class="btn btn-default pull-right" type="submit" style="margin-left:5px;">Save to Digilocker</button>
-
- <button class="btn btn-default pull-right" type="reset">Save as PDF</button>
- </div>
- <div class="col-lg-12">
- <div class="col-lg-3">
- <label>Account Name :</label>
- </div>
- <div class="col-lg-9 nor-font">
- <label>Mr. XYX ABC</label>
- </div>
-
- <div class="col-lg-3">
- <label>Account Number :</label>
- </div>
- <div class="col-lg-9 nor-font">
- <label>000000000000</label>
- </div>
- <div class="col-lg-3">
- <label>Account Description :</label>
- </div>
- <div class="col-lg-9 nor-font">
- <label>SBCHQ-GEN-PUB-INR</label>
- </div>
- <div class="col-lg-3">
- <label>Branch :</label>
- </div>
- <div class="col-lg-9 nor-font">
- <label>C G O COMPLEX, LODHI ESTATE</label>
-
+
+$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
+$vhi = curl_init($urlissued);
+//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
+//curl_setopt($vhi, CURLOPT_POST, true);
+curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
+curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
+//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
+//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
+curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
+curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
+curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
+$resissued = curl_exec($vhi);
+$resissuedErr = curl_error($vhi);
+curl_close($vhi);
+$issuedNew = explode('¿', $resissued);
+$dataI = json_decode($issuedNew[1], TRUE);
+?>
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <title>DigiLocker Service Center</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
+ <!-- Bootstrap Core CSS -->
+ <link href="css/bootstrap.min.css" rel="stylesheet">
+ <!-- Custom CSS -->
+ <link href="css/digi-bank.css" rel="stylesheet">
+ <!-- Custom Fonts -->
+ <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
+ </head>
+ <body>
+ <div id="wrapper">
+ <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
+ <div class="collapse navbar-collapse navbar-ex1-collapse">
+ <ul class="nav navbar-nav side-nav">
+ <li class="active">
+ <a href="index.php"><i class="fa fa-fw fa-clock-o"></i> Open Account</a>
+ </li>
+ <li>
+ <a href="loanapproval.php"><i class="fa fa-fw fa-link"></i> Print Document</a>
+ </li>
+ <li>
+ <a href="accountstatement.php"><i class="fa fa-fw fa-stack-exchange"></i>Upload Document</a>
+ </li>
+ </ul>
+ </div>
+ <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>
+ </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>
+ </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="uriData(<?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']);
+ }
+ ?>
+ <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" onclick="share_its('<?php echo $api_detail['uri']; ?>')"><?php } ?>
+ <?php
+ endforeach;
+ ?>
+ </table>
+ <div class="footer">
+ <button id="share_it" value="" onclick='sharedata();' style=" float:right;display: inline-block; background-color: rgb(51, 122, 183); color: rgb(255, 255, 255);">Share </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+ </div>
+
+ </div>
</div>
-
- </div>
-
- <div class="col-lg-12">
- <div class="col-lg-8 nor-font">
- <label style="margin-top:10px;">Account Statement from 1 Apr 2017 to 17 Apr 2017</label>
- </div>
-
- </div>
-
-
- <div class="col-lg-12">
- <table class="tg">
- <tr>
- <th class="tg-yw4l">Txn Date</th>
- <th class="tg-yw4l">Value Date</th>
- <th class="tg-yw4l">Description</th>
- <th class="tg-yw4l">Ref No.</th>
- <th class="tg-yw4l">Debit</th>
- <th class="tg-yw4l">Credit</th>
- <th class="tg-yw4l">Balance</th>
- </tr>
- <tr>
- <td>16 Apr
-2017</td>
- <td>16 Apr
-2017</td>
- <td>TO TRANSFER-INB IRCTCRAILWAY
-TICKET BOOK
-Railway Ticket Booki-</td>
- <td>100000809530637
-IGABDMOHD8
-TRANSFER T</td>
- <td>150.00</td>
- <td></td>
- <td>11,271.78</td>
- </tr>
- </table>
- </div>
- <div class="col-lg-12">
- <p>
- Please do not share your ATM, Debit/Credit card number, PIN and OTP with anyone over mail, SMS, phone call or any other
-media. Bank never asks for such information.
- </p>
- </div>
-
- </form>
-
-
-
+ </div>
+ </div>
</div>
+
</div>
-
</div>
- <div class="col-lg-1"></div>
- <!-- /.row -->
-
- </div>
- <?php include 'footer.php' ?>
\ No newline at end of file
+ <!-- /.container-fluid -->
+ </div>
+</div>
+<!-- jQuery -->
+<script src="js/jquery.js"></script>
+<!-- Bootstrap Core JavaScript -->
+<script src="js/bootstrap.min.js"></script>
+<script>
+ function share_its(seluri)
+ {
+ var uridata = seluri;
+ $("#button_share").val(uridata);
+ }
+ function sharedata()
+ {
+ var uri = $("#button_share").val();
+ window.opener.postMessage(uri, '*');
+ window.close();
+ }
+ 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) {
+ $("#div1").html(result.directory);
+ }, "json")
+ .fail(function () {
+ alert("error");
+ });
+ }
+ }
+
+</script>
+</body>
+<?php include 'footer.php' ?>
+</html>
+
--- 'a/fetchdoc.php'
+++ b/fetchdoc.php
@@ -1,4 +1,5 @@
<?php
+include 'header.php';
$access_token = $_GET['accesstoken'];
$headers = array(
'Authorization: Bearer ' . $access_token
@@ -47,7 +48,7 @@ $dataI = json_decode($issuedNew[1], TRUE
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
- <title>DigiBank</title>
+ <title>DigiLocker Service Center</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
@@ -64,13 +65,13 @@ $dataI = json_decode($issuedNew[1], TRUE
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li class="active">
- <a href="index.php"><i class="fa fa-fw fa-clock-o"></i> Link To DigiLocker</a>
+ <a href="index.php"><i class="fa fa-fw fa-clock-o"></i> Open Account</a>
</li>
<li>
- <a href="link_document.php"><i class="fa fa-fw fa-link"></i> Loan Approvals</a>
+ <a href="loanapproval.php"><i class="fa fa-fw fa-link"></i> Print Document</a>
</li>
<li>
- <a href="statement.php"><i class="fa fa-fw fa-stack-exchange"></i>Account Statements</a>
+ <a href="accountstatement.php"><i class="fa fa-fw fa-stack-exchange"></i>Upload Document</a>
</li>
</ul>
</div>
@@ -102,16 +103,20 @@ $dataI = json_decode($issuedNew[1], TRUE
foreach ($dataF['items'] as $api_detail):
?>
<tr>
- <td><a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&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']);
- }
- ?></a></td>
+ <?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']; ?>)">
+ <?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" onclick="share_its('<?php echo $api_detail['uri']; ?>')"><?php } ?>
@@ -195,7 +200,21 @@ $dataI = json_decode($issuedNew[1], TRUE
window.opener.postMessage(uri, '*');
window.close();
}
+ 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) {
+ $("#div1").html(result.directory);
+ }, "json")
+ .fail(function () {
+ alert("error");
+ });
+ }
+ }
</script>
</body>
+ <?php include 'footer.php' ?>
</html>
--- 'a/header.php'
+++ b/header.php
@@ -9,7 +9,7 @@
<meta name="description" content="">
<meta name="author" content="">
- <title>Bank Demo</title>
+ <title>DigiLocker Service Center</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
@@ -56,13 +56,13 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left ">
<li>
- <a href="index.php">LINK TO DIGILOCKER</a>
+ <a href="index.php">Open Account</a>
</li>
<li>
- <a target="_blank" href="loanapproval.php">APPLY FOR LOAN</a>
+ <a target="_blank" href="loanapproval.php">Print Document</a>
</li>
<li>
- <a target="_blank" href="accountstatement.php">ACCOUNT STATEMENT</a>
+ <a target="_blank" href="accountstatement.php">Upload Document</a>
</li>
--- 'a/index.php'
+++ b/index.php
@@ -7,7 +7,7 @@
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">
- <h4><i class="fa fa-fw fa-link"></i> Link to Digilocker</h4>
+ <h4><i class="fa fa-fw fa-link"></i>Open Account</h4>
</div>
<div class="panel-body">
<p>DigiLocker is Government of India's cloud based platform for issuance and verification of documents & certificates digitally. </p>
@@ -35,6 +35,9 @@
<input type="text" class="form-control" name = "state" value="123456">
</div>
<button type="submit" class="btn btn-default">Access Digilocker</button>
+ <div class="my_content_container">
+ <a class="btn btn-default" style="float: right;" href="https://digilocker.gov.in/public/register">Signup</a>
+ </div>
</form>
</div>
</div>
--- 'a/loanapproval.php'
+++ b/loanapproval.php
@@ -28,215 +28,64 @@ $notgettingdata = explode('¿', $result);
$getToken = json_decode($notgettingdata[1]);
$access_token = $getToken->access_token;
?>
-<link href="css/jquery.datepick.css" rel="stylesheet">
-<script src="js/jquery.min.js"></script>
-<script src="js/jquery.plugin.js"></script>
-<script src="js/jquery.datepick.js"></script>
-<script>
- $(function () {
- $('#popupDatepicker').datepick();
- });
-
- function showDate(date) {
- alert('The date chosen is ' + date);
- }
-</script>
-<div class="container">
- <div class="col-lg-2"></div>
- <div class="col-lg-8">
+<div class="row">
+ <div class="col-md-1">
+ </div>
+ <div class="col-md-10 outerborder">
<div class="panel panel-default">
- <div class="panel-heading">
- <h4><i class="fa fa-fw fa-bar-chart"></i> Loan Application Form</h4>
- </div>
- <div class="panel-body">
- <form role="form" action="upload_data.php" method="POST">
- <div class="col-lg-12">
- <div class="col-lg-12 nor-font form-group">
- <label style="font-weight:bold">Personal Details :</label>
- <hr>
- </div>
- <div class="row">
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>First Name</label>
- <input class="form-control height-form" type="text" name="firstname" id="firstname">
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Middle Name</label>
- <input class="form-control height-form" type="text" name="middlename" id="middlename">
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Last Name</label>
- <input class="form-control height-form" type="text" name="lastname" id="lastname">
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-5 form-group">
- <div class="col-lg-12">
- <div class="row">
- <div class="col-lg-12 nor-font">
- <label>Gender</label></div></div>
- <div class="col-lg-12">
- <label class="radio-inline">
- <input type="radio" checked="" id="gender" name="gender">M
- </label>
- <label class="radio-inline">
- <input type="radio" id="gender" name="gender">F
- </label>
- <label class="radio-inline">
- <input type="radio" id="gender" name="gender">Others
- </label></div>
- </div>
- </div>
- <div class="col-lg-3 form-group">
- <div class="col-lg-12 nor-font">
- <label>Date of Birth</label>
- <input class="form-control height-form" type="text" id="popupDatepicker" name="popupDatepicker">
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Upload proof of identity</label>
- <div class="row">
- <div class="col-lg-12">
- <input class="form-control height-form" type="text" name="uri" id="uri">
+ <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>
- <input type="file" name="file" id="file"></div></div>
- <div class="text-center">OR</div>
- <div class="row">
- <div class="col-lg-12">
- <a href="#" onclick="docfetch();">Fetch Document Digilocker</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>E-mail</label>
- <input class="form-control height-form" type="text" name="email" id="email">
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Mobile</label>
- <input class="form-control height-form" type="text" name="mobile" id="mobile">
- </div>
- </div>
- </div>
- <div class="col-lg-12 nor-font form-group">
- <label style="font-weight:bold">Address :</label>
- <hr>
- </div>
- <div class="row">
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Street-1</label>
- <input class="form-control height-form" type="textarea" id="address" rows="4" cols="20" name="address">
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Street-2</label>
- <input class="form-control height-form" type="textarea" id="address" rows="4" cols="20" name="address">
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Country</label>
- <select class="form-control height-form" name="country" id="country">
- <option>India</option>
- <option>Shrilanka</option>
- <option>Bangladesh</option>
- <option>Nepal</option>
- <option>Span</option>
- </select>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>State</label>
- <select class="form-control height-form" name="state" id="state">
- <option value="1">Delhi</option>
- <option value="2">UP</option>
- <option value="3">HP</option>
- <option value="4">JHR</option>
- <option value="5">BHr</option>
- </select>
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>City</label>
- <select class="form-control height-form" name="city" id="city">
- <option>Delhi</option>
- <option>Mumbai</option>
- <option>Kolkata</option>
- <option>Chennai</option>
- <option>Bhopal</option>
- </select>
- </div>
- </div>
- <div class="col-lg-4 form-group">
- <div class="col-lg-12 nor-font">
- <label>Upload proof of address</label>
- <div class="row">
- <div class="col-lg-12">
- <input type="file" id="files" name="files"></div></div>
- <div class="text-center">OR</div>
- <div class="row">
- <div class="col-lg-12">
- <a href="#">Fetch Address Digilocker</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-12 text-center">
- <button class="btn btn-default" type="submit">Submit</button>
- <button class="btn btn-default" type="reset">Reset</button>
- </div>
- </div>
- </form>
- </div>
+ <div class="row">
+ <div class="col-lg-12">
+ <a href="#" onclick="docfetch();" ><center>Proceed</center></a>
</div>
</div>
- <div class="col-lg-2"></div>
- <!-- /.row -->
-</div>
-<script type="text/javascript">
- var accesstoken = '<?php echo $access_token; ?>';
- function docfetch()
- {
- window.open('fetchdoc.php' + "?accesstoken=" + accesstoken + "", "_blank", "height=600,width=800,status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no");
- }
- 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>
- window.addEventListener("message", receiveMessage, false);
+ <script type="text/javascript">
+ var accesstoken = '<?php echo $access_token; ?>';
+ function docfetch()
+ {
+ window.location.replace('fetchdoc.php' + "?accesstoken=" + accesstoken + "", "_blank", "height=600,width=800,status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no");
+
+ }
+ 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>
+ window.addEventListener("message", receiveMessage, false);
-function receiveMessage(event)
-{
- $('#uri').val(event.data);
- alert(event.data);
- // ...
-}
-</script>
-<?php include 'footer.php' ?>
\ No newline at end of file
+ function receiveMessage(event)
+ {
+ $('#uri').val(event.data);
+ alert(event.data);
+ // ...
+ }
+ </script>
+ <?php include 'footer.php' ?>
\ No newline at end of file
--- 'a/response.php'
+++ /dev/null
@@ -1,255 +0,0 @@
-<?php
-$code = $_GET['code'];
-$state = $_GET['state'];
-$headers = array(
- 'Content-Type:application/json'
-);
-$url = "https://developers.digitallocker.gov.in/public/oauth2/1/token";
-$post = array(
- 'code' => $code,
- 'grant_type' => 'authorization_code',
- 'client_id' => 'NIELN3M9',
- 'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU',
- 'redirect_uri' => 'http://localhost/digibank/response.php',
-);
-$vh = curl_init($url);
-curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST");
-curl_setopt($vh, CURLOPT_POST, true);
-curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
-curl_setopt($vh, CURLOPT_POSTFIELDS, $post);
-//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers);
-curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0);
-curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0);
-curl_setopt($vh, CURLOPT_RETURNTRANSFER, true);
-$result = curl_exec($vh);
-curl_close($vh);
-$notgettingdata = explode('¿', $result);
-$getToken = json_decode($notgettingdata[1]);
-$access_token = $getToken->access_token;
-
-
-
-$headers = array(
- 'Authorization: Bearer ' . $access_token
- //'Authorization: Basic '. base64_encode("$username:$password")
-);
-$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/';
-$vhf = curl_init($urlFile);
-//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST");
-//curl_setopt($vhf, CURLOPT_POST, true);
-curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
-curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
-//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post);
-//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true);
-curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0);
-curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0);
-curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true);
-$resFile = curl_exec($vhf);
-curl_close($vhf);
-$resFileNew = explode('¿', $resFile);
-$dataF = json_decode($resFileNew[1], TRUE);
-
-
-$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
-$vhi = curl_init($urlissued);
-//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
-//curl_setopt($vhi, CURLOPT_POST, true);
-curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
-curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
-//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
-//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
-curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
-curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
-curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
-$resissued = curl_exec($vhi);
-$resissuedErr = curl_error($vhi);
-curl_close($vhi);
-$issuedNew = explode('¿', $resissued);
-$dataI = json_decode($issuedNew[1], TRUE);
-
-?>
-
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="description" content="">
- <meta name="author" content="">
- <title>DigiBank</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- <!-- Bootstrap Core CSS -->
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <!-- Custom CSS -->
- <link href="css/digi-bank.css" rel="stylesheet">
- <!-- Custom Fonts -->
- <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <div id="wrapper">
- <!-- Navigation -->
- <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
- <!-- Brand and toggle get grouped for better mobile display -->
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="index.html">DigiBank</a>
- </div>
- <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
- <div class="collapse navbar-collapse navbar-ex1-collapse">
- <ul class="nav navbar-nav side-nav">
- <li class="active">
- <a href="index.php"><i class="fa fa-fw fa-clock-o"></i> Link To DigiLocker</a>
- </li>
- <li>
- <a href="link_document.php"><i class="fa fa-fw fa-link"></i> Loan Approvals</a>
- </li>
- <li>
- <a href="statement.php"><i class="fa fa-fw fa-stack-exchange"></i>Account Statements</a>
- </li>
- </ul>
- </div>
- <!-- /.navbar-collapse -->
- </nav>
- <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>
- <li><a data-toggle="tab" href="#menu2">Menu 2</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>Type</th>
- <th>Size</th>
- <th>Date</th>
- <th>Parent</th>
- <th>Mime</th>
- <th>Uri</th>
- <th>Description</th>
- <th>Issuer</th>
- </tr>
- <?php
- foreach ($dataF['items'] as $api_detail):
- ?>
- <tr>
- <td><a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&name=<?php echo($api_detail['name']); ?>">
- <?php
- if ($api_detail['type'] == "dir") {
- echo "<i class='fa fa-folder-o'></i> ";
- } elseif ($api_detail['type'] == "file") {
- echo "<i class='fa fa-file-o'></i> ";
- } echo($api_detail['name']);
- ?></a></td>
-
- <td><?php echo($api_detail['size']); ?></td>
- <td><?php echo($api_detail['date']); ?></td>
- <td><?php echo($api_detail['parent']); ?></td>
- <td><?php echo($api_detail['mime']); ?></td>
- <td><?php echo($api_detail['uri']); ?></td>
- <td><?php echo($api_detail['description']); ?></td>
- <td><?php echo($api_detail['issuer']); ?></td>
- </tr>
- <?php
- endforeach;
- ?>
- </table>
- </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>Type</th>
- <th>Size</th>
- <th>Date</th>
- <th>Parent</th>
- <th>Mime</th>
- <th>Uri</th>
- <th>Description</th>
- <th>Issuer</th>
- </tr>
- <?php
- foreach ($dataI['items'] as $issued_detail):
- ?>
- <tr><td>
- <?php
- if ($issued_detail['type'] == "dir") {
- echo "<i class='fa fa-folder-o'></i> ";
- } elseif ($issued_detail['type'] == "file") {
- echo "<i class='fa fa-file-o'></i> ";
- } echo($issued_detail['name']);
- ?>
- </td>
- <td><?php echo($issued_detail['type']); ?>></td>
- <td><?php echo($issued_detail['size']); ?></td>
- <td><?php echo($issued_detail['date']); ?></td>
- <td><?php echo($issued_detail['parent']); ?></td>
- <td><?php echo($issued_detail['mime']); ?></td>
- <td><?php echo($issued_detail['uri']); ?></td>
- <td><?php echo($issued_detail['description']); ?></td>
- <td><?php echo($issued_detail['issuer']); ?></td>
-
- </tr>
- <?php
- endforeach;
- ?>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
-
- </div>
- <div id="menu2" class="tab-pane fade">
- <h3>Menu 2</h3>
- <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- <!-- /.container-fluid -->
- </div>
- </div>
- <!-- jQuery -->
- <script src="js/jquery.js"></script>
- <!-- Bootstrap Core JavaScript -->
- <script src="js/bootstrap.min.js"></script>
- </body>
-</html>
--- 'a/upload_data.php'
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-$servername = "localhost";
-$username = "root";
-$password = "";
-$dbname = "digibank";
-print_r($_POST['uri']);
-// Create connection
-$conn = new mysqli($servername, $username, $password, $dbname);
-// Check connection
-if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
-}
-
-$sql = "INSERT INTO employees (firstname, middlename, lastname, gender, popupDatepicker, email, mobile, uri)
-VALUES ('".$_POST['firstname']."','".$_POST['middlename']."', '".$_POST['lastname']."', '".$_POST['gender']."', '".$_POST['popupDatepicker']."', '".$_POST['email']."', '".$_POST['mobile']."', '".$_POST['uri']."')";
-
-if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
-
-} else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- die();
-}
-
-$conn->close();
-
-header('Location: http://localhost/digibank/loanapproval.php');
-die();
\ No newline at end of file
--- 'a/uri.php'
+++ b/uri.php
@@ -1,7 +1,7 @@
<?php
-$id = $_GET['id'];
+$id = $_POST['id'];
$headers = array(
- 'Authorization: Bearer ' . $_GET['access_tocken']
+ 'Authorization: Bearer ' . $_POST['access_token']
//'Authorization: Basic '. base64_encode("$username:$password")
);
$urlUri = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'.$id;
--- 'a/view.php'
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-$host="localhost";
-$username="root";
-$password="";
-$db_name="digibank";
-// Connect to server and select database.
-mysql_connect("$host", "$username", "$password")or die("cannot connect");
-mysql_select_db("digibank")or die("cannot select DB");
-
-$sql="SELECT * FROM employees";
-$result=mysql_query($sql);
-
-?>
-<center>
-<table width="500" border="1" cellspacing="0" cellpadding="3">
-<tr>
-<td colspan="5"><center><strong>User Details </strong></center> </td>
-</tr>
-
-<tr>
-<td align="center"><strong>First Names</strong></td>
-<td align="center"><strong>Middle Name</strong></td>
-<td align="center"><strong>Last Name</strong></td>
-<td align="center"><strong>Email</strong></td>
-<td align="center"><strong>Phone</strong></td>
-<td align="center"><strong>URI</strong></td>
-</tr>
-</center>
-<?php
-while($rows=mysql_fetch_array($result)){
-
-?>
-
-<tr>
-<td><?php echo $rows['firstname']; ?></td>
-<td><?php echo $rows['middlename']; ?></td>
-<td><?php echo $rows['lastname']; ?></td>
-<td><?php echo $rows['email']; ?></td>
-<td><?php echo $rows['mobile']; ?></td>
-<td><?php echo $rows['uri']; ?></td>
-
-</tr>
-<?php
-}
-?>
-</table>
-</td>
-</tr>
-</table>
-<?php
-mysql_close();
-
-?>