From: indresh singh bhadoria Date: Thu, 22 Jun 2017 14:55:32 +0530 Subject: Merge branch 'feature/dlscsampleapi' into develop --- Merge branch 'feature/dlscsampleapi' into develop --- --- 'a/css/styles.css' +++ b/css/styles.css @@ -5,6 +5,7 @@ /* * 1.1 Common styles */ + ::-moz-selection { color: #fff; background: #000000; } @@ -5303,35 +5304,18 @@ 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.1; background: url(loading.gif) center no-repeat transparent; } \ No newline at end of file --- 'a/doc.php' +++ b/doc.php @@ -1,66 +1,55 @@ $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 @@ -95,6 +84,8 @@ $resissuedErr = curl_error($vhi); curl_close($vhi); $issuedNew = explode('¿', $resissued); $dataI = json_decode($issuedNew[1], TRUE); + +include 'header.php'; ?>
@@ -123,49 +114,52 @@ $dataI = json_decode($issuedNew[1], TRUE Date URI -
+
+ + +
- - - '; - echo ''; - echo($api_detail['name']); - } - if ($api_detail['type'] == "file") { - echo ""; - echo ''; - echo($api_detail['name']); + "; ?> - - - - - + + '; + echo ''; + echo($api_detail['name']); + } + if ($api_detail['type'] == "file") { + echo ""; + echo ''; + echo($api_detail['name']); + } + echo ""; + ?> + + + + + - - - - + + + +
@@ -209,8 +203,8 @@ $dataI = json_decode($issuedNew[1], TRUE ?> @@ -230,60 +224,62 @@ $dataI = json_decode($issuedNew[1], TRUE \ No newline at end of file --- 'a/footer.php' +++ b/footer.php @@ -32,7 +32,6 @@ - --- 'a/header.php' +++ b/header.php @@ -78,7 +78,7 @@