Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ltms.eemo.co.kr
/
public_html
/
super
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/ltms.eemo.co.kr/public_html/super/ltman_contract_re_auth_do.php
<? session_cache_limiter('no-cache, must-revalidate'); session_start(); header("Pragma: no-cache"); header("Cache-Control: no-cache,must-revalidate"); header("Content-Type: text/html; charset=utf-8"); include_once("dbconn.php"); include_once("lib.php"); foreach($_GET as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } foreach($_POST as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } $arr_rst=array(); $rs_contract=RS("select * from ltman_contract where no='$no' "); $contractor_company=RS("select * from contractor_company where no='{$_COOKIE[ltms_company_no]}' "); $rs_vmem=RS("select * from ltman_member where no='{$rs_contract[mem_no]}' "); if($auth==1) { mysql_query("update ltman_contract set status='1', is_auth='$auth', is_auth_date=now(), re_auth='0', re_auth_chk_date=now() where no='$no' ") or die(); $data = array( 'msg' => "담당자어플 : ".$contractor_company[name]." ".$rs_contract[breed_type]." 계약 재승인요청이 승인되었습니다", 'tel' => $rs_vmem[tel] ); $url = "http://ltms.eemo.co.kr/super/sms_send_msg.php"; $ch = curl_init(); //curl 초기화 curl_setopt($ch, CURLOPT_URL, $url); //URL 지정하기 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //요청 결과를 문자열로 반환 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); //connection timeout 10초 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //원격 서버의 인증서가 유효한지 검사 안함 curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); //POST data curl_setopt($ch, CURLOPT_POST, true); //true시 post 전송 $response = curl_exec($ch); curl_close($ch); } else if($auth==-1) { mysql_query("update ltman_contract set status='-1', is_auth='$auth', is_auth_date=now(), re_auth='0', re_auth_chk_date=now() where no='$no' ") or die(); mysql_query("insert into ltman_contract_reject_log set mem_no='{$rs_contract[mem_no]}', ltman_contract_no='$no', reject_msg='$msg', regdate=now() ") or die(); $data = array( 'msg' => "담당자어플 : ".$contractor_company[name]." ".$rs_contract[breed_type]." 계약 재승인요청이 ".$msg." 사유로 반려되었습니다", 'tel' => $rs_farm_ju[cel] ); $url = "http://ltms.eemo.co.kr/super/sms_send_msg.php"; $ch = curl_init(); //curl 초기화 curl_setopt($ch, CURLOPT_URL, $url); //URL 지정하기 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //요청 결과를 문자열로 반환 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); //connection timeout 10초 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //원격 서버의 인증서가 유효한지 검사 안함 curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); //POST data curl_setopt($ch, CURLOPT_POST, true); //true시 post 전송 $response = curl_exec($ch); curl_close($ch); } $arr_rst['rst']='1'; echo json_encode($arr_rst); ?>