include_once "../lib/rlatjd_fun.php";
extract($_REQUEST);
if ($_GET['sp'])
$readonly = "readonly";
if ($_POST['speech'])
$sp = $_POST['speech'];
if (!$pcode)
$pcode = "opb";
$meta_img = "";
if ($_GET['landing_idx'] != "") {
$landing_idx = $_GET['landing_idx'];
$sql = "UPDATE Gn_landing SET read_cnt = read_cnt+1 WHERE landing_idx='{$landing_idx}'";
mysqli_query($self_con,$sql);
$sql = "SELECT * FROM Gn_landing WHERE landing_idx='{$landing_idx}'";
$result = mysqli_query($self_con,$sql);
$data = mysqli_fetch_array($result);
if ($data['status_yn'] == "N") {
echo '';
exit;
}
$m_id = $row['m_id'];
$event_idx = $row['event_idx'];
$pcode = $data['pcode'];
$page_title = $data['title'];
if ($data['img_thumb'] != "") {
$meta_img = $data['img_thumb'];
} else {
// 기존에디터로 편집된 랜딩페이지를 위해서 추가됨
if (strpos($data['content'], '
location.href = '$direct_url';");
}
//아이엠 프로필 상단 착한기업소개 자동링크
if ($landing_idx == "787") {
$direct_url = "https://smartstore.naver.com/misohealth/products/2878753669";
echo ("");
}
// 김세규 대표 아이엠 자동 링크
if ($landing_idx == "790") {
$direct_url = "https://kiam.kr/?EtYTwm9OZn";
echo ("");
}
//아이엠 공유정보더보기 자동링크
if ($landing_idx == "788") {
$direct_url = "https://oog.kiam.kr/pages/page_3302.php";
echo ("");
}
$url_refer = str_replace("&", "###", $_SERVER['REQUEST_URI']);
?>
if ($_GET['landing_idx'] = "") { ?>
} ?>
if ($mode && $chk && $over == "yes") {
//referer_check();
if ($chk != $_SESSION['join'])
alert('중복가입이 방지 되었습니다.');
$ipcheck = $_SERVER['REMOTE_ADDR'];
$sql = "INSERT INTO Gn_event_request SET event_idx='{$event_idx}',
event_code='{$event_code}',
name='{$name}',
mobile='{$mobile}',
email='{$email}',
job='{$job}',
other='{$other}',
pcode='{$pcode}',
sp='{$sp}',
ip_addr='{$ipcheck}',
regdate=now(),
step_end_time=now()";
if ($landing_idx != '')
$sql .= " ,landing_idx='{$landing_idx}'";
mysqli_query($self_con,$sql);
alert("접수 되었습니다. 감사합니다.", "/opb/index.php");
} elseif ($mode && $chk) {
}
if (!$mode) $mode = "JOIN";
$_SESSION['join'] = md5(time());
function alerting($msg)
{
echo "";
}
if ($_POST['mode'] == "speech") {
if ($_POST['name'] == "") {
alerting('신청자명을 입력해주세요');
} else if ($_POST['mobile'] == "") {
alerting('전화번호를 입력해주세요. ');
} else if ($_POST['sp'] == "") {
alerting('신청강좌를 입력해주세요.');
} else {
$ipcheck = $_SERVER['REMOTE_ADDR'];
// duplicate submit prevention (2026-04-04, fixed 2026-04-05)
$dup_mobile = mysqli_real_escape_string($self_con, $_POST['mobile']);
$dup_pcode = mysqli_real_escape_string($self_con, $_POST['pcode']);
$sql_dup_event = "SELECT 1 FROM Gn_event_request WHERE mobile='{$dup_mobile}' AND pcode='{$dup_pcode}' AND regdate > DATE_SUB(NOW(), INTERVAL 10 SECOND) LIMIT 1";
$dup_event_res = mysqli_query($self_con, $sql_dup_event);
if (!$dup_event_res || mysqli_num_rows($dup_event_res) == 0) {
$sql_dup_ai = "SELECT 1 FROM Gn_aievent_request WHERE mobile='{$dup_mobile}' AND pcode='{$dup_pcode}' AND regdate > DATE_SUB(NOW(), INTERVAL 10 SECOND) LIMIT 1";
$dup_event_res = mysqli_query($self_con, $sql_dup_ai);
}
if ($dup_event_res && mysqli_num_rows($dup_event_res) > 0) {
echo '';
echo "";
echo '