assign("album",true); if ($_REQUEST[action]=="clientlogin" and $_POST[username]) { $get_user=db_query("SELECT * FROM usernames WHERE username='".$_POST[username]."' AND password='".$_POST[password]."' LIMIT 0,1",$dbConnect); if ($get_user[0]) { $_SESSION[logged]=1; header("Location: ?component=files"); exit; } else { header("Location: ?component=login&show=failed"); exit; } } if ($_GET[logout]) { unset($_SESSION[logged]); session_unregister(logged); header('Location: index.php?lan='.$_GET[lan]); exit; } $smarty->assign("logged",$_SESSION[logged]); include "admin/config.inc.php"; //print_r($forms[clientlogin]); include "admin/form.php"; include "inc/".$_GET[lan]."lan.php"; //loads component if ($_GET[component]) $component_file='components/'.$_GET[component].'/'.$_GET[component].'.php'; else $component_file='components/content/content.php'; if (file_exists($component_file)) { ob_start(); include $component_file; $contents = ob_get_contents(); ob_end_clean(); $smarty->assign("body",$contents); } if ($_GET[yacht_id]) { $yacht=db_query("SELECT file FROM html WHERE html.id=".$_GET[yacht_id],$dbConnect); if ($yacht[0][file]) $header=$yacht[0][file]; else $header='header.swf'; $ext=explode('.', $header); if ($ext[1]=='swf') $smarty->assign("flash_header", $header); else $smarty->assign("header", $header); } if ($_GET[component]) $smarty->assign("flash_header", 'header.swf'); $serv=db_query("SELECT ".$_GET[lan]."title as title,id,img,".$_GET[lan]."html as html FROM html WHERE id IN(14,15,16,21,44,45) ORDER by ordering ASC",$dbConnect); $smarty->assign("serv",$serv); $whats_new=db_query("SELECT ".$_GET[lan]."title as title,id,img,".$_GET[lan]."html as html FROM html WHERE html.idc=19 and html.featured=1 ORDER BY rand()",$dbConnect); $smarty->assign("whats_new",$whats_new[0]); ob_start(); include "weather_xml.php"; $contents1 = ob_get_contents(); ob_end_clean(); $smarty->assign("weather",$contents1); $smarty->assign("id", $_GET[id]); $smarty->assign("comp",$_GET[component]); if ($_GET[component]=='simple_gallery') $_GET[idc]=11; $smarty->display('index.htm'); ?>