Exemple #1
0
function mail_naiyou($gc) {

	$sql = "SELECT";
	$sql.= " anken_no,";
	$sql.= " relocation_flg,";
	$sql.= " chintai_flg,";
	$sql.= " sublease_flg,";
	$sql.= " purpose_flg,";
	$sql.= " buken_sbt,";
	$sql.= " buken_shikucyouson_no,";
	$sql.= " buken_banchi,";
	$sql.= " buken_tatemono,";
	$sql.= " chikunensu,";
	$sql.= " menseki,";
	$sql.= " input_val,";
	$sql.= " input_kbn,";
	$sql.= " land_val,";
	$sql.= " madori_no,";
	$sql.= " meigi_no,";
	$sql.= " genjyou_no,";
	$sql.= " room_cnt,";
	$sql.= " fudousan_flg,";
	$sql.= " fudousan_nm,";
	$sql.= " bikou,";
	$sql.= " lname,";
	$sql.= " fname,";
	$sql.= " lname_kn,";
	$sql.= " fname_kn,";
	$sql.= " tel,";
	$sql.= " e_mail,";
	$sql.= " sumai_flg,";
	$sql.= " sumai_shikucyouson_no,";
	$sql.= " sumai_banchi,";
	$sql.= " sumai_tatemono,";
	$sql.= " moushikomibi,";
	$sql.= " rank_no,";
	$sql.= " tesuryou,";
	$sql.= " ltime ";
	$sql.= "FROM";
	$sql.= " t_item ";
	$sql.= "WHERE";
	$sql.= " item_no = ".$gc->item_no;

	$rs = $gc->db->query($sql);

	if(!$rs->eof){

		$gc->anken_no = $rs->fields["anken_no"];

		$relocation_flg = $rs->fields["relocation_flg"];
		$chintai_flg = $rs->fields["chintai_flg"];
		$sublease_flg = $rs->fields["sublease_flg"];
		$purpose_flg = $rs->fields["purpose_flg"];

		$buken_sbt = $rs->fields["buken_sbt"];
		$buken_shikucyouson_no = $rs->fields["buken_shikucyouson_no"];
		$buken_banchi = $rs->fields["buken_banchi"];
		$buken_tatemono = $rs->fields["buken_tatemono"];
		$chikunensu = $rs->fields["chikunensu"];
		$menseki = $rs->fields["menseki"];
		$input_val = $rs->fields["input_val"];
		$input_kbn = $rs->fields["input_kbn"];
		$land_val = $rs->fields["land_val"];

		$madori_no = $rs->fields["madori_no"];
		$meigi_no = $rs->fields["meigi_no"];
		$genjyou_no = $rs->fields["genjyou_no"];
		$room_cnt = $rs->fields["room_cnt"];

		$fudousan_flg = $rs->fields["fudousan_flg"];
		$fudousan_nm = $rs->fields["fudousan_nm"];
		$bikou = $rs->fields["bikou"];
		$lname = $rs->fields["lname"];
		$fname = $rs->fields["fname"];
		$lname_kn = $rs->fields["lname_kn"];
		$fname_kn = $rs->fields["fname_kn"];
		$tel = $rs->fields["tel"];
		$e_mail = $rs->fields["e_mail"];
		$sumai_flg = $rs->fields["sumai_flg"];
		$sumai_shikucyouson_no = $rs->fields["sumai_shikucyouson_no"];
		$sumai_banchi = $rs->fields["sumai_banchi"];
		$sumai_tatemono = $rs->fields["sumai_tatemono"];
		$moushikomibi = $rs->fields["moushikomibi"];
		$rank_no = $rs->fields["rank_no"];
		$tesuryou = $rs->fields["tesuryou"];

		$arr = fdiv_set_buken_sbt_array();
		$buken_sbt_nm = $arr[$buken_sbt];

		$purpose_arr = fdiv_set_purpose_array();
		$purpose_str = $purpose_arr[$purpose_flg];

		$kibou_cnt = 0;
		$kibou_str ="";
		if($chintai_flg == 1){
			$kibou_str.= "賃貸募集・賃貸管理";
			$kibou_cnt++;
		}
		if($sublease_flg == 1) {
			if($kibou_cnt > 0){
				$kibou_str.= "/";
			}
			$kibou_cnt++;
			$kibou_str.= "サブリース";
		}
		if($relocation_flg == 1) {
			if($kibou_cnt > 0){
				$kibou_str.= "/";
			}
			$kibou_str.= "リロケーション";
		}


		$info = get_shikucyouson_info($gc, $buken_shikucyouson_no);
		$buken_syozaichi = $info["todoufuken_nm"].$info["shikucyouson_nm"];

		$chikunensu = (float)$chikunensu;
		if($chikunensu >= 0){
			$chikunensu = $chikunensu."年";
		}else{
			$chikunensu = "";
		}

		$menseki = (float)$menseki;
		$menseki = $menseki."平米";
		//土地面積
		$land_val = $land_val."平米";

		$arr = fdiv_set_madori_array();
		$madori_nm = $arr[$madori_no];

		$arr = fdiv_set_meigi_array();
		$meigi_nm = $arr[$meigi_no];

		$arr = fdiv_set_genjyou_array();
		$genjyou_nm = $arr[$genjyou_no];
		if($room_cnt > 0){
			$genjyou_nm = $genjyou_nm." 空き部屋数 ".$room_cnt;
		}

		$arr = fdiv_set_sumai_flg_array();
		$sumai_nm = $arr[$sumai_flg];

		if($sumai_flg==1){
			$info = get_shikucyouson_info($gc, $sumai_shikucyouson_no);
			$sumai_syozaichi = $info["todoufuken_nm"].$info["shikucyouson_nm"];
		}else{
			$sumai_syozaichi = $buken_syozaichi;
			$sumai_banchi = $buken_banchi;
			$sumai_tatemono = $buken_tatemono;
		}

		$moushikomibi = substr($moushikomibi, 0, 4)."/".substr($moushikomibi, 5, 2)."/".substr($moushikomibi, 8, 2)." ".substr($moushikomibi, 11);

		$gc->moushikomibi = $moushikomibi;

		$s_u = "";
		$s_u.= "\n";
		$s_u.= "───────────────────────────────────\n";
		$s_u.= "■物件情報■\n";
		$s_u.= "───────────────────────────────────\n";
		$s_s.= "ご利用目的.............: ".$purpose_str."\n";
		$s_s2.= "希望のサービス.........: ".$kibou_str."\n";
		$s_d.= "物件種別...............: ".$buken_sbt_nm."\n";
		$s_d.= "物件所在地.............: ".$buken_syozaichi."\n";
		$s_d.= "町名・番地.............: ".$buken_banchi."\n";
		if($buken_sbt != 3){
			if($buken_sbt == 2){
			$s_d.= "建物名.................: ".$buken_tatemono."\n";
			}else{
			$s_d.= "建物名・部屋番号.......: ".$buken_tatemono."\n";
			}
		}
		$s_d.= "築年数.................: ".$chikunensu."\n";
		$s_d.= "面積...................: ".$menseki."\n";
		if($buken_sbt != 1){
			$s_d.= "土地面積...............: ".$land_val."\n";
		}
		if($buken_sbt != 2){
		$s_d.= "間取り.................: ".$madori_nm."\n";
		}
		$s_d.= "名義...................: ".$meigi_nm."\n";
		$s_d.= "現況...................: ".$genjyou_nm."\n";
		$s_d.= "\n";
		$s_d.= "───────────────────────────────────\n";
		$s_d.= "■お客様情報■\n";
		$s_d.= "───────────────────────────────────\n";
		$s_d.= "お名前.................: ".$lname.$fname."\n";
		$s_d.= "フリガナ...............: ".$lname_kn.$fname_kn."\n";
		$s_d.= "電話番号...............: ".$tel."\n";
		$s_d.= "メールアドレス.........: ".$e_mail."\n";
		$s_d.= "お住まい...............: ".$sumai_syozaichi."\n";
		$s_d.= "町名・番地.............: ".$sumai_banchi."\n";
		$s_d.= "建物名・部屋番号.......: ".$sumai_tatemono."\n";
		$s_d.= "ご要望・ご質問など.....: ".$bikou."\n";
		$s_d.= "\n";

		$gc->naiyou_u = $s_u;
		$gc->naiyou_d = $s_d;

		$gc->naiyou_s = $s_s;

		$gc->user_naiyou = $s_u;
		$gc->user_naiyou.= "ご利用目的.............: ".$purpose_str."\n";
		$gc->user_naiyou.= $s_s2;
		$gc->user_naiyou.= $s_d;

		$gc->kanri_naiyou = $s_u;
		$gc->kanri_naiyou.= "ご利用目的.............: ".$purpose_str."\n";
		$gc->kanri_naiyou.= $s_s2;
		$gc->kanri_naiyou.= $s_d;

	}

	$rs->free_result();

	return $s;

}
function mail_naiyou($gc) {
    require_once(dirname(__FILE__)."/../../../init.inc.php");
    require_once(C_INC_DIR_SSL."db_utils.php");
    require_once(C_INC_DIR_SSL."kenNo_ref.php");
    
    $db = connect_db();
    
	$sql = "SELECT";
	$sql.= " anken_no,";
	$sql.= " relocation_flg,";
	$sql.= " chintai_flg,";
	$sql.= " sublease_flg,";
	$sql.= " purpose_flg,";
	$sql.= " buken_sbt,";
	$sql.= " buken_shikucyouson_no,";
	$sql.= " buken_shozai,";
    $sql.= " sonota_jusho,";
	$sql.= " buken_tatemono,";
	$sql.= " chikunensu,";
	$sql.= " menseki,";
	$sql.= " input_val,";
	$sql.= " input_kbn,";
	$sql.= " land_val,";
	$sql.= " madori_no,";
	$sql.= " meigi_no,";
	$sql.= " genjyou_no,";
	$sql.= " room_cnt,";
	$sql.= " fudousan_flg,";
	$sql.= " fudousan_nm,";
	$sql.= " bikou,";
	$sql.= " fullname,";
	$sql.= " fullname_kn,";
	$sql.= " tel,";
	$sql.= " e_mail,";
	$sql.= " sumai_flg,";
	$sql.= " sumai_yubin,";
	$sql.= " sumai_jusho,";
	$sql.= " sumai_tatemono,";
	$sql.= " moushikomibi,";
	$sql.= " rank_no,";
	$sql.= " tesuryou,";
	$sql.= " ltime ";
	$sql.= "FROM";
	$sql.= " t_item ";
	$sql.= "WHERE";
	$sql.= " item_no = ".$_SESSION["item_no"];

	$stmt = $db->query($sql);
    $row = $stmt->fetch(PDO::FETCH_ASSOC);

    $_SESSION["anken_no"] = $row["anken_no"];

    $relocation_flg = $row["relocation_flg"];
    $chintai_flg = $row["chintai_flg"];
    $sublease_flg = $row["sublease_flg"];
    $purpose_flg = $row["purpose_flg"];

    $buken_sbt = $row["buken_sbt"];
    $buken_shikucyouson_no = $row["buken_shikucyouson_no"];
    $buken_shozai = $row["buken_shozai"];
    $sonota_jusho = $row["sonota_jusho"];
    $buken_tatemono = $row["buken_tatemono"];
    $chikunensu = $row["chikunensu"];
    $menseki = $row["menseki"];
    $input_kbn = $row["input_kbn"];
    $land_val = $row["land_val"];

    $madori_no = $row["madori_no"];
    $meigi_no = $row["meigi_no"];
    $genjyou_no = $row["genjyou_no"];
    $room_cnt = $row["room_cnt"];

    $fudousan_flg = $row["fudousan_flg"];
    $fudousan_nm = $row["fudousan_nm"];
    $bikou = $row["bikou"];
    $fullname = $row["fullname"];
    $fullname_kn = $row["fullname_kn"];
    $tel = $row["tel"];
    $e_mail = $row["e_mail"];
    $sumai_flg = $row["sumai_flg"];
    $sumai_jusho = $row["sumai_jusho"];
    $sumai_tatemono = $row["sumai_tatemono"];
    $moushikomibi = $row["moushikomibi"];
    $rank_no = $row["rank_no"];
    $tesuryou = $row["tesuryou"];

    $arr = fdiv_set_buken_sbt_array();
    $buken_sbt_nm = $arr[$buken_sbt];

    $purpose_arr = fdiv_set_purpose_array();
    $purpose_str = $purpose_arr[$purpose_flg];

    $kibou_cnt = 0;
    $kibou_str ="";
    if($chintai_flg == 1){
        $kibou_str.= "賃貸募集・賃貸管理";
        $kibou_cnt++;
    }
    if($sublease_flg == 1) {
        if($kibou_cnt > 0){
            $kibou_str.= "/";
        }
        $kibou_cnt++;
        $kibou_str.= "サブリース";
    }
    if($relocation_flg == 1) {
        if($kibou_cnt > 0){
            $kibou_str.= "/";
        }
        $kibou_str.= "リロケーション";
    }

    $buken_syozaichi = $buken_shozai;

    $chikunensu = (float)$chikunensu;
    if($chikunensu >= 0){
        $chikunensu = $chikunensu."年";
    }else{
        $chikunensu = "";
    }

    $menseki = $menseki."平米";
    //土地面積
    $land_val = $land_val."平米";

    $arr = fdiv_set_madori_array();
    $madori_nm = $arr[$madori_no];

    $arr = fdiv_set_meigi_array();
    $meigi_nm = $arr[$meigi_no];

    $arr = fdiv_set_genjyou_array();
    $genjyou_nm = $arr[$genjyou_no];
    if($room_cnt > 0){
        $genjyou_nm = $genjyou_nm." 空き部屋数 ".$room_cnt;
    }

    $arr = fdiv_set_sumai_flg_array();
    $sumai_nm = $arr[$sumai_flg];

    $moushikomibi = substr($moushikomibi, 0, 4)."/".substr($moushikomibi, 5, 2)."/".substr($moushikomibi, 8, 2)." ".substr($moushikomibi, 11);

    $_SESSION["moushikomibi"] = $moushikomibi;

    $s_u = "";
    $s_u.= "\n";
    $s_u.= "───────────────────────────────────\n";
    $s_u.= "■物件情報■\n";
    $s_u.= "───────────────────────────────────\n";
    $s_s = "ご利用目的.............: ".$purpose_str."\n";
    $s_s2= "希望のサービス.........: ".$kibou_str."\n";
    $s_d.= "物件種別...............: ".$buken_sbt_nm."\n";
    $s_d.= "物件所在地.............: ".$buken_shozai."\n";
    $s_d.= "その他住所.............: ".$sonota_jusho."\n";
    if($buken_sbt != 3){
        if($buken_sbt == 2){
        $s_d.= "建物名.................: ".$buken_tatemono."\n";
        }else{
        $s_d.= "建物名・部屋番号.......: ".$buken_tatemono."\n";
        }
    }
    $s_d.= "築年数.................: ".$chikunensu."\n";
    $s_d.= "延床面積...............: ".$menseki."\n";
    if($buken_sbt != 1){
        $s_d.= "土地面積...............: ".$land_val."\n";
    }
    if($buken_sbt != 2){
    $s_d.= "間取り.................: ".$madori_nm."\n";
    }
    $s_d.= "名義...................: ".$meigi_nm."\n";
    $s_d.= "現況...................: ".$genjyou_nm."\n";
    $s_d.= "\n";
    $s_d.= "───────────────────────────────────\n";
    $s_d.= "■お客様情報■\n";
    $s_d.= "───────────────────────────────────\n";
    $s_d.= "お名前.................: ".$fullname."\n";
    $s_d.= "フリガナ...............: ".$fullname_kn."\n";
    $s_d.= "電話番号...............: ".$tel."\n";
    $s_d.= "メールアドレス.........: ".$e_mail."\n";
	if($sumai_flg==1) {
    	$s_d.= "お住まい...............: ".$sumai_jusho."\n";
		$s_d.= "建物名・部屋番号.......: ".$sumai_tatemono."\n";
	} else {
		$s_d.= "お住まい...............: ".$buken_shozai."\n";
		$s_d.= "その他住所.............: ".$sonota_jusho."\n";
		$s_d.= "建物名・部屋番号.......: ".$buken_tatemono."\n";
	}
    $s_d.= "ご要望・ご質問など.....: ".$bikou."\n";
    $s_d.= "\n";

    $_SESSION["naiyou_u"] = $s_u;
    $_SESSION["naiyou_d"] = $s_d;

    $_SESSION["naiyou_s"] = $s_s;

    $_SESSION["user_naiyou"]  = $s_u;
    $_SESSION["user_naiyou"] .= "ご利用目的.............: ".$purpose_str."\n";
    $_SESSION["user_naiyou"] .= $s_s2;
    $_SESSION["user_naiyou"] .= $s_d;

    $_SESSION["kanri_naiyou"] = $s_u;
    $_SESSION["kanri_naiyou"] .= "ご利用目的.............: ".$purpose_str."\n";
    $_SESSION["kanri_naiyou"] .= $s_s2;
    $_SESSION["kanri_naiyou"] .= $s_d;


	$db = null;
        
	return $s;

}
Exemple #3
0
function fdiv_set_sumai_flg_radio($gc, $cd, $name)
{
    $array = fdiv_set_sumai_flg_array();
    fdiv_set_radio($gc, $cd, $name, $array);
}
Exemple #4
0
function get_data($gc) {

	$sql = "SELECT";
	$sql.= " anken_no,";
	$sql.= " relocation_flg,";
	$sql.= " chintai_flg,";
	$sql.= " sublease_flg,";
	$sql.= " purpose_flg,";
	$sql.= " buken_sbt,";
	$sql.= " buken_shikucyouson_no,";
	$sql.= " buken_shozai,";
	$sql.= " sonota_jusho,";
	$sql.= " buken_tatemono,";
	$sql.= " chikunensu,";
	$sql.= " menseki,";
	$sql.= " input_val,";
	$sql.= " input_kbn,";
	$sql.= " land_val,";
	$sql.= " madori_no,";
	$sql.= " meigi_no,";
	$sql.= " genjyou_no,";
	$sql.= " room_cnt,";
	$sql.= " fudousan_flg,";
	$sql.= " fudousan_nm,";
	$sql.= " bikou,";
	$sql.= " fullname,";
	$sql.= " fullname_kn,";
	$sql.= " tel,";
	$sql.= " e_mail,";
	$sql.= " sumai_flg,";
	$sql.= " sumai_shikucyouson_no,";
	$sql.= " sumai_yubin,";
	$sql.= " sumai_jusho,";
	$sql.= " sumai_tatemono,";
	$sql.= " moushikomibi,";
	$sql.= " rank_no,";
	$sql.= " tesuryou,";
	$sql.= " mukou_flg ";
	$sql.= "FROM";
	$sql.= " t_item ";
	$sql.= "WHERE";
	$sql.= " item_no = ".$gc->item_no;

	$rs = $gc->db->query($sql);

	if(!$rs->eof){

		$gc->mukou_flg = $rs->fields["mukou_flg"];

		$anken_no = $rs->fields["anken_no"];

		$relocation_flg = $rs->fields["relocation_flg"];
		$chintai_flg = $rs->fields["chintai_flg"];
		$sublease_flg = $rs->fields["sublease_flg"];
		$purpose_flg = $rs->fields["purpose_flg"];

		$buken_sbt = $rs->fields["buken_sbt"];
		$buken_shozai = $rs->fields["buken_shozai"];
		$sonota_jusho = $rs->fields["sonota_jusho"];
		$buken_tatemono = $rs->fields["buken_tatemono"];
		$chikunensu = $rs->fields["chikunensu"];
		$menseki = $rs->fields["menseki"];
		$input_kbn = $rs->fields["input_kbn"];
		$land_val = $rs->fields["land_val"];

		$madori_no = $rs->fields["madori_no"];
		$meigi_no = $rs->fields["meigi_no"];
		$genjyou_no = $rs->fields["genjyou_no"];
		$room_cnt = $rs->fields["room_cnt"];

		$fudousan_flg = $rs->fields["fudousan_flg"];
		$fudousan_nm = $rs->fields["fudousan_nm"];
		$bikou = $rs->fields["bikou"];
		$fullname = $rs->fields["fullname"];
		$fullname_kn = $rs->fields["fullname_kn"];
		$tel = $rs->fields["tel"];
		$e_mail = $rs->fields["e_mail"];
		$sumai_flg = $rs->fields["sumai_flg"];
		$sumai_jusho = $rs->fields["sumai_jusho"];
		$sumai_tatemono = $rs->fields["sumai_tatemono"];
		$moushikomibi = $rs->fields["moushikomibi"];
		$rank_no = $rs->fields["rank_no"];
		$tesuryou = $rs->fields["tesuryou"];

		$arr = fdiv_set_buken_sbt_array();
		$buken_sbt_nm = $arr[$buken_sbt];

		$purpose_arr = fdiv_set_purpose_array();
		$purpose_str = $purpose_arr[$purpose_flg];

		$kibou_str ="";
		if($chintai_flg == 1){
			$kibou_str.= "賃貸募集・賃貸管理  ";
		}
		if($sublease_flg == 1) {
			$kibou_str.= "サブリース  ";
		}
		if($relocation_flg == 1) {
			$kibou_str.= "リロケーション";
		}

		//$info = get_shikucyouson_info($gc, $buken_shikucyouson_no);
		//$buken_syozaichi = $info["todoufuken_nm"].$info["shikucyouson_nm"];

		$chikunensu = (float)$chikunensu;

		if($chikunensu >= 0){
			$chikunensu = $chikunensu."年";
		}else{
			$chikunensu = "";
		}

		//$relocation_str = "いいえ";
		//if($relocation_flg==1){
		//	$relocation_str = "はい";
		//}


		$menseki = $menseki."平米";

		//土地面積
		$land_val = $land_val."平米";

		$arr = fdiv_set_madori_array();
		$madori_nm = $arr[$madori_no];

		$arr = fdiv_set_meigi_array();
		$meigi_nm = $arr[$meigi_no];

		$arr = fdiv_set_genjyou_array();
		$genjyou_nm = $arr[$genjyou_no];
		if($room_cnt > 0){
			$genjyou_nm = $genjyou_nm." 空き部屋数 ".$room_cnt;
		}

		$arr = fdiv_set_sumai_flg_array();
		$sumai_nm = $arr[$sumai_flg];

		$moushikomibi = substr($moushikomibi, 0, 4)."/".substr($moushikomibi, 5, 2)."/".substr($moushikomibi, 8, 2)." ".substr($moushikomibi, 11);

		$s = "\n";
		$s.= "案件番号...............: ".$anken_no."\n";
		$s.= "申込日時...............: ".$moushikomibi."\n";
		$s.= "\n";
		$s.= "───────────────────────────────────\n";
		$s.= "■物件情報■\n";
		$s.= "───────────────────────────────────\n";
		$s.= "ご利用目的.............: ".$purpose_str."\n";
//		$s.= "希望のサービス.........: ".$kibou_str."\n";
		$s.= "物件種別...............: ".$buken_sbt_nm."\n";
		$s.= "物件所在地.............: ".$buken_shozai."\n";
		$s.= "その他住所.............: ".$sonota_jusho."\n";
		if($buken_sbt != 3){
		$s.= "建物名・部屋番号.......: ".$buken_tatemono."\n";
		}
		$s.= "築年数.................: ".$chikunensu."\n";
		$s.= "延床面積...............: ".$menseki."\n";
		if($buken_sbt != 1){
			$s.= "土地面積...............: ".$land_val."\n";
		}
		if($buken_sbt != 2){
		$s.= "間取り.................: ".$madori_nm."\n";
		}
		$s.= "名義...................: ".$meigi_nm."\n";
		$s.= "現況...................: ".$genjyou_nm."\n";
		$s.= "\n";
		$s.= "───────────────────────────────────\n";
		$s.= "■お客様情報■\n";
		$s.= "───────────────────────────────────\n";
		$s.= "お名前.................: ".$fullname."\n";
   		$s.= "フリガナ...............: ".$fullname_kn."\n";
		$s.= "電話番号...............: ".$tel."\n";
		$s.= "メールアドレス.........: ".$e_mail."\n";
		if($sumai_flg==1) {
			$s.= "お住まい...............: ".$sumai_jusho."\n";
			$s.= "建物名・部屋番号.......: ".$sumai_tatemono."\n";
		} else {
			$s.= "お住まい...............: ".$buken_shozai."\n";
			$s.= "その他住所.............: ".$sonota_jusho."\n";
			$s.= "建物名・部屋番号.......: ".$buken_tatemono."\n";
		}
		$s.= "ご要望・ご質問など.....: ".$bikou."\n";
		$s.= "\n";

	}

	$rs->free_result();

	$gc->naiyou = $s;

}