"; while (list($key,$value) = each($_GET)) {$$key = $value;}; // Defaults and Language if (!isset($ui)) $ui = 0; if (!isset($pg)) $pg = 1; if (!isset($option)) $option = _opt_home; if (!isset($lang)) $lang = _lang_en; if ( $lang != _lang_de && $lang != _lang_en && $lang != _lang_es && $lang != _lang_fr) { $lang = _lang_en; } $filang = _path_inc . "lang" . _fi_separator . $lang . ".php"; require_once($filang); $fin = _fi_separator . $lang . _fi_sfx; $incpath = $option . "/"; // Get title image and determine width and height $imgtit = _path_root . _path_img . "tit" . _fi_separator . $option . ".jpg"; $imgsize = getimagesize ("$imgtit"); switch ($option) { // Home case _opt_home: $tit = _obj_home; break; // News case _opt_news: $tit = _obj_news; break; // Shop case _opt_shop: $tit = _obj_shop; break; // Tour case _opt_tour: $tit = _obj_tour; break; // Gallery case _opt_gallery: $tit = _obj_gallery; /* if (isset($act)) { $tit .= $act; } */ break; // Exhibition case _opt_exhibit: $tit = _obj_exhibit; break; // Biography case _opt_bio: $tit = _obj_bio; break; // Tarot case _opt_tarot: $tit = _obj_tarot; break; // Visit case _opt_visit: $tit = _obj_visit; break; // Reservation case _opt_res: $tit = _obj_res; break; // Movies case _opt_shortmovies: $tit = _obj_shortmovies; break; // Home default: $option = _opt_home; $incpath = _opt_home . "/"; $tit = _obj_home; break; } if (isset($act)) { $tit .= $act; } $obj = $incpath . $tit . $fin; if (!file_exists($obj)) { $msg = "The requested file " . $obj . " does NOT exist !!"; die($msg); } $arrFile = file($obj); // read file into an array $totpages = 0; $arrPrint = array(); $offset = 0; foreach($arrFile as $key=>$value) { if (substr($value,0,_pg_len) == _pg_separator) { $totpages += 1; if ($pg == $totpages) { $offset = $key + 1; $lines = 0; } if ($pg == ($totpages - 1) && $offset > 0) { $lines = $key - $offset; } } //print("line $key: $value
\n"); } if ($totpages == 0) { $totpages = 1; $lines = 0; } // Determine Goggle Image $gjump = $pg * round(110 / $totpages); //echo $gjump; $gpic = 111 - $gjump; if ($gjump > 110) { $gpic = 1; } $imggog = _path_root . _path_img . "goggle/" . $gpic . ".jpg"; // Force Title // Must be adapted when Menus change or when Submenus should also be configurable if ($tit == "home") { $forcetitle = _home; } elseif ($tit == "news") { $forcetitle = _news; } elseif ($tit == "shop") { $forcetitle = _shop; } elseif ($tit == "tour") { $forcetitle = _tour; } elseif ($tit == "gal") { $forcetitle = _gal; } elseif ($tit == "galarchive") { $forcetitle = _galarchive; } elseif ($tit == "exhibit") { $forcetitle = _exhibit; } elseif ($tit == "bio") { $forcetitle = _bio; } elseif ($tit == "tarot") { $forcetitle = _tarot; } elseif ($tit == "visit") { $forcetitle = _visit; } elseif ($tit == "res") { $forcetitle = _res; } elseif ($tit == "shortmovies") { $forcetitle = _shortmovies; } else { $forcetitle = 0; } //echo "
pages=" . $totpages . " offset=" . $offset . " lines=" . $lines; if ($lines > 0) { $arrContent = array_slice($arrFile, $offset, $lines); } else { $arrContent = array_slice($arrFile, $offset); } //echo "
" ; //print_r(array_values ($arrContent)); // Content Navigation $pgprev = $pg - 1; $pgfp = $pg - _qty_ff; $pgnxt = $pg + 1; $pgff = $pg + _qty_ff; $pgfirst = 1; $pglast = $totpages; // Language Navigation $obj_de = $incpath . $tit . _fi_separator . "de" . _fi_sfx; $obj_en = $incpath . $tit . _fi_separator . "en" . _fi_sfx; $obj_es = $incpath . $tit . _fi_separator . "es" . _fi_sfx; $obj_fr = $incpath . $tit . _fi_separator . "fr" . _fi_sfx; if (file_exists($obj_de)) { $nav_de = 1; } else { $nav_de = 0; } if (file_exists($obj_en)) { $nav_en = 1; } else { $nav_en = 0; } if (file_exists($obj_es)) { $nav_es = 1; } else { $nav_es = 0; } if (file_exists($obj_fr)) { $nav_fr = 1; } else { $nav_fr = 0; } // only show language selection if more than one language is available $nav_bool = _single_langmenu; if ($nav_bool == 0) { $nav_bool = $nav_de + $nav_en + $nav_es +$nav_fr; if ($nav_bool < 2) { $nav_de = 0; $nav_en = 0; $nav_es = 0; $nav_fr = 0; } } // show page if ($tit == "tourtour") { $content = _path_inc . "tourcontent.php"; } else { $content = _path_inc . _fi_content; } require_once($content); ?>