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_nvr_mody_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_nvr where no != '$v_no' and farm_no='$farm_no' and nvr_ip='$nvr_ip' "); if($is_rs[no]) { $arr_rst['rst']='double'; echo json_encode($arr_rst); exit; } $vv_sn2=strtolower(str_replace(":","",$nvr_sn)); $vv_sn3=strtoupper(substr($vv_sn2,0,2).":".substr($vv_sn2,2,2).":".substr($vv_sn2,4,2).":".substr($vv_sn2,6,2).":".substr($vv_sn2,8,2).":".substr($vv_sn2,10,2)); $is_rs2=RS("select * from farm_nvr where no != '$v_no' and nvr_sn='$vv_sn3' "); if($is_rs2[no]) { $arr_rst['rst']='double2'; echo json_encode($arr_rst); exit; } $rs_farm=RS("select * from farm where no='$farm_no' "); $vv_sn=strtolower(str_replace(":","",$nvr_sn)); $nvr_ddns=$vv_sn.".dynlink.net"; $query="update farm_nvr set nvr_ip='$nvr_ip', nvr_model='$nvr_model', nvr_chan_su='$nvr_chan_su', nvr_sn='$vv_sn3', nvr_ddns='$nvr_ddns' where no='$v_no' "; mysql_query($query) or die(mysql_error()); $arr_rst['rst']='1'; $arr_rst['code']=$rs[farm_code]; echo json_encode($arr_rst); ?>