login first for viewing website.');
// }
/**
* The header for our theme
*
* This is the template that displays all of the
section and everything up until
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
require_once HELPER_FUNC_FILE_DIR;
function _display_talkfile_link($talkfile_link, $anchor,$confday){
$b1 = $confday==1 && IS_OPEN_SLIDES_DAY1;
$b2 = $confday==2 && IS_OPEN_SLIDES_DAY2;
$b3 = $confday==3 && IS_OPEN_SLIDES_DAY3;
$b4 = $confday==4 && IS_OPEN_SLIDES_DAY4;
$ret='';
if($b1||$b2||$b3||$b4){
if(isset($_SESSION['can_view_agenda'])
and $_SESSION['can_view_agenda'] #TODO: use in_array or other way checking
and strpos($talkfile_link,'http')===0
){
$talkfile_link = str_replace(array("\n", "\r", "\t"),'',$talkfile_link); //TODO: add white domain name
$ret=$talkfile_link
? '
'.SLIDE_FILE_TEXT.''
: '';#'
等待上架'.SLIDE_FILE_TEXT.'連結';
}
}
return$ret;
}
function is_support_page($page_id){
return in_array($page_id, array(SUPPORT_COM_PAGE_ID, SUPPORT_ORG_PAGE_ID));
}
function is_speaker_page($page_id){
return in_array($page_id, array(KEYNOTE_SPEAKER_PAGE_ID, TOPIC_SPEAKER_PAGE_ID, VIP_PAGE_ID, SPECIAL_SPEAKER_PAGE_ID, HOST_PAGE_ID,PANEL_DISCUSSION_PAGE_ID));
}
function is_join_page($page_id){
return in_array($page_id, array(VUL_PAGE_ID, SPEAKER_PAGE_ID));
}
function is_signup_page($page_id){
return in_array($page_id, array(SIGNUP_PAGE_ID, TRANSFER_TICKET_PAGE_ID, TRAFFIC_PAGE_ID));
}
function is_sponsor_page($page_id){
return in_array($page_id, array(SPONSOR_PAGE_ID, MEDIA_PARTNER_PAGE_ID));
}
function get_sub_nav($type_or_pageid){
if(is_string($type_or_pageid)){
$type = $type_or_pageid;
}elseif(is_int($type_or_pageid)){
if(is_support_page($type_or_pageid)){
$type='SUPPORT';
}elseif(is_speaker_page($type_or_pageid)){
$type='SPEAKER';
}elseif(is_join_page($type_or_pageid)){
$type='JOIN';
}elseif(is_signup_page($type_or_pageid)){
$type='SIGNUP';
}elseif(is_sponsor_page($type_or_pageid)){
$type='SPONSOR';
}
}
//
$ary = array();
if($type=='SUPPORT'){
#20170503 no need.... $ary = array( array('徵求贊助企業','support'),array('徵求協辦單位','support-org') );
}elseif($type=='SPEAKER'){
$ary = array(
array('VIP', 'vip'),
#array('Special Speakers', 'special-speakers'),
array('Keynote Speakers', 'keynote-speakers'),
array('Topic Speakers', 'speakers'),
// array('Panel Discussion', 'panel-discussion'),。
array('Panel Discussion', 'panel-discussion'),
array('Moderators', 'moderator'),
array('All Sessions', 'category/all-sessions'),
#array('資料科學演講', 'category/data-science-talk'),
);
}elseif($type=='JOIN'){
#$ary = array( array('徵求講者','join-speakers'), array('徵求志工','join-volunteers') );
}elseif($type=='SIGNUP'){
#$ary = array( array('報名資訊','signup'),array('轉讓資訊','transfer-tickets'),array('交通資訊','traffic') );
}elseif($type=='ABOUT'){
$ary = array(
array('Taiwan AI Academy (eng.)', '//en.aiacademy.tw'),
array('Taiwan AI Academy (cht.)', '//aiacademy.tw')
);
}elseif($type=='SPONSOR'){
$ary = array( array('贊助','sponsor'),array('媒體夥伴','partner') );
}elseif($type=='PAST'){
$ary = array(
array('2024 Conf','//conf2024.aiacademy.tw'),
array('2023 Conf','//conf2023.aiacademy.tw'),
array('2022 Conf','//conf2022.aiacademy.tw'),
array('2021 Conf','//conf2021.aiacademy.tw'),
array('2020 Conf','//conf2020.aiacademy.tw'),
array('2019 Conf','//aiacademy.kktix.cc/events/aia-alumni-2019'),
array('2018 Conf','//aiacademy.kktix.cc/events/aia-alumni-event-20181117'),
);
}
return $ary;
}
function get_pagetitle($id){
$title = '';
if(is_support_page($id)){
$title = '支持';
}elseif(is_speaker_page($id)){
$title = 'VIP / Speakers';
}elseif(is_join_page($id)){
$title = '參與';
}elseif(is_signup_page($id)){
$title = '報名';
}elseif(is_sponsor_page($id)){
$tilte = '贊助';
}
return $title ? $title : the_title();
}
?>
class="pID?> no-js">
ID);
$is_single_speaker = false;
foreach($cats as $c){if($c->category_parent==SPEAKER_CAT_ID or $c->term_id==SPEAKER_CAT_ID){
$is_single_speaker = true;
}}
}
$og_title_desc = get_post_meta(ABOUT_PAGE_ID, 'fb_og_title_desc', true);
$og_image = '';
foreach(explode("\n", $og_title_desc)as$v){
if(strpos($v,'`')===false){continue;}
$v=explode('`',str_replace("\r", '', $v));
if(strpos($_SERVER['REQUEST_URI'], WEB_URL.$v[0])===0){
$og_title = $v[1]; $og_desc = $v[2]; if(isset($v[3])){$og_image=$v[3];} break;
}
}
if(!$og_title){
$og_title = get_post_meta(ABOUT_PAGE_ID, 'fb_og_default_title', true);
if(!$og_title){ $og_title = '2017 台灣資料科學年會';}
}
if(!$og_desc){
$og_desc = get_post_meta(ABOUT_PAGE_ID, 'fb_og_default_desc', true);
if(!$og_desc){ $og_desc = '2017 台灣資料科學年會 2017/11/09 (Thu) ~ 2017/11/12 (Sun)';}
}
?>
post_title));
}
echo$og_title;
?>" />
post_content);
}
echo $og_desc;
?>" />
';
}?>
$('#bnr').height(window.innerWidth*514.56/1720);?>

*/ ?>