hauptbilder ### - grafiken/{c_id}/pics -> gallery bilder ### - grafiken/{c_id}/thumbs -> gallery vorschau ### - das tpl für die bilder -> tpl/inc/images.tpl ################################################################################# ini_set('display_errors', 1); error_reporting(E_ERROR | E_WARNING | E_PARSE); @include("inc/config.inc.php"); #include("config.inc.php"); include(PATH_INC."func.inc.php"); if(strpos($_SERVER["REQUEST_URI"],"?")) { parse_str(substr($_SERVER["REQUEST_URI"],strpos($_SERVER["REQUEST_URI"],"?")+1),$_REAL_GET); $_GET = array_merge($_GET,$_REAL_GET); } $lang = $_GET[lang]; // LANG auto detect if(!$lang) { # if (substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2)=="de") { # $lang='de'; # } # else { $lang='it'; # } } $_GET[lang] = $lang; // INIT CACHE_ID unset($cache_id); foreach($_GET as $k => $v) $cache_id.= $k."-".$v."_"; // initialize smarty define(SMARTY_DIR, PATH_INC . "/smarty/"); include(PATH_INC . "/smarty/Smarty.class.php"); $smarty = new Smarty(); $smarty->compile_dir = PATH_INC . "/smarty/compile"; $smarty->cache_dir = PATH_INC . "/smarty/cache"; $smarty->config_dir = PATH_INC . "/smarty/config"; $smarty->template_dir = PATH_TPL; $smarty->assign("URL_IMG",URL_IMG); $smarty->assign("URL_ROOT",URL_ROOT); $smarty->assign("_POST",$_POST); $smarty->assign("_GET",$_GET); $smarty->assign("RIMG_URL",RIMG_URL); // WARNING!!!! $smarty->force_compile = 1; # $smarty->caching = 1; # $smarty->compile_check = true; $smarty->assign("self",basename($PHP_SELF,".php")); $smarty->assign("lang",$lang); $smarty->config_load(PATH_LANG."/$lang.inc"); $hash = $smarty->get_config_vars(); ###################################################################### // START PAGE if(!$_GET[cat_id] AND !$_GET[pro_id] AND !$_GET[c_id]) $_GET[c_id]=0; $nav_id=0; // NAVIGATION while($hash["l_nav_".$nav_id]) { // GET C_ID $nav[$nav_id][url_name] = get_url_name($hash["l_nav_".$nav_id]); if($nav[$nav_id][url_name]==$_GET[s_name] AND !$_GET[c_id]) $_GET[c_id] = $nav_id; $nav[$nav_id][name] = $hash["l_nav_".$nav_id]; $nav[$nav_id][link] = $hash["l_nav_".$nav_id."_link"]; $nav[$nav_id][class_name] = $hash["l_nav_class_".$nav_id]; // SUBNAV while($hash["l_nav_".$nav_id."_".$subnav_id] OR $subnav_id==0) { if($hash["l_nav_".$nav_id."_".$subnav_id]!="") { $subnav[$nav_id][$subnav_id]=$hash["l_nav_".$nav_id."_".$subnav_id]; $subnav_url[$nav_id][$subnav_id]=get_url_name($hash["l_nav_".$nav_id."_".$subnav_id]); if($subnav_url[$nav_id][$subnav_id]==$_GET[ss_name]) $_GET[sc_id] = $subnav_id; $subnav_color[$nav_id][$subnav_id]=$hash["l_nav_".$nav_id."_".$subnav_id."_color"]; } $subnav_id++; } $nav_id++; } if($_GET[c_id] AND $hash["l_nav_".$_GET[c_id]."_0"] AND !$_GET[sc_id]) $_GET[sc_id] = 0; $smarty->assign("nav",$nav); $smarty->assign("subnav",$subnav); $smarty->assign("subnav_url",$subnav_url); $smarty->assign("subnav_color",$subnav_color); $smarty->assign("_GET",$_GET); if($_GET[c_id]>=0) { $smarty->assign("b_nav",$hash["l_nav_".$_GET[c_id]]); } ###################################################################### /// HTML UND H1 TITLE if($hash["l_nav_".$_GET[c_id]."_".$_GET[sc_id]]) $sub_html_title = del_bdo($hash["l_nav_".$_GET[c_id]."_".$_GET[sc_id]]." - "); if($_GET[c_id]>0) $smarty->assign("html_title",$sub_html_title.$hash["l_nav_".$_GET[c_id]]." - ".$hash[l_html_title]); else $smarty->assign("html_title",$hash[l_html_title]); if($hash["l_nav_".$_GET[c_id]."_".$_GET[sc_id]]) $h1_title = $hash["l_nav_".$_GET[c_id]."_".$_GET[sc_id]]; else $h1_title = $hash["l_nav_".$_GET[c_id]]; $smarty->assign("h1_title",$h1_title); ###################################################################### /// GET ACTIV NAV ELEMENT if ($_GET[cat_id]) $active_nav = "cat_".$_GET[cat_id]; else if ($_GET[pro_id]) $active_nav = "cat_".get_product_cat_id($_GET[pro_id]); $smarty->assign("active_nav",$active_nav); ?>