{83QFR3CwUu/^b*1}|Zq0L,xWV3`IK'); define('SECURE_AUTH_SALT', 'aa$g>n@zEn}~%c XXi/#IUZ0|<%2[%!lADAfkwp855r]g_0wa~k+_Ysc1f;=[[(q'); define('LOGGED_IN_SALT', 'aax+qd_m{Z}V_)s6$SpI(vKkNYEo>-%`65EcfJ[5_fX>3+`Bw`i'); define('NONCE_SALT', 'aaY?vt:+(D+j*p9jv+rc+ZFS]-DI@g0aB0KN%56-dfYpV>N$(rBW[xH10OXS~s3r'); /**#@-*/ /** * WordPress 資料表前綴。 * * 若您為每個 WordPress 設定不同的資料表前綴,則可在同個資料庫內安裝多個 WordPress。 * 前綴只能使用半型數字、字母和底線! */ $table_prefix = 'sci_'; /** * WordPress 自動儲存間隔 * * 當您編輯文章時 WordPress 使用 Ajax 技術自動地定時幫您儲存文章草稿。 * 您可更改數值以延長或減少自動儲存的時間間隔。 * 預設儲存間隔為 60 秒。 */ //define('AUTOSAVE_INTERVAL', 60 ); // 單位:秒 /** * WordPress 文章版本設定 * * WordPress 預設會幫您儲存舊版的文章與分頁,以便您之後可以回復到先前的版本。 * 這功能可關閉,或是指定最大版本數量。 * 預設為開啟,若要關閉請將它設為 false。 * 若您想指定指定最大版本數量,請設個整數。 */ define('WP_POST_REVISIONS', 5); /** * 快取 * * 若 WP_CACHE 值為 true,當它執行 wp-settings.php 時會把 wp-content/advanced-cache.php 一起執行。 * 許多快取外掛會要求您將這個值設為 true。 */ /** * 啟用多網誌站台與網誌網路功能 * * 若 WP_ALLOW_MULTISITE 值為 true 可啟用多網誌站台功能。 */ //define('WP_ALLOW_MULTISITE', false); /** * 開發人員用: WordPress 偵錯模式。 * * 將此設定為 true 將可開啟開發時的通知顯示。 * 強烈建議外掛與佈景主題開發人員使用 WP_DEBUG * 於他們的開發環境中。 */ $LIVE_SERVER_IP = '172.18.0.2'; define('WP_DEBUG', strpos($_SERVER['REMOTE_ADDR'], DEVELOP_REMOTE_IP) === 0); if ($_SERVER['SERVER_ADDR'] == $LIVE_SERVER_IP) { // define('WP_HOME', 'https://workshop202506.aiacademy.tw'); define('WP_SITEURL', 'https://workshop202506.aiacademy.tw'); } else { define('WP_HOME', 'http://localhost:8443'); define('WP_SITEURL', 'http://localhost:8443'); } function now($format = 'Y-m-d H:i:s') { // %Y-%m-%d %H:%M:%S foreach (array('Y' => '%Y', 'm' => '%m', 'd' => '%d', 'H' => '%H', 'i' => '%M', 's' => '%S') as $k => $v) { $format = str_replace($k, $v, $format); } $ret = shell_exec("date '+" . $format . "'"); return trim($ret); } /* 設定完成,請儲存檔案。然後開始 Blogging 吧! */ /** WordPress 目錄的絕對路徑。 */ if (! defined('ABSPATH')) define('ABSPATH', dirname(__FILE__) . '/'); define('TBL_AGENDA', 'agenda'); define('TBL_AGENDA_LOGIN', 'agenda_login'); define('TBL_AGENDA_FILE_LOG', 'agenda_file_download_log'); define('TBL_AGENDA_WORKING', 'agenda_backup'); define('TBL_SPEAKERS', 'speakers'); define('TBL_SPEAKERS_CHANGELOG', 'speakers_changelog'); define('IS_GOOGLE_EXCEL_DATA', 1); define('IS_UNCOMPRESS', isset($_GET['unc1c1c'])); define('HELPER_FUNC_FILE_DIR', __DIR__ . '/helper_functions.php'); define('WEB_URL', '/'); define('TOOLS_URL', WEB_URL . 'tools/'); define('PDF_URL', WEB_URL . 'pdf/'); define('KEYNOTE_SPEAKERS_URL', WEB_URL . 'keynote-speakers/'); define('SPECIAL_SPEAKERS_URL', WEB_URL . 'special-speakers/'); define('SPEAKERS_URL', WEB_URL . 'speakers/'); define('AGENDA_URL', WEB_URL . 'agenda/'); define('ENTER_URL', WEB_URL . 'enter/'); define('R0_URL', WEB_URL . 'r0/'); define('SIGNUP_URL', WEB_URL . 'signup/'); define('FE_VER', strpos($_SERVER['REMOTE_ADDR'], '198.13.46.35') === 0 ? '?1' . date('YmdHi') : '?2'); define('CSS_FOLDER', 'css'); define('CSS_URL', WEB_URL . CSS_FOLDER . '/'); define('CSS_VENDORS_URL', CSS_URL . 'vendor/'); define('JS_FOLDER', 'js'); define('JS_URL', WEB_URL . JS_FOLDER . '/'); define('JS_VENDOR_URL', JS_URL . 'vendor/'); define('ASSETS_URL', WEB_URL . 'assets/'); define('BOOTSTRAP_URL', ASSETS_URL . 'bootstrap/'); define('BS_DATERANGEPICKER_URL', JS_URL . 'bootstrap-daterangepicker/'); define('IMG_URL', WEB_URL . 'img/'); define('IMG_FLAG_URL', IMG_URL . 'flag/'); define('IMG_SPONSOR_3D_URL', IMG_URL . 'sp24/'); define('BANNER_URL', IMG_URL . 'bnr/'); define('IMAGES_URL', WEB_URL . 'images/'); define('IMG_SPEAKER_URL', IMG_URL . 'speaker/'); define('IMG_SPEAKER_DIR', __DIR__ . IMG_SPEAKER_URL); define('CATEGORY_PREFIX_URL', WEB_URL . 'category/'); define('TAG_PREFIX_URL', WEB_URL . 'tag/'); $ip = $_SERVER['REMOTE_ADDR']; define('IS_DEV', false); #strpos($_SERVER['HTTP_HOST'], '.dev')!==false); # TODO: code review define('IS_TEAM_MEMBERS_IP', strpos($ip, '118.163.102.67') === 0 || strpos($ip, '36.225.213.191') === 0); define('DIRL_601_602_WIFI_IP', '140.109.22.127'); # TODO: code review define('IS_STRICT_TEAM_MEMBERS_IP', false); #$ip==='140.109.16.166' || $ip===DIRL_601_602_WIFI_IP || $ip==='127.0.0.1'); # TODO: code review define('IS_PRODUCTION', strpos($_SERVER['HTTP_HOST'], LIVE_DOMAIN) !== false); # TODO: code review define('AI_TALK_CAT_ID', 17); define('DS_TALK_CAT_ID', 18); define('EDM_CAT_ID', 3); define('COORG_CAT_ID', 15); define('ACADEMIC_PARTNER_CAT_ID', 273); define('LIVE_SUPPORT_CAT_ID', 270); define('SPONSOR_CAT_ID', 9); define('DIAMOND_SPONSOR_CAT_ID', 10); define('SILVER_SPONSOR_CAT_ID', 11); define('GOLD_SPONSOR_CAT_ID', 12); define('SPONSOR_KPMG_POST_ID', 6440); define('SPONSOR_MS_POST_ID', 570); define('SPONSOR_CISCO_POST_ID', 6442); define('SPONSOR_ASIASCHOOL_POST_ID', 6519); define('SPONSOR_INFUSEAI_POST_ID', 7110); define('ABOUT_PAGE_ID', 2); define('AGENDA_PAGE_ID', 6); define('SUPPORT_COM_PAGE_ID', 23); define('SUPPORT_ORG_PAGE_ID', 34); define('SPEAKER_PAGE_ID', 8); define('VUL_PAGE_ID', 37); define('EMCEE_PAGE_ID', 7328); define('HOST_PAGE_ID', 7328); define('VIP_PAGE_ID', 1412); define('KEYNOTE_SPEAKER_PAGE_ID', 321); define('PANEL_DISCUSSION_PAGE_ID', 8301); define('SPECIAL_SPEAKER_PAGE_ID', 7114); define('TOPIC_SPEAKER_PAGE_ID', 665); define('TOPIC_SPEAKER_TOTAL_NUM', 124); define('KEYNOTE_SPEAKER_TOTAL_NUM', 4); define('SIGNUP_PAGE_ID', 10954); define('TICKET_INFO_PAGE_ID', 54); define('TRANSFER_TICKET_PAGE_ID', 57); define('AI_SPEAKER_PAGE_ID', 57); define('TRAFFIC_PAGE_ID', 60); define('ORGANIZING_PAGE_ID', 27); define('SPONSOR_PAGE_ID', 14); define('MEDIA_PARTNER_PAGE_ID', 32); define('PAST_PAGE_ID', 12); define('EMCEE_CAT_ID', 272); define('HOST_CAT_ID', 272); define('VIP_CAT_ID', 16); define('SPEAKER_CAT_ID', 6); define('SPECIAL_SPEAKER_CAT_ID', 271); define('KEYNOTE_SPEAKER_CAT_ID', 4); define('TOPIC_SPEAKER_CAT_ID', 5); define('AI_SPEAKER_CAT_ID', 7); #define('DS_SPEAKER_CAT_ID', 8); define('PANEL_SPEAKER_CAT_ID', 8); define('SPECIAL_SPEAKER_ID1', 0); define('SPECIAL_SPEAKER_ID2', 0); define('SPECIAL_SPEAKER_ID3', 0); define('SPECIAL_SPEAKER_ID4', 0); define('SPECIAL_SPEAKER_ID5', 0); define('SPECIAL_SPEAKER_ID6', 0); // Home page use cache $uri = $_SERVER['REQUEST_URI']; $a = explode('?', $uri); #while development $uri = $a[0]; if ($_SERVER['REMOTE_ADDR'] !== DEVELOP_IP) { $cache_file = __DIR__ . '/v_cache/home_cache.html'; if (($uri == "" || $uri == "/") && substr($a[1], 0, 2) != "nc") { if (file_exists($cache_file)) { $html = file_get_contents($cache_file); if ($html) { $html = str_replace('http://' . $_SERVER['SERVER_NAME'], '//' . $_SERVER['SERVER_NAME'], $html); die($html . ($_SERVER['REMOTE_ADDR'] == '61.222.27.93' ? '' : '')); } } } } /* user authentication */ if (! in_array($_SERVER['REMOTE_ADDR'], array('149.28.16.132'))) : // Skip this code if the IP is the host to avoid the alert message being cached.//,'61.222.27.93' if (stripos($uri, "playback") !== false) { //require_once $_SERVER['DOCUMENT_ROOT'] ."/email_validation/continuous_authentication.php"; } endif; function get_agenda_login_hash($type, $no, $email_or_phone) { # TODO: code review #return hash('sha256', $no.'-datasci'.$email_or_phone.'-.tw'); return hash('sha256', $no . '-aia' . $email_or_phone . '-cademy.tw'); } /* palyback use cache */ if (0) : $v_cache_path = $_SERVER['DOCUMENT_ROOT'] . '/v_cache/'; $cache_files = array( 'playback-workshop2025', // 'workshop2025-playback-video' // ); foreach ($cache_files as $file) { $cache_file = $v_cache_path . $file . '.html'; if ($uri == "/$file/" && substr($a[1], 0, 2) != "nc") { if (file_exists($cache_file)) { $html = file_get_contents($cache_file); if ($html) { $html = str_replace('http://' . $_SERVER['SERVER_NAME'], '//' . $_SERVER['SERVER_NAME'], $html); die($html . ($_SERVER['REMOTE_ADDR'] == '61.222.27.93' ? '' : '')); } } } } endif; // function mb_str_split( $s ) { // # Split at all position not after the start: ^ // # and not before the end: $ // return preg_split('/(? $v) { $s = str_replace($k, $v, $s); } $s = htmlspecialchars($s); foreach ($ary_allow as $k => $v) { $s = str_replace($v, $k, $s); } return $s; } function imgsrc_rm_domain($imgsrc) { $b = false; $a = array($_SERVER['SERVER_NAME'], LIVE_DOMAIN, LIVE_DOMAIN_WITH_WWW); $a = array_unique($a); foreach ($a as $domain) { if (strpos($imgsrc, $domain) !== false) { $b = $domain; break; } } if ($b) { list($tmp, $imgsrc) = explode($b, $imgsrc); } return $imgsrc; } function get_imgsrc_by_post_meta($post_ID, $meta_key = 'photo', $image_size = 'medium') { $img = get_post_meta($post_ID, $meta_key, true); $img = wp_get_attachment_image($img, 'medium'); preg_match('/ src=".*?"/', $img, $m); $imgsrc = isset($m[0]) ? substr($m[0], 6, -1) : ''; $imgsrc = imgsrc_rm_domain($imgsrc); return $imgsrc; } function get_attribute_value_in_one_tag($tag_html, $attr = 'src') { preg_match('/ ' . $attr . '=".+?"/i', $tag_html, $m); return str_replace(array(' ' . $attr . '="', '"'), '', $m[0]); } function get_featured_imgsrc($post_id, $ary_size_conf = array(320, 320)) { $imgsrc = ''; $html_thumb = get_the_post_thumbnail($post_id, $ary_size_conf); $thumb = preg_match('/ src=".*?"/', $html_thumb, $m); if (isset($m[0]) && $m[0] != '') { $imgsrc = str_replace(array('"', " src="), '', $m[0]); } else { global $wpdb; $query = $wpdb->prepare("SELECT * FROM speakers WHERE post_id = %s", $post_id); $row = $wpdb->get_row($query); $imgsrc = $row->photo ?? ""; } return $imgsrc; } $ary_frontend_modules_config = array( // https://github.com/kazzkiq/balloon.css/blob/master/balloon.css // 'balloon'=>array('CSS'=>$IS_PC ? array(CSS_URL.'balloon.css') : array()) // using Javascript dynamic loading /* */ 'bootstrap' => array( 'CSS' => array(BOOTSTRAP_URL . 'css/bootstrap.min.css', BOOTSTRAP_URL . 'css/bootstrap-theme.min.css'), 'JS' => array(BOOTSTRAP_URL . 'js/bootstrap.min.js') ), 'bootstrap_daterangepicker' => array( 'CSS' => array( BS_DATERANGEPICKER_URL . 'daterangepicker.css' ), 'JS' => array( BS_DATERANGEPICKER_URL . 'moment.min.js', BS_DATERANGEPICKER_URL . 'daterangepicker.js', // // 'https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js', // lt IE9 // 'https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js', // lt IE9 ) ), 'base' => array('CSS' => array(CSS_URL . 'workshop2025base.css' . FE_VER)), 'fonts' => array('CSS' => array(CSS_URL . 'fonts.css')), 'animations' => array('CSS' => array(CSS_URL . 'animations.css')), ); array_unshift( $ary_frontend_modules_config['bootstrap_daterangepicker']['CSS'], $ary_frontend_modules_config['bootstrap']['CSS'][0], $ary_frontend_modules_config['bootstrap']['CSS'][1] ); array_unshift( $ary_frontend_modules_config['bootstrap_daterangepicker']['JS'], $ary_frontend_modules_config['bootstrap']['JS'][0] ); function collect_frontend_assets($ary_frontend_modules) { global $ary_frontend_modules_config; $ary_CSS = $ary_JS = array(); foreach ($ary_frontend_modules as $module) { $assets = $ary_frontend_modules_config[$module]; foreach (array('JS', 'CSS') as $type) { // if(!is_array($assets[$type])){var_dump($assets[$type]);continue;} if (! is_array($assets[$type])) { continue; } foreach ($assets[$type] as $url) { if (! in_array($url, ${'ary_' . $type})) { array_push(${'ary_' . $type}, $url); } } } } return array('CSS' => $ary_CSS, 'JS' => $ary_JS); } function get_css_js_assets_handle($css_js_relative_url) { if (strpos($css_js_relative_url, '?') !== false) { list($css_js_relative_url, $_) = explode('?', $css_js_relative_url); } $css_js_relative_url = str_replace('/', '-', $css_js_relative_url); $css_js_relative_url = str_replace('.', '_', $css_js_relative_url); $handle = 'ZZZ' . $css_js_relative_url; return $handle; } function load_css_assets($ary_css, $launch_css_path = '') { if (! is_array($ary_css)) { var_dump($ary_css); return; } if ($launch_css_path) { array_push($ary_css, $launch_css_path); } foreach ($ary_css as $v) { if ($v) { // echo''; wp_enqueue_style(get_css_js_assets_handle($v), $v); } } } function load_js_assets($ary_js, $launch_js_path = '') { if (! is_array($ary_js)) { var_dump($ary_js); return; } if ($launch_js_path) { array_push($ary_js, $launch_js_path); } foreach ($ary_js as $v) { if ($v) { // echo''; wp_enqueue_script(get_css_js_assets_handle($v), $v); } } } function get_sql_limit($page, $pagesize) { if ($page == 1) { return ' LIMIT ' . $pagesize; } return ' LIMIT ' . (($page - 1) * $pagesize) . ', ' . $pagesize; } function display_post_tags($post) { return ''; $tags = wp_get_post_tags($post->ID); if (! $tags) return ''; $ret = '
關鍵字:
'; return $ret; } function display_date($date, $find = '-', $to = '/') { return str_replace($find, $to, $date); } function convert_num2day($num) { $a = array('?', '一', '二', '三', '四', '五', '六', '日'); return isset($a[$num]) ? $a[$num] : '---'; } session_start(); class DataConf { const DEFAULT_CONF = 'AI'; # or 'DS' const AI_CONF = 'AI'; const DS_CONF = 'DS'; public static function get_current_conf_name() { if ( isset($_GET['conf']) && in_array( $_GET['conf'], array(self::AI_CONF, self::DS_CONF) ) ) { $conf = $_GET['conf']; $_SESSION['conf'] = $conf; } else { $conf = isset($_SESSION['conf']) && $_SESSION['conf'] ? $_SESSION['conf'] : self::DEFAULT_CONF; } return $conf; } public static function is_AI_conf() { return self::get_current_conf_name() === self::AI_CONF; } public static function is_DS_conf() { return self::get_current_conf_name() === self::DS_CONF; } public static function set_conf($type) { if ($type == self::AI_CONF) { $_SESSION['conf'] = self::AI_CONF; } if ($type == self::DS_CONF) { $_SESSION['conf'] = self::DS_CONF; } } public static function get_url_with_conf_querystring($url) { $S = strpos($url, '?') !== false ? '&' : '?'; return $url . $S . 'conf=' . self::get_current_conf_name(); } } function is_AI_DS_output_html($type = 'AI') { $targetValue = $type === 'DS' ? DataConf::DS_CONF : DataConf::AI_CONF; $b1 = ! is_bot(); $b2 = is_bot() && ((isset($_GET['conf']) && $_GET['conf'] == $targetValue) || (isset($_SESSION['conf']) && $_SESSION['conf'] == $targetValue)); return $b1 || $b2; } function is_AI_output_html() { return is_AI_DS_output_html('AI'); } function is_DS_output_html() { return is_AI_DS_output_html('DS'); } function get_conf_first_value($post_ID) { $ary_conf = get_post_meta($post_ID, 'which_conf', true); $conf = isset($ary_conf[0]) ? $ary_conf[0] : ''; return $conf; } function get_conf_img($post_ID, $return_only_img = false) { return ''; //20170821 teacher does not like. $conf = get_conf_first_value($post_ID); $conf_imgsrc = ''; if ($conf === 'ds') { $conf_imgsrc = IMG_URL . 'conf-ds.svg'; } elseif ($conf === 'ai') { $conf_imgsrc = IMG_URL . 'conf-ai.svg'; } $conf_img = $conf_imgsrc ? '' : ''; return $return_only_img ? $conf_img : array('img' => $conf_img, 'conf' => $conf); } function get_speaker_agenda_by_speaker_id($speaker_id, $speaker_title = "", $speaker_name = "") { global $wpdb; $sql = "SELECT * FROM " . TBL_AGENDA . " WHERE speaker_id='" . $speaker_id . "'"; $speaker_agenda = $wpdb->get_results($sql); if (! $speaker_agenda) { $sql = "SELECT * FROM " . TBL_AGENDA . " WHERE speaker_id REGEXP '\\\\+" . $speaker_id . "$'"; $speaker_agenda = $wpdb->get_results($sql); } if (! $speaker_agenda) { $sql = "SELECT * FROM " . TBL_AGENDA . " WHERE speaker_id REGEXP '^" . $speaker_id . "\\\\+'"; $speaker_agenda = $wpdb->get_results($sql); } if (! $speaker_agenda) { $sql = "SELECT * FROM " . TBL_AGENDA . " WHERE speaker_id REGEXP '\\\\+" . $speaker_id . "\\\\+'"; $speaker_agenda = $wpdb->get_results($sql); } if (! $speaker_agenda && $speaker_title && $speaker_name) { $sql = "SELECT * FROM " . TBL_AGENDA . " WHERE speaker_id like '%{$speaker_title}%' and speaker_id like '%{$speaker_name}%'"; $speaker_agenda = $wpdb->get_results($sql); } elseif (! $speaker_agenda && $speaker_name) { $sql = "SELECT * FROM " . TBL_AGENDA . " WHERE speaker_id like '%{$speaker_name}%';"; $speaker_agenda = $wpdb->get_results($sql); } #if(isset($_GET['debug'])){var_dump($speaker_agenda);echo$sql;} return $speaker_agenda ? $speaker_agenda[0] : array(); # $sql,$speaker_title , $speaker_name } function get_speaker_agenda_by_speaker_anchor($anchor) { global $wpdb; $rows = $wpdb->get_results('SELECT * FROM ' . TBL_SPEAKERS . ' WHERE hide=0 AND anchor="' . $anchor . '"'); if ($rows) { $speaker_id = $rows[0]->id; $speaker_agenda = get_speaker_agenda_by_speaker_id($speaker_id); return $speaker_agenda; } return array(); } function is_AI_agenda($agenda) { return $agenda && ($agenda->day == 1 || $agenda->day == 2); } function is_DS_agenda($agenda) { return $agenda->day == 3 || $agenda->day == 4; } function get_agenda_talk_type_prefix_by($speaker_anchor_or_speaker_id) { if (1 === preg_match('/^[0-9]+$/', $speaker_anchor_or_speaker_id)) { $speaker_id = $speaker_anchor_or_speaker_id; $speaker_anchor = ''; } else { $speaker_id = ''; $speaker_anchor = $speaker_anchor_or_speaker_id; } if ($speaker_anchor) { $speaker_agenda = get_speaker_agenda_by_speaker_anchor($speaker_anchor); } elseif ($speaker_id) { $speaker_agenda = get_speaker_agenda_by_speaker_id($speaker_id); } $prefix = ''; if (is_AI_agenda($speaker_agenda)) { $prefix = '人工智慧'; } elseif (is_DS_agenda($speaker_agenda)) { $prefix = '資料科學'; } return $prefix; } function get_talktime( $speaker_agenda, #$ary_room = array('R0','A0','R1','R2','A1'), $ary_room = array('R0', 'R1', 'R2', 'R3'), #$ary_agenda_day = array('','11/9 (四)','11/10 (五)','11/11 (六)','11/12 (日)') $ary_agenda_day = array('', '09/15 (Fri.)', '09/16 (Sat.)', '10/8 (Fri.)') ) { $talktime = ''; $is_AI = is_AI_agenda($speaker_agenda); $is_DS = false; #is_DS_agenda($speaker_agenda); if ($is_AI) { $talktime .= ''; /*'2020 AI Academy 台灣人工智慧年會';*/ } #if($is_DS){$talktime.='台灣資料科學年會';} $dur = $speaker_agenda->during; $talktime = '' . $talktime; $talktime .= #' 第 '.($speaker_agenda->day>2 ? $speaker_agenda->day-2 : $speaker_agenda->day) #.' 天 '.$ary_agenda_day[$speaker_agenda->day] #.' '. '⏱️ ' . $ary_agenda_day[$speaker_agenda->day] . ' ' . substr($dur, 0, 2) . ':' . substr($dur, 2, 2) . '-' . substr($dur, 5, 2) . ':' . substr($dur, 7, 2) . '' . ' at ' . $ary_room[$speaker_agenda->room] . ($speaker_agenda->room == 3 ? " ( Academia Sinica Academic Activities Center )" : ""); return $talktime; } function display_AIA() { return ''; #return IS_OPEN_AIACADEMY ? '' : ''; } define('TEAM_TICKET_SIGNUP_BASE_NUMBER', 5000); # because the total of personal-ticket is less than 5000 define('MAX_TEAM_TICKET_SIGNUP_NUMBER', 6000); function is_team_ticket($signup_number) { return $signup_number > TEAM_TICKET_SIGNUP_BASE_NUMBER && $signup_number <= MAX_TEAM_TICKET_SIGNUP_NUMBER; } function health_encode($phone) { return md5('conf20lajsda' . $phone . 'alsd20'); } define('MMR_CACHE_DIR', ABSPATH . 'fe'); # front-end define('MMR_CACHE_URL', '/fe'); define('SLIDE_FILE_TEXT', '簡報檔'); #'投影片'); /** 設定 WordPress 變數和包含的檔案。 */ require_once(ABSPATH . 'wp-settings.php'); define('IS_OPEN_AIACADEMY', true); #(strpos($_SERVER['REMOTE_ADDR'],'140.109.')===0&& isset($_GET['AIA'])) || current_time('mysql')>='2017-11-10 08:57:00'); $now = current_time('mysql'); define('IS_OPEN_SLIDES_DAY1', $now >= '2020-11-13 08:00:00' || (IS_TEAM_MEMBERS_IP && isset($_GET['testtalkfile']) && $now >= '2020-10-31 08:00:00')); define('IS_OPEN_SLIDES_DAY2', $now >= '2020-11-14 08:00:00' || (IS_TEAM_MEMBERS_IP && isset($_GET['testtalkfile']) && $now >= '2020-11-12 08:00:00')); #define('IS_OPEN_SLIDES_DAY3', $now>='2017-11-11 08:00:00' || (IS_TEAM_MEMBERS_IP&&isset($_GET['testtalkfile'])&&$now>='2017-11-09 08:00:00')); #define('IS_OPEN_SLIDES_DAY4', $now>='2017-11-12 08:00:00' || (IS_TEAM_MEMBERS_IP&&isset($_GET['testtalkfile'])&&$now>='2017-11-10 08:00:00')); define('IS_TESTING_SERVER', false); #$_SERVER['SERVER_NAME']==='2017ready.aiacademy.tw'); define('IS_LIVE_SERVER', IS_PRODUCTION); #!IS_TESTING_SERVER && strpos($_SERVER['SERVER_NAME'], LIVE_DOMAIN)!==false); # TODO: code review $user = wp_get_current_user(); define('IS_LOGIN_TEAM_MEMBER', in_array($user->user_login, array('vansindata', 'dh', 'richie'))); // define('FS_METHOD', 'direct'); # TODO: upgrade core