Id) { stop("Invalid page"); #error exit; } $L=new Language(GetSessionParam("IntLang")); $Condition=(int)GetParam("Condition"); $Mark=(int)GetParam("Mark"); $Type=(int)GetParam("Type"); $Transmission=(int)GetParam("Transmission"); $FuelType=(int)GetParam("FuelType"); $EngineSize=(int)GetParam("EngineSize"); $Price=(int)GetParam("Price"); $Keywords=GetInputParam("Keywords"); $t=new Templ8(confESRootP . confESDirTpl . sprintf("CarSearch%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 "Search": $X=CarSearch(GetSessionParam("IntUserId"), $Condition, $Mark, $Type, $Transmission, $FuelType, $EngineSize, $Price, $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; } HeaderEasysite($L->Load("CarSearch"), "", 0, 0, 0); #title $t->v["L_CarSearch"]=$L->Load("CarSearch"); #search text $t->v["L_SearchText01"]=$L->Load("SearchText01"); #condition $t->v["L_Condition"]=$L->Load("Condition"); $t->v["L_ConditionNew"]=$L->Load("ConditionNew"); $t->v["L_ConditionUsed"]=$L->Load("ConditionUsed"); #mark $t->v["L_Mark"]=$L->Load("Mark"); for ($i=0; $i<18; $i++) { $t->NewBlock("Mark"); $t->bv["Mark"]["Id"]=$i; $t->bv["Mark"]["Name"]=$L->Load(sprintf("CarMark%02d", $i)); if ($i==$Mark) { $t->bv["Mark"]["Selected"]="selected"; } } #type $t->v["L_Type"]=$L->Load("Type"); for ($i=0; $i<11; $i++) { $t->NewBlock("Type"); $t->bv["Type"]["Id"]=$i; $t->bv["Type"]["Name"]=$L->Load(sprintf("CarType%02d", $i)); if ($i==$Type) { $t->bv["Type"]["Selected"]="selected"; } } #transmission $t->v["L_Transmission"]=$L->Load("Transmission"); $t->v["L_TransmissionAutomatic"]=$L->Load("TransmissionAutomatic"); $t->v["L_TransmissionManual"]=$L->Load("TransmissionManual"); #fuel type $t->v["L_FuelType"]=$L->Load("FuelType"); for ($i=0; $i<7; $i++) { $t->NewBlock("FuelType"); $t->bv["FuelType"]["Id"]=$i; $t->bv["FuelType"]["Name"]=$L->Load(sprintf("CarFuelType%02d", $i)); if ($i==$FuelType) { $t->bv["FuelType"]["Selected"]="selected"; } } #engine size $t->v["L_EngineSize"]=$L->Load("EngineSize"); #price $t->v["L_Price"]=$L->Load("Price"); $t->v["Price" . sprintf("%02d", $Price)]="selected"; #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"); $t->Output(); FooterEasysite(); ?>