authpartner

Clone or download

Modified Files

M css/loading.gif
+- −-
Binary files 'a/css/loading.gif' and b/css/loading.gif differ
M css/styles.css
+20 −26
--- 'a/css/styles.css'
+++ b/css/styles.css
@@ -5,6 +5,7 @@
/*
* 1.1 Common styles
*/
+
::-moz-selection {
color: #fff;
background: #000000; }
@@ -781,14 +782,14 @@ select:not([multiple]) {
color: #FFFFFF;
/* border-color: #000000;*/ }
.btn.btn-blue-b {
- border: 2px solid #f15d35;
- background: #f15d35;
+ border: 2px solid blueviolet;
+ background: blueviolet;
font-family: "Karla", arial, sans-serif;
font-weight: normal;
color: #FFFFFF; }
.btn.btn-blue-b:hover {
- border: 2px solid #f15d35;
- background: #FFFFFF;
+ border: 2px solid cornflowerblue;
+ background: cornflowerblue;
color: #000000; }
.rev-btn {
@@ -1723,7 +1724,8 @@ body.opened-nav-animate.opened-nav .main
#footer-copyright {
padding: 30px 0 0 0 ;
color: #ffffff;
- text-align: center; }
+ text-align: center;
+ }
#footer-copyright .container .social-nav,
#footer-copyright .container .footer-copyright {
margin-bottom: 10px; }
@@ -4575,7 +4577,7 @@ table.compare tr td .add_to_cart_button
}
.box:hover {
- border:1px solid #f15d35;
+ border:1px solid blueviolet !important;
background: #fefefe;
}
@@ -5303,35 +5305,27 @@ h3.widget-title.side-nav {margin-top: 20
.no-padding {
padding: 0 !important; }
- /**
-#loading {
- content: '';
- display: block;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- position:absolute;
- width: 100%; height: 100%;
- background: url('loading.gif') no-repeat center center;
- margin:0 auto;
- z-index:10000000;
- /**opacity: 0.4; **/
-}
-**/
+
+
/* Paste this css to your style sheet file or under head tag */
/* This only works with JavaScript,
if it's not present, don't show loader */
-.no-js #loader { display: none; }
-.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.se-pre-con {
- display: none;
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
- opacity: 0.2;
+ opacity: 0.4;
background: url(loading.gif) center no-repeat transparent;
+}
+.btn-default:hover{
+ border:1px solid blueviolet;
+}
+.navbar-nav >
+ li > a:hover
+ {
+ background-color: green;
+ color: #000;
}
\ No newline at end of file
M doc.php
+172 −154
--- 'a/doc.php'
+++ b/doc.php
@@ -1,66 +1,55 @@
<?php
-include 'header.php';
include 'config.php';
$code = $_GET['code'];
$state = $_GET['state'];
+$url = $config['access_token_download'];
+$post = array(
+ 'code' => $code,
+ 'grant_type' => 'authorization_code',
+ 'client_id' => $config['client_id_download'],
+ 'client_secret' => $config['client_secret_download'],
+ 'redirect_uri' => $config['download_redirect_uri'],
+);
+$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_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]);
+
+if (isset($getToken->access_token)) {
+ $access_token = $getToken->access_token;
+}
+if (isset($access_token)) {
+ $doc = new DOMDocument('1.0');
+ $doc->formatOutput = true;
+ $doc = new DOMDocument('1.0');
+ $doc->formatOutput = true;
+ $root = $doc->createElement('maincontent');
+ $root = $doc->appendChild($root);
+ $title = $doc->createElement('code');
+ $title = $root->appendChild($title);
+ $enclosure = $doc->createAttribute('num');
+ $enclosure->value = $code;
+ $title->appendChild($enclosure);
+ $title = $doc->createElement('access_token');
+ $title = $root->appendChild($title);
+ $text = $doc->createTextNode($access_token);
+ $text = $title->appendChild($text);
+ $doc->save("xml/hashKey.xml");
+}
if (file_exists("xml/hashKey.xml")) {
$xml = (array) simplexml_load_file("xml/hashKey.xml") or die("Error: Cannot create object");
} else {
echo "xml/hashKey.xml file doesnot exists";
}
$access_token = $xml['access_token'];
-$cd = (array) $xml['code']['num'];
-if ($cd != $code) {
- $url = $config['access_token_download'];
- $post = array(
- 'code' => $code,
- 'grant_type' => 'authorization_code',
- 'client_id' => $config['client_id_download'],
- 'client_secret' => $config['client_secret_download'],
- 'redirect_uri' => $config['download_redirect_uri'],
- );
- $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]);
-
- if (isset($getToken->access_token)) {
- $access_token = $getToken->access_token;
- }
- if (isset($access_token)) {
- $doc = new DOMDocument('1.0');
- $doc->formatOutput = true;
- $doc = new DOMDocument('1.0');
- $doc->formatOutput = true;
- $root = $doc->createElement('maincontent');
- $root = $doc->appendChild($root);
- $title = $doc->createElement('code');
- $title = $root->appendChild($title);
- $enclosure = $doc->createAttribute('num');
- $enclosure->value = $code;
- $title->appendChild($enclosure);
- $title = $doc->createElement('access_token');
- $title = $root->appendChild($title);
- $text = $doc->createTextNode($access_token);
- $text = $title->appendChild($text);
- $doc->save("xml/hashKey.xml");
- }
- if (file_exists("xml/hashKey.xml")) {
- $xml = (array) simplexml_load_file("xml/hashKey.xml") or die("Error: Cannot create object");
- } else {
- echo "xml/hashKey.xml file doesnot exists";
- }
- $access_token = $xml['access_token'];
-}
$headers = array(
'Authorization: Bearer ' . $access_token
@@ -76,8 +65,29 @@ curl_setopt($vhf, CURLOPT_RETURNTRANSFER
$resFile = curl_exec($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
-$dataF = json_decode($resFileNew[1], TRUE);
-
+$uriRes = json_decode($resFileNew[1]);
+$uriDir = array();
+$uriFiles = array();
+foreach ($uriRes->items as $uriI) {
+ if ($uriI->type == "dir") {
+ $uriDir[] = (array) $uriI;
+ } else {
+ $uriFiles[] = (array) $uriI;
+ }
+}
+if ($uriDir == NULL || $uriFiles == NULL) {
+ $x = array_merge($uriDir, $uriFiles);
+ foreach ($x as $y) {
+ if ($y != NULL) {
+ $uriItems[] = $y;
+ }
+ }
+} else {
+ $uriItems = array_merge($uriDir, $uriFiles);
+}
+$uriItemsArray['items'] = $uriItems;
+$dataDirectory['directory'] = $uriRes->directory;
+$dataF = array_merge($dataDirectory, $uriItemsArray);
$headers = array(
'Authorization: Bearer ' . $access_token
@@ -95,6 +105,8 @@ $resissuedErr = curl_error($vhi);
curl_close($vhi);
$issuedNew = explode('¿', $resissued);
$dataI = json_decode($issuedNew[1], TRUE);
+
+include 'header.php';
?>
<div class="se-pre-con"></div>
<div id="wrapper">
@@ -113,7 +125,7 @@ $dataI = json_decode($issuedNew[1], TRUE
<section class="content">
<div class="row">
<div class="col-md-12">
- <div class="box box-body col-sm-12" >
+ <div class="box box-body" style="min-height: 385px;">
<div class="table-responsive">
<table class="table">
<thead style="color:blueviolet;">
@@ -123,49 +135,54 @@ $dataI = json_decode($issuedNew[1], TRUE
<td>Date</td>
<td id="tdUri" style="display:none;">URI</td>
</tr>
- <div><b onclick="uriData(null, null)" class="fa fa-home fa-2x" style="color:blueviolet;"></b><b id="parent" style="color:blueviolet;"></b></div>
+ <div>
+ <span onclick="uriData(null, null)" class="fa fa-home fa-2x" style="color:blueviolet; cursor:pointer; cursor:hand"></span>
+ <span id="parent" style="color:blueviolet; font-size: 16px; cursor:pointer; cursor:hand"></span>
+ </div>
</thead>
<tbody id="folderPath">
- <?php
- foreach ((array) ($dataF['items']) as $api_detail) {
- if (isset($api_detail['id'])) {
- $api_detail['id'] = $api_detail['id'];
- $api_detail['parent'] = $api_detail['parent'];
- } else {
- $api_detail['id'] = "";
- }
- ?>
- <tr>
- <?php
- if (($api_detail['type']) == "dir") {
- echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
- echo '<img src="images/folder.svg"></img>';
- echo($api_detail['name']);
- }
- if ($api_detail['type'] == "file") {
- echo "<td onclick='thisIsNotAFolder()'>";
- echo '<img src="images/file.svg"></img>';
- echo($api_detail['name']);
+ <?php
+ foreach ((array) ($dataF['items']) as $api_detail) {
+ if (isset($api_detail['id'])) {
+ $api_detail['id'] = $api_detail['id'];
+ $api_detail['parent'] = $api_detail['parent'];
+ } else {
+ $api_detail['id'] = "";
}
- echo "</td>";
- ?>
- <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>
-
- </td>
- <?php }
?>
- </tr>
- <?php }
- ?>
+ <tr>
+ <?php
+ if (($api_detail['type']) == "dir") {
+ echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
+ echo '<img src="images/folder.svg"></img>';
+ echo($api_detail['name']);
+ echo "</td>";
+ }
+ if ($api_detail['type'] == "file") {
+ echo "<td>";
+ echo '<img src="images/file.svg"></img>';
+ echo($api_detail['name']);
+ echo "</td>";
+ }
+ ?>
+ <td><?php echo($api_detail['size']); ?></td>
+ <td><?php echo($api_detail['date']); ?></td>
+ <?php if ($api_detail['type'] == "file") { ?>
+ <td>
+ <i onclick="download('<?php echo($api_detail['uri'] . ',' . $api_detail['name']); ?>')" class="fa fa-download"> </i>
+ </td>
+ <?php }else{
+ echo "<td></td>";
+ }
+ ?>
+ </tr>
+ <?php }
+ ?>
</tbody>
</table>
<div class="footer">
- <a class="btn btn-primary" style="float: right; margin-left: 10px; border-radius:5px;" href="payment.php">Complete Payment</a>
- <a class="btn btn-primary" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
+ <a class="btn btn-default" style="float: right; margin-left: 10px; border-radius:5px;" href="payment.php">Complete Payment</a>
+ <a class="btn btn-default" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
</div>
</div>
</div>
@@ -176,10 +193,9 @@ $dataI = json_decode($issuedNew[1], TRUE
<div id="issueddocument" class="tab-pane">
<section class="content">
<div class="row">
- <div class="col-md-12" style="height:315px;">
- <div class="box box-body col-sm-12">
- <div class="table-responsive">
- <table class="table">
+ <div class="col-md-12">
+ <div class="box box-body" style="min-height: 385px;">
+ <table class="table table-responsive">
<thead style="color:#1569C7">
<tr>
<td>Name</td>
@@ -200,7 +216,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>
+ <i onclick="download('<?php echo($issued_detail['uri'] . ',' . $issued_detail['name']); ?>')" class="fa fa-download"> </i>
</td>
<?php } ?>
</tr>
@@ -209,10 +225,9 @@ $dataI = json_decode($issuedNew[1], TRUE
?>
</table>
<div class="footer">
- <a class="btn btn-primary" style="float: right; margin-left: 10px; border-radius:5px;" href="payment.php">Complete Payment</a>
- <a class="btn btn-primary" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
+ <a class="btn btn-default" style="float: right; margin-left: 10px; border-radius:5px;" href="payment.php">Complete Payment</a>
+ <a class="btn btn-default" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
</div>
- </div>
</div>
</div>
</div>
@@ -230,60 +245,63 @@ $dataI = json_decode($issuedNew[1], TRUE
<?php include 'footer.php' ?>
<script src="js/modernizr.js"></script>
<script>
- function uriData(id, parent) {
- $("#folderPath").empty();
- $("#tdUri").show();
- var id = id;
- var accessTocken = "<?php echo $access_token; ?>";
- var uri = "<?php echo $api_detail['uri']; ?>";
- var uriDataHtml = "";
- var fileOrFolder = "";
- var onclickFnc = "";
- var dwnldTd = "";
- var accessToken = "<?php echo $access_token; ?>";
- var urifnc = "<?php echo $config['uri_path']; ?>";
- $.post(urifnc, {access_token: accessTocken, id: id}, function (result) {
- $.each(result.items, function (i, l) {
- if (result.items[i].type == "file") {
- 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>" + dwnldTd + "</tr>";
- $("#folderPath").html(uriDataHtml);
- });
- $("#parent").html("<b onclick=uriData(" + parent + ",null) >" + result.directory + "</b>");
- }, "json")
- .fail(function () {
- $("#folderPath").html("Some error found");
- });
- }
- function download(uris, filename) {
- $(".se-pre-con").show();
- var getdata = uris.split(",");
- var uri = getdata[0];
- var filename = getdata[1];
- var accessTocken = "<?php echo $access_token; ?>";
- var dlscfnc = "<?php echo $config['dlsc_path']; ?>"
- var arraydata = {uri: uri, accesstoken: accessTocken, filename: filename}
- $.ajax({
- url: dlscfnc + 'download.php',
- type: 'POST',
- data: arraydata
- }).done(function (response)
- {
- $(".se-pre-con").hide();
- var getdata = JSON.parse(response);
- console.log(getdata[1]);
- window.open("data:" + getdata[0] + ";base64," + getdata[1], '', 'height=650,width=840');
+function uriData(id, parent) {
+ $("#folderPath").empty();
+ $("#tdUri").show();
+ $(".se-pre-con").show();
+ var id = id;
+ var accessTocken = "<?php echo $access_token; ?>";
+ var uri = "<?php echo $api_detail['uri']; ?>";
+ var uriDataHtml = "";
+ var fileOrFolder = "";
+ var onclickFnc = "";
+ var dwnldTd = "";
+ var accessToken = "<?php echo $access_token; ?>";
+ var urifnc = "<?php echo $config['uri_path']; ?>";
+ $.post(urifnc, {access_token: accessTocken, id: id}, function (result) {
+ $.each(result.items, function (i, l) {
+ if (result.items[i].type == "file") {
+ console.log(result.items);
+ fileOrFolder = '<img src="images/file.svg"></img>';
+ onclickFnc = "onclick='thisIsNotAFolder()'";
+ dwnldTd = "<td><i onclick = 'download(\"" + result.items[i].uri + "\",\"" + result.items[i].name + "\");'; class='fa fa-download'> </i></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>" + dwnldTd + "</tr>";
+ $("#folderPath").html(uriDataHtml);
});
- }
- $(".se-pre-con").fadeOut("slow");
+ $("#parent").html("<span onclick=uriData(" + parent + ",null) >" + result.directory + "</span>");
+ $(".se-pre-con").hide();
+ }, "json")
+ .fail(function () {
+ $("#folderPath").html("No document available in this folder");
+ $(".se-pre-con").hide();
+ });
+}
+function download(uris, filename) {
+ $(".se-pre-con").show();
+ var getdata = uris.split(",");
+ var uri = getdata[0];
+ var filename = getdata[1];
+ var accessTocken = "<?php echo $access_token; ?>";
+ var dlscfnc = "<?php echo $config['dlsc_path']; ?>"
+ var arraydata = {uri: uri, accesstoken: accessTocken, filename: filename}
+ $.ajax({
+ url: dlscfnc + 'download.php',
+ type: 'POST',
+ data: arraydata
+ }).done(function (response)
+ {
+ $(".se-pre-con").hide();
+ var getdata = JSON.parse(response);
+ console.log(getdata[1]);
+ window.open("data:" + getdata[0] + ";base64," + getdata[1], '', 'height=650,width=840');
+ });
+}
+$(".se-pre-con").fadeOut("slow");
</script>
</html>
\ No newline at end of file
M footer.php
+0 −1
--- 'a/footer.php'
+++ b/footer.php
@@ -32,7 +32,6 @@
</footer>
</div>
<!-- /.container -->
-<!-- jQuery -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
M header.php
+11 −15
--- 'a/header.php'
+++ b/header.php
@@ -67,18 +67,18 @@
<img src="images/digitalindialogo.png"></a>
</div>
</div>
- <nav role="navigation" style="background-color: blueviolet; margin-bottom: 15px;height: 35px; position: relative;" >
+ <nav role="navigation" style="background-color: blueviolet; margin-bottom: 15px;height: 40px; position: relative;" >
<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" >
<ul class="nav navbar-nav navbar-left ">
- <li><a href="/digibank/index.php"><i class="fa fa-home fa-2x" aria-hidden="true"></i></a></li>
+ <li><a href= "<?php echo $config['dlsc_path']; ?>"><i class="fa fa-home fa-2x" aria-hidden="true"></i></a></li>
<li>
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">AADHAAR
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a >Aadhaar Demographic Update</a></li><hr>
<li><a>Aadhaar Mobile Update</a></li><hr>
<li><a>Best Finger Detection</a></li><hr>
@@ -90,12 +90,11 @@
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">AGRICULTURE
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" >Agricultural Machine Store</a></li><hr>
<li><a tabindex="-1" >Online Store</a></li><hr>
<li><a tabindex="-1" >Farmer Registration</a></li><hr>
<li><a tabindex="-1" >Marketplace</a></li>
-
</ul>
</div>
</li>
@@ -103,7 +102,7 @@
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">BANKING AND PENSION
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" >RAP Registration</a></li><hr>
<li><a tabindex="-1" >Basic Banking Course</a></li><hr>
<li><a tabindex="-1" >Life Certificate (LIC)</a></li><hr>
@@ -115,7 +114,7 @@
<li>
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">DIGILOCKER</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" href="https://digilocker.gov.in/public/register">Open Digilocker Account</a>
</li><hr>
<li>
@@ -136,7 +135,7 @@
<label class="control-label" for="inputSuccess">State</label>
<input type="text" class="form-control" name = "state" value="123456">
</div>
- <button type="submit" class="btn" >Download</button>
+ <button type="submit" class="btn">Download</button>
</form>
</span>
</li><hr>
@@ -169,12 +168,11 @@
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">ELECTION
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" >Punjab Election Services</a></li><hr>
<li><a tabindex="-1" >Uttarakhand Election Services</a></li><hr>
<li><a tabindex="-1" >Meghalaya Election Services</a></li><hr>
<li><a tabindex="-1" >Rajasthan Election Services</a></li>
-
</ul>
</div>
</li>
@@ -182,12 +180,11 @@
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">GOVERNMENT
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" >Birth and Death Application</a></li><hr>
<li><a tabindex="-1" >Forest Services</a></li><hr>
<li><a tabindex="-1" >Online FIR</a></li><hr>
<li><a tabindex="-1" >Ration Card Services</a></li>
-
</ul>
</div>
</li>
@@ -195,12 +192,11 @@
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">INSURANCE
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" >Pradhan Mantri Fasal Bima Yojna</a></li><hr>
<li><a tabindex="-1" >Farmer Package Policy</a></li><hr>
<li><a tabindex="-1" >Life Insurance</a></li><hr>
<li><a tabindex="-1" >Personal Accidental</a></li>
-
</ul>
</div>
</li>
@@ -208,7 +204,7 @@
<div class="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown">TRAVEL
</div>
- <ul class="dropdown-menu" style="margin-left: -8px;">
+ <ul class="dropdown-menu" style="margin-left: -5px;">
<li><a tabindex="-1" >Darshan Booking</a></li><hr>
<li><a tabindex="-1" >Bus Ticket Booking</a></li><hr>
<li><a tabindex="-1" >Flight Tickets</a></li><hr>
D images/loading.gif
+- −-
Binary files 'a/images/loading.gif' and /dev/null differ
D images/loading12.gif
+- −-
Binary files 'a/images/loading12.gif' and /dev/null differ
A images/loading3.gif
+- −-
Binary files /dev/null and b/images/loading3.gif differ
A images/loadinga.gif
+- −-
Binary files /dev/null and b/images/loadinga.gif differ
M payment.php
+1 −1
--- 'a/payment.php'
+++ b/payment.php
@@ -41,7 +41,7 @@
</div>
<div class='form-row'>
<div class='col-md-12'>
- <div class='form-control total btn btn-info'>
+ <div class='form-control total btn btn-default'>
Ammount:
<span class='amount'>Rs.10</span>
</div>
M uploaddoc.php
+132 −112
--- 'a/uploaddoc.php'
+++ b/uploaddoc.php
@@ -1,5 +1,4 @@
<?php
-include 'header.php';
include 'config.php';
$code = $_GET['code'];
$state = $_GET['state'];
@@ -16,7 +15,6 @@ curl_setopt($vh, CURLOPT_CUSTOMREQUEST,
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);
@@ -25,8 +23,6 @@ curl_close($vh);
$notgettingdata = explode('¿', $result);
$getToken = json_decode($notgettingdata[1]);
-
-
if (isset($getToken->access_token)) {
$access_token = $getToken->access_token;
}
@@ -69,8 +65,47 @@ curl_setopt($vhf, CURLOPT_RETURNTRANSFER
$resFile = curl_exec($vhf);
curl_close($vhf);
$resFileNew = explode('¿', $resFile);
-$dataF = json_decode($resFileNew[1], TRUE);
+$uriRes = json_decode($resFileNew[1]);
+$uriDir = array();
+$uriFiles = array();
+foreach ($uriRes->items as $uriI) {
+ if ($uriI->type == "dir") {
+ $uriDir[] = (array) $uriI;
+ } else {
+ $uriFiles[] = (array) $uriI;
+ }
+}
+if ($uriDir == NULL || $uriFiles == NULL) {
+ $x = array_merge($uriDir, $uriFiles);
+ foreach ($x as $y) {
+ if ($y != NULL) {
+ $uriItems[] = $y;
+ }
+ }
+} else {
+ $uriItems = array_merge($uriDir, $uriFiles);
+}
+$uriItemsArray['items'] = $uriItems;
+$dataDirectory['directory'] = $uriRes->directory;
+$dataF = array_merge($dataDirectory, $uriItemsArray);
+include 'header.php';
?>
+<style>
+ #fileUpload {
+ cursor: pointer;
+ cursor:hand;
+ margin: -14px -4px;
+ opacity: 0;
+ overflow: hidden;
+ position: relative;
+ z-index: 20;
+ }
+ .inputfile + label {
+ background-color: blueviolet;
+ color: #f1e5e6;
+ padding: 5px;
+ }
+</style>
<div class="se-pre-con"></div>
<div id="wrapper">
<div id="page-wrapper">
@@ -87,25 +122,27 @@ $dataF = json_decode($resFileNew[1], TRU
<section class="content">
<div class="row">
<div class="col-md-12">
- <div class="box box-body col-sm-12" >
- <div class="row" style="margin-top:10px;">
- <div class="col-md-6"><b onclick="uriData(null, null)" class="fa fa-home fa-2x" style="color:blueviolet;"></b><b id="parent" style="color:blueviolet;"></b>
+ <div class="box box-body" style="min-height: 385px;" >
+ <div class="row" style="margin-top:7px;">
+ <div class="col-md-3">
+ <span onclick="uriData(null, null)" class="fa fa-home fa-2x" style="color:blueviolet; cursor:pointer; cursor:hand;"></span>
+ <span id="parent" style="color:blueviolet; font-size: 16px; cursor:pointer; cursor:hand;"></span>
</div>
- <div class="col-md-6">
+ <div class="col-md-9 pull-left">
<form action="browse.php" method="post" enctype="multipart/form-data" >
- <div class="col-md-8" style="padding-left:130px;">
- <input type="text" value="<?php echo $access_token; ?>" name="accesstoken" class="hidden"/>
- <input type="text" value="<?php echo $code; ?>" name="code" class="hidden"/>
- <input type="text" value="<?php echo $state; ?>" name="state" class="hidden"/>
- <input type="text" name="filePath" class="hidden" value="" id="filePath"/>
- <input type="file" id="fileUpload" name="fileUpload"/>
- </div>
- <div class="col-md-4 " >
- <input type="submit" name="submit" class="btn btn-primary" value="Upload" style="height:23px; width:78px; padding:0px !important;">
- </div>
+ <input type="text" value="<?php echo $access_token; ?>" name="accesstoken" class="hidden"/>
+ <input type="text" value="<?php echo $code; ?>" name="code" class="hidden"/>
+ <input type="text" value="<?php echo $state; ?>" name="state" class="hidden"/>
+ <input type="text" name="filePath" class="hidden" value="" id="filePath"/>
+ <input type="file" class="inputfile" id="fileUpload" name="fileUpload"/>
+ <label for="fileUpload" style="border-radius:5px;">
+ <i class="fa fa-upload"></i>
+ <span>Upload Here</span>
+ </label>
</form>
</div>
</div>
+ <div class="table-responsive">
<table class="table">
<thead style="color:blueviolet;">
<tr>
@@ -116,47 +153,45 @@ $dataF = json_decode($resFileNew[1], TRU
</tr>
</thead>
<tbody id="folderPath">
- <?php
- foreach ((array) ($dataF['items']) as $api_detail) {
- if (isset($api_detail['id'])) {
- $api_detail['id'] = $api_detail['id'];
- $api_detail['parent'] = $api_detail['parent'];
- } else {
- $api_detail['id'] = "";
- }
- ?>
- <tr>
- <?php
- if (($api_detail['type']) == "dir") {
- echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
- echo '<img src="images/folder.svg"></img>';
- echo($api_detail['name']);
+ <?php
+ foreach ((array) ($dataF['items']) as $api_detail) {
+ if (isset($api_detail['id'])) {
+ $api_detail['id'] = $api_detail['id'];
+ $api_detail['parent'] = $api_detail['parent'];
+ } else {
+ $api_detail['id'] = "";
}
- if ($api_detail['type'] == "file") {
- echo "<td onclick='thisIsNotAFolder()'>";
- echo '<img src="images/file.svg"></img>';
- echo($api_detail['name']);
- }
- echo "</td>";
- ?>
- <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>
- </td>
- <?php }
?>
- </tr>
- <?php }
- ?>
+ <tr>
+ <?php
+ if (($api_detail['type']) == "dir") {
+ echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
+ echo '<img src="images/folder.svg"></img>';
+ echo($api_detail['name']);
+ }
+ if ($api_detail['type'] == "file") {
+ echo "<td>";
+ echo '<img src="images/file.svg"></img>';
+ echo($api_detail['name']);
+ }
+ echo "</td>";
+ ?>
+ <td><?php echo($api_detail['size']); ?></td>
+ <td><?php echo($api_detail['date']); ?></td>
+ <?php if ($api_detail['type'] == "file") { ?>
+ <?php }
+ ?>
+ </tr>
+ <?php }
+ ?>
</tbody>
</table>
<div class="footer">
- <a class="btn btn-primary" style="float: right; margin-left: 10px; border-radius:5px;" href="payment.php">Complete Payment</a>
- <a class="btn btn-primary" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
+ <a class="btn btn-default" style="float: right; margin-left: 10px; border-radius:5px;" href="payment.php">Complete Payment</a>
+ <a class="btn btn-default" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
</div>
</div>
+ </div>
</div>
</div>
</section>
@@ -171,66 +206,51 @@ $dataF = json_decode($resFileNew[1], TRU
<?php include 'footer.php' ?>
<script src="js/modernizr.js"></script>
<script>
-
+$(document).on('change', "#fileUpload", function () {
+ $("form").submit();
+});
+$("#filePath").val("");
+function uriData(id, parent) {
+
+ $("#folderPath").empty();
+ $("#fileUpload").val("");
$("#filePath").val("");
- function uriData(id, parent) {
- $("#folderPath").empty();
- $("#fileUpload").val("");
- $("#filePath").val("");
- $("#tdUri").show();
- var id = id;
- var accessTocken = "<?php echo $access_token; ?>";
- var uri = "<?php echo $api_detail['uri']; ?>";
- var uriDataHtml = "";
- var fileOrFolder = "";
- var onclickFnc = "";
- var dwnldTd = "";
- var accessToken = "<?php echo $access_token; ?>";
- var urifnc = "<?php echo $config['uri_path']; ?>";
- $.post(urifnc, {access_token: accessTocken, id: id}, function (result) {
- $.each(result.items, function (i, l) {
-
- if (result.items[i].type == "file") {
- 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>" + dwnldTd + "</tr>";
- $("#folderPath").html(uriDataHtml);
- });
- $("#filePath").val(result.directory);
- $("#parent").html("<b onclick=uriData(" + parent + ",null)>" + result.directory + "</b>");
- }, "json")
- .fail(function () {
- $("#folderPath").html("Some error found");
- });
- }
- function download(uris, filename) {
- $(".se-pre-con").show();
- var getdata = uris.split(",");
- var uri = getdata[0];
- var filename = getdata[1];
- var accessTocken = "<?php echo $access_token; ?>";
- var dlscfnc = "<?php echo $config['dlsc_path']; ?>"
- var arraydata = {uri: uri, accesstoken: accessTocken, filename: filename}
- $.ajax({
- url: dlscfnc+'download.php',
- type: 'POST',
- data: arraydata
- }).done(function (response)
- {
- $(".se-pre-con").hide();
- var getdata = JSON.parse(response);
- console.log(getdata[1]);
- window.open("data:" + getdata[0] + ";base64," + getdata[1], '', 'height=650,width=840');
+ $("#tdUri").show();
+ $(".se-pre-con").show();
+ var id = id;
+ var accessTocken = "<?php echo $access_token; ?>";
+ var uri = "<?php echo $api_detail['uri']; ?>";
+ var uriDataHtml = "";
+ var fileOrFolder = "";
+ var onclickFnc = "";
+ var dwnldTd = "";
+ var accessToken = "<?php echo $access_token; ?>";
+ var urifnc = "<?php echo $config['uri_path']; ?>";
+ $.post(urifnc, {access_token: accessTocken, id: id}, function (result) {
+ $.each(result.items, function (i, l) {
+ if (result.items[i].type == "file") {
+ 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 + "\");';></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>" + dwnldTd + "</tr>";
+ $("#folderPath").html(uriDataHtml);
});
- }
- $(".se-pre-con").fadeOut("slow");
+ $("#filePath").val(result.directory);
+ $("#parent").html("<span onclick=uriData(" + parent + ",null)>" + result.directory + "</span>");
+ $(".se-pre-con").hide();
+ }, "json")
+ .fail(function () {
+ $("#folderPath").html("No document available in this folder");
+ $(".se-pre-con").hide();
+ });
+}
+$(".se-pre-con").fadeOut("slow");
</script>
</html>
\ No newline at end of file
M uri.php
+34 −2
--- 'a/uri.php'
+++ b/uri.php
@@ -1,4 +1,5 @@
<?php
+
include 'config.php';
$id = $_POST['id'];
$headers = array(
@@ -16,5 +17,36 @@ curl_setopt($uri, CURLOPT_SSL_VERIFYHOST
curl_setopt($uri, CURLOPT_RETURNTRANSFER, true);
$uriResissued = curl_exec($uri);
curl_close($uri);
-print_r($uriResissued);
-?>
+$resFileNew = explode('¿', $uriResissued);
+$uriRes = json_decode($resFileNew[1]);
+$uriDir = array();
+$uriFiles = array();
+if ($uriRes->items == 'null') {
+ $uriItemsArray['items'] = "Data not available";
+ $dataDirectory['directory'] = $uriRes->directory;
+ $dataF = json_encode(array_merge($dataDirectory, $uriItemsArray));
+ print_r($dataF);
+ exit();
+}
+foreach ($uriRes->items as $uriI) {
+ if ($uriI->type == "dir") {
+ $uriDir[] = (array) $uriI;
+ } else {
+ $uriFiles[] = (array) $uriI;
+ }
+}
+if ($uriDir == NULL || $uriFiles == NULL) {
+ $x = array_merge($uriDir, $uriFiles);
+ foreach ($x as $y) {
+ if ($y != NULL) {
+ $uriItems[] = $y;
+ }
+ }
+} else {
+ $uriItems = array_merge($uriDir, $uriFiles);
+}
+$uriItemsArray['items'] = $uriItems;
+$dataDirectory['directory'] = $uriRes->directory;
+$dataF = json_encode(array_merge($dataDirectory, $uriItemsArray));
+print_r($dataF);
+?>
\ No newline at end of file