header('Content-type: text/html; charset=iso-8859-2');
require 'smarty3/Smarty.class.php';
include_once("../includes/sql.inc");
$smarty = new Smarty;
$smarty->template_dir="../templates/";
$smarty->compile_dir="../templates_c/";
$PICTURE_DIR="/images/";
$THUMB_DIR="/thumbs/";
if(!isset($_GET['command']))
$_GET['command']="main";
if($_GET['command']=="lang")
{
setcookie("lang", $_GET["lang"]);
$_COOKIE["lang"]=$_GET["lang"];
$_GET["command"]=isset($_GET["old_command"])?$_GET["old_command"]:"main";
}
if(!isset($_COOKIE["lang"]))
{
setcookie("lang", "hu");
$_COOKIE["lang"]="hu";
}
if($_COOKIE["lang"]=="hu")
$lang="hu";
else
$lang="en";
foreach($_GET as $key=>$value)
{
if($key!="old_command" and $key!="lang")
{
if($key=="command")
$key="old_command";
$old_command.="&$key=$value";
}
}
$smarty->assign("lang", $lang);
$smarty->assign("old_command", $old_command);
switch($_GET['command'])
{
case "main":
// include_once("../includes/main.inc");
include_once("../includes/puppies.inc");
// include_once('../includes/for_sale.inc');
break;
case "puppies":
include_once("../includes/puppies.inc");
break;
case "standard":
include_once("../includes/standard.inc");
break;
case "history":
include_once("../includes/history.inc");
break;
case "dogs":
include_once("../includes/dogs.inc");
break;
case "litters":
include_once("../includes/litters.inc");
break;
case "links":
include_once("../includes/links.inc");
break;
case "group_choose":
include_once("../includes/group_choose.inc");
break;
case "gallery_choose":
include_once("../includes/gallery_choose.inc");
$smarty->assign("template", "gallery_choose.tpl");
break;
case "gallery":
include_once("../includes/gallery.inc");
$smarty->assign("template", "gallery.tpl");
break;
case "calendar":
include_once("../includes/calendar.inc");
$smarty->assign("template", "calendar.tpl");
break;
case "for_free":
include_once("../includes/for_free.inc");
break;
case "in_memoriam":
include_once("../includes/in_memoriam.inc");
break;
case "show_blog":
include_once("../includes/show_blog.inc");
break;
case "for_sale":
include_once("../includes/for_sale.inc");
break;
default:
include_once("../includes/main.inc");
// $smarty->assign("template", "coming_soon.tpl");
}
include_once("../includes/menu.inc");
$smarty->display("index.tpl");
?>