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/bunyang_plan_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_parts=RS("select * from farm_contract_parts where no='$parts_no' "); $rs_hat_pdate=RS("select * from hatchery_jucha_plan_date where no='$hatchery_jucha_plan_date_no' "); $is_rs=RS("select * from hatchery_plan_log where contract_parts_no='$parts_no' and contract_no='{$rs_parts[contract_no]}' and dong_no='$dong_no' and hatchery_no='{$rs_hat_pdate[hatchery_no]}' and jong_type='{$rs_hat_pdate[jong_type]}' and breedtype='{$rs_hat_pdate[breedtype]}' and gegun_name='{$rs_hat_pdate[gegun_name]}' "); if($is_rs[no]) { $arr_rst['rst']='double'; echo json_encode($arr_rst); exit; } $rs_dong=RS("select * from farm_dong_info where no='$dong_no' "); $rs_cont_dong_out=RS("select sum(susu) as cnt from hatchery_plan_log where contract_parts_no='$parts_no' and dong_no='$dong_no' and jong_type='{$rs_hat_pdate[jong_type]}' and breedtype='{$rs_hat_pdate[breedtype]}' "); if($rs_dong[max_chick_limit] < ($rs_cont_dong_out[cnt]+$susu) ) { $arr_rst['rst']='over'; $arr_rst['max']=($rs_dong[max_chick_limit]-$rs_cont_dong_out[cnt]); echo json_encode($arr_rst); exit; } $query="insert into hatchery_plan_log set contract_parts_no='$parts_no', hatchery_jucha_plan_date_no='{$rs_hat_pdate[no]}', hatchery_no='{$rs_hat_pdate[hatchery_no]}', jdate='$jdate', company_no='{$_COOKIE[ucompany_no]}', contract_no='{$rs_parts[contract_no]}', farm_no='{$rs_parts[farm_no]}', dong_no='$dong_no', susu='$susu', jong_type='{$rs_hat_pdate[jong_type]}', breedtype='{$rs_hat_pdate[breedtype]}', gegun_name='{$rs_hat_pdate[gegun_name]}', regdate=now() "; mysql_query($query) or die(mysql_error()); $arr_rst['rst']='1'; $arr_rst['contract_no']=$rs_parts[contract_no]; $arr_rst['dong_no']=$dong_no; echo json_encode($arr_rst); ?>