Id) { stop("Invalid page"); #error exit; } $L=new Language(GetSessionParam("IntLang")); $BuildingType=(int)GetParam("BuildingType"); $Transaction=(int)GetParam("Transaction") % 2; $Price=(int)GetParam("Price"); $Area=(int)GetParam("Area"); $GroundArea=(int)GetParam("GroundArea"); $Rooms=(int)GetParam("Rooms"); $RentalAssistance=(int)GetParam("RentalAssistance"); $Access4Disabled=(int)GetParam("Access4Disabled"); $City=GetInputParam("City"); $Zip=GetInputParam("Zip"); $Keywords=GetInputParam("Keywords"); $t=new Templ8(confESRootP . confESDirTpl . sprintf("HouseSearch%04d.tpl.html", $E->Layout)); $t->v["Session"]=session_id(); $t->v["UserId"]=GetSessionParam("IntUserId"); $t->v["confRequestScheme"]=confRequestScheme; $t->v["confHost"]=confHost; $t->v["confRootV"]=confRootV; $t->v["confDirPix"]=confDirPix; $t->v["confESRootV"]=confESRootV; $t->v["confESDirPhp"]=confESDirPhp; $Action=GetParam("Action"); switch ($Action) { case "Refresh": break; case "Search": $X=HouseSearch(GetSessionParam("IntUserId"), $BuildingType, $Transaction, $Price, $Area, $GroundArea, $Rooms, $RentalAssistance, $Access4Disabled, $City, $Zip, $Keywords); if (count($X)>0) { SetSessionParam("SearchResults", $X); HeaderLocation(confESRootV . confESDirPhp . "Overview.php" . "?session=" . session_id() . "&Action=Search"); } $t->NewBlock("Warning"); $t->bv["Warning"]["L_Message"]=$L->Load("SearchFailed"); break; } #title $t->v["L_HouseSearch"]=$L->Load("HouseSearch"); #search text $t->v["L_SearchText01"]=$L->Load("SearchText01"); #building type $t->v["L_BuildingType"]=$L->Load("BuildingType"); $XT=new CategoryText(); foreach ($XT->GetAllByTypes(2, GetSessionParam("IntLang")) as $Id) { $CT=new CategoryText($Id, GetSessionParam("IntLang")); $t->NewBlock("BuildingType"); $t->bv["BuildingType"]["Id"]=$CT->Id; $t->bv["BuildingType"]["Name"]=$CT->Name; if ($BuildingType==$CT->Id) { $t->bv["BuildingType"]["Selected"]="selected"; } } #transaction $t->v["L_Transaction"]=$L->Load("Transaction"); $t->v["L_TransactionRent"]=$L->Load("Transaction00"); $t->v["L_TransactionBuy"]=$L->Load("Transaction01"); switch ($BuildingType) { case 104: $Transaction=1; $t->v["Transaction01"]="disabled"; $t->v["Transaction02"]="checked"; break; case 105: $Transaction=0; $t->v["Transaction01"]="checked"; $t->v["Transaction02"]="disabled"; break; default: $t->v[sprintf("Transaction%02d", $Transaction)]="checked"; break; } #price $t->v["L_Price"]=$L->Load("Price"); if ($Transaction==1) { $t->NewBlock("PriceRent"); } else { $t->NewBlock("PriceSale"); } #area $t->v["L_Area"]=$L->Load("Area"); $t->v["Area" . sprintf("%02d", $Area)]="selected"; #area2 (depends on building type) $t->v["L_GroundArea"]=$L->Load("GroundArea"); if ($BuildingType==102 || $BuildingType==103 || $BuildingType==104 || $BuildingType==106) { $t->v["GroundAreaDisabled"]="disabled"; } else { $t->v["GroundArea" . sprintf("%02d", $Area)]="selected"; } #rooms $t->v["L_Rooms"]=$L->Load("Rooms"); $t->v["L_NotSpecifiedShort"]=$L->Load("NotSpecifiedShort"); $t->v["Rooms" . sprintf("%02d", $Rooms)]="selected"; #rental assistance $t->v["L_RentalAssistance"]=$L->Load("RentalAssistance"); $t->v["L_Yes"]=$L->Load("Yes"); $t->v["L_No"]=$L->Load("No"); $t->v["RentalAssistance" . sprintf("%02d", $RentalAssistance)]="checked"; #access 4 disabled $t->v["L_Access4Disabled"]=$L->Load("Access4Disabled"); $t->v["Access4Disabled" . sprintf("%02d", $Access4Disabled)]="checked"; #zip $t->v["L_Zip"]=$L->Load("Zip"); $t->v["Zip"]=$Zip; #city $t->v["L_City"]=$L->Load("City"); $t->v["City"]=$City; #keywords $t->v["L_Keywords"]=$L->Load("Keywords"); $t->v["Keywords"]=$Keywords; #button $t->v["L_ButtonSearch"]=$L->Load("ButtonSearch"); $t->v["L_ButtonSearchText"]=$L->Load("ButtonSearchText"); $t->v["L_NotSpecified"]=$L->Load("NotSpecified"); HeaderEasysite($L->Load("HouseSearch"), "", 0, 0, 0); $t->Output(); FooterEasysite(); ?>