If you want to upgrade from an older version of TWG please copy your changes form the old config.php to the file my_config.php."); } if (file_exists(dirname(__FILE__) . "/skins/" . $skin . ".php")) { include dirname(__FILE__) . "/skins/" . $skin . ".php"; } if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { $lang_browser = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); if (file_exists(dirname(__FILE__) . "/language/language_" . $lang_browser . ".php")) { $default_language = $lang_browser; } } $twg_root = $_SERVER['PHP_SELF']; // needed in some i_frames !! we store this later in the session for the other frames ! /* set some session variables */ include (dirname(__FILE__) . "/inc/mysession.inc.php"); if ($default_big_navigation == "HTML_SIDE") { $numberofpics = $numberofpics_html_side; } if ($test_connection && $test_client_connection) { // speedtest! if (!$test_connection_background) { include (dirname(__FILE__) . "/inc/speed.inc.php"); return; } } if (!checkFullscreen()) { $activate_lightbox_thumb = $activate_lightbox_thumb_full = $activate_lightbox_image = $activate_lightbox_topx = $activate_lightbox_topx_full = $enable_album_tree = false; $fullscreen_active=true; } // make some settings that should be done in the config.php but the user have not configured properly if ($php_include) { $enable_maximized_view = false; } if (!$enable_maximized_view) { $default_is_fullscreen = false; } // some intro settings $detailswidth = 300; $hoverjs = false; $CurrentVer = $twg_version; $webpath = "http://www.tinywebgallery.com"; // don't modify this - this can only be done if you register ;) $basedir = $install_dir . $basedir; $cachedir = $install_dir . $cachedir; $counterdir = $install_dir . $counterdir; $xmldir = $install_dir . $xmldir; if (!checkCacheDirs()) { // checks if all cache dir are here and set the right umask return; } require (dirname(__FILE__) . "/language/language_" . $default_language . ".php"); include (dirname(__FILE__) . "/inc/fixfont.inc.php"); // we set the default title to $default_gallery_title if no one is set if ($lang_titel == "") { $lang_titel = $default_gallery_title; } // read the request parameters include dirname(__FILE__) . "/inc/parserequest.inc.php"; include dirname(__FILE__) . "/inc/readxml.inc.php"; $relativepath = ""; include dirname(__FILE__) . "/inc/checkprivate.inc.php"; cleanup_cache(); $twg_rot_available = checktwg_rot(); // check private login $twg_showprivatelogin = false; if (($privategal == true) && (!in_array(trim($privatelogin), $passwd))) { // we want to have a login :) if (($twg_album != false)) { $twg_showprivatelogin = true; } } // delete comment include dirname(__FILE__) . "/inc/delcomment.inc.php"; // important check if we already have to show fullscreen $default_is_fullscreen = ($image != false && $twg_album != false && $default_is_fullscreen); $generatecounter = false; if (isset($charset)) { set_error_handler("on_error_no_output"); // using utf-8 gives a warning i don't care header("Content-Type: text/html;charset=' . $charset . '"); set_error_handler("on_error"); } include dirname(__FILE__) . "/inc/index.inc.php"; include dirname(__FILE__) . "/inc/head.inc.php"; // prints all from to $numberofpics = floor(($numberofpics - 1) / 2); include dirname(__FILE__) . "/inc/bodytag.inc.php"; // prints include dirname(__FILE__) . "/js/twg.js.php"; if ($use_dynamic_background && $show_background_images && !$default_is_fullscreen) { echo '
'; } ?> "; include ($lefthtml); if ($enable_album_tree && $myborder != 'TRUE') { echo ""; } else { echo ""; } $leftinclude = true; } } if ($enable_album_tree && $myborder != 'TRUE') { if (!$leftinclude) { echo ""; } print_album_tree($basedir); if (!$leftinclude) { echo "
"; // } $leftinclude = true; // close the table at the end! } // used for footerhtml as well! if ($enable_album_tree) { $colspan = "4"; if ($album_tree_default_open) { $but_image = "hide"; } else { $but_image = "expand"; } } else { $colspan = "3"; } if ($myborder == 'TRUE' && !$default_is_fullscreen) { $iheight = ""; if ($iframe_include && $msie) { $iheight = "style='height:" . ($iframe_height_ie) . "'"; } echo ""; if ($enable_external_html_include && !$default_is_fullscreen) { $headerhtml = dirname(__FILE__) . "/header.htm"; if (file_exists($headerhtml)) { echo ""; } } echo " "; if ($enable_album_tree) { print_album_tree($basedir); } echo "
"; include ($headerhtml); echo "
"; if ($enable_album_tree) { echo ""; $widthfix = "width:100%"; } else { $widthfix = ""; } echo " "; } echo ""; if ($enable_external_html_include && !$default_is_fullscreen) { $headerhtml = dirname(__FILE__) . "/header.htm"; if (file_exists($headerhtml) && $myborder != 'TRUE') { echo ""; } } // start of small top navigation if (!$default_is_fullscreen) { echo ''; include (dirname(__FILE__) . "/inc/topnavigation.inc.php"); echo ''; } // end of small top navigation ?> "; } else { echo "'; if (!$default_is_fullscreen) { include dirname(__FILE__) . "/inc/bottom.inc.php"; } else { echo "
"; include ($headerhtml); echo "
"; echo ""; } echo '
'; if ($myborder != 'TRUE' && !$default_is_fullscreen) { if ($enable_album_tree) { echo ""; } } echo " "; if (!$default_is_fullscreen) { echo " // if (!$default_is_fullscreen && (!$input_invalid)) { include dirname(__FILE__) . "/inc/bottomnav.inc.php"; } ?>
"; } else { echo ""; } // start of image section if ($twg_showprivatelogin) { echo $lang_not_loggedin; // we show a login link here !! echo "
 

"; } else if ($input_invalid) { printErrorInvalid(); } else if ($image != false && $twg_album != false) { // imageview include (dirname(__FILE__) . "/inc/image.inc.php"); } else if ($top10) { print_top_10($album_enc, $top10_type); } else if ($twg_album != false) { // thumbnailview - or top 10 view print_thumbnails($twg_album, $twg_offset, $werte, $index, $twg_foffset); } else { // main view! show_folders($basedir, $twg_foffset); } ?>
'; echo ''; echo '
"; } if ($leftinclude) { echo "
"; } if ($use_dynamic_background && $show_background_images && !$default_is_fullscreen) { echo ''; if ($backgroundimage != "") { // we make this later because then it it loaded afterwards! echo ''; } } echo ''; if (!$default_is_fullscreen) { include dirname(__FILE__) . "/inc/counterdiv.inc.php"; } else { include dirname(__FILE__) . "/inc/fullscreen.inc.php"; createFullscreenControl($twg_album, $image); } if ($activate_lightbox_topx || $activate_lightbox_thumb || ($activate_lightbox_image && $enable_download)) { echo ''; } if (!$php_include) { echo ' '; }