authpartner

Clone or download

folder navigation complete, access token store in xml file and justyfy header footer

Modified Files

M browse.php
+5 −6
--- 'a/browse.php'
+++ b/browse.php
@@ -1,15 +1,15 @@
<?php
$fileBrowse = $_FILES['fileUpload']['tmp_name'];
-$filePath = $_POST['filePath']."/".$_FILES['fileUpload']['name'];
-$access_token = $_POST['accessToken'];
+$filePath = $_POST['filePath'] . "/" . $_FILES['fileUpload']['name'];
+$access_token = $_POST['accesstoken'];
$fileContent = file_get_contents($fileBrowse);
$finfo = new \finfo(FILEINFO_MIME_TYPE);
$mime = $finfo->buffer($fileContent);
-$client_secret = 'Pax7Rmv9uWo2KrNcXMtlDtsQN';
+$client_secret = 'DQ3pWgCtB0I3EhSrtTXU';
$hk = hash_hmac('sha256', $fileContent, $client_secret, true);
$hmac = base64_encode($hk);
-$ur = array('Content-Type: '.$mime, 'Authorization: Bearer ' . $access_token, 'path : '.$filePath, 'hmac : ' . $hmac . '');
+$ur = array('Content-Type: ' . $mime, 'Authorization: Bearer ' . $access_token, 'path : ' . $filePath, 'hmac : ' . $hmac . '');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://developers.digitallocker.gov.in/public/oauth2/1/file/upload");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -23,6 +23,5 @@ curl_setopt($ch, CURLOPT_TCP_NODELAY, 1)
curl_setopt($ch, CURLOPT_HTTPHEADER, $ur);
$output = curl_exec($ch);
curl_close($ch);
-echo "Your file has been uploaded";
-
+echo "Your File has been uploaded please <a href=/digibank/index.php>Click Here</a> to go main page";
?>
\ No newline at end of file
M doc.php
+29 −38
--- 'a/doc.php'
+++ b/doc.php
@@ -104,8 +104,8 @@ $dataI = json_decode($issuedNew[1], TRUE
<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 class="active"><a data-toggle="tab" href="#uploadeddocument"><img src="images/uploaded_files.png">Uploaded Document</a></li>
+ <li><a data-toggle="tab" href="#issueddocument" ><img src="images/issuedfile.png">Issued Document</a></li>
</ul>
<div class="tab-content">
<div id="uploadeddocument" class="tab-pane fade in active">
@@ -113,7 +113,7 @@ $dataI = json_decode($issuedNew[1], TRUE
<div class="row">
<div class="col-md-12">
<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">
<table class="table">
<thead>
@@ -123,7 +123,7 @@ $dataI = json_decode($issuedNew[1], TRUE
<th>Date</th>
<th>URI</th>
</tr>
- <div><b onclick="uriData(null, null)" >HOME</b><b id="parent"></b></div>
+ <div><b onclick="uriData(null, null)" class="fa fa-home fa-2x" style="color:#3701ff"></b><b id="parent"></b></div>
</thead>
<tbody id="folderPath">
@@ -154,11 +154,11 @@ $dataI = json_decode($issuedNew[1], TRUE
?>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
-
+
<?php if ($api_detail['type'] == "file") { ?>
<td>
- <button onclick="download('<?php echo($api_detail['uri'].','.$api_detail['name']); ?>')"><i class="fa fa-download"> </i></button>
-
+ <button onclick="download('<?php echo($api_detail['uri'] . ',' . $api_detail['name']); ?>')"><i class="fa fa-download"> </i></button>
+
</td>
<?php }
?>
@@ -204,7 +204,7 @@ $dataI = json_decode($issuedNew[1], TRUE
<td><?php echo($issued_detail['date']); ?></td>
<td><?php if ($api_detail['type'] == "file") { ?>
<td>
- <button onclick="download('<?php echo($issued_detail['uri'].','.$issued_detail['name']); ?>')"><i class="fa fa-download"> </i></button>
+ <button onclick="download('<?php echo($issued_detail['uri'] . ',' . $issued_detail['name']); ?>')"><i class="fa fa-download"> </i></button>
</td>
<?php } ?>
</tr>
@@ -242,6 +242,7 @@ $dataI = json_decode($issuedNew[1], TRUE
var uriDataHtml = "";
var fileOrFolder = "";
var onclickFnc = "";
+ var dwnldTd = "";
var accessToken = "<?php echo $access_token; ?>";
$.post("http://localhost/digibank/uri.php", {access_token: accessTocken, id: id}, function (result) {
$.each(result.items, function (i, l) {
@@ -249,13 +250,14 @@ $dataI = json_decode($issuedNew[1], TRUE
console.log(result.items);
fileOrFolder = '<img src="images/file.svg"></img>';
onclickFnc = "onclick='thisIsNotAFolder()'";
+ dwnldTd = "<td onclick = 'download(\"" + result.items[i].uri + "\",\"" + result.items[i].name + "\");';><button><i class='fa fa-download'> </i></button></td>";
} else {
fileOrFolder = '<img src="images/folder.svg"></img>';
onclickFnc = "onclick='uriData(" + result.items[i].id + "," + result.items[i].parent + ")'";
+ dwnldTd = "<td></td>";
}
uriDataHtml += "<tr><td " + onclickFnc + ">" + fileOrFolder + result.items[i].name + "</td><td>" + result.items[i].size + "</td><td>" + result.items[i].date + "</td>\n\
- <td>" + result.items[i].uri + "</td><td>\n\
-<a href='download.php?accessToken=" + accessToken + "&uri=" + result.items[i].uri + "&fileName=" + result.items[i].name + "' > <i class='fa fa-download'> </i></a><th></tr>";
+ <td>" + result.items[i].uri + "</td>" + dwnldTd + "</tr>";
$("#folderPath").html(uriDataHtml);
});
//$("#parent").empty();
@@ -264,35 +266,24 @@ $dataI = json_decode($issuedNew[1], TRUE
.fail(function () {
$("#folderPath").html("Some error found");
});
-
}
- function download(uris,filename){
- // alert(uris);
- var getdata = uris.split(",");
-
- var uri = getdata[0];
- var filename = getdata[1];
-
- var accessTocken = "<?php echo $access_token; ?>";
- //alert(accessTocken);
- var arraydata = {uri:uri,accesstoken:accessTocken,filename:filename}
-
- $.ajax({
- url:'/digibank/download.php' ,
- type: 'POST' ,
-
- data: arraydata
-
- }).done(function (response)
- {
-
- var getdata = JSON.parse(response);
- console.log(getdata[1]);
- window.open("data:"+getdata[0]+";base64,"+getdata[1],'','height=650,width=840'); //var myObj = JSON.parse(response);
-
-
- });
+ function download(uris, filename) {
+ var getdata = uris.split(",");
+ var uri = getdata[0];
+ var filename = getdata[1];
+ var accessTocken = "<?php echo $access_token; ?>";
+ var arraydata = {uri: uri, accesstoken: accessTocken, filename: filename}
+ $.ajax({
+ url: '/digibank/download.php',
+ type: 'POST',
+ data: arraydata
+ }).done(function (response)
+ {
+ var getdata = JSON.parse(response);
+ console.log(getdata[1]);
+ window.open("data:" + getdata[0] + ";base64," + getdata[1], '', 'height=650,width=840');
+ });
}
-
+
</script>
</html>
\ No newline at end of file
M footer.php
+44 −44
--- 'a/footer.php'
+++ b/footer.php
@@ -1,52 +1,52 @@
<div class="navbar navbar-inverse footer-setting" style="margin-bottom:0px;">
- <footer class="container border-box">
- <div class="row">
-
- <div class="col-lg-4">
- <div class="col-lg-12">
- <h6 class="footer-hed">Customer Service</h6>
- <p class="pull-left"><a target="_blank" href="http://www.digibank.gov.in/complaints/customer-care.html" title="Safe Services">Customer Care Numbers</a></p>
- </div>
- <div class="col-lg-12"></div>
- <div class="col-lg-12">
- <h6 class="footer-hed">Customer Service</h6>
- <p class="pull-left"><a target="_blank" href="http://www.digilockerservicecenter.gov.in/online-safe-service/index.html" title="Safe Services" >Safe Service</a> | <a target="_blank" href="http://www.digibank.gov.in/go-green/Index.html" title="Go Green">Go Green</a></p>
- </div>
- </div>
- <div class="col-lg-4">
- <h6 class="text-center footer-hed">Useful Link</h6>
+ <footer class="container border-box">
+ <div class="row">
+
+ <div class="col-lg-4">
+ <div class="col-lg-12">
+ <h6 class="footer-hed">Customer Service</h6>
+ <p class="pull-left"><a target="_blank" href="http://www.digibank.gov.in/complaints/customer-care.html" title="Safe Services">Customer Care Numbers</a></p>
+ </div>
+ <div class="col-lg-12"></div>
+ <div class="col-lg-12" style="margin-top:-15px;">
+ <h6 class="footer-hed">Customer Service</h6>
+ <p class="pull-left"><a target="_blank" href="http://www.digilockerservicecenter.gov.in/online-safe-service/index.html" title="Safe Services" >Safe Service</a> | <a target="_blank" href="http://www.digibank.gov.in/go-green/Index.html" title="Go Green">Go Green</a></p>
+ </div>
+ </div>
+ <div class="col-lg-4">
+ <h6 class="text-center footer-hed">Useful Link</h6>
<p class="text-center" style="text-align:justify"><a target="_blank" href="https://Digibank.co.in/BANKAWAY?Action.RetriveUserId.Acct.first=Y&amp;folderId=AL&amp;AppSignonBankId=ICI&amp;AppType=corporate&amp;abrdPrf=N" title="Get User ID">Get User ID</a> | <a target="_blank" href="http://www.digilockerservice.gov.in/Personal-service/insta-/insta-index.html" title="Ways To Bank">Ways To services</a> | <a target="_blank" href="http://www.digilockerservice.gov.in/Personal-Service/insta-/internet-service/index.html" title="Online Service">Online Service</a> |
-<a target="_blank" href="http://www.digibank.gov.in/Personal-Banking/account-deposit/savings-account/index.html" title="">Online Stydy</a> | <a target="_blank" href="http://www.digilockerservice.gov.in/Personal-swrvices/investments/ppf/ppf.html" title="online learning">Online Learning activity</a> | <a target="_blank" href="http://www.digibank.gov.in/financial-tools/index.html" title="home services">Home Services</a> |
-<a target="_blank" href="http://www.digibank.gov.in/form-center.html" title="Form Center">Form Center</a> | <a target="_blank" href="http://www.digibank.gov.in/Personal-Banking/investments/Digi-ser vices-pure-gold/gold-rate.html" title="Gold Rate Today">Online Services Today</a> | <a target="_blank" href="http://www.digibank.gov.in/media-gallery/media-gallery.html" title="Media Gallery">Media Gallery</a> | <a target="_blank" href="http://www.digibank.gov.in/Personal-Banking/credit-card/credit-cards.html" title="Credit Card">Online payment services</a>
+ <a target="_blank" href="http://www.digibank.gov.in/Personal-Banking/account-deposit/savings-account/index.html" title="">Online Stydy</a> | <a target="_blank" href="http://www.digilockerservice.gov.in/Personal-swrvices/investments/ppf/ppf.html" title="online learning">Online Learning activity</a> | <a target="_blank" href="http://www.digibank.gov.in/financial-tools/index.html" title="home services">Home Services</a> |
+ <a target="_blank" href="http://www.digibank.gov.in/form-center.html" title="Form Center">Form Center</a> | <a target="_blank" href="http://www.digibank.gov.in/Personal-Banking/investments/Digi-ser vices-pure-gold/gold-rate.html" title="Gold Rate Today">Online Services Today</a> | <a target="_blank" href="http://www.digibank.gov.in/media-gallery/media-gallery.html" title="Media Gallery">Media Gallery</a> | <a target="_blank" href="http://www.digibank.gov.in/Personal-Banking/credit-card/credit-cards.html" title="Credit Card">Online payment services</a>
</p>
- </div>
- <div class="col-lg-4">
- <h6 class="pull-right footer-hed" style="padding-right:10px;">Visit Other Service Centers Sites</h6>
+ </div>
+ <div class="col-lg-4">
+ <h6 class="pull-right footer-hed" style="padding-right:10px;">Visit Other Service Centers Sites</h6>
<p class="pull-right" style="text-align: justify"><a target="_blank" href="https://www.csc.gov.in//" title="CSC Service Center">Common Service Center</a> | <a target="_blank" href="https://digilocker.gov.in//" title="DigiLocker">DigiLocker</a> |
-<a target="_blank" href="https://www.Digilombard.com/" title="DIGI Lombard General Insurance">DIGI Lombard General Insurance</a> |
-<a target="_blank" href="http://www.iseconline.com/" title="DIGI Securities">DIGI Securities</a> |
-<a target="_blank" href="http://www.Digiprulife.com/public/default.htm" title="DIGI Prudential Life Insurance">DIGI Prudential Life Insurance</a> |
-<a target="_blank" href="http://www.Digipruamc.com/Homepage.aspx" title="DIGI Prudential AMC">DIGI Prudential AMC</a> |
-<a target="_blank" href="http://www.Digiventure.com/" title="DIGI Venture">DIGI Venture</a> | <a target="_blank" href="http://content.Digidirect.com/newsitecontent/Home/Home.asp" title="DIGI Direct">DLSC Direct</a> |
-<a target="_blank" href="http://dishafc.org/" title="DISHA Financial Counselling">DISHA Financial Counselling</a> |
-<a target="_blank" href="http://www.Digihfc.com/" title="DIGI Home Finance">DIGI Home Finance</a></p>
- </div>
- </div>
-
- <div class="col-lg-12">
- <p class="text-justify">
- <a target="_blank" href="http://www.digibank.gov.in/terms-condition/terms-and-conditions.html" title="Terms &amp; Conditions">Terms &amp; Conditions</a> | <a target="_blank" href="http://www.digibank.gov.in/interest-rates.html" title="Interest Rates">Interest Rates</a> | <a target="_blank" href="http://www.digibank.gov.in/service-charges/service-charges.html" title="Service Charges &amp; Fees">Service Charges &amp; Fees</a> | <a target="_blank" href="http://www.digibank.gov.in/do-not-call.html" title="Do Not Call Registry">Do Not Call Registry</a> | <a target="_blank" href="http://www.digibank.gov.in/disclaimer.html" title="Disclaimer">Disclaimer</a> | <a target="_blank" href="http://www.digibank.gov.in/multilingual-disclaimer.html" title="Multilingual Disclaimer">Multilingual Disclaimer</a> | <a target="_blank" href="http://www.digibank.gov.in/code-of-commitment.html" title="Code of Commitment">Code of Commitment</a> | <a target="_blank" href="http://www.digibank.gov.in/aboutus/pdf/code_of_business_conduct_ethics.pdf" title="Group Code of Business Conduct and Ethics">Group Code of Business Conduct and Ethics</a> | <a target="_blank" href="http://www.digibank.gov.in/aboutus/invest-disclosure.html" title="Basel II Disclosures">Basel II Disclosures</a> | <a target="_blank" href="http://www.digibank.gov.in/notice-board.html" title="Notice Board">Notice Board</a> | <a target="_blank" href="http://www.digibank.gov.in/unparliamentary-language-by-customers.html" title="Use of Unparliamentary Language by Customers">Use of Unparliamentary Language by Customers</a> | <a target="_blank" href="http://www.digibank.gov.in/privacy.html" title="Privacy">Privacy</a> | <a target="_blank" href="http://www.digibank.gov.in/usa-patriot-act-certification.html" title="USA Patriot Act Certification">USA Patriot Act Certification</a> </p>
-
- </div>
- </footer>
+ <a target="_blank" href="https://www.Digilombard.com/" title="DIGI Lombard General Insurance">DIGI Lombard General Insurance</a> |
+ <a target="_blank" href="http://www.iseconline.com/" title="DIGI Securities">DIGI Securities</a> |
+ <a target="_blank" href="http://www.Digiprulife.com/public/default.htm" title="DIGI Prudential Life Insurance">DIGI Prudential Life Insurance</a> |
+ <a target="_blank" href="http://www.Digipruamc.com/Homepage.aspx" title="DIGI Prudential AMC">DIGI Prudential AMC</a> |
+ <a target="_blank" href="http://www.Digiventure.com/" title="DIGI Venture">DIGI Venture</a> | <a target="_blank" href="http://content.Digidirect.com/newsitecontent/Home/Home.asp" title="DIGI Direct">DLSC Direct</a> |
+ <a target="_blank" href="http://dishafc.org/" title="DISHA Financial Counselling">DISHA Financial Counselling</a> |
+ <a target="_blank" href="http://www.Digihfc.com/" title="DIGI Home Finance">DigiLocker Home Services</a></p>
+ </div>
+ </div>
+
+ <div class="col-lg-12">
+ <p class="text-justify" style="margin-top:-20px;">
+ <a target="_blank" href="http://www.digibank.gov.in/terms-condition/terms-and-conditions.html" title="Terms &amp; Conditions">Terms &amp; Conditions</a> | <a target="_blank" href="http://www.digibank.gov.in/interest-rates.html" title="Interest Rates">Interest Rates</a> | <a target="_blank" href="http://www.digibank.gov.in/service-charges/service-charges.html" title="Service Charges &amp; Fees">Service Charges &amp; Fees</a> | <a target="_blank" href="http://www.digibank.gov.in/do-not-call.html" title="Do Not Call Registry">Do Not Call Registry</a> | <a target="_blank" href="http://www.digibank.gov.in/disclaimer.html" title="Disclaimer">Disclaimer</a> | <a target="_blank" href="http://www.digibank.gov.in/multilingual-disclaimer.html" title="Multilingual Disclaimer">Multilingual Disclaimer</a> | <a target="_blank" href="http://www.digibank.gov.in/code-of-commitment.html" title="Code of Commitment">Code of Commitment</a> | <a target="_blank" href="http://www.digibank.gov.in/aboutus/pdf/code_of_business_conduct_ethics.pdf" title="Group Code of Business Conduct and Ethics">Group Code of Business Conduct and Ethics</a> | <a target="_blank" href="http://www.digibank.gov.in/aboutus/invest-disclosure.html" title="Basel II Disclosures">Basel II Disclosures</a> | <a target="_blank" href="http://www.digibank.gov.in/notice-board.html" title="Notice Board">Notice Board</a> | <a target="_blank" href="http://www.digibank.gov.in/unparliamentary-language-by-customers.html" title="Use of Unparliamentary Language by Customers">Use of Unparliamentary Language by Customers</a> | <a target="_blank" href="http://www.digibank.gov.in/privacy.html" title="Privacy">Privacy</a> | <a target="_blank" href="http://www.digibank.gov.in/usa-patriot-act-certification.html" title="USA Patriot Act Certification">USA Patriot Act Certification</a> </p>
+
+ </div>
+ </footer>
+
+</div>
- </div>
-
<script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
- <!-- /.container -->
- <!-- jQuery -->
-
+<!-- /.container -->
+<!-- jQuery -->
+
- <!-- Bootstrap Core JavaScript -->
+<!-- Bootstrap Core JavaScript -->
<script src="js/jquery.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
+<script src="js/bootstrap.min.js"></script>
M header.php
+4 −3
--- 'a/header.php'
+++ b/header.php
@@ -24,11 +24,12 @@
}
.navbar-nav>li>a:hover{ color: #000; background-color:#f0ede4;}
.row{margin-top: -10px;margin-bottom: 15px;}
+
}
</style>
</head>
<body>
- <!-- Navigation -->
+ <!-- Navigation -->
<div class="row">
<div class="col-md-6">
<a class="navbar-brand pull-left" href="index.html"><img src="images/digibank.png"></a>
@@ -39,10 +40,10 @@
</div>
</div>
<nav role="navigation" style="background-color: blueviolet; margin-bottom: 15px;height: 35px; position: relative;" >
- <div class="container">
+ <div class="container" style="padding-left:0px !important;">
<!-- 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">
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1" >
<ul class="nav navbar-nav navbar-left ">
<li>
<a href="signup.php">Open DigiLocker Account</a>
A images/app_1.svg
+44 −0
--- /dev/null
+++ b/images/app_1.svg
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve" width="512px" height="512px">
+<g>
+ <path d="M12.5,24h25c0.552,0,1-0.448,1-1s-0.448-1-1-1h-25c-0.552,0-1,0.448-1,1S11.948,24,12.5,24z" fill="#000333"/>
+ <path d="M12.5,16h10c0.552,0,1-0.448,1-1s-0.448-1-1-1h-10c-0.552,0-1,0.448-1,1S11.948,16,12.5,16z" fill="#000333"/>
+ <path d="M12.5,32h25c0.552,0,1-0.448,1-1s-0.448-1-1-1h-25c-0.552,0-1,0.448-1,1S11.948,32,12.5,32z" fill="#000333"/>
+ <path d="M29.5,38h-17c-0.552,0-1,0.448-1,1s0.448,1,1,1h17c0.552,0,1-0.448,1-1S30.052,38,29.5,38z" fill="#000333"/>
+ <path d="M26.5,46h-14c-0.552,0-1,0.448-1,1s0.448,1,1,1h14c0.552,0,1-0.448,1-1S27.052,46,26.5,46z" fill="#000333"/>
+ <path d="M48.5,34.363V14.586L33.914,0H1.5v60h44c7.168,0,13-5.832,13-13C58.5,40.866,54.224,35.723,48.5,34.363z M34.5,3.414 L45.086,14H34.5V3.414z M38.578,58H3.5V2h29v14h14v18.044C46.158,34.015,45.826,34,45.5,34c-7.168,0-13,5.832-13,13 c0,0.399,0.025,0.792,0.06,1.183c0.008,0.091,0.017,0.181,0.027,0.272c0.043,0.382,0.098,0.76,0.173,1.131 c0.009,0.044,0.021,0.087,0.03,0.131c0.072,0.338,0.159,0.67,0.257,0.998c0.025,0.082,0.048,0.165,0.074,0.246 c0.113,0.352,0.239,0.698,0.38,1.037c0.027,0.064,0.057,0.126,0.084,0.189c0.129,0.296,0.269,0.585,0.419,0.869 c0.036,0.068,0.07,0.137,0.107,0.205c0.175,0.317,0.363,0.626,0.564,0.927c0.046,0.069,0.094,0.135,0.141,0.203 c0.183,0.264,0.375,0.521,0.576,0.77c0.038,0.047,0.074,0.096,0.113,0.143c0.231,0.278,0.475,0.544,0.728,0.801 c0.062,0.063,0.125,0.124,0.189,0.186c0.245,0.239,0.496,0.471,0.759,0.69c0.023,0.02,0.045,0.041,0.069,0.06 c0.282,0.232,0.577,0.449,0.879,0.658c0.073,0.051,0.147,0.1,0.221,0.149C38.427,57.897,38.501,57.951,38.578,58z M45.5,58 c-6.065,0-11-4.935-11-11s4.935-11,11-11c0.312,0,0.62,0.021,0.926,0.047c0.291,0.028,0.592,0.066,0.909,0.119l0.443,0.074 C52.753,37.293,56.5,41.716,56.5,47C56.5,53.065,51.565,58,45.5,58z" fill="#000333"/>
+ <path d="M50.679,41.429l-5.596,8.04l-3.949-3.242c-0.426-0.351-1.057-0.288-1.407,0.139c-0.351,0.427-0.289,1.057,0.139,1.407 l4.786,3.929c0.18,0.147,0.404,0.227,0.634,0.227c0.045,0,0.091-0.003,0.137-0.009c0.276-0.039,0.524-0.19,0.684-0.419l6.214-8.929 c0.315-0.453,0.204-1.077-0.25-1.392C51.617,40.863,50.995,40.976,50.679,41.429z" fill="#000333"/>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>
A images/issuedfile.png
+- −-
Binary files /dev/null and b/images/issuedfile.png differ
M payment.php
+10 −2
--- 'a/payment.php'
+++ b/payment.php
@@ -49,9 +49,11 @@
</div>
<div class='form-row'>
<div class='col-md-12 form-group' style="text-align: center;">
- <a class="btn btn-default"style="margin-top: 10px;" href="index.php">Pay</a>
+ <a class="btn btn-default"style="margin-top: 10px;" href="index.php">Pay</a><br><br>
+ <button onclick="myFunction()" class="btn btn-default">Print this page</button>
</div>
</div>
+
<div class='form-row'>
<div class='col-md-12 error form-group hide'>
<div class='alert-danger alert'>
@@ -67,4 +69,10 @@
<div class="col-lg-2"></div>
<!-- /.row -->
<script src="js/jquery.js"></script>
-<?php include 'footer.php' ?>
\ No newline at end of file
+
+<?php include 'footer.php' ?>
+<script>
+ function myFunction() {
+ window.print();
+ }
+</script>
M signup.php
+1 −1
--- 'a/signup.php'
+++ b/signup.php
@@ -7,7 +7,7 @@
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">
- <h4><i class="fa fa-fw fa-link"></i>Open DigiLocker Account</h4>
+ <h4><i class="fa fa-external-link"></i>Open DigiLocker Account</h4>
</div>
<div class="panel-body">
<p>DigiLocker is Government of India's cloud based platform for issuance and verification of documents &amp; certificates digitally. </p>
M upload.php
+3 −20
--- 'a/upload.php'
+++ b/upload.php
@@ -17,24 +17,7 @@
<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>
- <button type="submit" class="btn btn-default">Access Digilocker</button>
+ <a class="btn btn-default" href="uploaddoc.php">Access Digilocker</a>
</form>
</div>
</div>
@@ -42,7 +25,7 @@
<div class="col-md-2">
</div>
</div>
- </div>
- <!-- /.row -->
+</div>
+<!-- /.row -->
</div>
<?php include 'footer.php' ?>
\ No newline at end of file
M uploaddoc.php
+8 −30
--- 'a/uploaddoc.php'
+++ b/uploaddoc.php
@@ -1,7 +1,5 @@
<?php
include 'header.php';
-$code = $_GET['code'];
-$state = $_GET['state'];
if (file_exists("xml/hashKey.xml")) {
$xml = (array) simplexml_load_file("xml/hashKey.xml") or die("Error: Cannot create object");
} else {
@@ -9,30 +7,8 @@ if (file_exists("xml/hashKey.xml")) {
}
$access_token = $xml['access_token'];
$cd = (array) $xml['code']['num'];
-if ($cd != $code) {
-$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;
-}
+
+$access_token = $xml['access_token'];
$headers = array(
'Authorization: Bearer ' . $access_token
@@ -84,10 +60,12 @@ $dataF = json_decode($resFileNew[1], TRU
<div class="row">
<div class="col-md-1">
</div>
- <div class="col-md-2">
+ <div class="col-md-8">
<form action="browse.php" method="post" enctype="multipart/form-data">
- <input type="text" value="<?php echo $access_token; ?>" name="accessToken" class="hidden"/>
+ <input type="text" value="<?php echo $access_token; ?>" name="accesstoken" class="hidden"/>
+
<input type="file" id="fileUpload" name="fileUpload"/>
+ <br/>
<select name="filePath">
<?php
$itm = "";
@@ -97,10 +75,10 @@ $dataF = json_decode($resFileNew[1], TRU
$itm .= "<option value='" . $items['name'] . "'>" . $items['name'] . "</option>";
}
}
- echo "<option value='' selected='selected'>Save here</option>" . $itm;
+ echo "<option value='' selected='selected'>-Select-</option>" . $itm;
?>
</select>
- <button type="submit" class="btn btn-default">Upload</button>
+ <input type="submit" name="submit" class="btn btn-default"style="margin-left:10px;" value="Upload" />
</form>
</div>
<div class="col-md-1">
M xml/hashKey.xml
+2 −2
--- 'a/xml/hashKey.xml'
+++ b/xml/hashKey.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<maincontent>
- <code num="1118bc17074eb5d780f23ef98bcce2603a01dad0"/>
- <access_token>8ca24d585fedcfc3771361fd10603968acb13ac5</access_token>
+ <code num="2d5be450f80301fbf3d0e02911d0646b8c0d26fb"/>
+ <access_token>0ae5fcbb90a134e6137ba940d2b7283ca605a6c4</access_token>
</maincontent>