4) { }else{ unset($_SESSION['member_pass']); # pass unset($_SESSION['member_name']); # 會員名字 unset($_SESSION['member_id']); # 會員代號 unset($_SESSION['show_member_title']); # 是否顯示 會員工具列 $uurl = "/city119/member/member_house_add.php"; location_href("/member/member.php?url=" . $uurl); exit(); } $xajax = new xajax(); $xajax->registerFunction("gettown"); //取得鄉鎮 $xajax->registerFunction("gettransit"); //取得摂運站 $xajax->registerFunction("getsSchool"); //取得學校 function gettown($city_sn) // (1) 輸入縣市 , 取得鄉鎮 { $objResponse = new xajaxResponse(); $objResponse->setCharacterEncoding('utf-8'); #----------------------------------------------------------- $sql="select * from town where is_flag=1 and city_sn=$city_sn order by sn"; $rs21 = new recordset($sql); #----------------------------------------------------------- $str =""; $objResponse->assign("town","innerHTML",$str); return $objResponse; } // END function GetTown function gettransit($transit_line_sn) // (1) 輸入縣市 , 取得鄉鎮 { $objResponse = new xajaxResponse(); $objResponse->setCharacterEncoding('utf-8'); #----------------------------------------------------------- $sql = "select transit_runline.sn as sn, transit_line_sn , transit_sn , transit from transit_runline inner join transit on transit_sn = transit.sn where transit_line_sn = $transit_line_sn"; $rs22 = new recordset($sql); #----------------------------------------------------------- $str =""; $objResponse->assign("transit","innerHTML",$str); return $objResponse; } // END function GetTown function getschool($classify_c,$city_sn) // (1) 輸入縣市 , 取得鄉鎮 { $objResponse = new xajaxResponse(); $objResponse->setCharacterEncoding('utf-8'); #----------------------------------------------------------- $sql = "select * from school where classify_sn=$classify_c and city_sn=$city_sn order by school_name"; $rs23 = new recordset($sql); #----------------------------------------------------------- $str =""; $objResponse->assign("school","innerHTML",$str); return $objResponse; } // END function GetTown $xajax->processRequest(); if($_POST["hsn"] != ""){ $hsn = sql_String($_POST["hsn"]); }elseif($_GET["hsn"]!=""){ $hsn = sql_String($_GET["hsn"]); }else{ $hsn = 0; } if($_POST["member_idnum"] != ""){ $member_idnum = sql_String($_POST["member_idnum"]); }elseif($_GET["member_idnum"]!=""){ $member_idnum = sql_String($_GET["member_idnum"]); }else{ $member_idnum = $_SESSION['member_id']; } if($_POST["para"] != ""){ $para = sql_String($_POST["para"]); }elseif($_GET["para"]!=""){ $para = sql_String($_GET["para"]); }else{ $para = ""; } //檢查大戶 if($hsn==0){ mysql_select_db("citynet",$link); $sql = "select * from rich_tb where lessor_idnum='" . $member_idnum . "'"; $rs31 = new recordset($sql); $piece = 0; if(! $rs31->eof){ $putup_method_1 = 1; $piece = $rs31->field("piece"); $sql="select freeid,post,havedelete,lessor_idnum,subcity,address,rentprice"; $sql.=",printdate,logindate,pay from alive_tb where havedelete=0 and post=1 and lessor_idnum='" . $member_idnum . "' order by printdate desc"; $rs32 = new recordset($sql); $fnum = 0; if(! $rs32->eof){ $fnum = $rs32->record_count; } mysql_select_db("city119",$link); $sql = "select * from house where is_delete=0 and adver_date>='" . strftime("%Y-%m-%d") . "' and member_idnum='" . $member_idnum . "'"; $rs33 = new recordset($sql); $hnum = 0; if(! $rs33->eof){ $hnum = $rs33->record_count; } if($hnum+$fnum>=$piece){ alert("目前在線上的廣告數為" . ($hnum+$fnum) . "筆,已超過可張貼廣告數(" . $piece . "筆),不能繼續張貼了。"); location_href("member_house_add_result.php?member_idnum=$member_idnum&hsn=$hsn"); } } } if($_POST["action"] != ""){ $action = sql_String($_POST["action"]); }elseif($_GET["action"]!=""){ $action = sql_String($_GET["action"]); }else{ $action = ""; } mysql_select_db("citynet",$link); $sql = "select * from lessor"; $sql .= " where lessor_idnum = '" . $member_idnum . "'"; $rs1 = new recordset($sql); $lessor_idnum = ""; $lessor_pwd = ""; $lessor_name = ""; $lessor_email = ""; $lessor_tel1 = ""; $lessor_tel2 = ""; $lessor_mobile = ""; if(! $rs1->eof){ $lessor_idnum = $rs1->field("lessor_idnum"); $lessor_pwd = $rs1->field("lessor_pwd"); $lessor_name = $rs1->field("lessor_name"); $lessor_email = $rs1->field("lessor_email"); if($rs1->field("lessor_tel1")!=""){ $lessor_tel1 = $rs1->field("lessor_tel1"); } if($rs1->field("lessor_tel2")!=""){ $lessor_tel2 = $rs1->field("lessor_tel2"); } if($rs1->field("lessor_mobile1")!=""){ $lessor_mobile = $rs1->field("lessor_mobile1"); }elseif($rs1->field("lessor_mobile2")!=""){ $lessor_mobile = $rs1->field("lessor_mobile2"); }elseif($rs1->field("lessor_mobile3")!=""){ $lessor_mobile = $rs1->field("lessor_mobile3"); } } mysql_select_db("city119",$link); if( $action == "save" ) { mysql_select_db("city119",$link); if($_POST["city_sn"] != ""){ $city_sn = sql_string($_POST["city_sn"]); }elseif($_GET["city_sn"]!=""){ $city_sn = sql_string($_GET["city_sn"]); }else{ $city_sn = 0; } if($_POST["town_sn"] != ""){ $town_sn = sql_string($_POST["town_sn"]); }elseif($_GET["town_sn"]!=""){ $town_sn = sql_string($_GET["town_sn"]); }else{ $town_sn = 0; } if($_POST["transit_line_sn"] != ""){ $transit_line_sn = sql_string($_POST["transit_line_sn"]); }elseif($_GET["transit_line_sn"]!=""){ $transit_line_sn = sql_string($_GET["transit_line_sn"]); }else{ $transit_line_sn = 0; } if($_POST["transit_sn"] != ""){ $transit_sn = sql_string($_POST["transit_sn"]); }elseif($_GET["transit_sn"]!=""){ $transit_sn = sql_string($_GET["transit_sn"]); }else{ $transit_sn = 0; } if($_POST["classify_c"] != ""){ $classify_c = sql_string($_POST["classify_c"]); }elseif($_GET["classify_c"]!=""){ $classify_c = sql_string($_GET["classify_c"]); }else{ $classify_c = 0; } if($_POST["school_sn"] != ""){ $school_sn = sql_string($_POST["school_sn"]); }elseif($_GET["school_sn"]!=""){ $school_sn = sql_string($_GET["school_sn"]); }else{ $school_sn = 0; } if($_POST["classify_c_1"] != ""){ $classify_c_1 = sql_string($_POST["classify_c_1"]); }elseif($_GET["classify_c_1"]!=""){ $classify_c_1 = sql_string($_GET["classify_c_1"]); }else{ $classify_c_1 = 0; } if($_POST["school_sn_1"] != ""){ $school_sn_1 = sql_string($_POST["school_sn_1"]); }elseif($_GET["school_sn_1"]!=""){ $school_sn_1 = sql_string($_GET["school_sn_1"]); }else{ $school_sn_1 = 0; } if($_POST["classify_c_2"] != ""){ $classify_c_2 = sql_string($_POST["classify_c_2"]); }elseif($_GET["classify_c_2"]!=""){ $classify_c_2 = sql_string($_GET["classify_c_2"]); }else{ $classify_c_2 = 0; } if($_POST["school_sn_2"] != ""){ $school_sn_2 = sql_string($_POST["school_sn_2"]); }elseif($_GET["school_sn_2"]!=""){ $school_sn_2 = sql_string($_GET["school_sn_2"]); }else{ $school_sn_2 = 0; } if($_POST["how_story"] != ""){ $how_story = sql_string($_POST["how_story"]); }elseif($_GET["how_story"]!=""){ $how_story = sql_string($_GET["how_story"]) ; }else{ $how_story = 0; } if($_POST["total_story"] != ""){ $total_story = sql_string($_POST["total_story"]); }elseif($_GET["total_story"]!=""){ $total_story = sql_string($_GET["total_story"]); }else{ $total_story = 0; } if($_POST["sale_price"] != ""){ $sale_price = sql_string($_POST["sale_price"]); }elseif($_GET["sale_price"]!=""){ $sale_price = sql_string($_GET["sale_price"]); }else{ $sale_price = 0; } if($_POST["sale_price_type"] != ""){ $sale_price_type = sql_string($_POST["sale_price_type"]); }elseif($_GET["sale_price_type"]!=""){ $sale_price_type = sql_string($_GET["sale_price_type"]); }else{ $sale_price_type = 0; } if($_POST["house_age"] != ""){ $house_age = sql_string($_POST["house_age"]); }elseif($_GET["house_age"]!=""){ $house_age = sql_string($_GET["house_age"]); }else{ $house_age = 0; } if($_POST["seat_direction"] != ""){ $seat_direction = sql_string($_POST["seat_direction"]); }elseif($_GET["seat_direction"]!=""){ $seat_direction = sql_string($_GET["seat_direction"]); }else{ $seat_direction = 0; } if($_POST["is_stall"] != ""){ $is_stall = sql_string($_POST["is_stall"]); }elseif($_GET["is_stall"]!=""){ $is_stall = sql_string($_GET["is_stall"]); }else{ $is_stall = 0; } if($_POST["is_floor"] != ""){ $is_floor = sql_string($_POST["is_floor"]); }elseif($_GET["is_floor"]!=""){ $is_floor = sql_string($_GET["is_floor"]); }else{ $is_floor = 0; } if($_POST["is_guard"] != ""){ $is_guard = sql_string($_POST["is_guard"]); }elseif($_GET["is_guard"]!=""){ $is_guard = sql_string($_GET["is_guard"]); }else{ $is_guard = 0; } if($_POST["is_expense"] != ""){ $is_expense = sql_string($_POST["is_expense"]); }elseif($_GET["is_expense"]!=""){ $is_expense = sql_string($_GET["isexpense"]); }else{ $is_expense = 0; } if($_POST["is_side"] != ""){ $is_side = sql_string($_POST["is_side"]); }elseif($_GET["is_side"]!=""){ $is_side = sql_string($_GET["is_side"]); }else{ $is_side = 0; } if($_POST["is_darkroom"] != ""){ $is_darkroom = sql_string($_POST["is_darkroom"]); }elseif($_GET["is_darkroom"]!=""){ $is_darkroom = sql_string($_GET["is_darkroom"]); }else{ $is_darkroom = 0; } if($_POST["is_floor_name"]=="1"){ $floor_name = $_POST["floor_name"]; }else{ $floor_name = ""; } if($_POST["is_expense"]=="0"){ $expense = ""; }else{ $expense = sql_string($_POST["expense"]); } if($_POST["main_building_levelground"] != ""){ $main_building_levelground = sql_string($_POST["main_building_levelground"]); }elseif($_GET["main_building_levelground"]!=""){ $main_building_levelground = sql_string($_GET["main_building_levelground"]); }else{ $main_building_levelground = -1; } if($_POST["pertain_building_levelground"] != ""){ $pertain_building_levelground = sql_string($_POST["pertain_building_levelground"]); }elseif($_GET["pertain_building_levelground"]!=""){ $pertain_building_levelground = sql_string($_GET["pertain_building_levelground"]); }else{ $pertain_building_levelground = -1; } if($_POST["postulate_levelground"] != ""){ $postulate_levelground = sql_string($_POST["postulate_levelground"]); }elseif($_GET["postulate_levelground"]!=""){ $postulate_levelground = sql_string($_GET["postulate_levelground"]); }else{ $postulate_levelground = -1; } if($_POST["right_levelground"] != ""){ $right_levelground = sql_string($_POST["right_levelground"]); }elseif($_GET["right_levelground"]!=""){ $right_levelground = sql_string($_GET["right_levelground"]); }else{ $right_levelground = -1; } if($_POST["use_levelground"] != ""){ $use_levelground = sql_string($_POST["use_levelground"]); }elseif($_GET["use_levelground"]!=""){ $use_levelground = sql_string($_GET["use_levelground"]); }else{ $use_levelground = -1; } if($_POST["ground_percent"] != ""){ $ground_percent = sql_string($_POST["ground_percent"]); }elseif($_GET["ground_percent"]!=""){ $ground_percent = sql_string($_GET["ground_percent"]); }else{ $ground_percent = -1; } if($_POST["car_levelground"] != ""){ $car_levelground = sql_string($_POST["car_levelground"]); }elseif($_GET["car_levelground"]!=""){ $car_levelground = sql_string($_GET["car_levelground"]); }else{ $car_levelground = -1; } if($_POST["update_flag"] != ""){ $update_flag = sql_string($_POST["update_flag"]); }elseif($_GET["update_flag"]!=""){ $update_flag = sql_string($_GET["update_flag"]); }else{ $update_flag = 4; } $post_date = strftime("%Y-%m-%d"); $mmm = intval(substr($post_date,5,2)); $ddd = intval(substr($post_date,8,2)); $yyy = intval(substr($post_date,0,4)); $home_daynum = intval($_POST["home_daynum"]); $top_daynum = intval($_POST["top_daynum"]); $adver_daynum = intval($_POST["adver_daynum"]); $sql = "select * from plan where sn=1"; $rs12 = new recordset($sql); $home_date = strftime("%Y-%m-%d"); $top_date = strftime("%Y-%m-%d"); $adver_top = strftime("%Y-%m-%d"); $is_home = 0; $is_adv = 0; $pnum = 0; $pay_num = 0; switch($_POST["putup_method"]) { case "2": $pay_num = $rs12->field("plan_a_money"); $d1num = $rs12->field("plan_a_1_daynum")+10; $d2num = $rs12->field("plan_a_2_daynum")+10; $d3num = $rs12->field("plan_a_3_daynum")+10; $home_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d1num + $home_daynum, $yyy)); $top_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d2num + $top_daynum, $yyy)); $adver_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d3num + $adver_daynum, $yyy)); $is_home = 1; $is_adv = 1; $pnum = $rs12->field("photo_a_num"); break; case "3": $pay_num = $rs12->field("plan_b_money"); $d1num = $rs12->field("plan_b_1_daynum")+10; $d2num = $rs12->field("plan_b_2_daynum")+10; $d3num = $rs12->field("plan_b_3_daynum")+10; $home_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d1num + $home_daynum, $yyy)); $top_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d2num + $top_daynum, $yyy)); $adver_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d3num + $adver_daynum, $yyy)); $is_home = 1; $is_adv = 1; $pnum = $rs12->field("photo_b_num"); break; case "4": $pay_num = $rs12->field("plan_c_money"); $d1num = 0; $d2num = $rs12->field("plan_c_2_daynum")+10; $d3num = $rs12->field("plan_c_3_daynum")+10; $home_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d1num + $home_daynum-1, $yyy)); $top_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d2num + $top_daynum, $yyy)); $adver_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d3num + $adver_daynum, $yyy)); $is_home = 0; $is_adv = 1; $pnum = $rs12->field("photo_c_num"); break; case "5": $pay_num = $rs12->field("plan_d_money"); $d1num = 0; $d3num = 0; $d3num = $rs12->field("plan_d_3_daynum")+10; $home_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d1num + $home_daynum-1, $yyy)); $top_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d2num + $top_daynum-1, $yyy)); $adver_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d3num + $adver_daynum, $yyy)); $is_home = 0; $is_adv = 1; $pnum = $rs12->field("photo_d_num"); break; case "6": $pay_num = 0; $d1num = 0; $d2num = 0; $d3num = $rs12->field("plan_e_3_daynum"); $home_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d1num + $home_daynum-1, $yyy)); $top_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d2num + $top_daynum-1, $yyy)); $adver_date = date( "Y-m-d" , mktime(0,0,0, $mmm , $ddd + $d3num + $adver_daynum, $yyy)); $is_home = 0; $is_adv = 0; $pnum = $rs12->field("photo_e_num"); break; case "1": //大戶 mysql_select_db("citynet",$link); $sql = "select * from rich_tb where lessor_idnum ='" . $member_idnum . "'"; $rs2 = new recordset($sql); $home_date = strftime("%Y-%m-%d"); $top_date = strftime("%Y-%m-%d"); $home_date = strftime("%Y-%m-%d"); $is_home = 0; $is_adv = 0; if(! $rs2->eof){ if($rs2->field("richboss")=="A"){ $home_date = strftime("%Y-%m-%d"); $top_date = strftime("%Y-%m-%d"); $adver_date = $rs2->field("enddate"); $is_home = 0; $is_adv = 0; }elseif($rs2->field("richboss")=="B"){ $home_date = strftime("%Y-%m-%d"); $top_date = $rs2->field("enddate"); $adver_date = $rs2->field("enddate"); $is_home = 0; $is_adv = 1; }elseif($rs2->field("richboss")=="C"){ $home_date = strftime("%Y-%m-%d"); $top_date = $rs2->field("enddate"); $adver_date = $rs2->field("enddate"); $is_home = 0; $is_adv = 0; }elseif($rs2->field("richboss")=="D"){ $home_date = strftime("%Y-%m-%d"); $top_date = strftime("%Y-%m-%d"); $adver_date = $rs2->field("enddate"); $is_home = 0; $is_adv = 0; }elseif($rs2->field("richboss")=="E"){ $home_date = strftime("%Y-%m-%d"); $top_date = strftime("%Y-%m-%d"); $adver_date = $rs2->field("enddate"); $is_home = 0; $is_adv = 0; }elseif($rs2->field("richboss")=="F"){ $home_date = $rs2->field("enddate"); $top_date = $rs2->field("enddate"); $adver_date = $rs2->field("enddate"); $is_home = 1; $is_adv = 1; } }else{ alert("你不是大戶會員"); history_back(); } $pnum = $rs12->field("photo_a_num"); mysql_select_db("city119",$link); break; default: break; } if(strval($hsn)=="0"){ $hsn = get_sn("house"); $house_class = "H" . $hsn; $sql = "insert into house set sn=" . $hsn . ",sale_method = " . sql_string($_POST["sale_method"]) . ",city_sn =" . sql_string($city_sn) . ","; $sql .= " town_sn = " . sql_string($town_sn) . " , house_address = '" . sql_string($_POST["house_address"]) . "' ,"; $sql .= " transit_line_sn=" . sql_string($transit_line_sn) . ",transit_sn=" . sql_string($transit_sn) . ",house_class='" . sql_string($house_class) . "',"; $sql .= " transit_distance='" . sql_string($_POST["transit_distance"]) . "',classify_c=" . sql_string($classify_c) . ","; $sql .= " school_sn=" . sql_string($school_sn) . ",school_distance='" . sql_string($_POST["school_distance"]) . "',"; $sql .= " classify_c_1=" . sql_string($classify_c_1) . ","; $sql .= " school_sn_1=" . sql_string($school_sn_1) . ",school_distance_1='" . sql_string($_POST["school_distance_1"]) . "',"; $sql .= " classify_c_2=" . sql_string($classify_c_2) . ","; $sql .= " school_sn_2=" . sql_string($school_sn_2) . ",school_distance_2='" . sql_string($_POST["school_distance_2"]) . "',"; $sql .= " house_type =" . sql_string($_POST["house_type"]) . ",member_idnum='" . sql_string($member_idnum) . "',"; $sql .= " how_story= '" . sql_string($how_story) . "' , total_story = '" . sql_string($total_story) . "' ,"; $sql .= " seat_direction =" . sql_string($seat_direction) . ",is_side =" . sql_string($is_side) . ","; $sql .= " is_darkroom =" . sql_string($is_darkroom) . ",is_stall =" . sql_string($is_stall) . ","; $sql .= " house_age =" . sql_string($house_age) . ", house_remark = '" . sql_string($_POST["remark"]) . "',"; $sql .= " sale_price =" . sql_string($sale_price) . ",main_building_levelground =" . sql_string($main_building_levelground) . ","; $sql .= " pertain_building_levelground =" . sql_string($pertain_building_levelground) . ",postulate_levelground =" . sql_string($postulate_levelground) . ","; $sql .= " right_levelground =" . sql_string($right_levelground) . ",use_levelground =" . sql_string($use_levelground) . ",car_levelground =" . sql_string($car_levelground) . ","; $sql .= " ground_percent =" . sql_String($ground_percent) . " , house_name = '" . sql_string($_POST["house_name"]) . "' ,"; $sql .= " update_date = '" . strftime("%Y-%m-%d") . "' , putup_method = " . sql_string($_POST["putup_method"]) . " , "; $sql .= " sale_price_type =" . sql_string($sale_price_type) . ",is_home = $is_home , is_adv = $is_adv ,"; $sql .= " man_name = '" . sql_string($_POST["man_name"]) . "' , man_tel1 = '" . sql_string($_POST["man_tel1"]) . "' , man_tel2 = '" . sql_string($_POST["man_tel2"]) . "',"; $sql .= " man_mobile = '" . sql_string($_POST["man_mobile"]) . "' , man_email = '" . sql_string($_POST["man_email"]) . "' , floor_name='" . sql_string($_POST["floor_name"]) . "' , expense = '" . sql_string($expense) . "',"; $sql .= " guard = '" . sql_string($_POST["$guard"]) . "' , guard_time = '" . sql_string($_POST["guard_time"]) . "' , post_date='$post_date',home_date = '$home_date' , top_date = '$top_date' , "; $sql .= " adver_date = '$adver_date' , home_daynum = $home_daynum , top_daynum = $top_daynum , adver_daynum = $adver_daynum,"; $sql .= " how_partition_1 = " . sql_string($_POST["how_partition_1"]) . " , how_partition_2 = " . sql_string($_POST["how_partition_2"]) . " ,"; $sql .= " how_partition_3 = " . sql_string($_POST["how_partition_3"]) . " , how_partition_4 = " . sql_string($_POST["how_partition_4"]) . ","; $sql .= " update_flag=" . sql_string($update_flag) . ",stall='" . sql_string($_POST["stall"]) . "',"; $sql .= " company='" . sql_string($_POST["company"]) . "',department='" . sql_string($_POST["department"]) . "',"; $sql .= " is_floor=" . sql_string($is_floor) . ",is_guard=" . sql_string($is_guard) . ",is_expense=" . sql_string($is_expense); //echo $sql; //exit(); execute_sql($sql); include("member_house_report.php"); }else{ $sql = "update house set sale_method = " . sql_string($_POST["sale_method"]) . ",city_sn =" . sql_string($city_sn) . ","; $sql .= " town_sn = " . sql_string($town_sn) . " , house_address = '" . sql_string($_POST["house_address"]) . "' ,"; $sql .= " transit_line_sn=" . sql_string($transit_line_sn) . ",transit_sn=" . sql_string($transit_sn) . ","; $sql .= " transit_distance='" . sql_string($_POST["transit_distance"]) . "',classify_c=" . sql_string($classify_c) . ","; $sql .= " school_sn=" . sql_string($school_sn) . ",school_distance='" . sql_string($_POST["school_distance"]) . "',"; $sql .= " classify_c_1=" . sql_string($classify_c_1) . ","; $sql .= " school_sn_1=" . sql_string($school_sn_1) . ",school_distance_1='" . sql_string($_POST["school_distance_1"]) . "',"; $sql .= " classify_c_2=" . sql_string($classify_c_2) . ","; $sql .= " school_sn_2=" . sql_string($school_sn_2) . ",school_distance_2='" . sql_string($_POST["school_distance_2"]) . "',"; $sql .= " house_type =" . sql_string($_POST["house_type"]) . ",member_idnum='" . sql_string($member_idnum) . "',"; $sql .= " how_story= '" . sql_string($how_story) . "' , total_story = '" . sql_string($total_story) . "' ,"; $sql .= " seat_direction =" . sql_string($seat_direction) . ",is_side =" . sql_string($is_side) . ","; $sql .= " is_darkroom =" . sql_string($is_darkroom) . ",is_stall =" . sql_string($is_stall) . ","; $sql .= " house_age =" . sql_string($house_age) . ", house_remark = '" . sql_string($_POST["remark"]) . "',"; $sql .= " sale_price =" . sql_string($sale_price) . ",main_building_levelground =" . sql_string($main_building_levelground) . ","; $sql .= " pertain_building_levelground =" . sql_string($pertain_building_levelground) . ",postulate_levelground =" . sql_string($postulate_levelground) . ","; $sql .= " right_levelground =" . sql_string($right_levelground) . ",use_levelground =" . sql_string($use_levelground) . ",car_levelground =" . sql_string($car_levelground) . ","; $sql .= " ground_percent =" . sql_String($ground_percent) . " , house_name = '" . sql_string($_POST["house_name"]) . "' ,"; $sql .= " update_date = '" . strftime("%Y-%m-%d") . "' , putup_method = " . sql_string($_POST["putup_method"]) . " , view_num_1=0,"; $sql .= " sale_price_type =" . sql_string($sale_price_type) . ",is_home = $is_home , is_adv = $is_adv ,"; $sql .= " man_name = '" . sql_string($_POST["man_name"]) . "' , man_tel1 = '" . sql_string($_POST["man_tel1"]) . "' , man_tel2 = '" . sql_string($_POST["man_tel2"]) . "',"; $sql .= " man_mobile = '" . sql_string($_POST["man_mobile"]) . "' , man_email = '" . sql_string($_POST["man_email"]) . "' , floor_name='" . sql_string($_POST["floor_name"]) . "' , expense = '" . sql_string($expense) . "',"; $sql .= " guard = '" . sql_string($_POST["$guard"]) . "' , guard_time = '" . sql_string($_POST["guard_time"]) . "' ,"; $sql .= " home_daynum = $home_daynum , top_daynum = $top_daynum , adver_daynum = $adver_daynum,"; $sql .= " how_partition_1 = " . sql_string($_POST["how_partition_1"]) . " , how_partition_2 = " . sql_string($_POST["how_partition_2"]) . " ,"; $sql .= " how_partition_3 = " . sql_string($_POST["how_partition_3"]) . " , how_partition_4 = " . sql_string($_POST["how_partition_4"]) . ","; $sql .= " update_flag=" . sql_string($update_flag) . ",stall='" . sql_string($_POST["stall"]) . "',"; $sql .= " company='" . sql_string($_POST["company"]) . "',department='" . sql_string($_POST["department"]) . "',"; $sql .= " is_floor=" . sql_string($is_floor) . ",is_guard=" . sql_string($is_guard) . ",is_expense=" . sql_string($is_expense); $sql .= " where sn=$hsn"; //echo $sql; //exit(); execute_sql($sql); } $rigthnow_dot = 0; if($_POST["putup_method"]!="1"){ mysql_select_db("citynet",$link); include("aboutpoint_inc.php"); $pay = "1"; $rigthnow_dot=intval(find_point($_SESSION['member_id'])); //目前的使用點數 if (($rigthnow_dot-$pay_num)>=0) // 點數夠的話 { use_point($_SESSION['member_id'],$pay,"H" . $hsn,$pay_num); // 成功 扣這會員的 點數 } else // 當點數 不足的話 做的事 並將 目前 這筆 post=0 , 讓 他 無法 刊登在外 { $SQL="update house set is_delete=1 where sn=". $hsn; $rs = new recordset($SQL); } mysql_select_db("city119",$link); } //echo $sql; //exit(); $SaveOK = true ; alert("基本資料刊登完成"); if($para=="edit"){ location_href("member_list_1.php?lessor_idnum" . base64_encode($member_idnum) . "&level_authority=1"); }elseif($para=="edit_1"){ location_href("house_search_result_detail.php?member_idnum=$member_idnum&hsn=$hsn"); }else{ location_href("member_house_add_2.php?member_idnum=$member_idnum&hsn=$hsn&rigthnow_dot=$rigthnow_dot&pay_num=$pay_num"); } } mysql_select_db("city119",$link); $sql = "select * from house where sn = " . $hsn; $rs = new recordset($sql); $SaveOK = false ; //開啟資料庫 $house_class = ""; $house_name = ""; $sale_method = 1; $city_sn = 0; $town_sn = 0; $house_address = ""; $house_type = 1; $partition_sn = ""; $main_building_levelground = 0; $pertain_building_levelground = 0; $postulate_levelground = 0; $right_levelground = 0; $use_levelground = 0; $ground_percent = 0; $sale_price = 1; $house_age = 0; $how_age = ""; $how_story = ""; $total_story = ""; $seat_direction = 9; $is_darkroom = 0; $is_stall = 0; $house_remark = ""; if($putup_method_1==1){ $putup_method = 1; }else{ $putup_method = 6; } $is_side = 0; $sale_price_type = 0; $man_tel1 = $lessor_tel1; $man_tel2 = $lessor_tel2; $man_mobile = $lessor_mobile; $man_email = $lessor_email; $man_name = $lessor_name; $floor_name = ""; $guard = ""; $guard_time = ""; $expense = ""; $how_partition_1 = 0; $how_partition_2 = 0; $how_partition_3 = 0; $how_partition_4 = 0; $post_date = ""; $home_date = ""; $top_date = ""; $adver_date = ""; $home_daynum = 0; $top_daynum = 0; $adver_daynum = 0; $transit_line_sn = 0; $transit_sn = 0; $transit_distance = ""; $classify_c = 0; $school_sn = 0; $school_distance = ""; $classify_c_1 = 0; $school_sn_1 = 0; $school_distance_1 = ""; $classify_c_2 = 0; $school_sn_2 = 0; $school_distance_2 = ""; $update_flag = 4; $stall = ""; $car_levelground = 0; $is_floor = 0; $is_guard = 0; $is_expense = 0; $company = ""; $department = ""; if(! $rs->eof){ $house_class = $rs->field("house_class"); $house_name = $rs->field("house_name"); $sale_method = $rs->field("sale_method"); $city_sn = $rs->field("city_sn"); $town_sn = $rs->field("town_sn"); $house_address = $rs->field("house_address"); $house_type = $rs->field("house_type"); $partition_sn = $rs->field("partition_sn"); $main_building_levelground = $rs->field("main_building_levelground"); $pertain_building_levelground = $rs->field("pertain_building_levelground"); $postulate_levelground = $rs->field("postulate_levelground"); $right_levelground = $rs->field("right_levelground"); $use_levelground = $rs->field("use_levelground"); $ground_percent = $rs->field("ground_percent"); $sale_price = $rs->field("sale_price"); $house_age = $rs->field("house_age"); $how_story = $rs->field("how_story"); $total_story = $rs->field("total_story"); $seat_direction = $rs->field("seat_direction"); $is_darkroom = $rs->field("is_darkroom"); $is_stall = $rs->field("is_stall"); $stall = $rs->field("stall"); $house_remark = $rs->field("house_remark"); $putup_method = $rs->field("putup_method"); $is_side = $rs->field("is_side"); $sale_price_type = $rs->field("sale_price_type"); $man_tel1 = $rs->field("man_tel1"); $man_tel2 = $rs->field("man_tel2"); $man_mobile = $rs->field("man_mobile"); $man_email = $rs->field("man_email"); $man_name = $rs->field("man_name"); $is_floor = $rs->field("is_floor"); $floor_name = $rs->field("floor_name"); $is_guard = $rs->field("is_guard"); $guard = $rs->field("guard"); $guard_time = $rs->field("guard_time"); $is_expense = $rs->field("is_expense"); $expense = $rs->field("expense"); $how_partition_1 = $rs->field("how_partition_1"); $how_partition_2 = $rs->field("how_partition_2"); $how_partition_3 = $rs->field("how_partition_3"); $how_partition_4 = $rs->field("how_partition_4"); $post_date = $rs->field("post_date"); $home_date = $rs->field("home_date"); $top_date = $rs->field("top_date"); $adver_date = $rs->field("adver_date"); $home_daynum = $rs->field("home_daynum"); $top_daynum = $rs->field("top_daynum"); $adver_daynum = $rs->field("adver_daynum"); $transit_line_sn = $rs->field("transit_line_sn"); $transit_sn = $rs->field("transit_sn"); $transit_distance = $rs->field("transit_distance"); $classify_c = $rs->field("classify_c"); $school_sn = $rs->field("school_sn"); $school_distance = $rs->field("school_distance"); $classify_c_1 = $rs->field("classify_c_1"); $school_sn_1 = $rs->field("school_sn_1"); $school_distance_1 = $rs->field("school_distance_1"); $classify_c_2 = $rs->field("classify_c_2"); $school_sn_2 = $rs->field("school_sn_2"); $school_distance_2 = $rs->field("school_distance_2"); $update_flag = $rs->field("update_flag"); $car_levelgorund = $rs->field("car_levelground"); $company = $rs->field("company"); $department = $rs->field("department"); } $herb=mt_rand(10000,9999999); $herb1=mt_rand(10000,9999999); ?>