Browse Source

Journal API integrated

Md Mozahidur Rahman 1 year ago
parent
commit
324e4304d4
1 changed files with 18 additions and 65 deletions
  1. 18 65
      page-template/page-journal.php

+ 18 - 65
page-template/page-journal.php

@@ -27,11 +27,9 @@ get_header(); ?>
         CURLOPT_CUSTOMREQUEST => 'POST',
         CURLOPT_POSTFIELDS => '{
             "employee_id" : " ",
-            "year" : "2022",
+            "year" : " ",
             "auth_token" : "' . $auth_token . '",
-            "user_login_id" : "' . $client_id . '",
-            "page" : 1,
-            "limit" : 3
+            "user_login_id" : "' . $client_id . '"
         }',
         CURLOPT_HTTPHEADER => array(
             'Content-Type: application/json'
@@ -78,7 +76,6 @@ get_header(); ?>
 
         </div>
 
-
         <div class="row container">
             <div class="col-md-3 col-sidebar">
 
@@ -98,85 +95,41 @@ get_header(); ?>
             </div>
             <div class="col-md-9 col-content">
 
-
                 <div class="sections">
-
-
                     <section id="conference-papers-section" class="container generic-content" data-theme="light">
-
                         <div class="generic-para shadowed">
                             <h3>Journal Papers</h3>
-
-                            <div class="paper-details">
-                                <span class="paper-year">2015</span>
-
-                                <h2 class="paper-title">Target Coverage Through Distributed Clustering in Directional Sensor Networks</h2>
-                                <p class="paper-tags">
-                                    <span class="tag">Wireless Communications</span>
-                                </p>
-
-                                <p class="paper-event">
-                                    <i>Publication: </i> Eurasip Journal on Wireless Communications and Networking, April 2015 (in Press). SCIE,
-                                </p>
-
-                                <p class="paper-contributors">
-                                    <i>Authors: </i> Md. Mofijul Islam, Md. Ahasanuzzaman, Md. Abdur Razzaque, M. M. Hassan, Abdulhameed Alelaiwi, Yang Xiang
-                                </p>
-
-                            </div>
-
                             <?php
                             foreach ($response as $item) {
-                                // Access individual elements of each item in the array
-                                $year = $item['Year'];
-                                $journalList = $item['JournalList'];
-
-                                // Process or output the values as needed
-                                echo "Year: $year\n";
-                                echo '<br>';
+                                // Access individual elements of each response
+                                echo "<div class='paper-details'>";
+                                echo "<span class='paper-year'>{$item['Year']}</span>";
 
                                 // Iterate over the JournalList array within each item
-                                foreach ($journalList as $journal) {
+                                foreach ($item['JournalList'] as $journal) {
                                     // Access individual elements of each journal
-                                    $paperTitle = $journal['PaperTitle'];
-                                    $JournalLink = $journal['JournalLink'];
-                                    $Keyword = $journal['Keyword'];
-                                    $journalTitle = $journal['JournalTitle'];
-
-                                    // Process or output the values as needed
-                                    echo "Paper Title: $paperTitle\n";
-                                    echo "Journal Link: $JournalLink\n";
-                                    echo "Keywords: $Keyword\n";
-                                    echo "Journal Title: $journalTitle\n";
-                                    echo '<br>';
-
+                                    echo "<a href='{$journal['JournalLink']}'>";
+                                    echo "<h2 class='paper-title'>{$journal['PaperTitle']}</h2>";
+                                    echo "</a>";
+                                    echo "<p class='paper-tags'>";
+                                    echo "<span class='tag'>{$journal['Keyword']}</span>";
+                                    echo "</p>";
+                                    echo "<p class='paper-event'><i>Publication: </i> {$journal['JournalTitle']}</p>";
+                                    echo "<p class='paper-contributors'>";
+                                    echo "<i>Authors: </i>";
                                     // Iterate over the Author array within each journal
                                     foreach ($journal['Author'] as $author) {
                                         // Access individual elements of each author
                                         $authorName = $author['AuthorName'];
                                         // Process or output the values as needed
-                                        echo "Author Name: $authorName\n";
-                                        echo '<br>';
+                                        echo " $authorName,";
                                     }
+                                    echo "</p>";
                                 }
+                                echo "</div>";
                             }
                             ?>
 
-                            <?php
-                            echo '<pre>';
-                            print_r($response[0]["Year"]);
-                            echo '<br>';
-                            print_r($response[0]["JournalList"][0]["PaperTitle"]);
-                            echo '<br>';
-                            print_r($response[0]["JournalList"][0]["JournalLink"]);
-                            echo '<br>';
-                            print_r($response[0]["JournalList"][0]["Keyword"]);
-                            echo '<br>';
-                            print_r($response[0]["JournalList"][0]["JournalTitle"]);
-                            echo '<br>';
-                            print_r($response[0]["JournalList"][0]["Author"][0]["AuthorName"]);
-                            ?>
-
                         </div>
                     </section>
                 </div>