".$s."
"; } if (isset($_GET['id'])) $id = (int)($_GET['id']); else $id=0; $firstRoom = ""; $firstRoomID = 0; $firstRoomName = ""; $selectedRoom = ""; $selectedRoomName = ""; $roommenu = ""; $roomtitle = ""; $res = mysql_query("select * from rooms order by weight asc"); while ($row = mysql_fetch_array ($res)) { $room_name = stripslashes($row['name_'.$lang]); $room_desc = stripslashes($row['description_'.$lang]); $_imgcontent1_ = ""; $_imgcontent2_ = ""; for ($i=1;$i<=10;$i++) { if ($row['image'.$i] != "" and file_exists("tcache/trooms_".substr($row['image'.$i], 0, -4).".jpg")) $_imgsource_ = "tcache/trooms_".substr($row['image'.$i], 0, -4).".jpg"; else if ($row['image'.$i] != "") $_imgsource_ = "trooms.php?file=".$row['image'.$i].""; if ($row['image'.$i] != "" and $i<=5) $_imgcontent1_ .= "
\"\"
\n"; else if ($row['image'.$i] != "" and $i>5) $_imgcontent2_ .= "
\"\"
\n"; } $__tmpcontent__ = "
".$room_desc."
".INTERIOR."
".$_imgcontent1_."
".EXTERIOR."
".$_imgcontent2_."
"; if ($firstRoom == "") { $firstRoom = $__tmpcontent__; $firstRoomName = $room_name; $firstRoomID = $row['id']; } if ($id == $row['id']) { $selectedRoom = $__tmpcontent__; $selectedRoomName = $room_name; } $roommenu .= " ".$room_name.""; } if ($selectedRoom != "") { $roomtitle = $selectedRoomName; $roommenu = str_replace("".$selectedRoomName."", "".$selectedRoomName."", $roommenu); } else { $roomtitle = $firstRoomName; $roommenu = str_replace("".$firstRoomName."", "".$firstRoomName."", $roommenu); } $__content__ .= "

".MENU_ITEM_3." |".$roommenu."

"; if ($selectedRoom != "") { $__content__ .= $selectedRoom; } else { $__content__ .= $firstRoom; } $ttemplate = $template; $ttemplate = str_replace("_____SITE_TITLE_____", MENU_ITEM_3." :: ".$roomtitle.SITE_TITLE, $ttemplate); $ttemplate = str_replace("_____CONTENT_____", $__content__, $ttemplate); echo $ttemplate; ?>