connect($dbhost,$dbuser,$dbpw,$dbname,"p"); $is_submit=$_POST["is_submit"]; if($is_submit=="y"){ //初始化 $table="web_zdb_map"; $dd=$_POST["dd"]; if($dd==1){ $db->query("truncate table ".$table.";"); // $content=$_POST["content"]; $arr=explode("\n",$content); $num=0; for($i=0;$i0){ $sql_value.="('".$username."','".$qytitle."','".$dplx."','".$zd1."','".$zd2."','".$zd3."'),"; $num++; }else{ //客户名称有误 $msg.="".$username."-客户编码有误!
"; } } if($num>0){ $sql_value=substr($sql_value,0,-1); $q1="insert into ".$table." (username,qytitle,dplx,zd1,zd2,zd3) values ".$sql_value; //echo $q1."
"; $db->query($q1); $msg.="导入成功!
"; } }else{ $content=$_POST["content"]; $arr=explode("\n",$content); $num=0; for($i=0;$i0){ $check2=get_db_msg("select id from web_zdb_map where username='".$username."' limit 0,1"); if($check2["id"]>0){ $q1="update ".$table." set qytitle='".$dplx."',dplx='".$dplx."',zd1='".$zd1."',zd2='".$zd2."',zd3='".$zd3."' where id='".$check2["id"]."'"; }else{ $q1="insert into ".$table." (username,qytitle,dplx,zd1,zd2,zd3) values('".$username."','".$qytitle."','".$dplx."','".$zd1."','".$zd2."','".$zd3."')"; } $db->query($q1); $msg.="".$username."-导入成功!
"; }else{ //客户名称有误 $msg.="".$username."-客户编码有误!
"; } } } } ?> 智订宝,地图属性导入
"; } ?>
智订宝,地图属性导入
格式说明:店铺编码,区域名,店铺类型;用制表符分隔;多条记录请回车。
".$msg."