authpartner
Clone or download
Modified Files
Binary files /dev/null and b/Downloads/44008552Singh.pdf differ
Binary files /dev/null and b/Downloads/avatar04.png differ
--- 'a/accountstatement.php'
+++ /dev/null
@@ -1,190 +0,0 @@
-<?php
-include 'loanapproval.php';
-print_r($_SESSION["code"]);
-print_r($code);
-die();
-include 'header.php';
-
-$code = $_GET['code'];
-$state = $_GET['state'];
-$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/loanapproval.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_TIMEOUT, 30); //timeout after 30 seconds
-curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
-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);
-
-
-?>
-
-<!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" class="getval" name="grp"><?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>
- <!-- /.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();
-
- }
- 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/css/style.css'
+++ b/css/style.css
@@ -212,7 +212,7 @@ div.navbar-inverse {
.navbar-header a img{
margin-top:-10px;
- margin-left:100px;
+ /*margin-left:100px;*/
}
footer{
margin:0px;
--- /dev/null
+++ b/doc.php
@@ -0,0 +1,245 @@
+<?php
+include 'header.php';
+$code = $_GET['code'];
+$state = $_GET['state'];
+$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/doc.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_TIMEOUT, 30); //timeout after 30 seconds
+curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
+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);
+
+
+$headers = array(
+ 'Authorization: Bearer ' . $access_token
+ //'Authorization: Basic '. base64_encode("$username:$password")
+);
+$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
+$vhi = curl_init($urlissued);
+curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
+curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
+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);
+?>
+
+
+ <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">
+
+ <tbody>
+ <tr>
+ <th>Name</th>
+ <th>Size</th>
+ <th>Date</th>
+ <th>Action</th>
+ </tr>
+
+ <?php
+ foreach ($dataF['items'] as $api_detail){
+ if(isset($api_detail['id'])){
+ $api_detail['id']=$api_detail['id'];
+ }else{
+ $api_detail['id']="";
+ }
+ ?>
+ <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']; ?>)" 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']);
+ }
+ ?>
+ <div class="row">
+ <div class="col-md-10 col-md-offset1 dataTable1" style="display:none;">
+ <table class="table table-responsive table-striped" >
+ <thead>
+
+ </thead>
+ <tbody class="dataTable" id="div_<?php echo $api_detail['id']; ?>">
+
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td><?php echo($api_detail['size']); ?></td>
+ <td><?php echo($api_detail['date']); ?></td>
+ <?php if ($api_detail['type'] == "file") { ?>
+ <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 }
+ ?>
+
+
+
+ </tr>
+ <?php
+ }?>
+ </tbody>
+ </table>
+ <div class="footer">
+ <a class="btn btn-default" style="float: right;" href="payment.php">Done</a>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+ </div>
+ <div id="issueddocument" 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 ($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") { ?>
+ <?php } ?>
+ </tr>
+ <?php
+ endforeach;
+ ?>
+ </table>
+ <div class="footer">
+ <a href="payment.php"><input type="button" class="btn btn-primary" value="Done" /></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- /.container-fluid -->
+ </div>
+ </div>
+
+</body>
+<?php include 'footer.php' ?>
+<script>
+ function uriData(id) {
+ $(".dataTable").empty();
+ var id = id;
+ var accessTocken = "<?php echo $access_token; ?>";
+ var uri = "<?php echo $api_detail['uri']; ?>";
+ var uriDataHtml = "";
+ var fileOrFolder = "";
+ var accessToken = "<?php echo $access_token; ?>";
+ if (id != null) {
+ $.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
+ $(".dataTable1").show();
+ $.each( result.items, function( i, l ){
+ if(result.items[i].type=="file"){
+ fileOrFolder = "<i class='fa fa-file-o'></i> ";
+ }else{
+ fileOrFolder ="<i class='fa fa-folder-o'></i> ";
+ }
+ uriDataHtml += "<tr><th>"+fileOrFolder+result.items[i].name+"</th><th>"+result.items[i].type+"</th><th>"+result.items[i].date+"</th>\n\
+ <th>"+result.items[i].uri+"</th><th>\n\
+<a href='download.php?accessToken="+accessToken+"&uri="+result.items[i].uri+"&fileName="+result.items[i].name+"' download="+result.items[i].name+"> <i class='fa fa-download'> </i></a><th></tr>";
+ $("#div_"+id).html(uriDataHtml);
+ });
+ }, "json")
+ .fail(function () {
+ $(".dataTable1").hide();
+ alert("error");
+ });
+ }else{
+ alert('This is not a folder');
+ }
+ }
+
+ </script>
+</html>
\ No newline at end of file
--- 'a/footer.php'
+++ b/footer.php
@@ -48,7 +48,5 @@
<!-- Bootstrap Core JavaScript -->
+<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
-</body>
-
-</html>
\ No newline at end of file
--- 'a/header.php'
+++ b/header.php
@@ -1,22 +1,16 @@
<!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>
-
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
-
<!-- Custom CSS -->
<link href="css/style.css" rel="stylesheet">
-
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<style>
@@ -31,11 +25,8 @@
.navbar-nav>li>a:hover{ color: #000; background-color:#f0ede4;}
}
</style>
-
</head>
-
<body>
-
<!-- Navigation -->
<div class="container">
<div class="navbar-header">
@@ -51,21 +42,18 @@
<nav role="navigation" style="background-color: blueviolet; margin-bottom: 15px;height: 35px; position: relative;" >
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
-
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left ">
<li>
- <a href="index.php">Open Account</a>
+ <a href="signup.php">Open Account</a>
</li>
<li>
- <a target="_blank" href="loanapproval.php">Print Document</a>
+ <a href="loanapproval.php">Download</a>
</li>
<li>
- <a target="_blank" href="accountstatement.php">Upload Document</a>
+ <a href="upload.php">Upload</a>
</li>
-
-
</ul>
</div>
<!-- /.navbar-collapse -->
Binary files 'a/images/digibank.png' and b/images/digibank.png differ
--- 'a/index.php'
+++ b/index.php
@@ -28,16 +28,13 @@
</div>
<div class="form-group has-success" style="display:none">
<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/doc.php">
</div>
<div class="form-group has-success" style="display:none">
<label class="control-label" for="inputSuccess">State</label>
<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
@@ -1,347 +1,49 @@
-<?php
-include 'header.php';
-$code = $_GET['code'];
-session_start();
-$_SESSION["code"] = $code;
-$state = $_GET['state'];
-$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/loanapproval.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_TIMEOUT, 30); //timeout after 30 seconds
-curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
-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);
-//print_r($dataF);die();
-
-
-
-
-$headers = array(
- 'Authorization: Bearer ' . $access_token
- //'Authorization: Basic '. base64_encode("$username:$password")
-);
-$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued';
-$vhi = curl_init($urlissued);
-curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
-curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers);
-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);
-
-$fileContent = file_get_contents('C:/img/digi.png');
-$client_secret = 'DQ3pWgCtB0I3EhSrtTXU';
-$hk = hash_hmac('sha256', $fileContent, $client_secret, true);
-$hmac = base64_encode($hk);
-$ur = array('Content-Type: application/octet-stream', 'Authorization: Bearer ' . $access_token, 'path : cehck.png', 'hmac : ' . $hmac . '');
-$fileContent = file_get_contents('C:/img/digi.png');
-$ch = curl_init();
-curl_setopt($ch, CURLOPT_URL, "https://developers.digitallocker.gov.in/public/oauth2/1/file/upload");
-curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
-curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
-curl_setopt($ch, CURLOPT_POST, 1);
-curl_setopt($ch, CURLOPT_POSTFIELDS, $fileContent);
-curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
-curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
-curl_setopt($ch, CURLOPT_TCP_NODELAY, 1);
-curl_setopt($ch, CURLOPT_HTTPHEADER, $ur);
-$output = curl_exec($ch);
-?>
-
-<!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 class="row">
- <div class="col-md-1"> </div>
- <div class="col-md-10 outerborder">
- <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>
+<?php include 'header.php' ?>
+<div class="container">
+ <!-- Marketing Icons Section -->
+ <div class="row">
+ <div class="col-md-2">
</div>
-
- <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 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 class="col-md-8">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4><i class="fa fa-fw fa-link"></i>Download</h4>
</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>
- <?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']);
- }
- ?>
- <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>
- </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
- 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>
- </div>
- </section>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- /.container-fluid -->
- </div>
+ <div class="panel-body">
+ <p>DigiLocker is Government of India's cloud based platform for issuance and verification of documents & certificates digitally. </p>
+ <p>With DigiLocker, you can: </p>
+ <ul class="custom-bullet">
+ <li>Access your documents anytime, anywhere.</li>
+ <li>Share documents digitally for verification.</li>
+ <li>eSign documents (which is similar to self-attestation).</li>
+ </ul>
+ <form action = "https://developers.digitallocker.gov.in/public/oauth2/1/authorize" method = "GET" role="form">
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">Response Type</label>
+ <input type="text" class="form-control" name = "response_type" value="code">
</div>
- </div>
- </div>
- <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">
- <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 class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">Client ID</label>
+ <input type="text" class="form-control" name = "client_id" value="NIELN3M9">
</div>
- </div>
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">Redirect Uri</label>
+ <input type="text" class="form-control" name = "redirect_uri" value="http://localhost/digibank/doc.php">
+ </div>
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">State</label>
+ <input type="text" class="form-control" name = "state" value="123456">
+ </div>
+ <!--<a href="doc.php"><input type="button" class="btn btn-primary" value="Submit" /></a>-->
+ <button type="submit" class="btn btn-default">Access Digilocker</button>
+ </form>
</div>
-
</div>
</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");
- });
- }
- }
-
-
- </script>
- </body>
- <?php include 'footer.php' ?>
-</html>
\ No newline at end of file
+ <div class="col-md-2">
+ </div>
+ </div>
+ </div>
+ <!-- /.row -->
+</div>
+<?php include 'footer.php' ?>
\ No newline at end of file
--- /dev/null
+++ b/payment.php
@@ -0,0 +1,99 @@
+<?php include 'header.php' ?>
+<div class="container">
+
+ <div class="col-lg-2"></div>
+ <div class="col-lg-8">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4><i class="fa fa-fw fa-link"></i>Payment</h4>
+ </div>
+ <div class="panel-body">
+
+ <form role="form">
+
+ <script src='https://js.stripe.com/v2/' type='text/javascript'></script>
+ <fohttp://bootsnipp.com/snippets/featured/payment-receipt-bs3rm accept-charset="UTF-8" action="/" class="require-validation" data-cc-on-file="false" data-stripe-publishable-key="pk_bQQaTxnaZlzv4FnnuZ28LFHccVSaj" id="payment-form" method="post">
+ <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" />
+ <input name="_method" type="hidden" value="PUT" />
+ <input name="authenticity_token" type="hidden" value="qLZ9cScer7ZxqulsUWazw4x3cSEzv899SP/7ThPCOV8=" /></div>
+ <div class='form-row'>
+ <div class='col-xs-12 form-group required'>
+ <label class='control-label'>Name on Card</label>
+ <input class='form-control' value="Sanjay Singh" size='4' type='text'>
+ </div>
+ </div>
+ <div class='form-row'>
+ <div class='col-xs-12 form-group card required'>
+ <label class='control-label'>Card Number</label>
+ <input autocomplete='off' value="5196200080652015" class='form-control card-number' size='20' type='text'>
+ </div>
+ </div>
+ <div class='form-row'>
+ <div class='col-xs-4 form-group cvc required'>
+ <label class='control-label'>CVC</label>
+ <input autocomplete='off' value="708" class='form-control card-cvc' placeholder='ex. 2021' size='4' type='text'>
+ </div>
+ <div class='col-xs-4 form-group expiration required'>
+ <label class='control-label'>Expiration</label>
+ <input class='form-control card-expiry-month' placeholder='MM' value="02" size='2' type='text'>
+ </div>
+ <div class='col-xs-4 form-group expiration required'>
+ <label class='control-label'>Â </label>
+ <input class='form-control card-expiry-year' placeholder='YYYY' value="2017" size='4' type='text'>
+ </div>
+ </div>
+ <div class='form-row'>
+ <div class='col-md-12'>
+ <div class='form-control total btn btn-info'>
+ Ammount:
+ <span class='amount'>Rs.10</span>
+ </div>
+ </div>
+ </div>
+ <div class='form-row'>
+ <div class='col-md-12 form-group'>
+ <a href="loanapproval.php"><input type="button" class="btn btn-primary" value="Pay" /></a>
+ </div>
+ </div>
+ <div class='form-row'>
+ <div class='col-md-12 error form-group hide'>
+ <div class='alert-danger alert'>
+ Please correct the errors and try again.
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+
+
+
+
+
+ </form>
+
+
+
+ </div>
+ </div>
+
+ </div>
+ <div class="col-lg-2"></div>
+
+ <!-- /.row -->
+
+
+</div>
+<script src="js/jquery.js"></script>
+<script>
+ var dls_server = 'https://developers.digitallocker.gov.in/public/oauth2/1/authorize';
+ $('.dl_pop').click(function () {
+
+
+ CallDL('code', '7QAKRAJO', '123456', 'http://localhost/curlexample/response.php');
+ });
+ function CallDL(requester_id, hash_key, time_st, hostname) {
+ window.open(dls_server + "?response_type=" + requester_id + "&client_id=" + hash_key + "&state=" + time_st + "&redirect_uri=" + hostname, "_blank", "height=500,width=600,status=yes,toolbar=no,menubar=no,location=no");
+ }
+</script>
+
+<?php include 'footer.php' ?>
\ No newline at end of file
--- /dev/null
+++ b/signup.php
@@ -0,0 +1,31 @@
+<?php include 'header.php' ?>
+<div class="container">
+ <!-- Marketing Icons Section -->
+ <div class="row">
+ <div class="col-md-2">
+ </div>
+ <div class="col-md-8">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <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>
+ <p>With DigiLocker, you can: </p>
+ <ul class="custom-bullet">
+ <li>Access your documents anytime, anywhere.</li>
+ <li>Share documents digitally for verification.</li>
+ <li>eSign documents (which is similar to self-attestation).</li>
+ </ul>
+ <div class="my_content_container">
+ <a class="btn btn-default" style="float: left;" href="https://digilocker.gov.in/public/register">Signup</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-2">
+ </div>
+ </div>
+ <!-- /.row -->
+</div>
+<?php include 'footer.php' ?>
\ No newline at end of file
--- /dev/null
+++ b/upload.php
@@ -0,0 +1,50 @@
+<?php include 'header.php' ?>
+<div class="container">
+ <!-- Marketing Icons Section -->
+ <div class="row">
+ <div class="col-md-2">
+ </div>
+ <div class="col-md-8">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4><i class="fa fa-fw fa-link"></i>Upload</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>
+ <p>With DigiLocker, you can: </p>
+ <ul class="custom-bullet">
+ <li>Access your documents anytime, anywhere.</li>
+ <li>Share documents digitally for verification.</li>
+ <li>eSign documents (which is similar to self-attestation).</li>
+ </ul>
+ <form action = "https://developers.digitallocker.gov.in/public/oauth2/1/authorize" method = "GET" role="form">
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">Response Type</label>
+ <input type="text" class="form-control" name = "response_type" value="code">
+ </div>
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">Client ID</label>
+ <input type="text" class="form-control" name = "client_id" value="7QAKRAJO">
+ </div>
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">Redirect Uri</label>
+ <input type="text" class="form-control" name = "redirect_uri" value="http://localhost/digibank/uploaddoc.php">
+ </div>
+ <div class="form-group has-success" style="display:none">
+ <label class="control-label" for="inputSuccess">State</label>
+ <input type="text" class="form-control" name = "state" value="123456">
+ </div>
+ <!--- <a href="uploaddoc.php"><input type="button" class="btn btn-primary" value="Submit" /></a>-->
+ <button type="submit" class="btn btn-default">Access Digilocker</button>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-2">
+ </div>
+ </div>
+
+ </div>
+ <!-- /.row -->
+</div>
+<?php include 'footer.php' ?>
\ No newline at end of file
--- /dev/null
+++ b/uploaddoc.php
@@ -0,0 +1,114 @@
+<?php
+include 'header.php';
+$code = $_GET['code'];
+$state = $_GET['state'];
+$url = "https://developers.digitallocker.gov.in/public/oauth2/1/token";
+$post = array(
+ 'code' => $code,
+ 'grant_type' => 'authorization_code',
+ 'client_id' => '7QAKRAJO',
+ 'client_secret' => 'Pax7Rmv9uWo2KrNcXMtlDtsQN',
+ 'redirect_uri' => 'http://localhost/digibank/uploaddoc.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_TIMEOUT, 30); //timeout after 30 seconds
+curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers);
+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);
+
+
+
+$fileContent = file_get_contents('C:/img/digi.png');
+$client_secret = 'Pax7Rmv9uWo2KrNcXMtlDtsQN';
+$hk = hash_hmac('sha256', $fileContent, $client_secret, true);
+$hmac = base64_encode($hk);
+$ur = array('Content-Type: application/octet-stream', 'Authorization: Bearer ' . $access_token, 'path : cehck.png', 'hmac : ' . $hmac . '');
+$fileContent = file_get_contents('C:/img/digi.png');
+$ch = curl_init();
+curl_setopt($ch, CURLOPT_URL, "https://developers.digitallocker.gov.in/public/oauth2/1/file/upload");
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
+curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
+curl_setopt($ch, CURLOPT_POST, 1);
+curl_setopt($ch, CURLOPT_POSTFIELDS, $fileContent);
+curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
+curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+curl_setopt($ch, CURLOPT_TCP_NODELAY, 1);
+curl_setopt($ch, CURLOPT_HTTPHEADER, $ur);
+$output = curl_exec($ch);
+
+?>
+<div class="container">
+ <!-- Marketing Icons Section -->
+ <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="#">demobank.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="col-md-1">
+ </div>
+ </div>
+ <div class="row">
+
+ <div class="col-md-1">
+ </div>
+ <div class="col-md-2">
+ <input type="file" id="browse" name="fileupload"/>
+ </div>
+ <div class="col-md-8">
+ <a href="payment.php"><input type="button" class="btn btn-primary" value="Upload" /></a>
+ </div>
+ <div class="col-md-1">
+ </div>
+ </div>
+ <!-- /.row -->
+</div>
+<?php include 'footer.php' ?>
\ No newline at end of file