From: indresh singh bhadoria Date: Thu, 22 Jun 2017 14:52:59 +0530 Subject: sample api UI change --- sample api UI change --- --- 'a/css/styles.css' +++ b/css/styles.css @@ -5316,6 +5316,6 @@ if it's not present, don't show loader * 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 @@ -2,55 +2,54 @@ 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_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']; +$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']; $headers = array( 'Authorization: Bearer ' . $access_token @@ -115,7 +114,10 @@ include 'header.php'; Date URI -
+
+ + +
@@ -201,8 +203,8 @@ include 'header.php'; ?> --- 'a/uploaddoc.php' +++ b/uploaddoc.php @@ -15,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); @@ -76,7 +75,7 @@ include 'header.php'; #fileUpload { cursor: pointer; cursor:hand; - margin: -13px -3px; + margin: -14px -4px; opacity: 0; overflow: hidden; position: relative; @@ -106,9 +105,11 @@ include 'header.php';
-
+
+ +
-
+
@@ -169,8 +170,8 @@ include 'header.php';
--- 'a/xml/hashKey.xml' +++ b/xml/hashKey.xml @@ -1,5 +1,5 @@ - - 80ce0101529982b4c469de2f9536fc28866af189 + + f3d904f5c239c28b620e28dad6265fbad321b029 --- 'a/xml/hashhkey.xml' +++ b/xml/hashhkey.xml @@ -1,5 +1,5 @@ - - faeea1af87f855a0b94856b0e07ff0fa6e74de48 + + 86a8123cb941790bedf2c2f9d97d389375f5a420