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/claim_rst_set_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=RS("select * from farm_claim_input_log where no='$no' "); $rs_farm=RS("select * from farm where no='{$rs[farm_no]}' "); mysql_query("update farm_claim_input_log set answer_cont='$answer_cont' where no='$no' ") or die(); $arr_gubun=array(); if($rs[chk_pesa]==1) { $arr_gubun[]="폐사발생"; } if($rs[chk_jilb]==1) { $arr_gubun[]="난계대질병"; } if($rs[chk_yakchu]==1) { $arr_gubun[]="약추발생"; } if($rs[chk_unsong]==1) { $arr_gubun[]="운송시 문제"; } if($rs[chk_weight]==1) { $arr_gubun[]="중량미달"; } if($rs[chk_else]==1) { $arr_gubun[]="기타"; } $str_gubun=implode(",",$arr_gubun); $rs_dong=RS("select * from farm_dong_info where no='{$rs[dong_no]}' "); $title2="클레임처리 알림"; $title="클레임처리"; $cont="클레임처리 : ".$rs_dong[dong_name]." ".$rs[jdate]." ".$str_gubun." 발생건이 처리될 예정입니다."; $tts_cont=$cont; $query="insert into farm_msg_alarm set farm_no='{$rs[farm_no]}', contract_no='{$rs[contract_no]}', msg_gubun='사육관리', title='$title2', cont='$cont', parts_no='{$rs[parts_no]}', regdate=now() "; mysql_query($query) or die(mysql_error()); $mode="notice"; if($rs_farm[set_alarm]==1) { $result_mem=mysql_query("select * from member where farm_no='{$rs_oklog[farm_no]}' and fcm_token is not null ") or die(mysql_error()); while($rs_mem=mysql_fetch_array($result_mem)) { $tokens = array(); $tokens[]=$rs_mem[fcm_token]; $istts=$rs_farm[set_alarm_tts]; $is_sound=$rs_farm[set_alarm_tts]==1?"0":$rs_farm[set_alarm_sound]; $isvib=$rs_farm[alarm_vibrate]; $ispopup=$rs_farm[alarm_popup]; $message = array("message" => $cont,"title" => $title,"mode" => $mode,"sound" => $is_sound=="1"?"1":'-1',"tts" => $tts_cont,"istts" => $istts=="1"?"1":'-1',"isvib" => $isvib=="1"?"1":'-1',"ispopup" => $ispopup=="1"?"1":'-1'); $rst=send_notification($tokens, $message); if($rst=="success") { $str_val=implode("&",$tokens); mysql_query("insert into push_send_log set arr_mem_no='{$rs_mem[no]}', title='$title', cont='$cont', tts_cont='$tts_cont', is_tts='$istts', mode='$mode', is_sound='$is_sound', regdate=now(), mode2='2' ") or die(mysql_error()); } else { } } } $arr_rst['rst']='1'; echo json_encode($arr_rst); ?>