authpartner

Clone or download

consume upload doument api

Modified Files

D fetchdoc.php
+0 −220
<?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);
$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>
<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>
</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 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" onclick="share_its('<?php echo $api_detail['uri']; ?>')"><?php } ?>
</tr>
<?php
endforeach;
?>
</table>
<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>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</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();
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 loanapproval.php
+202 −168
<?php
<?php
include 'header.php';
include 'header.php';
$code = $_GET['code'];
$code = $_GET['code'];
session_start();
session_start();
$_SESSION["code"]= $code;
$_SESSION["code"] = $code;
$state = $_GET['state'];
$state = $_GET['state'];
$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;
$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_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_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);
$headers = array(
$headers = array(
'Authorization: Bearer ' . $access_token
'Authorization: Bearer ' . $access_token
//'Authorization: Basic '. base64_encode("$username:$password")
//'Authorization: Basic '. base64_encode("$username:$password")
);
);
$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_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_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);
$headers = array(
$fileContent = file_get_contents('C:/img/digi.png');
'Authorization: Bearer ' . $access_token
$client_secret = 'DQ3pWgCtB0I3EhSrtTXU';
//'Authorization: Basic '. base64_encode("$username:$password")
$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');
$fileContent = file_get_contents('C:/img/digi.png');
$ch = curl_init();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://developers.digitallocker.gov.in/public/oauth2/1/file/upload" );
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_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_POST,1 );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$fileContent);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fileContent);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TCP_NODELAY, 1);
curl_setopt($ch, CURLOPT_TCP_NODELAY, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/octet-stream','Authorization : Bearer . $access_token','path : cehck.png','hmac : CiLhWvbL5EX1+lOTdZzCOgXUzZ+m5fvwxkiEms9Bsvo='));
curl_setopt($ch, CURLOPT_HTTPHEADER, $ur);
$output = curl_exec($ch);
$output = curl_exec($ch);
print_r($output);
die();
?>
?>
<!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>DigiLocker Service Center</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 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="#">digilockerservicecenter.gov.in.</a>
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>
<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>
</div>
<div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question0">
<div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question">
<button type="button" class="btn btn-primary">Proceed</button>
<button type="button" class="btn btn-primary">Proceed</button>
</div>
</div>
<div id="question0" class="panel-collapse collapse" style="height: 0px;">
<div id="question" class="panel-collapse collapse" style="height: 0px;">
<div class="panel-body">
<div class="panel-body">
<div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question0">
<div id="wrapper">
<button type="button" class="btn btn-primary">Share</button>
<div id="page-wrapper">
<div id="question0" class="panel-collapse collapse" style="height: 0px;">
<div class="container-fluid">
<div class="panel-body">
<!-- Page Heading -->
<div id="wrapper">
<div class="row">
<div id="page-wrapper">
<div class="col-lg-12">
<div class="container-fluid">
<div class="container">
<!-- Page Heading -->
<ul class="nav nav-tabs">
<div class="row">
<li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
<div class="col-lg-12">
<li><a data-toggle="tab" href="#issueddocument">Issued Document</a></li>
<div class="container">
</ul>
<ul class="nav nav-tabs">
<div class="tab-content">
<li class="active"><a data-toggle="tab" href="#uploadeddocument">Uploaded Document</a></li>
<div id="uploadeddocument" class="tab-pane fade in active">
<li><a data-toggle="tab" href="#issueddocument">Issued Document</a></li>
<section class="content">
</ul>
<div class="row">
<div class="tab-content">
<div class="col-md-12">
<div id="uploadeddocument" class="tab-pane fade in active">
<div class="box box-primary">
<section class="content">
<div class="box box-body col-sm-12">
<div class="row">
<div class="table-responsive">
<div class="col-md-12">
<table class="table">
<div class="box box-primary">
<tr>
<div class="box box-body col-sm-12">
<th>Name</th>
<div class="table-responsive">
<th>Size</th>
<table class="table">
<th>Date</th>
<tr>
</tr>
<th>Name</th>
<?php
<th>Size</th>
foreach ($dataF['items'] as $api_detail):
<th>Date</th>
?>
</tr>
<tr>
<?php /**
<a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&id=<?php echo($api_detail['id']); ?>"></a>
* * */ ?>
<td onclick="FolderItems()">
<?php
if ($api_detail['type'] == "dir") {
echo "<i class='fa fa-folder-o'></i> ";
echo($api_detail['name']);
} elseif ($api_detail['type'] == "file") {
echo "<i class='fa fa-file-o'></i> ";
echo($api_detail['name']);
}
?>
<div id="div1"></div></td>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<td><?php if ($api_detail['type'] == "file") { ?>
<input type="radio" id="getval" class="getval" name="grp"><?php } ?>
<?php
<?php
endforeach;
foreach ($dataF['items'] as $api_detail):
?>
?>
</table>
<tr>
<div class="footer">
<?php /**
<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>
<a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&id=<?php echo($api_detail['id']); ?>"></a>
* * */ ?>
<td onclick="FolderItems()">
<?php
if ($api_detail['type'] == "dir") {
echo "<i class='fa fa-folder-o'></i> ";
echo($api_detail['name']);
} elseif ($api_detail['type'] == "file") {
echo "<i class='fa fa-file-o'></i> ";
echo($api_detail['name']);
}
?>
<div id="div1"></div></td>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<td><?php if ($api_detail['type'] == "file") { ?>
<input type="radio" id="getval" class="getval" name="grp"><?php } ?>
<?php
endforeach;
?>
</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>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<div id="issueddocument" class="tab-pane fade">
</section>
<section class="content">
</div>
<div class="row">
<div id="issueddocument" class="tab-pane fade">
<div class="col-md-12">
<section class="content">
<div class="box box-primary">
<div class="row">
<div class="box box-body col-sm-12">
<div class="col-md-12">
<div class="table-responsive">
<div class="box box-primary">
<table class="table">
<div class="box box-body col-sm-12">
<tr>
<div class="table-responsive">
<th>Name</th>
<table class="table">
<th>Size</th>
<tr>
<th>Date</th>
<th>Name</th>
<th>Size</th>
<th>Date</th>
</tr>
</tr>
<?php
foreach ($dataI['items'] as $issued_detail):
?>
<tr><td>
<?php
<?php
echo "<i class='fa fa-file-o'></i> ";
foreach ($dataI['items'] as $issued_detail):
echo($issued_detail['name']);
?>
<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;
?>
?>
</td>
</table>
<td><?php echo($issued_detail['size']); ?></td>
<div class="footer">
<td><?php echo($issued_detail['date']); ?></td>
<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>
<td><?php if ($api_detail['type'] == "file") { ?>
</div>
<input type="radio" id="getval" class="getval" name="grp"><?php } ?>
</div>
</tr>
</div>
<?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>
</div>
</section>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
</div>
</div>
</div>
</div>
<div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-target="#question1">
<button type="button" class="btn btn-primary">Upload Document</button>
<div id="question1" class="panel-collapse collapse" style="height: 0px;">
<div class="panel-body">
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-10 outerborder">
<div class="panel panel-default">
<p class="para">
Important security information:
</p>
</div>
<div class="row">
<ul class="custom-bullet">
<li class="formrow">
Before logging in, please ensure that the URL address on the address bar of your internet browser starts with <a href="#">digilockerservicecenter.gov.in.</a>
</li>
<li class="formrow">
Never provide your User ID or password to any one on phone or in response to a mail.<a href="#">&nbsp;Report a suspicious mail</a>.
</li>
<li class="formrow">
Do not enter login or other sensitive information in any pop up window.
</li>
<li class="formrow">
Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, <a href="#">click here</a>.
</li>
</ul>
</div>
<button type="submit" class="btn btn-primary">Upload</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4715900-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
<script>
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event)
<script type="text/javascript">
{
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
$('#uri').val(event.data);
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
alert(event.data);
</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 share_its(seluri)
function uriData(id) {
{
var id = id;
var uridata = seluri;
var accessTocken = "<?php echo $access_token; ?>";
$("#button_share").val(uridata);
var uri = "<?php echo $api_detail['uri']; ?>";
alert("share successfully");
if (id != null) {
window.location = "http://localhost/digibank/index.php";
$.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
}
alert(result.items[0].name);
function sharedata1()
$("#div1").val(result.directory);
{
}, "json")
var uri = $("#button_share").val();
.fail(function () {
alert("error");
});
}
}
alert("share successfully");
function FolderItems() {
}
var accessTocken = "<?php echo $access_token; ?>";
//if (id != null) {
function uriData(id) {
var id = id;
var accessTocken = "<?php echo $access_token; ?>";
var uri = "<?php echo $api_detail['uri']; ?>";
if (id != null) {
$.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
alert(result.items[0].name);
$("#div1").val(result.directory);
}, "json")
.fail(function () {
alert("error");
});
}
}
function FolderItems() {
var accessTocken = "<?php echo $access_token; ?>";
//if (id != null) {
$.ajax({
$.ajax({
url: "https://developers.digitallocker.gov.in/public/oauth2/1/files/1307",
url: "https://developers.digitallocker.gov.in/public/oauth2/1/files/1307",
header:"Äuthorization: Bearer " +accessTocken,
header: "Äuthorization: Bearer " + accessTocken,
type: "GET",
type: "GET",
beforeSend: function(xhr){xhr.setRequestHeader('Äuthorization: Bearer',accessTocken);},
beforeSend: function (xhr) {
success: function() { alert('Success!' + authHeader); }
xhr.setRequestHeader('Äuthorization: Bearer', accessTocken);
});
},
success: function () {
alert('Success!' + authHeader);
}
});
}
</script>
}
</script>
</body>
</body>
<?php include 'footer.php' ?>
<?php include 'footer.php' ?>
</html>
</html>
D new.php
+0 −293
<?php
include 'loanapproval.php';
$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);
?>
<!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">
<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="#">&nbsp;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>
<div class="panel-heading accordion-toggle question-toggle collapsed" data-toggle="collapse" data-parent="#faqAccordion" data-target="#question0">
<button type="button" class="btn btn-primary">Proceed</button>
</div>
<div id="question0" class="panel-collapse collapse" style="height: 0px;">
<div class="panel-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>
<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>
</tr>
<?php
foreach ($dataF['items'] as $api_detail):
?>
<tr>
<?php /**
<a href="/digibank/uri.php?access_tocken=<?php echo $access_token; ?>&uri=<?php echo($api_detail['uri']); ?>&id=<?php echo($api_detail['id']); ?>"></a>
* * */ ?>
<td onclick="FolderItems()">
<?php
if ($api_detail['type'] == "dir") {
echo "<i class='fa fa-folder-o'></i> ";
echo($api_detail['name']);
} elseif ($api_detail['type'] == "file") {
echo "<i class='fa fa-file-o'></i> ";
echo($api_detail['name']);
}
?>
<div id="div1"></div></td>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<td><?php if ($api_detail['type'] == "file") { ?>
<input type="radio" id="getval" class="getval" name="grp"><?php } ?>
<?php
endforeach;
?>
</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>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4715900-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
<script>
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event)
{
$('#uri').val(event.data);
alert(event.data);
}
function share_its(seluri)
{
var uridata = seluri;
$("#button_share").val(uridata);
alert("share successfully");
window.location = "http://localhost/digibank/index.php";
}
function sharedata1()
{
var uri = $("#button_share").val();
alert("share successfully");
}
function uriData(id) {
var id = id;
var accessTocken = "<?php echo $access_token; ?>";
var uri = "<?php echo $api_detail['uri']; ?>";
if (id != null) {
$.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
alert(result.items[0].name);
$("#div1").val(result.directory);
}, "json")
.fail(function () {
alert("error");
});
}
}
function FolderItems() {
var accessTocken = "<?php echo $access_token; ?>";
//if (id != null) {
$.ajax({
url: "https://developers.digitallocker.gov.in/public/oauth2/1/files/1307",
header:"Äuthorization: Bearer " +accessTocken,
type: "GET",
beforeSend: function(xhr){xhr.setRequestHeader('Äuthorization: Bearer',accessTocken);},
success: function() { alert('Success!' + authHeader); }
});
}
</script>
</body>
<?php include 'footer.php' ?>
</html>