page-conference-test.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <?php
  2. /**
  3. * Template Name: Conference test
  4. *
  5. * @package UIU_CSE
  6. */
  7. get_header(); ?>
  8. <?php while (have_posts()) : the_post();
  9. $auth_token = get_field('auth_token', 'option');
  10. $client_id = get_field('client_id', 'option');
  11. $conference_api = get_field('conference_api', 'option');
  12. $curl = curl_init();
  13. curl_setopt_array($curl, array(
  14. CURLOPT_URL => $conference_api,
  15. CURLOPT_RETURNTRANSFER => true,
  16. CURLOPT_ENCODING => '',
  17. CURLOPT_MAXREDIRS => 10,
  18. CURLOPT_TIMEOUT => 0,
  19. CURLOPT_FOLLOWLOCATION => true,
  20. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  21. CURLOPT_CUSTOMREQUEST => 'POST',
  22. CURLOPT_POSTFIELDS => '{
  23. "employee_id" : " ",
  24. "year" : " ",
  25. "auth_token" : "' . $auth_token . '",
  26. "user_login_id" : "' . $client_id . '"
  27. }',
  28. CURLOPT_HTTPHEADER => array(
  29. 'Content-Type: application/json'
  30. ),
  31. ));
  32. $response = curl_exec($curl);
  33. curl_close($curl);
  34. $response = json_decode($response, true);
  35. ?>
  36. <main id="main" class="site-main" role="main">
  37. <div class="">
  38. <section class="container-fluid">
  39. <div class="banner-img-holder">
  40. <div class="banner-overlay">
  41. </div>
  42. <img class="banner-img" src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
  43. <div class="banner-title">
  44. <h1>
  45. Research at <br> Department of <br>
  46. Computer Science &amp; Engineering
  47. </h1>
  48. </div>
  49. </div>
  50. </section>
  51. <section id="breadcrumb" class="container">
  52. <div>
  53. <span class="crumbs">Department of CSE > Research > Journals</span>
  54. </div>
  55. </section>
  56. </div>
  57. <div class="row container">
  58. <div class="col-md-3 col-sidebar">
  59. <div class="generic-para sidebar-links">
  60. <h3>Research</h3>
  61. <ul>
  62. <li class="active"><a href="#">Conference Papers</a></li>
  63. <li><a href="#">Journals</a></li>
  64. <li><a href="#">Journals</a></li>
  65. <li><a href="#">Journals</a></li>
  66. <li><a href="#">Journals</a></li>
  67. </ul>
  68. </div>
  69. </div>
  70. <div class="col-md-9 col-content">
  71. <div class="sections">
  72. <section id="conference-papers-section" class="container generic-content" data-theme="light">
  73. <div class="generic-para shadowed">
  74. <h3>Conference Papers</h3>
  75. <?php
  76. // $data = '[...your JSON data...]';
  77. // $array = json_decode($data, true);
  78. $uniqueTitles = [];
  79. $result = [];
  80. foreach ($response as $item) {
  81. $conferenceList = $item['ConferenceList'];
  82. foreach ($conferenceList as $conference) {
  83. $title = $conference['PaperTitle'];
  84. if (!in_array($title, $uniqueTitles)) {
  85. $uniqueTitles[] = $title;
  86. $result[] = $conference;
  87. }
  88. }
  89. }
  90. // $resultJson = json_encode($result);
  91. // echo "<pre>";
  92. // print_r($result);
  93. // echo $resultJson;
  94. // foreach ($result as $item) {
  95. // Access individual elements of each response
  96. // echo "<div class='paper-details'>";
  97. // echo "<span class='paper-year'>{$item['Year']}</span>";
  98. // Iterate over the JournalList array within each item
  99. foreach ($result as $conference) {
  100. echo "<div class='paper-details'>";
  101. // Access individual elements of each journal
  102. echo "<a href='{$conference['Link']}'>";
  103. echo "<h2 class='paper-title'>{$conference['PaperTitle']}</h2>";
  104. echo "</a>";
  105. echo "<p class='paper-tags'>";
  106. $conferenceKeyword = explode(',', $conference['Keyword']);
  107. foreach ($conferenceKeyword as $keyword) {
  108. if ($keyword) {
  109. echo "<span class='tag'>{$keyword}</span>";
  110. }
  111. }
  112. echo "</p>";
  113. echo "<p class='paper-event'><i>Conference: </i> {$conference['ConferenceName']}</p>";
  114. echo "<p class='paper-contributors'>";
  115. echo "<i>Authors: </i>";
  116. // Iterate over the Author array within each journal
  117. foreach ($conference['Author'] as $author) {
  118. // Process or output the values as needed
  119. echo " {$author['AuthorName']},";
  120. }
  121. echo "</p>";
  122. echo "</div>";
  123. }
  124. // echo "</div>";
  125. // }
  126. ?>
  127. </div>
  128. </section>
  129. </div>
  130. </div>
  131. </div>
  132. </main>
  133. <!-- #main -->
  134. <script>
  135. // var myHeaders = new Headers();
  136. // myHeaders.append("Content-Type", "application/json");
  137. // var raw = JSON.stringify({
  138. // "employee_id": "",
  139. // "year": "",
  140. // "user_login_id": "api_user",
  141. // "auth_token": "api_user20230419045143",
  142. // "page": 1,
  143. // "limit": 3
  144. // });
  145. // var requestOptions = {
  146. // method: 'POST',
  147. // headers: myHeaders,
  148. // body: raw,
  149. // redirect: 'follow'
  150. // };
  151. // fetch("http://103.109.52.3/webapi/api/EmployeeJournal", requestOptions)
  152. // .then(response => response.text())
  153. // .then(result => console.log(result))
  154. // .catch(error => console.log('error', error));
  155. </script>
  156. <?php endwhile; // end of the loop.
  157. ?>
  158. <style>
  159. #fine-print {
  160. text-align: center;
  161. margin: 10px auto;
  162. height: 50px;
  163. border-top: 1px solid #F68B1F;
  164. }
  165. #fine-print p {
  166. font-size: 12px;
  167. display: inline-flex;
  168. }
  169. #fine-print ul {
  170. display: inline;
  171. }
  172. #fine-print ul>li {
  173. display: inline;
  174. padding: 10px;
  175. font-size: 12px;
  176. letter-spacing: 1px;
  177. }
  178. .banner-img-holder {
  179. width: 100vw;
  180. height: 400px;
  181. margin-bottom: 60px !important;
  182. }
  183. .banner-overlay {
  184. position: relative;
  185. top: 0px;
  186. bottom: 0px;
  187. height: 400px;
  188. width: 100vw;
  189. background-color: rgba(50, 52, 63, 0.4588235294);
  190. z-index: 1;
  191. }
  192. .banner-img {
  193. position: relative;
  194. top: -400px;
  195. width: 100%;
  196. height: 100%;
  197. -o-object-fit: cover;
  198. object-fit: cover;
  199. -o-object-position: center;
  200. object-position: center;
  201. filter: greyscale(80%) !important;
  202. }
  203. .banner-title {
  204. position: relative;
  205. top: -800px;
  206. height: 400px;
  207. width: 100vw;
  208. z-index: 2;
  209. display: flex;
  210. flex-direction: column;
  211. justify-content: center;
  212. }
  213. .banner-title h1 {
  214. margin-top: 50px !important;
  215. font-family: "Open Sans", sans-serif;
  216. font-weight: 800;
  217. line-height: 140%;
  218. color: #fff;
  219. text-align: center;
  220. }
  221. #breadcrumb {
  222. padding-top: 20px;
  223. }
  224. #breadcrumb div {
  225. margin-left: 20px !important;
  226. }
  227. .crumbs {
  228. font-size: 14px;
  229. font-weight: 400;
  230. margin: 30px 0px;
  231. padding-bottom: 5px;
  232. letter-spacing: 2px;
  233. color: #333 !important;
  234. border-bottom: 1px solid #333;
  235. }
  236. .sidebar-links {
  237. margin: 10px 0px !important;
  238. border-radius: 4px;
  239. border: 1px solid rgba(51, 51, 51, 0.1921568627);
  240. }
  241. .sidebar-links h3 {
  242. font-size: 30px !important;
  243. font-family: "Open Sans", sans-serif !important;
  244. width: 100%;
  245. text-align: center !important;
  246. text-transform: uppercase;
  247. padding-bottom: 15px !important;
  248. border-bottom: 1px solid #117cf7 !important;
  249. }
  250. .sidebar-links ul li {
  251. height: 30px !important;
  252. padding: 5px 10px !important;
  253. font-size: 14px;
  254. list-style: none;
  255. border-bottom: 1px solid rgba(51, 51, 51, 0.231372549);
  256. }
  257. .sidebar-links ul li a:link,
  258. .sidebar-links ul li a:visited {
  259. color: #117cf7;
  260. }
  261. .sidebar-links ul li a:hover {
  262. text-decoration: none;
  263. color: #333;
  264. }
  265. .sidebar-links ul li.active a:link,
  266. .sidebar-links ul li.active a:visited {
  267. color: #865994;
  268. font-weight: 600;
  269. }
  270. .generic-content-block {
  271. padding: 40px 10px !important;
  272. }
  273. .generic-header {
  274. width: 100%;
  275. margin: 30px auto !important;
  276. }
  277. .generic-header h1 {
  278. font-weight: 600;
  279. text-align: center;
  280. text-transform: uppercase;
  281. }
  282. .personnel-img {
  283. width: 300px;
  284. height: 300px;
  285. margin: 30px auto;
  286. }
  287. .personnel-img img {
  288. border-radius: 4px;
  289. box-shadow: 4px 6px 18px 12px rgba(51, 51, 51, 0.1490196078);
  290. width: 100%;
  291. height: 100%;
  292. -o-object-fit: cover;
  293. object-fit: cover;
  294. -o-object-position: center;
  295. object-position: center;
  296. }
  297. .shadowed {
  298. border-radius: 4px;
  299. box-shadow: 4px 6px 18px 12px rgba(51, 51, 51, 0.1490196078);
  300. }
  301. .generic-para {
  302. text-align: left;
  303. padding: 20px !important;
  304. }
  305. .generic-para ol {
  306. margin: 10px 30px !important;
  307. }
  308. .generic-para img {
  309. border-radius: 4px;
  310. height: 240px;
  311. width: 100%;
  312. -o-object-fit: cover;
  313. object-fit: cover;
  314. -o-object-position: center;
  315. object-position: center;
  316. }
  317. .generic-para h2 {
  318. text-align: center;
  319. letter-spacing: 1px;
  320. }
  321. .generic-para h3 {
  322. font-family: "DM Serif Text", serif;
  323. margin: 20px 0px !important;
  324. text-align: left;
  325. border-bottom: 3px solid #117cf7;
  326. }
  327. .generic-para p {
  328. text-align: justify;
  329. margin: 30px 0px !important;
  330. font-size: 16px !important;
  331. line-height: 22px;
  332. }
  333. .prof-name {
  334. color: #485680;
  335. font-weight: 700;
  336. font-size: 18px;
  337. }
  338. .prof-deg {
  339. font-style: italic;
  340. font-weight: 400;
  341. }
  342. .prof-des {
  343. font-size: 18px;
  344. font-weight: 700;
  345. }
  346. .area {
  347. margin: 10px 0px;
  348. border: 1px solid rgba(51, 51, 51, 0.3803921569);
  349. border-radius: 8px;
  350. height: 120px;
  351. width: 100%;
  352. display: flex;
  353. justify-content: center;
  354. align-items: center;
  355. }
  356. .alignnone {
  357. width: 150px !important;
  358. height: auto !important;
  359. margin: 20px auto !important;
  360. }
  361. #all-faculties h2,
  362. #all-events h2,
  363. #all-news h2 {
  364. color: #000 !important;
  365. margin-top: 40px;
  366. margin-bottom: 20px;
  367. font-weight: 800;
  368. }
  369. #all-faculties hr,
  370. #all-events hr,
  371. #all-news hr {
  372. border: 1px solid rgba(51, 51, 51, 0.3882352941);
  373. }
  374. #all-faculties .faculty-stub,
  375. #all-events .faculty-stub,
  376. #all-news .faculty-stub {
  377. width: 100%;
  378. padding: 5px;
  379. box-shadow: 2px 2px 10px 6px rgba(0, 0, 0, 0.137254902);
  380. margin: 30px auto !important;
  381. }
  382. #all-faculties .stub-img-holder,
  383. #all-events .stub-img-holder,
  384. #all-news .stub-img-holder {
  385. border-radius: 4px !important;
  386. height: 160px;
  387. overflow: hidden;
  388. }
  389. #all-faculties .stub-img-holder img,
  390. #all-events .stub-img-holder img,
  391. #all-news .stub-img-holder img {
  392. border-radius: 0px !important;
  393. height: 100%;
  394. width: 100%;
  395. -o-object-fit: cover;
  396. object-fit: cover;
  397. -o-object-position: center;
  398. object-position: center;
  399. }
  400. #all-faculties .archive-faculty-details,
  401. #all-events .archive-faculty-details,
  402. #all-news .archive-faculty-details {
  403. height: 100px;
  404. padding: 0px 10px;
  405. }
  406. #all-faculties .archive-faculty-details .faculty-degree,
  407. #all-events .archive-faculty-details .faculty-degree,
  408. #all-news .archive-faculty-details .faculty-degree {
  409. display: inline-block;
  410. color: rgba(89, 107, 161, 0.5647058824);
  411. font-weight: 800;
  412. font-size: 14px;
  413. }
  414. #all-faculties .archive-faculty-details .faculty-designation,
  415. #all-events .archive-faculty-details .faculty-designation,
  416. #all-news .archive-faculty-details .faculty-designation {
  417. display: block;
  418. color: rgba(0, 0, 0, 0.5647058824);
  419. font-weight: 800;
  420. font-size: 14px;
  421. }
  422. #all-faculties .archive-faculty-details h3,
  423. #all-events .archive-faculty-details h3,
  424. #all-news .archive-faculty-details h3 {
  425. font-size: 18px;
  426. line-height: 22px;
  427. font-family: "Open Sans", sans-serif;
  428. color: #2F4858 !important;
  429. margin: 10px auto;
  430. }
  431. .faculty-grp-img {
  432. height: auto !important;
  433. width: 100% !important;
  434. margin: 0px auto !important;
  435. }
  436. .paper-details {
  437. padding: 30px 0px;
  438. border-bottom: 1px solid rgba(51, 51, 51, 0.1764705882);
  439. }
  440. .paper-details .paper-title {
  441. font-size: 18px !important;
  442. text-align: left !important;
  443. margin: 10px 0px !important;
  444. text-decoration: underline;
  445. }
  446. .paper-details .paper-year {
  447. font-size: 14px;
  448. display: block;
  449. color: rgba(51, 51, 51, 0.4509803922);
  450. }
  451. .paper-details p {
  452. margin: 5px !important;
  453. font-size: 14px !important;
  454. }
  455. .paper-details .paper-contributors {
  456. color: #222222 !important;
  457. }
  458. .paper-details .paper-tags {
  459. margin: 20px 0px !important;
  460. }
  461. .paper-details .paper-tags .tag {
  462. font-size: 14px;
  463. border: 1px solid rgba(17, 124, 247, 0.431372549);
  464. padding: 3px 8px !important;
  465. border-radius: 10px;
  466. }
  467. /*# sourceMappingURL=journal-cse.css.map */
  468. </style>
  469. <?php get_footer(); ?>