require_once("../config/search/setting_config.inc");
session_cache_limiter("no-cache");
session_start();
/*--------------------------------------------------------------------------
パラメータの格納とデコード
--------------------------------------------------------------------------*/
if( $_REQUEST[act] ){
$act = htmlspecialchars($_REQUEST[act],ENT_QUOTES);
}else{
$act = "search";
}
/*--------------------------------------------------------------------------
検索条件を取得
--------------------------------------------------------------------------*/
if( $_REQUEST[val] != "" ){
$val = escape_array($_REQUEST[val]);
}
/*--------------------------------------------------------------------------
お問い合わせ情報を取得
--------------------------------------------------------------------------*/
if( $_REQUEST[contact] != "" ){
$contact = escape_array($_REQUEST[contact]);
}
$option_arr[page] = ($_POST[page])? htmlspecialchars($_POST[page]) : 1;
$option_arr[page_size] = ($_POST[page_size])? htmlspecialchars($_POST[page_size]) : DEFAULT_PAGE_SIZE;
$option_arr[sort] = ($_POST[sort])? htmlspecialchars($_POST[sort]) : DEFAULT_SORT ;
$option_arr[sort_type] = ($_POST[sort_type])? htmlspecialchars($_POST[sort_type]) : DEFAULT_SORT_TYPE;
$sql="";
/*--------------------------------------------------------------------------
データ処理
--------------------------------------------------------------------------*/
switch( $act ){
case "detail":
$item =getRentMst($val,$option_arr);
//沿線情報をまとめる
for($j=1;$j<=3;$j++){
if($item["line".$j] && $item["station".$j] ){
$item[access_str] .= $item["line".$j]." ";
$item[access_str] .= $item["station".$j]."駅 ";
$item[access_str] .= ($item["walk".$j])? $item["walk".$j]."分":"" ;
$item[access_str] .= "
";
}
}
if(!$item[access_str]){
$item[access_str] = DEFAULT_NONE_STR;
}
//カテゴリー
$item[category_str] = ($item[category])? $search_category_array[$item[category]]: DEFAULT_NONE_STR;
//金額の見た目を調整
$item[rent] = yen_format($item[rent],DEFAULT_NONE_STR);
$item[general] = yen_format($item[general],DEFAULT_NONE_STR);
$item[deposit] = disp_value_by_unit($item[deposit_unit],$item[deposit],DEFAULT_NONE_STR);
$item[security_fee] = disp_value_by_unit($item[security_unit],$item[security_fee],DEFAULT_NONE_STR);
$item[reward] = disp_value_by_unit($item[reward_unit],$item[reward],DEFAULT_NONE_STR);
$item[allowance] = disp_value_by_unit($item[allowance_unit],$item[allowance],DEFAULT_NONE_STR);
//一時金
$item[temporary_fee] = yen_format($item[temporary_fee],DEFAULT_NONE_STR);
if(!$item[temporary_fee_ttl]){ $item[temporary_fee_ttl] = DEFAULT_NONE_STR;}
//間取り
$item[layout_unit_str] = ($item[layout_unit])? $layout_unitArray[$item[layout_unit]] : DEFAULT_NONE_STR;
//住所
if($item[pref] && $item[c_d] && $item[muni] ){
$item[address_str] = $item[pref].$item[c_d].$item[muni].$item[addr]." ".$item[other];
}else{
$item[address_str] = DEFAULT_NONE_STR;
}
//画像表示する幅、高さの設定値
$photo_width_array = array(""
,278
,240
,IMG_WIDTH_S
,IMG_WIDTH_S
,IMG_WIDTH_S
,IMG_WIDTH_S
,IMG_WIDTH_S);
$photo_height_array = array(""
,139
,320
,IMG_HEIGHT_S
,IMG_HEIGHT_S
,IMG_HEIGHT_S
,IMG_HEIGHT_S
,IMG_HEIGHT_S);
for($j=1;$j<=7;$j++){
//画像を取得
$photo_index = "photo0".$j;
$photo_index_nexthosing = "photo0".$j."_nexthosing";
if($item[article_id] && $item[$photo_index]){
if($j==1 || $j==2){
$tmp_folder = "b/";
}else{
$tmp_folder = "s/";
}
$item[$photo_index."_path"] = "../photo/{$item[article_id]}/{$tmp_folder}{$item[$photo_index]}";
$item[$photo_index."_href"] = "../photo/{$item[article_id]}/{$item[$photo_index]}";
}else if($item[article_id] && $item[$photo_index_nexthosing]){
//ネクストハウジング対応
if($j == "1"){
$item[$photo_index."_path"] = "../cgi-search/jutaku/bukken/{$item[$photo_index_nexthosing]}";
$item[$photo_index."_href"] = $item[$photo_index."_path"];
}else if($j == "2"){
$item[$photo_index."_path"] = "../cgi-search/jutaku/madori/{$item[$photo_index_nexthosing]}";
$item[$photo_index."_href"] = $item[$photo_index."_path"];
}else if($j == "3"){
$item[$photo_index."_path"] = "../cgi-search/jutaku/cg1/s/{$item[$photo_index_nexthosing]}";
$item[$photo_index."_href"] = "../cgi-search/jutaku/cg1/{$item[$photo_index_nexthosing]}";
}else if($j == "4"){
$item[$photo_index."_path"] = "../cgi-search/jutaku/cg2/s/{$item[$photo_index_nexthosing]}";
$item[$photo_index."_href"] = "../cgi-search/jutaku/cg2/{$item[$photo_index_nexthosing]}";
}
}else{
$item[$photo_index."_path"] = "common/img/no_img_s.jpg";
}
//画像サイズを調整
$item[$photo_index."_size"] = get_image_size($item[$photo_index."_path"],$photo_width_array[$j],$photo_height_array[$j]);
}
//オプション設備の表記
if($item[seq]){
$tmp_option_arr = getOptionInfo($item) ;
}
if(is_array($tmp_option_arr)){
for($j=0;$j0)? makeHtmlPager($option_arr[page],$pager_end,"") : "" ;
// echo "count is ".count($items);
for($i=0;$i