page-conference.php 16 KB

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