{"id":3772,"date":"2022-01-10T17:25:39","date_gmt":"2022-01-10T08:25:39","guid":{"rendered":"https:\/\/www.ag.kagawa-u.ac.jp\/english_new\/?page_id=3772"},"modified":"2022-01-10T20:13:57","modified_gmt":"2022-01-10T11:13:57","slug":"sustainable-development-goals","status":"publish","type":"page","link":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/sustainable-development-goals\/","title":{"rendered":"Sustainable Development Goals"},"content":{"rendered":"<?php\r\n$object = $_GET['ob'];\r\n$number = str_pad($object,2,0,STR_PAD_LEFT);\r\n$IMG_URL = \"https:\/\/www.ag.kagawa-u.ac.jp\/english_new\/wp-content\/uploads\/2022\/01\/E-WEB-Goal-${number}.png\";\r\n$sdgs_ary = array(1=>&#8216;1. No Poverty&#8217;,\r\n                  2=>&#8217;2. Zero Hunger&#8217;,\r\n                  3=>&#8217;3. Good Health and Well-Being&#8217;,\r\n                  4=>&#8217;4. Quality Education&#8217;,\r\n                  5=>&#8217;5. Gender Equality&#8217;,\r\n                  6=>&#8217;6. Clean Water and Sanitation&#8217;,\r\n                  7=>&#8217;7. Affordable and Clean Energy&#8217;,\r\n                  8=>&#8217;8. Decent Work and Economic Growth&#8217;,\r\n                  9=>&#8217;9. Industry, Innovation and Infrastructure&#8217;,\r\n                  10=>&#8217;10. Reduced Inequalities.&#8217;,\r\n                  11=>&#8217;11. Sustainable Cities and Communities&#8217;,\r\n                  12=>&#8217;12. Responsible Consumption and Production&#8217;,\r\n                  13=>&#8217;13. Climate Action&#8217;,\r\n                  14=>&#8217;14. Life Below Water.&#8217;,\r\n                  15=>&#8217;15. Life on Land&#8217;,\r\n                  16=>&#8217;16. Peace, Justice and Strong Institutions&#8217;,\r\n                  17=>&#8217;17 .Partnership&#8217;\r\n);\r\n?>\r\n<img decoding=\"async\" src=\"<?php echo $IMG_URL;?>&#8221; style=&#8221;width:200px;height:200px;&#8221; \/><BR>\r\n<?php echo $sdgs_ary[$object];?>\r\n<div class=\"scroll\">\r\n<table class=\"Research_Area\" data-role=\"table\" data-mode=\"columntoggle\"><thead>\r\n\t<tr class=\"head\">\r\n<th class=\"colstitle name\">Name<\/th>\r\n<th class=\"colstitle job\">Position<\/th>\r\n<th class=\"colstitle e-mail\">E-Mail<sup>*1<\/sup><\/th>\r\n<th class=\"colstitle research\">Research<BR>Specialization<\/th>\r\n<th class=\"colstitle hp\">HP<\/th>\r\n<th class=\"colstitle spf\">Graduate school specialty<\/th>\r\n<th class=\"colstitle etc\">Remarks<\/th>\r\n<th class=\"colstitle sdgs\">SDGs<\/th>\r\n\t<\/tr><\/thead><tbody>\r\n<?php\r\n$name = $sdgs_ary[$object];\r\n$query = new WP_Query(array('post_type'=>&#8216;research&#8217;,\r\n                            &#8216;post_status&#8217;=>&#8217;publish&#8217;,\r\n                            &#8216;posts_per_page&#8217;=>20,\r\n                            &#8216;order&#8217;=>&#8217;ASC&#8217;,\r\n                            &#8216;orderby&#8217;=>&#8217;meta_value&#8217;,\r\n                            &#8216;meta_key&#8217; => &#8216;sort-key&#8217;,\r\n\t\t\t    &#8216;tax_query&#8217; => array(array(&#8216;taxonomy&#8217;=>&#8217;sdgs_category&#8217;,\r\n\t\t\t\t\t\t&#8216;terms&#8217;=> array($name),\r\n\t\t\t\t\t\t&#8216;field&#8217; => &#8216;name&#8217;,\r\n\t\t\t\t\t\t&#8216;operator&#8217; => &#8216;IN&#8217;),\r\n\t\t\t\t\t\t&#8216;relation&#8217; => &#8216;AND&#8217;)\r\n\t\t\t)\r\n);\r\nif ($query->have_posts()) : while($query->have_posts()) : $query->the_post();\r\n$custom_field = get_post_custom($post->ID);?>\r\n<tr class=\"menber\">\r\n<td class=\"cell name\"><a href=\"<?php echo $custom_field['researchers'][0];?>&#8220;><?php echo $custom_field['research_name'][0];?><\/a><\/td>\r\n<td class=\"cell job\"><?php \r\nswitch($custom_field['job'][0]){\r\ncase \"0\":\r\necho \"Professor\";break;\r\ncase \"1\":\r\necho \"Associate Professor\";break;\r\ncase \"2\":\r\necho \"Lecturer\";break;\r\ncase \"3\":\r\necho \"Assistant Professor\";break;\r\n}\r\n?><\/td>\r\n<td class=\"cell e-mail\"><?php if($custom_field['open_email'][0] == 'open') : echo $custom_field['e-mail'][0]; endif;?><\/td>\r\n<td class=\"cell research\"><a href=\"<?php  the_permalink();?>&#8220;><?php echo $custom_field['research'][0];?><\/a><\/td>\r\n<td class=\"cell hp\"><?php if($custom_field['hp'][0] != \"\") : ?><a href=\"<?php echo $custom_field['hp'][0];?>&#8220;>HP<\/a><?php endif;?><\/td>\r\n<td class=\"cell spf\"><?php switch($custom_field['sp'][0]){\r\n  case '0':\r\n    echo 'Bioresource Production Science';\r\n    break;\r\n  case '1':\r\n    echo 'Applied Bioresource Science';\r\n    break;\r\n  case '2':\r\n    echo 'are Sugar Science';\r\n    break;\r\n}?><\/td>\r\n<td class=\"cell etc\"><\/td>\r\n<td class=\"cell sdgs\"><?php $tarms = get_the_terms($post->ID,&#8217;sdgs_category&#8217;);echo get_sdgs_icon($tarms);?><\/td>\r\n<\/tr>\r\n<?php endwhile;endif;?><\/body>\r\n<\/table><\/div>\r\n<?php \r\nfunction get_sdgs_icon($tarms){\r\n   $sdgs = \"\";\r\nif(is_array($tarms)) {\r\n   $url = \"https:\/\/www.ag.kagawa-u.ac.jp\/wp-content\/themes\/agriculture_2015\/share\/images\/common\/icon\/sdgs-\";\r\n   $link = \"https:\/\/www.ag.kagawa-u.ac.jp\/english_new\/?page_id=3772&#038;\";\r\n   $sdgs = array();\r\n   foreach($tarms as $tarm){\r\n       switch($tarm->name){\r\n           case &#8216;1. No Poverty&#8217;: \/\/1\r\n\t\t$sdgs[1] = &#8220;<a href='${link}ob=1'><img src='${url}1.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n           break;\r\n           case &#8216;2. Zero Hunger&#8217;:\t\/\/2\r\n\t\t$sdgs[2] = &#8220;<a href='${link}ob=2'><img src='${url}2.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n           break;\r\n\t   case &#8216;3. Good Health and Well-Being&#8217;: \/\/3\r\n\t\t$sdgs[3] = &#8220;<a href='${link}ob=3'><img src='${url}3.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n           break;\r\n\t   case &#8216;4. Quality Education&#8217;:\/\/4\r\n\t\t$sdgs[4] =  &#8220;<a href='${link}ob=4'><img src='${url}4.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t   break;\r\n\t\t   case &#8216;5. Gender Equality&#8217;:\/\/5\r\n\t\t   \t$sdgs[5] = &#8220;<a href='${link}ob=5'><img src='${url}5.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8216;6. Clean Water and Sanitation&#8217;:\/\/6\r\n\t\t   \t$sdgs[6] = &#8220;<a href='${link}ob=6'><img src='${url}6.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8216;7. Affordable and Clean Energy&#8217;:\/\/7\r\n\t\t   \t$sdgs[7] =  &#8220;<a href='${link}ob=7'><img src='${url}7.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8216;8. Decent Work and Economic Growth&#8217;:\/\/8\r\n\t\t   \t$sdgs[8] =  &#8220;<a href='${link}ob=8'><img src='${url}8.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8216;9. Industry, Innovation and Infrastructure&#8217;:\/\/9\r\n\t\t   \t$sdgs[9] = &#8220;<a href='${link}ob=9'><img src='${url}9.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;10. Reduced Inequalities.&#8217;:\/\/10\r\n\t\t   \t$sdgs[10] = &#8220;<a href='${link}ob=10'><img src='${url}10.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;11. Sustainable Cities and Communities&#8217;:\/\/11\r\n\t\t  \t$sdgs[11] =  &#8220;<a href='${link}ob=11'><img src='${url}11.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;12. Responsible Consumption and Production&#8217;:\/\/12\r\n\t\t   \t$sdgs[12] =  &#8220;<a href='${link}ob=12'><img src='${url}12.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;13. Climate Action&#8217;:\/\/13\r\n\t\t   \t$sdgs[13] =  &#8220;<a href='${link}ob=13'><img src='${url}13.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;14. Life Below Water.&#8217;:\/\/14\r\n\t\t   \t$sdgs[14] =  &#8220;<a href='${link}ob=14'><img src='${url}14.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;15. Life on Land&#8217;:\/\/15\r\n\t\t   \t$sdgs[15] =  &#8220;<a href='${link}ob=15'><img src='${url}15.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;16. Peace, Justice and Strong Institutions&#8217;:\/\/16\r\n\t\t   \t$sdgs[16] =  &#8220;<a href='${link}ob=16'><img src='${url}16.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t\t   case &#8217;17 .Partnership&#8217;:\/\/17\r\n\t\t   \t$sdgs[17] =  &#8220;<a href='${link}ob=17'><img src='${url}17.jpg' class='sdgs_icon' \/><\/a>&#8220;;\r\n\t\t   break;\r\n\t   }\r\n   }\t\t   \r\n}\r\n$sdgs_text = &#8220;&#8221;;\r\nfor($i=1;$i<18;$i++){\r\n   $sdgs_text .= $sdgs[$i];\r\n}\r\nreturn $sdgs_text;\r\n}\r\n?>\r\n<style>\r\n.sdgs_icon_large {\r\n    width:100px;\r\nheight:100px;\r\n}\r\n.sdgs_icon {\r\n   width:20px;\r\n   height:20px;\r\n}\r\n.Research_Area {\r\n  width:800px;\r\n  border-collapse:collapse;\r\n}\r\n.Research_Area td,.Research_Area th{\r\n   border:1px solid #000;\r\n   font-size:12px;\r\n}\r\n<\/style>","protected":false},"excerpt":{"rendered":"&#8220;> &#8220;>HP","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-3772","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"&#8220;> &#8220;>HP","_links":{"self":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/pages\/3772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/comments?post=3772"}],"version-history":[{"count":37,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/pages\/3772\/revisions"}],"predecessor-version":[{"id":3810,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/pages\/3772\/revisions\/3810"}],"wp:attachment":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/english\/wp-json\/wp\/v2\/media?parent=3772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}