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_ipcamera_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(); $is_rs=RS("select * from farm_ipcamera where farm_no='$farm_no' and ca_ip='$ca_ip' "); if($is_rs[no]) { $arr_rst['rst']='double'; echo json_encode($arr_rst); exit; } $rs_farm=RS("select * from farm where no='$farm_no' "); /* $query="insert into farm_ipcamera set farm_no='$farm_no', farm_code='{$rs_farm[farm_code]}', ca_ip='$ca_ip', type='$type', model='$model', port='$port', sn='$sn', dong_info='$dong_info', pos='$pos', rtsp_url='$rtsp_url', hls_url='$hls_url', regdate=now() "; */ $is_rs2=RS("select * from farm_ipcamera where sn='$sn' "); if($is_rs2[no]) { $arr_rst['rst']='double2'; echo json_encode($arr_rst); exit; } $query="insert into farm_ipcamera set farm_no='$farm_no', farm_code='{$rs_farm[farm_code]}', ca_ip='$ca_ip', type='$type', model='$model', sn='$sn', dong_info='$dong_info', pos='$pos', regdate=now() "; mysql_query($query) or die(mysql_error()); $arr_rst['rst']='1'; $arr_rst['code']=$rs[farm_code]; echo json_encode($arr_rst); ?>