Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
nonga.eemo.co.kr
/
public_html
/
www
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/nonga.eemo.co.kr/public_html/www/local_dote_input_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_ipchu_confirm_log where no='$ipchu_no' "); for($n=1;$n<=100;$n++) { $prev_date=date('Y-m-d', strtotime("-".$n." day",strtotime($jdate))); if($prev_date < $rs[jdate]) { $prev_date=$rs[jdate]; } $rs_prev_dote=RS("select * from farm_dote_input_log where local_ipchu_no='$ipchu_no' and jdate='$prev_date' "); if(!$rs_prev_dote[no]) { $query="insert into farm_dote_input_log set farm_no='{$rs[farm_no]}', dong_no='{$rs[dong_no]}', jdate='$prev_date', dote='0', pesa='0', weight='0', local_ipchu_no='$ipchu_no', regdate=now() "; mysql_query($query) or die(mysql_error()); } } $is_rs=RS("select * from farm_dote_input_log where local_ipchu_no='$ipchu_no' and jdate='$jdate' "); if(!$is_rs[no]) { $query="insert into farm_dote_input_log set farm_no='{$rs[farm_no]}', dong_no='{$rs[dong_no]}', jdate='$jdate', dote='$dote', pesa='$pesa', weight='$weight', local_ipchu_no='$ipchu_no', regdate=now() "; mysql_query($query) or die(mysql_error()); } else { $query="update farm_dote_input_log set dote='$dote', pesa='$pesa', weight='$weight' where local_ipchu_no='$ipchu_no' and jdate='$jdate' "; mysql_query($query) or die(mysql_error()); } $arr_rst['rst']='1'; echo json_encode($arr_rst); ?>