From: indresh singh bhadoria Date: Mon, 19 Jun 2017 16:08:06 +0530 Subject: sample api UI completed --- sample api UI completed --- --- /dev/null +++ b/.gitignore @@ -0,0 +1,71 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +##Codignitor## +############## +application/cache/* +!application/cache/index.html +!application/cache/.htaccess + +application/logs/* +!application/logs/index.html +!application/logs/.htaccess + +user_guide_src/build/* +user_guide_src/cilexer/build/* +user_guide_src/cilexer/dist/* +user_guide_src/cilexer/pycilexer.egg-info/* +/vendor/ + +# IDE Files +#------------------------- +/nbproject/ +.idea/* + +## Sublime Text cache files +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache +*.sublime-workspace +*.sublime-project + +# Custom # +###################### +.DS_Store + +config.php \ No newline at end of file --- 'a/browse.php' +++ b/browse.php @@ -1,20 +1,17 @@ buffer($fileContent); - -$client_secret = 'Pax7Rmv9uWo2KrNcXMtlDtsQN'; +$client_secret = $config['client_secret_upload']; $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 . ''); - $ch = curl_init(); -curl_setopt($ch, CURLOPT_URL, "https://developers.digitallocker.gov.in/public/oauth2/1/file/upload"); +curl_setopt($ch, CURLOPT_URL, $config['upload_file']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_NOSIGNAL, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); @@ -28,5 +25,5 @@ $output = curl_exec($ch); curl_close($ch); header("Location: uploaddoc.php?code=".$_POST['code']."&state=".$_POST['state']); /* Redirect browser */ exit(); -//echo "Your File has been uploaded please Click Here to go main page"; + ?> \ No newline at end of file Binary files /dev/null and b/css/loading.gif differ --- 'a/css/styles.css' +++ b/css/styles.css @@ -95,30 +95,19 @@ p { .dropdown-menu>li>a{ color:#fff; } -.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{/*color:#262626;text-decoration:none;*/background-color:#fff !important; margin-left:15px; padding-left:8px !important;} -/*.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{ - color:#fff;text-decoration:none;background-color:#337ab7;outline:0} -.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{ - color:#777} -.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{ - text-decoration:none; - cursor:not-allowed; - background-color:transparent; - background-image:none; - - filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)} -.open>.dropdown-menu{display:block}.open>a{outline:0} -.dropdown-menu-right{right:0;left:auto} -.dropdown-menu-left{right:auto;left:0} -.dropdown-header{ - display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap} -.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990} -.pull-right>.dropdown-menu{right:0;left:auto} -.dropup .caret,.navbar-fixed-bottom .dropdown .caret{ - content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9} -.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{ - top:auto;bottom:100%;margin-bottom:2px} */ -/* indresh end style*/ +.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{ background-color:#fff !important; margin-left:15px; padding-left:8px !important;} + + + +.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th { + border-top: 1px solid #ddd; + line-height: 1.42857; + padding: 8px; + vertical-align: top; + cursor:hand; + cursor:pointer; +} + /* * 1.2. Helper CSS */ @@ -5313,4 +5302,17 @@ h3.widget-title.side-nav {margin-top: 20 padding-bottom: 0 !important; } .no-padding { - padding: 0 !important; } \ No newline at end of file + 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; **/ +} \ No newline at end of file --- 'a/doc.php' +++ b/doc.php @@ -1,5 +1,6 @@ $code, 'grant_type' => 'authorization_code', - 'client_id' => 'NIELN3M9', - 'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU', - 'redirect_uri' => 'http://localhost/digibank/doc.php', + '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"); @@ -65,7 +66,7 @@ $headers = array( 'Authorization: Bearer ' . $access_token //'Authorization: Basic '. base64_encode("$username:$password") ); -$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'; +$urlFile = $config['file_uri']; $vhf = curl_init($urlFile); curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers); @@ -82,7 +83,7 @@ $headers = array( 'Authorization: Bearer ' . $access_token //'Authorization: Basic '. base64_encode("$username:$password") ); -$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued'; +$urlissued = $config['issued_doc_url']; $vhi = curl_init($urlissued); curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers); @@ -96,7 +97,8 @@ $issuedNew = explode('¿', $resissued); $dataI = json_decode($issuedNew[1], TRUE); ?> -
+
+
@@ -108,6 +110,7 @@ $dataI = json_decode($issuedNew[1], TRUE
  • Issued Document
  • +
    @@ -124,42 +127,44 @@ $dataI = json_decode($issuedNew[1], TRUE
    - - +
    + + + '; + echo ''; + echo($api_detail['name']); + } + if ($api_detail['type'] == "file") { + echo ""; + echo ''; + echo($api_detail['name']); } + echo ""; ?> - - '; - echo ''; - echo($api_detail['name']); - } - if ($api_detail['type'] == "file") { - echo ""; - echo ''; - echo($api_detail['name']); - } - echo ""; - ?> - - - - - + - - - - + + + + + + + + + @@ -117,18 +119,18 @@
  • Open Digilocker Account

  • -
    +

  • - +