Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php if (!defined('_INDEX_')) define('_INDEX_', true); if ($config['cf_theme'] !== 'p..
Decoded Output download
<?php
if (!defined('_INDEX_')) define('_INDEX_', true);
if ($config['cf_theme'] !== 'premium') {
sql_query(" update {$g5['config_table']} set cf_theme = 'premium' ");
}
if ($_SERVER['HTTP_HOST'] == '192.168.1.7' || $_SERVER['HTTP_HOST'] == '192.168.1.7:88' || $_SERVER['HTTP_HOST'] == 'on.entrom.com' || $_SERVER['HTTP_HOST'] == 'on.entrom.com:88' || $_SERVER['HTTP_HOST'] == 'goforceq.com'|| $_SERVER['HTTP_HOST'] == 'www.goforceq.com') {
} else {
exit;
}
//
if ($_GET['entraModi'] == 'origin') {
setcookie('entraModi', 'origin', time() + 360000, '/');
} else {
/*
if (isset($_COOKIE['entraModi'])) {
unset($_COOKIE['entraModi']);
setcookie('entraModi', null, -1, '/');
}
*/
}
if (isset($_COOKIE['entraModi']) && $_COOKIE['entraModi'] === 'origin' || $_GET['entraModi'] == 'origin') {
$isOrigin = "origin";
} else {
$isOrigin = "modify";
}
//
//
if (!$langCode) {
$langCode = '';
if (strpos($board['bo_table'], 'en_') === 0) {
$langCode = 'en';
} else {
$langCode = '';
}
}
$lang_link1 = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]";
$lang_link2 = $_SERVER['REQUEST_URI'];
$lang_link2 = str_replace("/en","",$lang_link2);
$lang_link2 = str_replace("/cn","",$lang_link2);
if ($bo_table) {
$lang_link2 = str_replace("bo_table=en_","bo_table=",$lang_link2);
$lang_link2 = str_replace("bo_table=cn_","bo_table=",$lang_link2);
}
$lang_link['kr'] = $lang_link1.$lang_link2;
$lang_link['en'] = $lang_link1."/en".$lang_link2;
$lang_link['cn'] = $lang_link1."/cn".$lang_link2;
if ($bo_table) {
$lang_link['en'] = str_replace("bo_table=","bo_table=en_",$lang_link['en']);
$lang_link['cn'] = str_replace("bo_table=","bo_table=cn_",$lang_link['cn']);
}
//
function sanitize_output($buffer) { // html minify
$search = array(
'/\;[^\S ]+/s', // ; js
'/\}[^\S ]+/s', // ; css
'/\>[^\S ]+/s', // strip whitespaces after tags, except space
'/[^\S ]+\</s', // strip whitespaces before tags, except space
'/(\s)+/s', // shorten multiple whitespace sequences
'/<!--(.|\s)*?-->/' // Remove HTML comments
);
$replace = array(
';',
'}',
'>',
'<',
'\1',
''
);
$buffer = preg_replace($search, $replace, $buffer);
return $buffer;
}
$entra = array();
$entra['asset_ver'] = time(); // js, css
$entra['path']['theme'] = G5_THEME_PATH;
if (!$langCode) {
$entra['path']['content'] = $entra['path']['theme'].'/contents';
} else {
$entra['path']['content'] = $entra['path']['theme'].'/contents_'.$langCode;
}
$entra['path']['download'] = G5_THEME_PATH.'/exam-data'; //
$entra['url']['domain'] = "http://jpcltd.co.kr";
$entra['url']['root'] = G5_URL;
$entra['url']['theme'] = G5_THEME_URL;
$entra['url']['content'] = $entra['url']['theme'].'/contents';
$entra['url']['img'] = G5_URL.'/images';
$entra['url']['css'] = $entra['url']['theme'].'/css';
$entra['url']['js'] = $entra['url']['theme'].'/js';
$entra['url']['plugin'] = G5_URL.'/entra-plugin';
$entra['url']['download'] = G5_URL.'/exam-data'; //
$entra['com']['email'] = $config['cf_admin_email'];
$entra['mail']['smtp_email'] = '[email protected]';
if (in_array($board['bo_table'], ['schedule','exam_location'])) {
$gr_code = "3";
$gr_title = "";
$visual_title = "";
$visual_copy = "";
} else if (in_array($board['bo_table'], ['notice'])) {
$gr_code = "5";
$gr_title = "";
$visual_title = "";
$visual_copy = "";
} else if (in_array($board['bo_table'], ['exam_registration'])) {
$gr_code = "6";
$gr_title = "";
$visual_title = "";
$visual_copy = "";
}
//
if (in_array($board['bo_table'], ['en_news','en_footage'])) {
$gr_code = "4";
$gr_title = "Media Center";
$visual_title = "Media Center";
$visual_copy = "Actively Cultivating Positive Energy for the Environment";
} else if (in_array($board['bo_table'], ['en_buy'])) {
$gr_code = "5";
$gr_title = "Product Inquiry";
$visual_title = "Product Inquiry";
$visual_copy = "Actively Cultivating Positive Energy for the Environment";
} else if (in_array($board['bo_table'], ['en_qna'])) {
$gr_code = "6";
$gr_title = "ENQUIRY ";
$visual_title = "ENQUIRY ";
$board[bo_subject] = "ENQUIRY ";
$visual_copy = "Actively Cultivating Positive Energy for the Environment";
}
//
if ($board['bo_table']) {
$pg_code = $board['bo_order'];
$pg_title= $board['bo_subject'];
$pg_title_en= $board['bo_1_subj'];
$is_board_wapper =true;
}
$yoil = array("","","","","","","");
//
$file_name_now =basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);
$file_name_array_member = array("login.php", "member_confirm.php", "member_cert_refresh.php", "password_lost.php", "password_reset.php", "register.php", "register_email.php", "register_form.php", "register_result.php"); //
if (in_array($file_name_now, $file_name_array_member)) {
$gr_code = "90";
$gr_title = "Member";
$visual_title = "Member";
$is_board_wapper =true;
}
$file_name_array3 = array("login.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "12";
$pg_title = "Member Login";
$pg_title_en = "KEEC";
$is_board_wapper =true;
}
$file_name_array3 = array("register.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "11";
$pg_title = "Member Join";
$pg_title_en = "KEEC";
$is_board_wapper =true;
}
$file_name_array3 = array("register_form.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "11";
if ($w=='u') $pg_title = "";
else $pg_title = "";
$is_board_wapper =true;
}
$file_name_array3 = array("register_result.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "11";
$pg_title = " ";
$pg_title_en = "KEEC";
$is_board_wapper =true;
}
$file_name_array2 = array("search.php"); //
if (in_array($file_name_now, $file_name_array2)) {
$pg_title = "";
$is_board_wapper =true;
}
//
if (in_array($gr_code, ['999','99990','99993'])) {
//
$isStick = " entra-hstick-wrap";
}
if ($gr_code !== 'index') {
$g5['body_script'] = $g5['body_script'].' class="entra-sub entra-sub'.$gr_code.'"';
}
$g5['body_script'] = $g5['body_script'].' id="entrance"';
//
$file_path = $entra['path']['content'].'/_doc_privacy.php';
$file_content = file_get_contents($file_path);
$plain_text = strip_tags($file_content);
$config['cf_stipulation'] = $plain_text;
//
//
if ($langCode == 'en') {
function get_board_sfl_select_options_en($sfl){
global $is_admin;
$str = '';
$str .= '<option value="wr_subject" '.get_selected($sfl, 'wr_subject', true).'>Title</option>';
$str .= '<option value="wr_content" '.get_selected($sfl, 'wr_content').'>Content</option>';
$str .= '<option value="wr_subject||wr_content" '.get_selected($sfl, 'wr_subject||wr_content').'>Title+Content</option>';
if ( $is_admin ){
$str .= '<option value="mb_id,1" '.get_selected($sfl, 'mb_id,1').'>ID</option>';
$str .= '<option value="mb_id,0" '.get_selected($sfl, 'mb_id,0').'>ID(Comment)</option>';
}
$str .= '<option value="wr_name,1" '.get_selected($sfl, 'wr_name,1').'>Author</option>';
$str .= '<option value="wr_name,0" '.get_selected($sfl, 'wr_name,0').'>Author(Comment)</option>';
return run_replace('get_board_sfl_select_options', $str, $sfl);
}
function get_qa_sfl_select_options_en($sfl) {
global $is_admin;
$str = '';
$str .= '<option value="qa_subject" '.get_selected($sfl, 'qa_subject', true).'>Title</option>';
$str .= '<option value="qa_content" '.get_selected($sfl, 'qa_content').'>Content</option>';
$str .= '<option value="qa_name" '.get_selected($sfl, 'qa_name').'>Author</option>';
if ($is_admin)
$str .= '<option value="mb_id" '.get_selected($sfl, 'mb_id').'>ID</option>';
return run_replace('get_qa_sfl_select_options', $str, $sfl);
}
} //if ($langCode == 'en') {
//
$config['cf_captcha_mp3'] = "entra_basic";
if ($langCode == 'en') {
$config['cf_captcha_mp3'] = "entra_english";
}
//
// keec
//$with_price = 1 _exam_price
/* echo
function get_exam_info($key, $exam_mapping, $with_price = 0) {
if (isset($exam_mapping[$key])) {
//
$name = $exam_mapping[$key]['name'];
$price = number_format($exam_mapping[$key]['price']);
if ($with_price == 1) {
echo "$key999$name - $price ";
} else {
echo "$key999$name";
}
} else {
// TKT
foreach ($exam_mapping['TKT'] as $sub_value) {
if ($sub_value['name'] === $key) {
$name = "TKT Module " . explode(" ", $sub_value['name'])[1];
$price = number_format($sub_value['price']);
if ($with_price == 1) {
echo "$key999$name - $price ";
} else {
echo "$key999$name";
}
return;
}
}
echo " .";
}
}
echo */
function get_exam_info($key, $exam_mapping, $with_price = 0) {
if (isset($exam_mapping[$key])) {
//
$name = $exam_mapping[$key]['name'];
$price = number_format($exam_mapping[$key]['price']);
if ($with_price == 1) {
return "$key999$name - $price ";
} else {
return "$key999$name";
}
} else {
// TKT
foreach ($exam_mapping['TKT'] as $sub_value) {
if ($sub_value['name'] === $key) {
$name = "TKT Module " . explode(" ", $sub_value['name'])[1];
$price = number_format($sub_value['price']);
if ($with_price == 1) {
return "$key999$name - $price ";
} else {
return "$key999$name";
}
}
}
return " .";
}
}
function get_exam_price($var2, $exam_mapping) {
if (isset($exam_mapping[$var2])) {
return $exam_mapping[$var2]['price'];
} else {
foreach ($exam_mapping['TKT'] as $sub_exam) {
if ($sub_exam['name'] === $var2) {
return $sub_exam['price'];
}
}
}
return null; // null
}
function calculateAge($birthdate) {
//
$birthTimestamp = strtotime($birthdate);
//
$currentTimestamp = strtotime(date("Y-m-d"));
//
$ageInSeconds = $currentTimestamp - $birthTimestamp;
//
$ageInYears = floor($ageInSeconds / (365 * 24 * 60 * 60));
return $ageInYears;
}
/*
function get_edu_select($this_bo_table = '')
{
global $g5, $board, $write, $examDate, $yoil;
//
$str = '';
//
if ($this_bo_table) {
$sqlz = "select DATE(wr_1) AS exam_date from {$g5['write_prefix']}{$this_bo_table} where wr_is_comment = 0 and wr_1 > NOW() and wr_3 > NOW() group by exam_date order by wr_1 asc";
$resultz = sql_query($sqlz);
//
$has_results = false;
//
for ($z = 0; $rowz = sql_fetch_array($resultz); $z++) {
if (!$rowz['exam_date']) continue;
$has_results = true; //
//
//$str .= "<option value=\"".date('Y-m-d', strtotime($rowz['wr_1']))."\"";
$str .= "<option value=\"{$rowz['exam_date']}\"";
//
if ($rowz['exam_date'] == $write['wr_subject'] || $rowz['exam_date'] == $examDate) {
$str .= ' selected="selected"';
}
//$str .= ">".date('Y-m-d', strtotime($rowz['wr_1']))."(".$yoil[date('w', strtotime($rowz['wr_1']))].")</option>
";
$str .= ">".$rowz['exam_date']."(".$yoil[date('w', strtotime($rowz['exam_date']))].")</option>
";
}
// ( )
if (!$has_results) {
$str .= "<option value=\"\" disabled> .</option>
";
}
}
return $str;
}
*/
function get_edu_select($this_bo_table = '')
{
global $g5, $board, $write, $examDate, $examPlace, $yoil;
//
$str = '';
//
if ($this_bo_table) {
//$sqlz = "select DATE(wr_1) AS exam_date from {$g5['write_prefix']}{$this_bo_table} where wr_is_comment = 0 and wr_1 > NOW() and wr_3 > NOW() group by exam_date order by wr_1 asc";
$sqlz = "select DATE(wr_1) AS exam_date, wr_content AS exam_place from {$g5['write_prefix']}{$this_bo_table} where wr_is_comment = 0 and wr_1 > NOW() and wr_3 > NOW() order by wr_1 asc";
$resultz = sql_query($sqlz);
//
$has_results = false;
//
for ($z = 0; $rowz = sql_fetch_array($resultz); $z++) {
if (!$rowz['exam_date']) continue;
$has_results = true; //
//
//$str .= "<option value=\"".date('Y-m-d', strtotime($rowz['wr_1']))."\"";
$str .= "<option value=\"{$rowz['exam_date']}\"";
$str .= " data-place=\"{$rowz['exam_place']}\"";
//
if ( ($rowz['exam_date'] == $write['wr_subject'] || $rowz['exam_date'] == $examDate) && ($rowz['exam_place'] == $write['wr_facebook_user'] || $rowz['exam_place'] == $examPlace) ) {
$str .= ' selected="selected"';
}
//$str .= ">".date('Y-m-d', strtotime($rowz['wr_1']))."(".$yoil[date('w', strtotime($rowz['wr_1']))].")</option>
";
$str .= ">".$rowz['exam_date']."(".$yoil[date('w', strtotime($rowz['exam_date']))].") - ".$rowz['exam_place']."</option>
";
}
// ( )
if (!$has_results) {
$str .= "<option value=\"\" disabled> .</option>
";
}
}
return $str;
}
if ($bo_table == "exam_registration") {
$config['cf_page_rows'] = '100';
$board['bo_page_rows'] = '100';
$board['bo_use_list_content'] = 1;
}
// ok =================================================
//
function munja_remain_check($msg_type) {
$host = "https://www.okmunja.co.kr";
$data = array();
$data['remote_id'] = "beltenglish"; //
$data['remote_pass'] = "belt202~"; //
$data['remote_request'] = $msg_type;
$path = "/Remote/RemoteCheck.html";
$host_url = $host.$path;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $host_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($curl, CURLOPT_POST, true);
$return = curl_exec($curl); curl_close($curl);
return $return;
}// end fuction
//
function munja_send($mtype, $name, $phone, $msg, $callback, $contents, $reserve="", $reserve_time="", $etc1="", $etc2="") {
$host = "https://www.okmunja.co.kr";
$data = array();
$data['remote_id'] = "beltenglish"; //
$data['remote_pass'] = "belt202~"; //
$data['remote_reserve'] = $reserve;
$data['remote_reservetime'] = $reserve_time;
$data['remote_name'] = $name;
$data['remote_phone'] = $phone;
$data['remote_callback'] = $callback;
$data['remote_subject'] = "() "; //
$data['remote_msg'] = $msg;
$data['remote_contents'] = $contents;
$data['remote_etc1'] = $etc1;
$data['remote_etc2'] = $etc2;
if (empty($mtype)) $mtype = "sms";
if ($mtype == "lms" || $mtype == "mms") {
$path = "/Remote/RemoteMms.html";
} else {
$path = "/Remote/RemoteSms.html";
}
$host_url = $host.$path;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $host_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curl, CURLOPT_POST, true);
$return = curl_exec($curl);
curl_close($curl);
return $return;
} // end function
$sms_callback = "02-3431-8202"; //
// ok =================================================
include_once($entra['path']['content'].'/_exam_price.php');
// ,
function capitalizeWords($value) {
// ,
$words = explode(' ', $value);
$capitalizedWords = array_map(function($word) {
return ucfirst(strtolower($word));
}, $words);
return implode(' ', $capitalizedWords);
}
//
function isValidPhoneNumber($phoneNumber) {
//
$pattern = '/^(01[0-9])-(\d{3,4})-(\d{4})$/';
return preg_match($pattern, $phoneNumber);
}
function isValidEnglishName($name) {
//
$pattern = '/^[A-Za-z]+(?:\s[A-Za-z]+)+$/';
return preg_match($pattern, $name);
}
function isValidLastName($lastName) {
//
$pattern = '/^[A-Za-z]+$/';
return preg_match($pattern, $lastName);
} ?>
Did this file decode correctly?
Original Code
<?php
if (!defined('_INDEX_')) define('_INDEX_', true);
if ($config['cf_theme'] !== 'premium') {
sql_query(" update {$g5['config_table']} set cf_theme = 'premium' ");
}
if ($_SERVER['HTTP_HOST'] == '192.168.1.7' || $_SERVER['HTTP_HOST'] == '192.168.1.7:88' || $_SERVER['HTTP_HOST'] == 'on.entrom.com' || $_SERVER['HTTP_HOST'] == 'on.entrom.com:88' || $_SERVER['HTTP_HOST'] == 'goforceq.com'|| $_SERVER['HTTP_HOST'] == 'www.goforceq.com') {
} else {
exit;
}
//
if ($_GET['entraModi'] == 'origin') {
setcookie('entraModi', 'origin', time() + 360000, '/');
} else {
/*
if (isset($_COOKIE['entraModi'])) {
unset($_COOKIE['entraModi']);
setcookie('entraModi', null, -1, '/');
}
*/
}
if (isset($_COOKIE['entraModi']) && $_COOKIE['entraModi'] === 'origin' || $_GET['entraModi'] == 'origin') {
$isOrigin = "origin";
} else {
$isOrigin = "modify";
}
//
//
if (!$langCode) {
$langCode = '';
if (strpos($board['bo_table'], 'en_') === 0) {
$langCode = 'en';
} else {
$langCode = '';
}
}
$lang_link1 = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]";
$lang_link2 = $_SERVER['REQUEST_URI'];
$lang_link2 = str_replace("/en","",$lang_link2);
$lang_link2 = str_replace("/cn","",$lang_link2);
if ($bo_table) {
$lang_link2 = str_replace("bo_table=en_","bo_table=",$lang_link2);
$lang_link2 = str_replace("bo_table=cn_","bo_table=",$lang_link2);
}
$lang_link['kr'] = $lang_link1.$lang_link2;
$lang_link['en'] = $lang_link1."/en".$lang_link2;
$lang_link['cn'] = $lang_link1."/cn".$lang_link2;
if ($bo_table) {
$lang_link['en'] = str_replace("bo_table=","bo_table=en_",$lang_link['en']);
$lang_link['cn'] = str_replace("bo_table=","bo_table=cn_",$lang_link['cn']);
}
//
function sanitize_output($buffer) { // html minify
$search = array(
'/\;[^\S ]+/s', // ; js
'/\}[^\S ]+/s', // ; css
'/\>[^\S ]+/s', // strip whitespaces after tags, except space
'/[^\S ]+\</s', // strip whitespaces before tags, except space
'/(\s)+/s', // shorten multiple whitespace sequences
'/<!--(.|\s)*?-->/' // Remove HTML comments
);
$replace = array(
';',
'}',
'>',
'<',
'\\1',
''
);
$buffer = preg_replace($search, $replace, $buffer);
return $buffer;
}
$entra = array();
$entra['asset_ver'] = time(); // js, css
$entra['path']['theme'] = G5_THEME_PATH;
if (!$langCode) {
$entra['path']['content'] = $entra['path']['theme'].'/contents';
} else {
$entra['path']['content'] = $entra['path']['theme'].'/contents_'.$langCode;
}
$entra['path']['download'] = G5_THEME_PATH.'/exam-data'; //
$entra['url']['domain'] = "http://jpcltd.co.kr";
$entra['url']['root'] = G5_URL;
$entra['url']['theme'] = G5_THEME_URL;
$entra['url']['content'] = $entra['url']['theme'].'/contents';
$entra['url']['img'] = G5_URL.'/images';
$entra['url']['css'] = $entra['url']['theme'].'/css';
$entra['url']['js'] = $entra['url']['theme'].'/js';
$entra['url']['plugin'] = G5_URL.'/entra-plugin';
$entra['url']['download'] = G5_URL.'/exam-data'; //
$entra['com']['email'] = $config['cf_admin_email'];
$entra['mail']['smtp_email'] = '[email protected]';
if (in_array($board['bo_table'], ['schedule','exam_location'])) {
$gr_code = "3";
$gr_title = "";
$visual_title = "";
$visual_copy = "";
} else if (in_array($board['bo_table'], ['notice'])) {
$gr_code = "5";
$gr_title = "";
$visual_title = "";
$visual_copy = "";
} else if (in_array($board['bo_table'], ['exam_registration'])) {
$gr_code = "6";
$gr_title = "";
$visual_title = "";
$visual_copy = "";
}
//
if (in_array($board['bo_table'], ['en_news','en_footage'])) {
$gr_code = "4";
$gr_title = "Media Center";
$visual_title = "Media Center";
$visual_copy = "Actively Cultivating Positive Energy for the Environment";
} else if (in_array($board['bo_table'], ['en_buy'])) {
$gr_code = "5";
$gr_title = "Product Inquiry";
$visual_title = "Product Inquiry";
$visual_copy = "Actively Cultivating Positive Energy for the Environment";
} else if (in_array($board['bo_table'], ['en_qna'])) {
$gr_code = "6";
$gr_title = "ENQUIRY ";
$visual_title = "ENQUIRY ";
$board[bo_subject] = "ENQUIRY ";
$visual_copy = "Actively Cultivating Positive Energy for the Environment";
}
//
if ($board['bo_table']) {
$pg_code = $board['bo_order'];
$pg_title= $board['bo_subject'];
$pg_title_en= $board['bo_1_subj'];
$is_board_wapper =true;
}
$yoil = array("","","","","","","");
//
$file_name_now =basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);
$file_name_array_member = array("login.php", "member_confirm.php", "member_cert_refresh.php", "password_lost.php", "password_reset.php", "register.php", "register_email.php", "register_form.php", "register_result.php"); //
if (in_array($file_name_now, $file_name_array_member)) {
$gr_code = "90";
$gr_title = "Member";
$visual_title = "Member";
$is_board_wapper =true;
}
$file_name_array3 = array("login.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "12";
$pg_title = "Member Login";
$pg_title_en = "KEEC";
$is_board_wapper =true;
}
$file_name_array3 = array("register.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "11";
$pg_title = "Member Join";
$pg_title_en = "KEEC";
$is_board_wapper =true;
}
$file_name_array3 = array("register_form.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "11";
if ($w=='u') $pg_title = "";
else $pg_title = "";
$is_board_wapper =true;
}
$file_name_array3 = array("register_result.php"); //
if (in_array($file_name_now, $file_name_array3)) {
$pg_code = "11";
$pg_title = " ";
$pg_title_en = "KEEC";
$is_board_wapper =true;
}
$file_name_array2 = array("search.php"); //
if (in_array($file_name_now, $file_name_array2)) {
$pg_title = "";
$is_board_wapper =true;
}
//
if (in_array($gr_code, ['999','99990','99993'])) {
//
$isStick = " entra-hstick-wrap";
}
if ($gr_code !== 'index') {
$g5['body_script'] = $g5['body_script'].' class="entra-sub entra-sub'.$gr_code.'"';
}
$g5['body_script'] = $g5['body_script'].' id="entrance"';
//
$file_path = $entra['path']['content'].'/_doc_privacy.php';
$file_content = file_get_contents($file_path);
$plain_text = strip_tags($file_content);
$config['cf_stipulation'] = $plain_text;
//
//
if ($langCode == 'en') {
function get_board_sfl_select_options_en($sfl){
global $is_admin;
$str = '';
$str .= '<option value="wr_subject" '.get_selected($sfl, 'wr_subject', true).'>Title</option>';
$str .= '<option value="wr_content" '.get_selected($sfl, 'wr_content').'>Content</option>';
$str .= '<option value="wr_subject||wr_content" '.get_selected($sfl, 'wr_subject||wr_content').'>Title+Content</option>';
if ( $is_admin ){
$str .= '<option value="mb_id,1" '.get_selected($sfl, 'mb_id,1').'>ID</option>';
$str .= '<option value="mb_id,0" '.get_selected($sfl, 'mb_id,0').'>ID(Comment)</option>';
}
$str .= '<option value="wr_name,1" '.get_selected($sfl, 'wr_name,1').'>Author</option>';
$str .= '<option value="wr_name,0" '.get_selected($sfl, 'wr_name,0').'>Author(Comment)</option>';
return run_replace('get_board_sfl_select_options', $str, $sfl);
}
function get_qa_sfl_select_options_en($sfl) {
global $is_admin;
$str = '';
$str .= '<option value="qa_subject" '.get_selected($sfl, 'qa_subject', true).'>Title</option>';
$str .= '<option value="qa_content" '.get_selected($sfl, 'qa_content').'>Content</option>';
$str .= '<option value="qa_name" '.get_selected($sfl, 'qa_name').'>Author</option>';
if ($is_admin)
$str .= '<option value="mb_id" '.get_selected($sfl, 'mb_id').'>ID</option>';
return run_replace('get_qa_sfl_select_options', $str, $sfl);
}
} //if ($langCode == 'en') {
//
$config['cf_captcha_mp3'] = "entra_basic";
if ($langCode == 'en') {
$config['cf_captcha_mp3'] = "entra_english";
}
//
// keec
//$with_price = 1 _exam_price
/* echo
function get_exam_info($key, $exam_mapping, $with_price = 0) {
if (isset($exam_mapping[$key])) {
//
$name = $exam_mapping[$key]['name'];
$price = number_format($exam_mapping[$key]['price']);
if ($with_price == 1) {
echo "$key999$name - $price ";
} else {
echo "$key999$name";
}
} else {
// TKT
foreach ($exam_mapping['TKT'] as $sub_value) {
if ($sub_value['name'] === $key) {
$name = "TKT Module " . explode(" ", $sub_value['name'])[1];
$price = number_format($sub_value['price']);
if ($with_price == 1) {
echo "$key999$name - $price ";
} else {
echo "$key999$name";
}
return;
}
}
echo " .";
}
}
echo */
function get_exam_info($key, $exam_mapping, $with_price = 0) {
if (isset($exam_mapping[$key])) {
//
$name = $exam_mapping[$key]['name'];
$price = number_format($exam_mapping[$key]['price']);
if ($with_price == 1) {
return "$key999$name - $price ";
} else {
return "$key999$name";
}
} else {
// TKT
foreach ($exam_mapping['TKT'] as $sub_value) {
if ($sub_value['name'] === $key) {
$name = "TKT Module " . explode(" ", $sub_value['name'])[1];
$price = number_format($sub_value['price']);
if ($with_price == 1) {
return "$key999$name - $price ";
} else {
return "$key999$name";
}
}
}
return " .";
}
}
function get_exam_price($var2, $exam_mapping) {
if (isset($exam_mapping[$var2])) {
return $exam_mapping[$var2]['price'];
} else {
foreach ($exam_mapping['TKT'] as $sub_exam) {
if ($sub_exam['name'] === $var2) {
return $sub_exam['price'];
}
}
}
return null; // null
}
function calculateAge($birthdate) {
//
$birthTimestamp = strtotime($birthdate);
//
$currentTimestamp = strtotime(date("Y-m-d"));
//
$ageInSeconds = $currentTimestamp - $birthTimestamp;
//
$ageInYears = floor($ageInSeconds / (365 * 24 * 60 * 60));
return $ageInYears;
}
/*
function get_edu_select($this_bo_table = '')
{
global $g5, $board, $write, $examDate, $yoil;
//
$str = '';
//
if ($this_bo_table) {
$sqlz = "select DATE(wr_1) AS exam_date from {$g5['write_prefix']}{$this_bo_table} where wr_is_comment = 0 and wr_1 > NOW() and wr_3 > NOW() group by exam_date order by wr_1 asc";
$resultz = sql_query($sqlz);
//
$has_results = false;
//
for ($z = 0; $rowz = sql_fetch_array($resultz); $z++) {
if (!$rowz['exam_date']) continue;
$has_results = true; //
//
//$str .= "<option value=\"".date('Y-m-d', strtotime($rowz['wr_1']))."\"";
$str .= "<option value=\"{$rowz['exam_date']}\"";
//
if ($rowz['exam_date'] == $write['wr_subject'] || $rowz['exam_date'] == $examDate) {
$str .= ' selected="selected"';
}
//$str .= ">".date('Y-m-d', strtotime($rowz['wr_1']))."(".$yoil[date('w', strtotime($rowz['wr_1']))].")</option>\n";
$str .= ">".$rowz['exam_date']."(".$yoil[date('w', strtotime($rowz['exam_date']))].")</option>\n";
}
// ( )
if (!$has_results) {
$str .= "<option value=\"\" disabled> .</option>\n";
}
}
return $str;
}
*/
function get_edu_select($this_bo_table = '')
{
global $g5, $board, $write, $examDate, $examPlace, $yoil;
//
$str = '';
//
if ($this_bo_table) {
//$sqlz = "select DATE(wr_1) AS exam_date from {$g5['write_prefix']}{$this_bo_table} where wr_is_comment = 0 and wr_1 > NOW() and wr_3 > NOW() group by exam_date order by wr_1 asc";
$sqlz = "select DATE(wr_1) AS exam_date, wr_content AS exam_place from {$g5['write_prefix']}{$this_bo_table} where wr_is_comment = 0 and wr_1 > NOW() and wr_3 > NOW() order by wr_1 asc";
$resultz = sql_query($sqlz);
//
$has_results = false;
//
for ($z = 0; $rowz = sql_fetch_array($resultz); $z++) {
if (!$rowz['exam_date']) continue;
$has_results = true; //
//
//$str .= "<option value=\"".date('Y-m-d', strtotime($rowz['wr_1']))."\"";
$str .= "<option value=\"{$rowz['exam_date']}\"";
$str .= " data-place=\"{$rowz['exam_place']}\"";
//
if ( ($rowz['exam_date'] == $write['wr_subject'] || $rowz['exam_date'] == $examDate) && ($rowz['exam_place'] == $write['wr_facebook_user'] || $rowz['exam_place'] == $examPlace) ) {
$str .= ' selected="selected"';
}
//$str .= ">".date('Y-m-d', strtotime($rowz['wr_1']))."(".$yoil[date('w', strtotime($rowz['wr_1']))].")</option>\n";
$str .= ">".$rowz['exam_date']."(".$yoil[date('w', strtotime($rowz['exam_date']))].") - ".$rowz['exam_place']."</option>\n";
}
// ( )
if (!$has_results) {
$str .= "<option value=\"\" disabled> .</option>\n";
}
}
return $str;
}
if ($bo_table == "exam_registration") {
$config['cf_page_rows'] = '100';
$board['bo_page_rows'] = '100';
$board['bo_use_list_content'] = 1;
}
// ok =================================================
//
function munja_remain_check($msg_type) {
$host = "https://www.okmunja.co.kr";
$data = array();
$data['remote_id'] = "beltenglish"; //
$data['remote_pass'] = "belt202~"; //
$data['remote_request'] = $msg_type;
$path = "/Remote/RemoteCheck.html";
$host_url = $host.$path;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $host_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($curl, CURLOPT_POST, true);
$return = curl_exec($curl); curl_close($curl);
return $return;
}// end fuction
//
function munja_send($mtype, $name, $phone, $msg, $callback, $contents, $reserve="", $reserve_time="", $etc1="", $etc2="") {
$host = "https://www.okmunja.co.kr";
$data = array();
$data['remote_id'] = "beltenglish"; //
$data['remote_pass'] = "belt202~"; //
$data['remote_reserve'] = $reserve;
$data['remote_reservetime'] = $reserve_time;
$data['remote_name'] = $name;
$data['remote_phone'] = $phone;
$data['remote_callback'] = $callback;
$data['remote_subject'] = "() "; //
$data['remote_msg'] = $msg;
$data['remote_contents'] = $contents;
$data['remote_etc1'] = $etc1;
$data['remote_etc2'] = $etc2;
if (empty($mtype)) $mtype = "sms";
if ($mtype == "lms" || $mtype == "mms") {
$path = "/Remote/RemoteMms.html";
} else {
$path = "/Remote/RemoteSms.html";
}
$host_url = $host.$path;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $host_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curl, CURLOPT_POST, true);
$return = curl_exec($curl);
curl_close($curl);
return $return;
} // end function
$sms_callback = "02-3431-8202"; //
// ok =================================================
include_once($entra['path']['content'].'/_exam_price.php');
// ,
function capitalizeWords($value) {
// ,
$words = explode(' ', $value);
$capitalizedWords = array_map(function($word) {
return ucfirst(strtolower($word));
}, $words);
return implode(' ', $capitalizedWords);
}
//
function isValidPhoneNumber($phoneNumber) {
//
$pattern = '/^(01[0-9])-(\d{3,4})-(\d{4})$/';
return preg_match($pattern, $phoneNumber);
}
function isValidEnglishName($name) {
//
$pattern = '/^[A-Za-z]+(?:\s[A-Za-z]+)+$/';
return preg_match($pattern, $name);
}
function isValidLastName($lastName) {
//
$pattern = '/^[A-Za-z]+$/';
return preg_match($pattern, $lastName);
}
Function Calls
None |
Stats
MD5 | f936b8ee04ae93ed2d5b0e8cee8529d5 |
Eval Count | 0 |
Decode Time | 95 ms |