authpartner

Clone or download

äpi sample application view change

Modified Files

M accountstatement.php
+177 −100
<?php include 'header.php' ?>
<?php
<div class="container">
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">
$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
<div class="panel panel-default">
$vhi = curl_init($urlissued);
<div class="panel-heading">
//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
<h4><i class="fa fa-fw fa-bars"></i> Account Statement</h4>
//curl_setopt($vhi, CURLOPT_POST, true);
</div>
curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
<div class="panel-body">
curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
<form role="form">
//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
<div class="col-lg-12">
curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
<button class="btn btn-default pull-right" type="submit" style="margin-left:5px;">Print</button>
curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
<button class="btn btn-default pull-right" type="submit" style="margin-left:5px;">Save to Digilocker</button>
$resissued = curl_exec($vhi);
$resissuedErr = curl_error($vhi);
<button class="btn btn-default pull-right" type="reset">Save as PDF</button>
curl_close($vhi);
</div>
$issuedNew = explode('¿', $resissued);
<div class="col-lg-12">
$dataI = json_decode($issuedNew[1], TRUE);
<div class="col-lg-3">
?>
<label>Account Name :</label>
</div>
<!DOCTYPE html>
<div class="col-lg-9 nor-font">
<html lang="en">
<label>Mr. XYX ABC</label>
<head>
</div>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<div class="col-lg-3">
<meta name="viewport" content="width=device-width, initial-scale=1">
<label>Account Number :</label>
<meta name="description" content="">
</div>
<meta name="author" content="">
<div class="col-lg-9 nor-font">
<title>DigiLocker Service Center</title>
<label>000000000000</label>
<meta name="viewport" content="width=device-width, initial-scale=1">
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<div class="col-lg-3">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<label>Account Description :</label>
<!-- Bootstrap Core CSS -->
</div>
<link href="css/bootstrap.min.css" rel="stylesheet">
<div class="col-lg-9 nor-font">
<!-- Custom CSS -->
<label>SBCHQ-GEN-PUB-INR</label>
<link href="css/digi-bank.css" rel="stylesheet">
</div>
<!-- Custom Fonts -->
<div class="col-lg-3">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<label>Branch :</label>
</head>
</div>
<body>
<div class="col-lg-9 nor-font">
<div id="wrapper">
<label>C G O COMPLEX, LODHI ESTATE</label>
<!-- 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>
</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>
<div class="col-lg-1"></div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
<?php include 'footer.php' ?>
</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>
M fetchdoc.php
+33 −14
<?php
<?php
include 'header.php';
$access_token = $_GET['accesstoken'];
$access_token = $_GET['accesstoken'];
$headers = array(
$headers = array(
'Authorization: Bearer ' . $access_token
'Authorization: Bearer ' . $access_token
//'Authorization: Basic '. base64_encode("$username:$password")
//'Authorization: Basic '. base64_encode("$username:$password")
);
);
$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/';
$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/';
$vhf = curl_init($urlFile);
$vhf = curl_init($urlFile);
//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST");
//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST");
//curl_setopt($vhf, CURLOPT_POST, true);
//curl_setopt($vhf, CURLOPT_POST, true);
curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true);
curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true);
$resFile = curl_exec($vhf);
$resFile = curl_exec($vhf);
curl_close($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
$resFileNew = explode('¿', $resFile);
$dataF = json_decode($resFileNew[1], TRUE);
$dataF = json_decode($resFileNew[1], TRUE);
$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
$vhi = curl_init($urlissued);
$vhi = curl_init($urlissued);
//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($vhi, CURLOPT_POST, true);
//curl_setopt($vhi, CURLOPT_POST, true);
curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true);
$resissued = curl_exec($vhi);
$resissued = curl_exec($vhi);
$resissuedErr = curl_error($vhi);
$resissuedErr = curl_error($vhi);
curl_close($vhi);
curl_close($vhi);
$issuedNew = explode('¿', $resissued);
$issuedNew = explode('¿', $resissued);
$dataI = json_decode($issuedNew[1], TRUE);
$dataI = json_decode($issuedNew[1], TRUE);
?>
?>
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="description" content="">
<meta name="author" content="">
<meta name="author" content="">
<title>DigiBank</title>
<title>DigiLocker Service Center</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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://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>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- Bootstrap Core CSS -->
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<!-- Custom CSS -->
<link href="css/digi-bank.css" rel="stylesheet">
<link href="css/digi-bank.css" rel="stylesheet">
<!-- Custom Fonts -->
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
</head>
<body>
<body>
<div id="wrapper">
<div id="wrapper">
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<ul class="nav navbar-nav side-nav">
<li class="active">
<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>
<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>
<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>
</li>
</ul>
</ul>
</div>
</div>
<div id="page-wrapper">
<div id="page-wrapper">
<div class="container-fluid">
<div class="container-fluid">
<!-- Page Heading -->
<!-- Page Heading -->
<div class="row">
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12">
<div class="container">
<div class="container">
<ul class="nav nav-tabs">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
<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="#issueddocument">Issued Document</a></li>
</ul>
</ul>
<div class="tab-content">
<div class="tab-content">
<div id="uploadeddocument" class="tab-pane fade in active">
<div id="uploadeddocument" class="tab-pane fade in active">
<section class="content">
<section class="content">
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="box box-primary">
<div class="box box-primary">
<div class="box box-body col-sm-12">
<div class="box box-body col-sm-12">
<div class="table-responsive">
<div class="table-responsive">
<table class="table">
<table class="table">
<tr>
<tr>
<th>Name</th>
<th>Name</th>
<th>Size</th>
<th>Size</th>
<th>Date</th>
<th>Date</th>
</tr>
</tr>
<?php
<?php
foreach ($dataF['items'] as $api_detail):
foreach ($dataF['items'] as $api_detail):
?>
?>
<tr>
<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 /**
<?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>
if ($api_detail['type'] == "dir") {
* * */ ?>
echo "<i class='fa fa-folder-o'></i> ";
<td onclick="uriData(<?php echo $api_detail['id']; ?>)">
echo($api_detail['name']);
<?php
} elseif ($api_detail['type'] == "file") {
if ($api_detail['type'] == "dir") {
echo "<i class='fa fa-file-o'></i> ";
echo "<i class='fa fa-folder-o'></i> ";
echo($api_detail['name']);
echo($api_detail['name']);
}
} elseif ($api_detail['type'] == "file") {
?></a></td>
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['size']); ?></td>
<td><?php echo($api_detail['date']); ?></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 } ?>
<td><?php if ($api_detail['type'] == "file") { ?><input type="radio" id="getval" class="getval" onclick="share_its('<?php echo $api_detail['uri']; ?>')"><?php } ?>
<?php
<?php
endforeach;
endforeach;
?>
?>
</table>
</table>
<div class="footer">
<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>
<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>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
<div id="issueddocument" class="tab-pane fade">
<div id="issueddocument" class="tab-pane fade">
<section class="content">
<section class="content">
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="box box-primary">
<div class="box box-primary">
<div class="box box-body col-sm-12">
<div class="box box-body col-sm-12">
<div class="table-responsive">
<div class="table-responsive">
<table class="table">
<table class="table">
<tr>
<tr>
<th>Name</th>
<th>Name</th>
<th>Size</th>
<th>Size</th>
<th>Date</th>
<th>Date</th>
</tr>
</tr>
<?php
<?php
foreach ($dataI['items'] as $issued_detail):
foreach ($dataI['items'] as $issued_detail):
?>
?>
<tr><td>
<tr><td>
<?php
<?php
echo "<i class='fa fa-file-o'></i> ";
echo "<i class='fa fa-file-o'></i> ";
echo($issued_detail['name']);
echo($issued_detail['name']);
?>
?>
</td>
</td>
<td><?php echo($issued_detail['size']); ?></td>
<td><?php echo($issued_detail['size']); ?></td>
<td><?php echo($issued_detail['date']); ?></td>
<td><?php echo($issued_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 } ?>
<td><?php if ($api_detail['type'] == "file") { ?><input type="radio" id="getval" class="getval" onclick="share_its('<?php echo $api_detail['uri']; ?>')"><?php } ?>
</tr>
</tr>
<?php
<?php
endforeach;
endforeach;
?>
?>
</table>
</table>
<div class="footer">
<div class="footer">
<button id="button_share" value="" onclick='sharedata();' style=" float:right;display: inline-block; background-color: rgb(51, 122, 183); color: rgb(255, 255, 255);">Share </button>
<button id="button_share" 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>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
<!-- /.container-fluid -->
</div>
</div>
</div>
</div>
<!-- jQuery -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
<script>
function share_its(seluri)
function share_its(seluri)
{
{
var uridata = seluri;
var uridata = seluri;
$("#button_share").val(uridata);
$("#button_share").val(uridata);
}
}
function sharedata()
function sharedata()
{
{
var uri = $("#button_share").val();
var uri = $("#button_share").val();
window.opener.postMessage(uri, '*');
window.opener.postMessage(uri, '*');
window.close();
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>
</script>
</body>
</body>
<?php include 'footer.php' ?>
</html>
</html>
M header.php
+4 −4
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="description" content="">
<meta name="author" content="">
<meta name="author" content="">
<title>Bank Demo</title>
<title>DigiLocker Service Center</title>
<!-- Bootstrap Core CSS -->
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<!-- Custom CSS -->
<link href="css/style.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- Custom Fonts -->
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<style>
<style>
@media (min-width: 768px){
@media (min-width: 768px){
.navbar-nav>li>a {
.navbar-nav>li>a {
font-size:11px;
font-size:11px;
padding-top: 8px;
padding-top: 8px;
padding-bottom: 0px;
padding-bottom: 0px;
color: #fff;
color: #fff;
padding-bottom: 8px;
padding-bottom: 8px;
}
}
.navbar-nav>li>a:hover{ color: #000; background-color:#f0ede4;}
.navbar-nav>li>a:hover{ color: #000; background-color:#f0ede4;}
}
}
</style>
</style>
</head>
</head>
<body>
<body>
<!-- Navigation -->
<!-- Navigation -->
<div class="container">
<div class="container">
<div class="navbar-header">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</button>
<a class="navbar-brand" href="index.html"><img src="images/digibank.png"></a>
<a class="navbar-brand" href="index.html"><img src="images/digibank.png"></a>
</div>
</div>
</div>
</div>
<nav role="navigation" style="background-color: blueviolet; margin-bottom: 15px;height: 35px; position: relative;" >
<nav role="navigation" style="background-color: blueviolet; margin-bottom: 15px;height: 35px; position: relative;" >
<div class="container">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<!-- Brand and toggle get grouped for better mobile display -->
<!-- Collect the nav links, forms, and other content for toggling -->
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left ">
<ul class="nav navbar-nav navbar-left ">
<li>
<li>
<a href="index.php">LINK TO DIGILOCKER</a>
<a href="index.php">Open Account</a>
</li>
</li>
<li>
<li>
<a target="_blank" href="loanapproval.php">APPLY FOR LOAN</a>
<a target="_blank" href="loanapproval.php">Print Document</a>
</li>
</li>
<li>
<li>
<a target="_blank" href="accountstatement.php">ACCOUNT STATEMENT</a>
<a target="_blank" href="accountstatement.php">Upload Document</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
<!-- /.navbar-collapse -->
<!-- /.navbar-collapse -->
</div>
</div>
<!-- /.container -->
<!-- /.container -->
</nav>
</nav>
M index.php
+4 −1
<?php include 'header.php' ?>
<?php include 'header.php' ?>
<div class="container">
<div class="container">
<!-- Marketing Icons Section -->
<!-- Marketing Icons Section -->
<div class="row">
<div class="row">
<div class="col-md-2">
<div class="col-md-2">
</div>
</div>
<div class="col-md-8">
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel panel-default">
<div class="panel-heading">
<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>
<div class="panel-body">
<div class="panel-body">
<p>DigiLocker is Government of India's cloud based platform for issuance and verification of documents &amp; certificates digitally. </p>
<p>DigiLocker is Government of India's cloud based platform for issuance and verification of documents &amp; certificates digitally. </p>
<p>With DigiLocker, you can: </p>
<p>With DigiLocker, you can: </p>
<ul class="custom-bullet">
<ul class="custom-bullet">
<li>Access your documents anytime, anywhere.</li>
<li>Access your documents anytime, anywhere.</li>
<li>Share documents digitally for verification.</li>
<li>Share documents digitally for verification.</li>
<li>eSign documents (which is similar to self-attestation).</li>
<li>eSign documents (which is similar to self-attestation).</li>
</ul>
</ul>
<form action = "https://developers.digitallocker.gov.in/public/oauth2/1/authorize" method = "GET" role="form">
<form action = "https://developers.digitallocker.gov.in/public/oauth2/1/authorize" method = "GET" role="form">
<div class="form-group has-success" style="display:none">
<div class="form-group has-success" style="display:none">
<label class="control-label" for="inputSuccess">Response Type</label>
<label class="control-label" for="inputSuccess">Response Type</label>
<input type="text" class="form-control" name = "response_type" value="code">
<input type="text" class="form-control" name = "response_type" value="code">
</div>
</div>
<div class="form-group has-success" style="display:none">
<div class="form-group has-success" style="display:none">
<label class="control-label" for="inputSuccess">Client ID</label>
<label class="control-label" for="inputSuccess">Client ID</label>
<input type="text" class="form-control" name = "client_id" value="NIELN3M9">
<input type="text" class="form-control" name = "client_id" value="NIELN3M9">
</div>
</div>
<div class="form-group has-success" style="display:none">
<div class="form-group has-success" style="display:none">
<label class="control-label" for="inputSuccess">Redirect Uri</label>
<label class="control-label" for="inputSuccess">Redirect Uri</label>
<input type="text" class="form-control" name = "redirect_uri" value="http://localhost/digibank/loanapproval.php">
<input type="text" class="form-control" name = "redirect_uri" value="http://localhost/digibank/loanapproval.php">
</div>
</div>
<div class="form-group has-success" style="display:none">
<div class="form-group has-success" style="display:none">
<label class="control-label" for="inputSuccess">State</label>
<label class="control-label" for="inputSuccess">State</label>
<input type="text" class="form-control" name = "state" value="123456">
<input type="text" class="form-control" name = "state" value="123456">
</div>
</div>
<button type="submit" class="btn btn-default">Access Digilocker</button>
<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>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-2">
<div class="col-md-2">
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-md-1">
<div class="col-md-1">
</div>
</div>
<div class="col-md-10 outerborder">
<div class="col-md-10 outerborder">
<div class="panel panel-default">
<div class="panel panel-default">
<p class="para">
<p class="para">
Important security information:
Important security information:
</p>
</p>
</div>
</div>
<div class="row">
<div class="row">
<ul class="custom-bullet">
<ul class="custom-bullet">
<li class="formrow">
<li class="formrow">
Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">demobank.gov.in.</a>
Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">demobank.gov.in.</a>
</li>
</li>
<li class="formrow">
<li class="formrow">
Never provide your User ID or password to any one on phone or in response to a mail.<a href="#">&nbsp;Report a suspicious mail</a>.
Never provide your User ID or password to any one on phone or in response to a mail.<a href="#">&nbsp;Report a suspicious mail</a>.
</li>
</li>
<li class="formrow">
<li class="formrow">
Do not enter login or other sensitive information in any pop up window.
Do not enter login or other sensitive information in any pop up window.
</li>
</li>
<li class="formrow">
<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>.
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>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-1">
<div class="col-md-1">
</div>
</div>
</div>
</div>
<!-- /.row -->
<!-- /.row -->
</div>
</div>
<?php include 'footer.php' ?>
<?php include 'footer.php' ?>
M loanapproval.php
+54 −205
<?php
<?php
include 'header.php';
include 'header.php';
$code = $_GET['code'];
$code = $_GET['code'];
$state = $_GET['state'];
$state = $_GET['state'];
$headers = array(
$headers = array(
'Content-Type:application/json'
'Content-Type:application/json'
);
);
$url = "https://developers.digitallocker.gov.in/public/oauth2/1/token";
$url = "https://developers.digitallocker.gov.in/public/oauth2/1/token";
$post = array(
$post = array(
'code' => $code,
'code' => $code,
'grant_type' => 'authorization_code',
'grant_type' => 'authorization_code',
'client_id' => 'NIELN3M9',
'client_id' => 'NIELN3M9',
'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU',
'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU',
'redirect_uri' => 'http://localhost/digibank/loanapproval.php',
'redirect_uri' => 'http://localhost/digibank/loanapproval.php',
);
);
$vh = curl_init($url);
$vh = curl_init($url);
curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($vh, CURLOPT_POST, true);
curl_setopt($vh, CURLOPT_POST, true);
curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($vh, CURLOPT_POSTFIELDS, $post);
curl_setopt($vh, CURLOPT_POSTFIELDS, $post);
//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers);
curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($vh, CURLOPT_RETURNTRANSFER, true);
curl_setopt($vh, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($vh);
$result = curl_exec($vh);
curl_close($vh);
curl_close($vh);
$notgettingdata = explode('¿', $result);
$notgettingdata = explode('¿', $result);
$getToken = json_decode($notgettingdata[1]);
$getToken = json_decode($notgettingdata[1]);
$access_token = $getToken->access_token;
$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();
});
<div class="row">
<div class="col-md-1">
function showDate(date) {
</div>
alert('The date chosen is ' + date);
<div class="col-md-10 outerborder">
}
</script>
<div class="container">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="panel panel-default">
<div class="panel panel-default">
<div class="panel-heading">
<p class="para">
<h4><i class="fa fa-fw fa-bar-chart"></i> Loan Application Form</h4>
Important security information:
</div>
</p>
<div class="panel-body">
</div>
<form role="form" action="upload_data.php" method="POST">
<div class="row">
<div class="col-lg-12">
<ul class="custom-bullet">
<div class="col-lg-12 nor-font form-group">
<li class="formrow">
<label style="font-weight:bold">Personal Details :</label>
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>
<hr>
</li>
</div>
<li class="formrow">
<div class="row">
Never provide your User ID or password to any one on phone or in response to a mail.<a href="#">&nbsp;Report a suspicious mail</a>.
<div class="col-lg-4 form-group">
</li>
<div class="col-lg-12 nor-font">
<li class="formrow">
<label>First Name</label>
Do not enter login or other sensitive information in any pop up window.
<input class="form-control height-form" type="text" name="firstname" id="firstname">
</li>
</div>
<li class="formrow">
</div>
Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, <a href="#">click here</a>.
<div class="col-lg-4 form-group">
</li>
<div class="col-lg-12 nor-font">
</ul>
<label>Middle Name</label>
</div>
<input class="form-control height-form" type="text" name="middlename" id="middlename">
</div>
</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">
<input type="file" name="file" id="file"></div></div>
<div class="row">
<div class="text-center">OR</div>
<div class="col-lg-12">
<div class="row">
<a href="#" onclick="docfetch();" ><center>Proceed</center></a>
<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>
</div>
</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");
}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
var accesstoken = '<?php echo $access_token; ?>';
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
function docfetch()
</script>
{
<script type="text/javascript">
window.location.replace('fetchdoc.php' + "?accesstoken=" + accesstoken + "", "_blank", "height=600,width=800,status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no");
var pageTracker = _gat._getTracker("UA-4715900-1");
pageTracker._initData();
}
pageTracker._trackPageview();
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
</script>
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
<script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
</script>
<script>
<script type="text/javascript">
window.addEventListener("message", receiveMessage, false);
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)
function receiveMessage(event)
{
{
$('#uri').val(event.data);
$('#uri').val(event.data);
alert(event.data);
alert(event.data);
// ...
// ...
}
}
</script>
</script>
<?php include 'footer.php' ?>
<?php include 'footer.php' ?>
D response.php
+0 −255
<?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>
D upload_data.php
+0 −28
<?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();
M uri.php
+2 −2
<?php
<?php
$id = $_GET['id'];
$id = $_POST['id'];
$headers = array(
$headers = array(
'Authorization: Bearer ' . $_GET['access_tocken']
'Authorization: Bearer ' . $_POST['access_token']
//'Authorization: Basic '. base64_encode("$username:$password")
//'Authorization: Basic '. base64_encode("$username:$password")
);
);
$urlUri = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'.$id;
$urlUri = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'.$id;
$uri = curl_init($urlUri);
$uri = curl_init($urlUri);
curl_setopt($uri, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($uri, CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($uri, CURLOPT_POST, true);
//curl_setopt($uri, CURLOPT_POST, true);
curl_setopt($uri, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($uri, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($uri, CURLOPT_HTTPHEADER, $headers);
curl_setopt($uri, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($uri, CURLOPT_POSTFIELDS, $post);
//curl_setopt($uri, CURLOPT_POSTFIELDS, $post);
//curl_setopt($uri, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($uri, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($uri, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($uri, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($uri, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($uri, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($uri, CURLOPT_RETURNTRANSFER, true);
curl_setopt($uri, CURLOPT_RETURNTRANSFER, true);
$uriResissued = curl_exec($uri);
$uriResissued = curl_exec($uri);
curl_close($uri);
curl_close($uri);
print_r($uriResissued);
print_r($uriResissued);
?>
?>
D view.php
+0 −53
<?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();
?>