Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ltman.eemo.co.kr
/
public_html
/
www
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/ltman.eemo.co.kr/public_html/www/farm_iot_alarm_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)); } if($set_no==1) { if($onoff==1) { mysql_query("update farm set set_alarm='$onoff', set_alarm_sound='1', set_alarm_tts='1', alarm_vibrate='1', alarm_popup='1' where no='$farm_no' ") or die(); } else { mysql_query("update farm set set_alarm='$onoff', set_alarm_sound='0', set_alarm_tts='0', alarm_vibrate='0', alarm_popup='0' where no='$farm_no' ") or die(); } } else if($set_no==2) { mysql_query("update farm set set_alarm_sound='$onoff' where no='$farm_no' ") or die(); } else if($set_no==3) { mysql_query("update farm set set_alarm_tts='$onoff' where no='$farm_no' ") or die(); } else if($set_no==4) { mysql_query("update farm set alarm_vibrate='$onoff' where no='$farm_no' ") or die(); } else if($set_no==5) { mysql_query("update farm set alarm_popup='$onoff' where no='$farm_no' ") or die(); } $arr_rst['rst']='1'; echo urldecode(json_encode($arr_rst)); ?>