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/farm_ready_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 farm_contract where no='$contract_no' "); $rs_farm=RS("select * from farm where no='{$rs_contract[farm_no]}' "); $rs_rounds=RS("select max(rounds) as cnt from farm_import where jyear=year(now()) and farm_contractor_no='$contract_no' and is_export_complete='1' "); $is_double=RS("select no from farm_import where jyear=year(now()) and farm_contractor_no='$contract_no' and is_export_complete='0' "); if($is_double[no]) { $arr_rst['rst']='double'; echo json_encode($arr_rst); exit; } $rounds=$rs_rounds[cnt]+1; $arr_dongs=array(); $exp_nos=explode(",",$str_ids); foreach($exp_nos as $ak => $av) { $tmp_exp=explode("_",$av); $vv_dong_no=$tmp_exp[1]; $arr_dongs[]=$vv_dong_no; } $str_dongs=implode(",",$arr_dongs); $query="insert into farm_import set farm_no='{$rs_farm[no]}', farm_code='{$rs_farm[farm_code]}', farm_contractor_no='{$rs_contract[no]}', jyear=year(now()), rounds='$rounds', is_farm_import_ready='1', farm_import_click_date=now(), str_req_ready_contract_dong_nos='$str_dongs', regdate=now() "; mysql_query($query) or die(mysql_error()); mysql_query("update farm_contract set im_ex_status='1' where no='$contract_no' ") or die(); $arr_rst['rst']='1'; echo json_encode($arr_rst); ?>