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/pop_feed_contract_add_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' "); $exp=explode(",",$arr); foreach($exp as $ak => $av) { $is_rs=RS("select * from farm_contract_feed where contract_no='$contract_no' and feed_product_no ='$av' "); $rs_prd=RS("select * from feed_company_factory_product where no='$av' "); $rs_fac=RS("select * from feed_company_factory where no='{$rs_prd[factory_no]}' "); if(!$is_rs[no]) { $query="insert into farm_contract_feed set farm_no='{$rs_contract[farm_no]}', contract_no='$contract_no', feed_company_no='{$rs_fac[feed_company_no]}', feed_factory_no='{$rs_prd[factory_no]}', feed_product_no='$av', regdate=now() "; mysql_query($query) or die(mysql_error()); } } $arr_rst['rst']='1'; echo json_encode($arr_rst); ?>