php 입력값 제어 reg
페이지 정보
본문
include \"../con/con.php\";
$secur_ip = $_SERVER['REMOTE_ADDR'];
//okj 접근경로 처리
$sql = \"select * from company_info where find_in_set('$c_url', c_url) > 0\";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$c_no = $row[no];
if($c_no == \"\") $c_no = \"1\";
//okj 접근경로 처리//
$email = checkemail($_POST['mail']).\"@\".checkemail($_POST['mail2']);
$gender = checkinput($_POST['men']);
$hand = checknum($_POST['tel']).\"-\".checknum($_POST['tel1']).\"-\".checknum($_POST['tel2']);
if(checknum($_POST['tel1']) == \"\" || checknum($_POST['tel2']) == \"\"){ $chk_hand = \"nullvalue\";}
//okj 재무설계 기타 전화번호는 tel 로 통일할껏
/* if(checknum($_POST['sTEL_2']) != \"\"){
$hand = checknum($_POST['sTEL_1']).\"-\".checknum($_POST['sTEL_2']).\"-\".checknum($_POST['sTEL_3']);
}elseif(checknum($_POST['sTEL_21']) != \"\"){
$hand = checknum($_POST['sTEL_11']).\"-\".checknum($_POST['sTEL_21']).\"-\".checknum($_POST['sTEL_31']);
}elseif(checknum($_POST['sTEL_22']) != \"\"){
$hand = checknum($_POST['sTEL_12']).\"-\".checknum($_POST['sTEL_22']).\"-\".checknum($_POST['sTEL_32']);
}
if(checknum($_POST['sTEL_2']) == \"\" || checknum($_POST['sTEL_3']) == \"\"){ $chk_hand = \"nullvalue\";}
elseif(checknum($_POST['sTEL_21']) == \"\" || checknum($_POST['sTEL_31']) == \"\"){ $chk_hand = \"nullvalue\";}
elseif(checknum($_POST['sTEL_22']) == \"\" || checknum($_POST['sTEL_32']) == \"\"){ $chk_hand = \"nullvalue\";}
*/
//okj 재무설계 기타//
//okj 상단 무료상담에 생년월일 셀렉트박스로 수정되기 전까지만 사용
if(checknum($_POST['birthY']) != \"\"){ $birth = checknum($_POST['birthY']).checknum($_POST['birthM']).checknum($_POST['birthD']); }else{ $birth = \"19\".checknum($_POST['birth']);}
if(checknum($_POST['sBIRTH_Y'])){ $sBIRTH = checknum($_POST['sBIRTH_Y']).checknum($_POST['sBIRTH_M']).checknum($_POST['sBIRTH_D']); } //okj 재무설계
//if(checknum($_POST['sBIRTH_Y']) != \"\"){ $birth = checknum($_POST['sBIRTH_Y']).checknum($_POST['sBIRTH_M']).checknum($_POST['sBIRTH_D']); } //okj 재무설계
$s_type = iconv(\"euc-kr\", \"utf-8\", $_POST['s_type']);
$sNAME = iconv(\"euc-kr\", \"utf-8\", $_POST['customer']);
$inskind = iconv(\"euc-kr\", \"utf-8\", $_POST['inskind']);
$job = iconv(\"euc-kr\", \"utf-8\", $_POST['job']);
$call_time = iconv(\"euc-kr\", \"utf-8\", $_POST['call_time']);
$marry = iconv(\"euc-kr\", \"utf-8\", $_POST['marry']);
$inskind_detail = iconv(\"euc-kr\", \"utf-8\", $_POST['inskind_detail']); //okj mhd 현대해상미니사이트
$carname = iconv(\"euc-kr\", \"utf-8\", $_POST['carname']); //okj mhd 현대해상미니사이트
$CarKind = iconv(\"euc-kr\", \"utf-8\", $_POST['CarKind']); //okj with 자동차보험
//echo \"입력:\".$email;
$s_type = checkinput($s_type);
$sNAME = checkhangul($sNAME);
$inskind = checkinput($inskind);
$job = checkinput($job);
$call_time = checkinput($call_time);
$marry = checkinput($marry);
$inskind_detail = checkinput($inskind_detail); //okj mhd 현대해상미니사이트
$carname = checkinput($carname); //okj mhd 현대해상미니사이트
$carkind = checkinput($CarKind); //okj with 자동차보험
if($carkind != \"\"){ $carname = $carkind; }
//echo \"<br>출력:\".$email;
//okj 빈데이터 입력불가처리
//if($s_type == \"\" && $hand == \"\" && $site_type != \"financial\"){
if($s_type == \"\" && $chk_hand == \"nullvalue\" && $site_type != \"financial\"){ //okj 핸드폰 빈값 처리 해결하기
mysql_close($conn);
echo\"<script>window.alert(\"입력된 데이터가 없습니다.\");history.go(-1);</script>\";
exit;
} //okj 빈데이터 입력불가처리//
//okj 중복확인
if($exec == \"reg2\" && $site_type == \"totalins\"){ //okj 보험마트몰
$sql = \"select count(*) from totalins_customer where hand = '$hand'\";
$table_change = \"totalins_customer\";
}elseif($exec != \"reg2\" && $site_type == \"totalins\"){ //okj 보험마트몰
$sql = \"select count(*) from totalins_customer where birth = '$birth' and hand = '$hand'\";
$table_change = \"totalins_customer\";
}elseif($site_type == \"carins\"){ //okj 자동차
$sql = \"select count(*) from carins_customer where birth = '$birth' and hand = '$hand'\";
$table_change = \"carins_customer\";
}elseif($site_type == \"financial\"){ //okj 재무설계
$sql = \"select count(*) from register_info where birth = '$sBIRTH' and hand = '$hand'\";
$table_change = \"register_info\";
$birth = $sBIRTH;
}
$res = mysql_query($sql);
$total = @mysql_fetch_array($res);
if($total[0] > 0) $chk_err = '중복'; else $chk_err = '';
//okj 중복확인//
//okj 중복데이터 입력불가처리
/*if($site_type == \"totalins\"){
$table_change = \"totalins_customer\";
}elseif($site_type == \"carins\"){
$table_change = \"carins_customer\";
}elseif($site_type == \"financial\"){
$table_change = \"register_info\";
$birth = $sBIRTH;
}*/
$sql = \"select * from \".$table_change.\" order by no desc limit 1\";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$chk_c_url = $row['c_url'];
$chk_url = $row['url'];
$chk_name = $row['name'];
$chk_hand = $row['hand'];
$chk_birth = $row['birth'];
$chk_s_type = $row['s_type'];
if($chk_c_url == $c_url && $chk_url == $url && $chk_name == $sNAME && $chk_hand == $hand && $chk_birth == $birth && $chk_s_type == $s_type){
mysql_close($conn);
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
exit;
}
//okj 중복데이터 입력불가처리//
if($site_type == \"totalins\"){ //okj 보험마트몰
$query = \"insert into totalins_customer set
c_no = '$c_no',
c_url = '$c_url',
url = '$url',
name = '$sNAME',
gender = '$gender',
email = '$email',
hand = '$hand',
birth = '$birth',
inskind = '$inskind',
s_type = '$s_type',
inskind_detail = '$inskind_detail',
carname = '$carname',
job = '$job',
call_time = '$call_time',
marriage = '$marry',
chk_err = '$chk_err',
secur_ip = '$secur_ip',
reg_date = now()
\";
$result = mysql_query($query);
if(!mysql_affected_rows()){ echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\"; }
$no = mysql_insert_id();
if($no){
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
}else{
echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\";
}
//okj 보험마트몰
}elseif($site_type == \"carins\"){ //okj 자동차보험
$CarNoChkBox = checkinput($_POST['CarNoChkBox']);
$carno = iconv(\"euc-kr\", \"utf-8\", $_POST['carno']);
$etcquestion = iconv(\"euc-kr\", \"utf-8\", $_POST['etcquestion']);
$carno = checkinput($carno);
$etcquestion = checkinput($etcquestion);
$query = \"insert into carins_customer set
c_no = '$c_no',
c_url = '$c_url',
url = '$url',
name = '$sNAME',
gender = '$gender',
email = '$email',
hand = '$hand',
birth = '$birth',
carno = '$carno',
firstjoin = '$CarNoChkBox',
carname = '$carname',
s_type = '$s_type',
memo = '$etcquestion',
chk_err = '$chk_err',
reg_date = now()
\";
$result = mysql_query($query);
if(!mysql_affected_rows()){ echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\"; }
$no = mysql_insert_id();
if($no){
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
}else{
echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\";
}
//okj 자동차보험//
}elseif($site_type == \"financial\"){ //okj 재무설계
$email = checkemail($_POST['sEML_1']).\"@\".checkemail($_POST['sEML_2']);
//okj 전화번호 tel 로 일괄 변경할껏.
/*if(checknum($_POST['sTEL_1']) != \"\"){
$hand = checknum($_POST['sTEL_1']).\"-\".checknum($_POST['sTEL_2']).\"-\".checknum($_POST['sTEL_3']);
}elseif(checknum($_POST['sTEL_11']) != \"\"){
$hand = checknum($_POST['sTEL_11']).\"-\".checknum($_POST['sTEL_21']).\"-\".checknum($_POST['sTEL_31']);
}elseif(checknum($_POST['sTEL_12']) != \"\"){
$hand = checknum($_POST['sTEL_12']).\"-\".checknum($_POST['sTEL_22']).\"-\".checknum($_POST['sTEL_32']);
}*/
for($i=0; $i < count($sINVESTMENT);$i++){
$sINVESTMENT[$i] = iconv(\"euc-kr\", \"utf-8\", $_POST['sINVESTMENT'][$i]);
$sINVESTMENT[$i] = checkinput($sINVESTMENT[$i]);
}
for($i=0; $i < count($sFINANCE);$i++){
$sFINANCE[$i] = iconv(\"euc-kr\", \"utf-8\", $_POST['sFINANCE'][$i]);
$sFINANCE[$i] = checkinput($sFINANCE[$i]);
}
for($i=0; $i < count($sINTEREST);$i++){
$sINTEREST[$i] = iconv(\"euc-kr\", \"utf-8\", $_POST['sINTEREST'][$i]);
$sINTEREST[$i] = checkinput($sINTEREST[$i]);
}
$m_type = implode(\",\", $sINTEREST);
if($_POST['sINTEREST1']){
$m_type = iconv(\"euc-kr\", \"utf-8\", $_POST['sINTEREST1']);
$m_type = checkinput($m_type);
}
$m_type1 = implode(\",\", $sINVESTMENT);
$m_type2 = implode(\",\", $sFINANCE);
//$s_type = iconv(\"euc-kr\", \"utf-8\", $s_type);
$s_type1 = iconv(\"euc-kr\", \"utf-8\", $_POST['s_type1']);
$sNAME = iconv(\"euc-kr\", \"utf-8\", $_POST['sNAME']);
$cMARRY = iconv(\"euc-kr\", \"utf-8\", $_POST['cMARRY']);
$sJOB = iconv(\"euc-kr\", \"utf-8\", $_POST['sJOB']);
$sEXT = iconv(\"euc-kr\", \"utf-8\", $_POST['textarea']);
$sAREA_1 = iconv(\"euc-kr\", \"utf-8\", $_POST['sAREA_1']);
$sAREA_2 = iconv(\"euc-kr\", \"utf-8\", $_POST['sAREA_2']);
//if(checknum($_POST['sBIRTH_Y'])){ $sBIRTH = checknum($_POST['sBIRTH_Y']).checknum($_POST['sBIRTH_M']).checknum($_POST['sBIRTH_D']); }
$s_type1 = checkinput($s_type1);
$sNAME = checkhangul($sNAME);
$cMARRY = checkinput($cMARRY);
$sJOB = checkinput($sJOB);
$sEXT = checkinput($sEXT);
$sAREA_1 = checkinput($sAREA_1);
$sAREA_2 = checkinput($sAREA_2);
//okj 중복데이터 입력불가처리
/*$sql = \"select * from register_info order by no desc limit 1\";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$chk_c_url = $row['c_url'];
$chk_url = $row['url'];
$chk_name = $row['name'];
$chk_hand = $row['hand'];
$chk_birth = $row['birth'];
$chk_s_type = $row['s_type'];
if($chk_c_url == $c_url && $chk_url == $url && $chk_name == $sNAME && $chk_hand == $hand && $chk_birth == $sBIRTH && $chk_s_type == $s_type){
mysql_close($conn);
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
exit;
}*/
//okj 중복데이터 입력불가처리//
$query = \"insert into register_info set
c_no = '$c_no',
c_url = '$c_url',
url = 'assetplanner.co.kr',
name = '$sNAME',
gender = '$cGENDER',
email = '$email',
hand = '$hand',
birth = '$sBIRTH',
chk_married = '$cMARRY',
career = '$sJOB',
area = '$sAREA_1',
area1 = '$sAREA_2',
s_type = '$s_type',
s_type1 = '$s_type1',
m_type = '$m_type',
m_type1 = '$m_type1',
m_type2 = '$m_type2',
chk_money = '$sSAVINGS',
memo = '$sEXT',
chk_err = '$chk_err',
reg_date = now()
\";
$result = mysql_query($query);
if(!mysql_affected_rows()){ echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\"; }
$no = mysql_insert_id();
if($no){
echo\"<script>window.open('http://\".$c_url.\".\".$url.\"/include/popup.php?c_url=$c_url','','width=550,height=300,scrollbars=no,menubar=no,status=no');location.href='http://\".$c_url.\".\".$url.\"/include/log_location.php?c_url=$c_url';</script>\";
}
//okj 재무설계
}
mysql_close($conn);
$secur_ip = $_SERVER['REMOTE_ADDR'];
//okj 접근경로 처리
$sql = \"select * from company_info where find_in_set('$c_url', c_url) > 0\";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$c_no = $row[no];
if($c_no == \"\") $c_no = \"1\";
//okj 접근경로 처리//
$email = checkemail($_POST['mail']).\"@\".checkemail($_POST['mail2']);
$gender = checkinput($_POST['men']);
$hand = checknum($_POST['tel']).\"-\".checknum($_POST['tel1']).\"-\".checknum($_POST['tel2']);
if(checknum($_POST['tel1']) == \"\" || checknum($_POST['tel2']) == \"\"){ $chk_hand = \"nullvalue\";}
//okj 재무설계 기타 전화번호는 tel 로 통일할껏
/* if(checknum($_POST['sTEL_2']) != \"\"){
$hand = checknum($_POST['sTEL_1']).\"-\".checknum($_POST['sTEL_2']).\"-\".checknum($_POST['sTEL_3']);
}elseif(checknum($_POST['sTEL_21']) != \"\"){
$hand = checknum($_POST['sTEL_11']).\"-\".checknum($_POST['sTEL_21']).\"-\".checknum($_POST['sTEL_31']);
}elseif(checknum($_POST['sTEL_22']) != \"\"){
$hand = checknum($_POST['sTEL_12']).\"-\".checknum($_POST['sTEL_22']).\"-\".checknum($_POST['sTEL_32']);
}
if(checknum($_POST['sTEL_2']) == \"\" || checknum($_POST['sTEL_3']) == \"\"){ $chk_hand = \"nullvalue\";}
elseif(checknum($_POST['sTEL_21']) == \"\" || checknum($_POST['sTEL_31']) == \"\"){ $chk_hand = \"nullvalue\";}
elseif(checknum($_POST['sTEL_22']) == \"\" || checknum($_POST['sTEL_32']) == \"\"){ $chk_hand = \"nullvalue\";}
*/
//okj 재무설계 기타//
//okj 상단 무료상담에 생년월일 셀렉트박스로 수정되기 전까지만 사용
if(checknum($_POST['birthY']) != \"\"){ $birth = checknum($_POST['birthY']).checknum($_POST['birthM']).checknum($_POST['birthD']); }else{ $birth = \"19\".checknum($_POST['birth']);}
if(checknum($_POST['sBIRTH_Y'])){ $sBIRTH = checknum($_POST['sBIRTH_Y']).checknum($_POST['sBIRTH_M']).checknum($_POST['sBIRTH_D']); } //okj 재무설계
//if(checknum($_POST['sBIRTH_Y']) != \"\"){ $birth = checknum($_POST['sBIRTH_Y']).checknum($_POST['sBIRTH_M']).checknum($_POST['sBIRTH_D']); } //okj 재무설계
$s_type = iconv(\"euc-kr\", \"utf-8\", $_POST['s_type']);
$sNAME = iconv(\"euc-kr\", \"utf-8\", $_POST['customer']);
$inskind = iconv(\"euc-kr\", \"utf-8\", $_POST['inskind']);
$job = iconv(\"euc-kr\", \"utf-8\", $_POST['job']);
$call_time = iconv(\"euc-kr\", \"utf-8\", $_POST['call_time']);
$marry = iconv(\"euc-kr\", \"utf-8\", $_POST['marry']);
$inskind_detail = iconv(\"euc-kr\", \"utf-8\", $_POST['inskind_detail']); //okj mhd 현대해상미니사이트
$carname = iconv(\"euc-kr\", \"utf-8\", $_POST['carname']); //okj mhd 현대해상미니사이트
$CarKind = iconv(\"euc-kr\", \"utf-8\", $_POST['CarKind']); //okj with 자동차보험
//echo \"입력:\".$email;
$s_type = checkinput($s_type);
$sNAME = checkhangul($sNAME);
$inskind = checkinput($inskind);
$job = checkinput($job);
$call_time = checkinput($call_time);
$marry = checkinput($marry);
$inskind_detail = checkinput($inskind_detail); //okj mhd 현대해상미니사이트
$carname = checkinput($carname); //okj mhd 현대해상미니사이트
$carkind = checkinput($CarKind); //okj with 자동차보험
if($carkind != \"\"){ $carname = $carkind; }
//echo \"<br>출력:\".$email;
//okj 빈데이터 입력불가처리
//if($s_type == \"\" && $hand == \"\" && $site_type != \"financial\"){
if($s_type == \"\" && $chk_hand == \"nullvalue\" && $site_type != \"financial\"){ //okj 핸드폰 빈값 처리 해결하기
mysql_close($conn);
echo\"<script>window.alert(\"입력된 데이터가 없습니다.\");history.go(-1);</script>\";
exit;
} //okj 빈데이터 입력불가처리//
//okj 중복확인
if($exec == \"reg2\" && $site_type == \"totalins\"){ //okj 보험마트몰
$sql = \"select count(*) from totalins_customer where hand = '$hand'\";
$table_change = \"totalins_customer\";
}elseif($exec != \"reg2\" && $site_type == \"totalins\"){ //okj 보험마트몰
$sql = \"select count(*) from totalins_customer where birth = '$birth' and hand = '$hand'\";
$table_change = \"totalins_customer\";
}elseif($site_type == \"carins\"){ //okj 자동차
$sql = \"select count(*) from carins_customer where birth = '$birth' and hand = '$hand'\";
$table_change = \"carins_customer\";
}elseif($site_type == \"financial\"){ //okj 재무설계
$sql = \"select count(*) from register_info where birth = '$sBIRTH' and hand = '$hand'\";
$table_change = \"register_info\";
$birth = $sBIRTH;
}
$res = mysql_query($sql);
$total = @mysql_fetch_array($res);
if($total[0] > 0) $chk_err = '중복'; else $chk_err = '';
//okj 중복확인//
//okj 중복데이터 입력불가처리
/*if($site_type == \"totalins\"){
$table_change = \"totalins_customer\";
}elseif($site_type == \"carins\"){
$table_change = \"carins_customer\";
}elseif($site_type == \"financial\"){
$table_change = \"register_info\";
$birth = $sBIRTH;
}*/
$sql = \"select * from \".$table_change.\" order by no desc limit 1\";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$chk_c_url = $row['c_url'];
$chk_url = $row['url'];
$chk_name = $row['name'];
$chk_hand = $row['hand'];
$chk_birth = $row['birth'];
$chk_s_type = $row['s_type'];
if($chk_c_url == $c_url && $chk_url == $url && $chk_name == $sNAME && $chk_hand == $hand && $chk_birth == $birth && $chk_s_type == $s_type){
mysql_close($conn);
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
exit;
}
//okj 중복데이터 입력불가처리//
if($site_type == \"totalins\"){ //okj 보험마트몰
$query = \"insert into totalins_customer set
c_no = '$c_no',
c_url = '$c_url',
url = '$url',
name = '$sNAME',
gender = '$gender',
email = '$email',
hand = '$hand',
birth = '$birth',
inskind = '$inskind',
s_type = '$s_type',
inskind_detail = '$inskind_detail',
carname = '$carname',
job = '$job',
call_time = '$call_time',
marriage = '$marry',
chk_err = '$chk_err',
secur_ip = '$secur_ip',
reg_date = now()
\";
$result = mysql_query($query);
if(!mysql_affected_rows()){ echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\"; }
$no = mysql_insert_id();
if($no){
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
}else{
echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\";
}
//okj 보험마트몰
}elseif($site_type == \"carins\"){ //okj 자동차보험
$CarNoChkBox = checkinput($_POST['CarNoChkBox']);
$carno = iconv(\"euc-kr\", \"utf-8\", $_POST['carno']);
$etcquestion = iconv(\"euc-kr\", \"utf-8\", $_POST['etcquestion']);
$carno = checkinput($carno);
$etcquestion = checkinput($etcquestion);
$query = \"insert into carins_customer set
c_no = '$c_no',
c_url = '$c_url',
url = '$url',
name = '$sNAME',
gender = '$gender',
email = '$email',
hand = '$hand',
birth = '$birth',
carno = '$carno',
firstjoin = '$CarNoChkBox',
carname = '$carname',
s_type = '$s_type',
memo = '$etcquestion',
chk_err = '$chk_err',
reg_date = now()
\";
$result = mysql_query($query);
if(!mysql_affected_rows()){ echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\"; }
$no = mysql_insert_id();
if($no){
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
}else{
echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\";
}
//okj 자동차보험//
}elseif($site_type == \"financial\"){ //okj 재무설계
$email = checkemail($_POST['sEML_1']).\"@\".checkemail($_POST['sEML_2']);
//okj 전화번호 tel 로 일괄 변경할껏.
/*if(checknum($_POST['sTEL_1']) != \"\"){
$hand = checknum($_POST['sTEL_1']).\"-\".checknum($_POST['sTEL_2']).\"-\".checknum($_POST['sTEL_3']);
}elseif(checknum($_POST['sTEL_11']) != \"\"){
$hand = checknum($_POST['sTEL_11']).\"-\".checknum($_POST['sTEL_21']).\"-\".checknum($_POST['sTEL_31']);
}elseif(checknum($_POST['sTEL_12']) != \"\"){
$hand = checknum($_POST['sTEL_12']).\"-\".checknum($_POST['sTEL_22']).\"-\".checknum($_POST['sTEL_32']);
}*/
for($i=0; $i < count($sINVESTMENT);$i++){
$sINVESTMENT[$i] = iconv(\"euc-kr\", \"utf-8\", $_POST['sINVESTMENT'][$i]);
$sINVESTMENT[$i] = checkinput($sINVESTMENT[$i]);
}
for($i=0; $i < count($sFINANCE);$i++){
$sFINANCE[$i] = iconv(\"euc-kr\", \"utf-8\", $_POST['sFINANCE'][$i]);
$sFINANCE[$i] = checkinput($sFINANCE[$i]);
}
for($i=0; $i < count($sINTEREST);$i++){
$sINTEREST[$i] = iconv(\"euc-kr\", \"utf-8\", $_POST['sINTEREST'][$i]);
$sINTEREST[$i] = checkinput($sINTEREST[$i]);
}
$m_type = implode(\",\", $sINTEREST);
if($_POST['sINTEREST1']){
$m_type = iconv(\"euc-kr\", \"utf-8\", $_POST['sINTEREST1']);
$m_type = checkinput($m_type);
}
$m_type1 = implode(\",\", $sINVESTMENT);
$m_type2 = implode(\",\", $sFINANCE);
//$s_type = iconv(\"euc-kr\", \"utf-8\", $s_type);
$s_type1 = iconv(\"euc-kr\", \"utf-8\", $_POST['s_type1']);
$sNAME = iconv(\"euc-kr\", \"utf-8\", $_POST['sNAME']);
$cMARRY = iconv(\"euc-kr\", \"utf-8\", $_POST['cMARRY']);
$sJOB = iconv(\"euc-kr\", \"utf-8\", $_POST['sJOB']);
$sEXT = iconv(\"euc-kr\", \"utf-8\", $_POST['textarea']);
$sAREA_1 = iconv(\"euc-kr\", \"utf-8\", $_POST['sAREA_1']);
$sAREA_2 = iconv(\"euc-kr\", \"utf-8\", $_POST['sAREA_2']);
//if(checknum($_POST['sBIRTH_Y'])){ $sBIRTH = checknum($_POST['sBIRTH_Y']).checknum($_POST['sBIRTH_M']).checknum($_POST['sBIRTH_D']); }
$s_type1 = checkinput($s_type1);
$sNAME = checkhangul($sNAME);
$cMARRY = checkinput($cMARRY);
$sJOB = checkinput($sJOB);
$sEXT = checkinput($sEXT);
$sAREA_1 = checkinput($sAREA_1);
$sAREA_2 = checkinput($sAREA_2);
//okj 중복데이터 입력불가처리
/*$sql = \"select * from register_info order by no desc limit 1\";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$chk_c_url = $row['c_url'];
$chk_url = $row['url'];
$chk_name = $row['name'];
$chk_hand = $row['hand'];
$chk_birth = $row['birth'];
$chk_s_type = $row['s_type'];
if($chk_c_url == $c_url && $chk_url == $url && $chk_name == $sNAME && $chk_hand == $hand && $chk_birth == $sBIRTH && $chk_s_type == $s_type){
mysql_close($conn);
echo \"<script>location.href='http://\".$c_url.\".\".$url.\"/?fstat=inok';</script>\";
exit;
}*/
//okj 중복데이터 입력불가처리//
$query = \"insert into register_info set
c_no = '$c_no',
c_url = '$c_url',
url = 'assetplanner.co.kr',
name = '$sNAME',
gender = '$cGENDER',
email = '$email',
hand = '$hand',
birth = '$sBIRTH',
chk_married = '$cMARRY',
career = '$sJOB',
area = '$sAREA_1',
area1 = '$sAREA_2',
s_type = '$s_type',
s_type1 = '$s_type1',
m_type = '$m_type',
m_type1 = '$m_type1',
m_type2 = '$m_type2',
chk_money = '$sSAVINGS',
memo = '$sEXT',
chk_err = '$chk_err',
reg_date = now()
\";
$result = mysql_query($query);
if(!mysql_affected_rows()){ echo\"<script>window.alert(\"신청시에러가발생했습니다.\");history.go(-1);</script>\"; }
$no = mysql_insert_id();
if($no){
echo\"<script>window.open('http://\".$c_url.\".\".$url.\"/include/popup.php?c_url=$c_url','','width=550,height=300,scrollbars=no,menubar=no,status=no');location.href='http://\".$c_url.\".\".$url.\"/include/log_location.php?c_url=$c_url';</script>\";
}
//okj 재무설계
}
mysql_close($conn);
- 이전글sql 기본 데이터 처리 20.02.21
- 다음글php con DB 저장 함수 20.02.21
댓글목록
등록된 댓글이 없습니다.