authpartner
Clone or download
Modified Files
<div class="navbar navbar-inverse footer-setting" style="margin-bottom:0px;">
<div class="navbar navbar-inverse footer-setting" style="margin-bottom:0px;">
<footer id="footer-copyright" class="bg-wood">
<footer id="footer-copyright" class="bg-wood">
<div class="container">
<div class="container">
<div class="row">
<div class="row">
<div class="col-md-4">
<div class="col-md-4">
<p class="footer-text" >
<p class="footer-text" >
CSC E-Governance Services India Limited <br/>
CSC E-Governance Services India Limited <br/>
Department of Electronics & Information Technology<br/>
Department of Electronics & Information Technology<br/>
Ministry of Communications & IT<br/>
Ministry of Communications & IT<br/>
Government of India
Government of India
</p>
</p>
</div>
</div>
<div class="col-md-4">
<div class="col-md-4">
<p class="footer-text" >
<p class="footer-text" >
<!--<a href="tel:180030003468">Helpline: 1800 3000 3468</a> <br/>
<!--<a href="tel:180030003468">Helpline: 1800 3000 3468</a> <br/>
<a href="mailto:support@csc.gov.in">E-Mail: support@csc.gov.in</a><br/>-->
<a href="mailto:support@csc.gov.in">E-Mail: support@csc.gov.in</a><br/>-->
<span>Helpline: 1800 3000 3468</span><br/>
<span>Helpline: 1800 3000 3468</span><br/>
<span>E-Mail: support@csc.gov.in</span><br/>
<span>E-Mail: support@csc.gov.in</span><br/>
<a href="http://developer.csccloud.in/faq" target="_blank">FAQ</a>
<a href="http://developer.csccloud.in/faq" target="_blank">FAQ</a>
</p>
</p>
</div>
</div>
<div class="col-md-4">
<div class="col-md-4">
<ul class="social-nav">
<ul class="social-nav">
<li><a href="https://www.facebook.com/cscscheme/" target="_blank"><i class="fa fa-facebook fa-2x white"></i></a> </li>
<li><a href="https://www.facebook.com/cscscheme/" target="_blank"><i class="fa fa-facebook fa-2x white"></i></a> </li>
<li><a href="https://twitter.com/CSCegov" target="_blank"><i class="fa fa-twitter fa-2x sky"></i></a> </li>
<li><a href="https://twitter.com/CSCegov" target="_blank"><i class="fa fa-twitter fa-2x sky"></i></a> </li>
<li><a href="https://www.youtube.com/user/CSCSCHEME" target="_blank"><i class="fa fa-youtube-play fa-2x redwine"></i></a> </li>
<li><a href="https://www.youtube.com/user/CSCSCHEME" target="_blank"><i class="fa fa-youtube-play fa-2x redwine"></i></a> </li>
</ul>
</ul>
<div class="footer-copyright">Copyright 2017 CSC E-Governance Services India Limited.<br/> All rights reserved.</div>
<div class="footer-copyright">Copyright 2017 CSC E-Governance Services India Limited.<br/> All rights reserved.</div>
</div>
</div>
</div>
</div>
</div><!-- .container -->
</div><!-- .container -->
</footer>
</footer>
</div>
</div>
<script language="javascript" charset="UTF-8" type="text/javascript" src="js/stats.js"></script>
<!-- /.container -->
<!-- /.container -->
<!-- jQuery -->
<!-- jQuery -->
<!-- Bootstrap Core JavaScript -->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</body>
</html>
</html>
<?php
<?php
include 'header.php';
include 'header.php';
include 'config.php';
include 'config.php';
$code = $_GET['code'];
$code = $_GET['code'];
$state = $_GET['state'];
$state = $_GET['state'];
$url = $config['access_token_download'];
$url = $config['access_token_download'];
$post = array(
$post = array(
'code' => $code,
'code' => $code,
'grant_type' => 'authorization_code',
'grant_type' => 'authorization_code',
'client_id' => $config['client_id_upload'],
'client_id' => $config['client_id_upload'],
'client_secret' => $config['client_secret_upload'],
'client_secret' => $config['client_secret_upload'],
'redirect_uri' => $config['uploaddoc_redirect_uri'],
'redirect_uri' => $config['uploaddoc_redirect_uri'],
);
);
$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]);
if (isset($getToken->access_token)) {
if (isset($getToken->access_token)) {
$access_token = $getToken->access_token;
$access_token = $getToken->access_token;
}
}
if (isset($access_token)) {
if (isset($access_token)) {
$doc = new DOMDocument('1.0');
$doc = new DOMDocument('1.0');
$doc->formatOutput = true;
$doc->formatOutput = true;
$doc = new DOMDocument('1.0');
$doc = new DOMDocument('1.0');
$doc->formatOutput = true;
$doc->formatOutput = true;
$root = $doc->createElement('maincontent');
$root = $doc->createElement('maincontent');
$root = $doc->appendChild($root);
$root = $doc->appendChild($root);
$title = $doc->createElement('code');
$title = $doc->createElement('code');
$title = $root->appendChild($title);
$title = $root->appendChild($title);
$enclosure = $doc->createAttribute('num');
$enclosure = $doc->createAttribute('num');
$enclosure->value = $code;
$enclosure->value = $code;
$title->appendChild($enclosure);
$title->appendChild($enclosure);
$title = $doc->createElement('access_token');
$title = $doc->createElement('access_token');
$title = $root->appendChild($title);
$title = $root->appendChild($title);
$text = $doc->createTextNode($access_token);
$text = $doc->createTextNode($access_token);
$text = $title->appendChild($text);
$text = $title->appendChild($text);
$doc->save("xml/hashhkey.xml");
$doc->save("xml/hashhkey.xml");
}
}
if (file_exists("xml/hashhkey.xml")) {
if (file_exists("xml/hashhkey.xml")) {
$xml = (array) simplexml_load_file("xml/hashhkey.xml") or die("Error: Cannot create object");
$xml = (array) simplexml_load_file("xml/hashhkey.xml") or die("Error: Cannot create object");
} else {
} else {
echo "xml/hashhkey.xml file doesnot exists";
echo "xml/hashhkey.xml file doesnot exists";
}
}
$access_token = $xml['access_token'];
$access_token = $xml['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 = $config['file_uri'];
$urlFile = $config['file_uri'];
$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);
?>
?>
<div class="se-pre-con"></div>
<div class="se-pre-con"></div>
<div id="wrapper">
<div id="wrapper">
<div id="page-wrapper">
<div id="page-wrapper">
<div class="container-fluid">
<div class="container-fluid">
<!-- Page Heading -->
<!-- Page Heading -->
<div class="row">
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12">
<div class="container">
<div class="container">
<ul class="nav nav-tabs">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#uploadeddocument"><img src="images/uploaded_files.png">Uploaded Document</a></li>
<li class="active"><a data-toggle="tab" href="#uploadeddocument"><img src="images/uploaded_files.png">Uploaded Document</a></li>
</ul>
</ul>
<div class="tab-content">
<div class="tab-content">
<div id="uploadeddocument" class="tab-pane fade in active">
<div id="uploadeddocument" class="tab-pane fade in active">
<section class="content">
<section class="content">
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="box box-body col-sm-12" >
<div class="box box-body col-sm-12" >
<div class="row" style="margin-top:10px;">
<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="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>
</div>
<div class="col-md-6">
<div class="col-md-6">
<form action="browse.php" method="post" enctype="multipart/form-data" >
<form action="browse.php" method="post" enctype="multipart/form-data" >
<div class="col-md-8" style="padding-left:130px;">
<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 $access_token; ?>" name="accesstoken" class="hidden"/>
<input type="text" value="<?php echo $code; ?>" name="code" 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" value="<?php echo $state; ?>" name="state" class="hidden"/>
<input type="text" name="filePath" class="hidden" value="" id="filePath"/>
<input type="text" name="filePath" class="hidden" value="" id="filePath"/>
<input type="file" id="fileUpload" name="fileUpload"/>
<input type="file" id="fileUpload" name="fileUpload"/>
</div>
</div>
<div class="col-md-4 " >
<div class="col-md-4 " >
<input type="submit" name="submit" class="btn btn-primary" value="Upload" style="height:23px; width:78px; padding:0px !important;">
<input type="submit" name="submit" class="btn btn-primary" value="Upload" style="height:23px; width:78px; padding:0px !important;">
</div>
</div>
</form>
</form>
</div>
</div>
</div>
</div>
<table class="table">
<table class="table">
<thead style="color:blueviolet;">
<thead style="color:blueviolet;">
<tr>
<tr>
<td>Name</td>
<td>Name</td>
<td>Size</td>
<td>Size</td>
<td>Date</td>
<td>Date</td>
<td id="tdUri" style="display:none;">URI</td>
<td id="tdUri" style="display:none;">URI</td>
</tr>
</tr>
</thead>
</thead>
<tbody id="folderPath">
<tbody id="folderPath">
<div id="loading" style="height:42px; width:56px; margin:0 auto;"></div>
<?php
<?php
foreach ((array) ($dataF['items']) as $api_detail) {
foreach ((array) ($dataF['items']) as $api_detail) {
if (isset($api_detail['id'])) {
if (isset($api_detail['id'])) {
$api_detail['id'] = $api_detail['id'];
$api_detail['id'] = $api_detail['id'];
$api_detail['parent'] = $api_detail['parent'];
$api_detail['parent'] = $api_detail['parent'];
} else {
} else {
$api_detail['id'] = "";
$api_detail['id'] = "";
}
}
?>
?>
<tr>
<tr>
<?php
<?php
if (($api_detail['type']) == "dir") {
if (($api_detail['type']) == "dir") {
echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
echo '<td onclick="uriData(' . $api_detail['id'] . ',' . $api_detail['parent'] . ')">';
echo '<img src="images/folder.svg"></img>';
echo '<img src="images/folder.svg"></img>';
echo($api_detail['name']);
echo($api_detail['name']);
}
}
if ($api_detail['type'] == "file") {
if ($api_detail['type'] == "file") {
echo "<td onclick='thisIsNotAFolder()'>";
echo "<td onclick='thisIsNotAFolder()'>";
echo '<img src="images/file.svg"></img>';
echo '<img src="images/file.svg"></img>';
echo($api_detail['name']);
echo($api_detail['name']);
}
}
echo "</td>";
echo "</td>";
?>
?>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['size']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<td><?php echo($api_detail['date']); ?></td>
<?php if ($api_detail['type'] == "file") { ?>
<?php if ($api_detail['type'] == "file") { ?>
<td>
<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>
</td>
<?php }
<?php }
?>
?>
</tr>
</tr>
<?php }
<?php }
?>
?>
</tbody>
</tbody>
</table>
</table>
<div class="footer">
<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; 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-primary" style="float: right; border-radius:5px;" href="index.php">Cancel</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php' ?>
<?php include 'footer.php' ?>
<script src="js/modernizr.js"></script>
<script src="js/modernizr.js"></script>
<script>
<script>
$("#filePath").val("");
$("#filePath").val("");
function uriData(id, parent) {
function uriData(id, parent) {
$("#folderPath").empty();
$("#folderPath").empty();
$("#fileUpload").val("");
$("#fileUpload").val("");
$("#filePath").val("");
$("#filePath").val("");
$("#tdUri").show();
$("#tdUri").show();
var id = id;
var id = id;
var accessTocken = "<?php echo $access_token; ?>";
var accessTocken = "<?php echo $access_token; ?>";
var uri = "<?php echo $api_detail['uri']; ?>";
var uri = "<?php echo $api_detail['uri']; ?>";
var uriDataHtml = "";
var uriDataHtml = "";
var fileOrFolder = "";
var fileOrFolder = "";
var onclickFnc = "";
var onclickFnc = "";
var dwnldTd = "";
var dwnldTd = "";
var accessToken = "<?php echo $access_token; ?>";
var accessToken = "<?php echo $access_token; ?>";
var urifnc = "<?php echo $config['uri_path']; ?>";
var urifnc = "<?php echo $config['uri_path']; ?>";
$.post(urifnc, {access_token: accessTocken, id: id}, function (result) {
$.post(urifnc, {access_token: accessTocken, id: id}, function (result) {
$.each(result.items, function (i, l) {
$.each(result.items, function (i, l) {
if (result.items[i].type == "file") {
if (result.items[i].type == "file") {
console.log(result.items);
console.log(result.items);
fileOrFolder = '<img src="images/file.svg"></img>';
fileOrFolder = '<img src="images/file.svg"></img>';
onclickFnc = "onclick='thisIsNotAFolder()'";
onclickFnc = "onclick='thisIsNotAFolder()'";
dwnldTd = "<td onclick = 'download(\"" + result.items[i].uri + "\",\"" + result.items[i].name + "\");';><button><i class='fa fa-download'> </i></button></td>";
dwnldTd = "<td onclick = 'download(\"" + result.items[i].uri + "\",\"" + result.items[i].name + "\");';><button><i class='fa fa-download'> </i></button></td>";
} else {
} else {
fileOrFolder = '<img src="images/folder.svg"></img>';
fileOrFolder = '<img src="images/folder.svg"></img>';
onclickFnc = "onclick='uriData(" + result.items[i].id + "," + result.items[i].parent + ")'";
onclickFnc = "onclick='uriData(" + result.items[i].id + "," + result.items[i].parent + ")'";
dwnldTd = "<td></td>";
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\
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>";
<td>" + result.items[i].uri + "</td>" + dwnldTd + "</tr>";
$("#folderPath").html(uriDataHtml);
$("#folderPath").html(uriDataHtml);
});
});
$("#filePath").val(result.directory);
$("#filePath").val(result.directory);
$("#parent").html("<b onclick=uriData(" + parent + ",null)>" + result.directory + "</b>");
$("#parent").html("<b onclick=uriData(" + parent + ",null)>" + result.directory + "</b>");
}, "json")
}, "json")
.fail(function () {
.fail(function () {
$("#folderPath").html("Some error found");
$("#folderPath").html("Some error found");
});
});
}
}
function download(uris, filename) {
function download(uris, filename) {
$(".se-pre-con").show();
$(".se-pre-con").show();
var getdata = uris.split(",");
var getdata = uris.split(",");
var uri = getdata[0];
var uri = getdata[0];
var filename = getdata[1];
var filename = getdata[1];
var accessTocken = "<?php echo $access_token; ?>";
var accessTocken = "<?php echo $access_token; ?>";
var dlscfnc = "<?php echo $config['dlsc_path']; ?>"
var dlscfnc = "<?php echo $config['dlsc_path']; ?>"
var arraydata = {uri: uri, accesstoken: accessTocken, filename: filename}
var arraydata = {uri: uri, accesstoken: accessTocken, filename: filename}
$.ajax({
$.ajax({
url: dlscfnc+'download.php',
url: dlscfnc+'download.php',
type: 'POST',
type: 'POST',
data: arraydata
data: arraydata
}).done(function (response)
}).done(function (response)
{
{
$(".se-pre-con").hide();
$(".se-pre-con").hide();
var getdata = JSON.parse(response);
var getdata = JSON.parse(response);
console.log(getdata[1]);
console.log(getdata[1]);
window.open("data:" + getdata[0] + ";base64," + getdata[1], '', 'height=650,width=840');
window.open("data:" + getdata[0] + ";base64," + getdata[1], '', 'height=650,width=840');
});
});
}
}
$(".se-pre-con").fadeOut("slow");
$(".se-pre-con").fadeOut("slow");
</script>
</script>
</html>
</html>
<?xml version="1.0"?>
<?xml version="1.0"?>
<maincontent>
<maincontent>
<code num="86d1240af7f0816e4dfeb2994acbb270b2c876b6"/>
<code num="87740a85ef36450078a3913c5b7c559e90a162aa"/>
<access_token>ecc8194e07960dbd199f74d7641b2c11b01936f7</access_token>
<access_token>2813ae7a6aea48560c7e3e504a97f7c6fb13cb79</access_token>
</maincontent>
</maincontent>
<?xml version="1.0"?>
<?xml version="1.0"?>
<maincontent>
<maincontent>
<code num="57b391369c3e734e784968246f4b52e77b437441"/>
<code num="b4bdc5351ca2e962b08964c9a53584f6d454aff8"/>
<access_token>3f02489d72bf503e1624b892d918519ff92a0e72</access_token>
<access_token>abf2947b5c5a3661374234c2450079c2a0232b41</access_token>
</maincontent>
</maincontent>