= 0 ? $_GET['twg_rot'] : -1); $twg_rot = $twg_rot >= 360 ? 0 : $twg_rot; } else $twg_rot = -1; // twg_album if (isset($_GET['twg_album'])) { $twg_album = replace_plus(replaceInput($_GET['twg_album'])); $twg_album = str_replace("\\'", "'", $twg_album); $twg_album = urldecode($twg_album); // the double decode is because of some servers where this is needed! $twg_album = restore_plus($twg_album); $album_url = $twg_album; $album_enc = urlencode($twg_album); } else { $twg_album = false; $album_url = false; } include (dirname(__FILE__) . '/../mapping.php'); // image if (isset($_GET['twg_show'])) { $image = $_GET['twg_show']; $pos = strpos (strtolower($image), "http://"); if ($pos === false) { $image = ereg_replace("/", "", $image); } $image = str_replace("\\'", "'", $image); $image = replaceInput($image); $image_enc = urlencode($image); } else $image = false; if ($input_invalid) { printErrorInvalid(); die(); } // type if (isset($_GET['twg_generate'])) { $twg_generate = true; } else $twg_generate = false; // type if (isset($_GET['twg_type'])) { $type = $_GET['twg_type']; $type = replaceInput($type); } else $type = false; // randomnr if (isset($_GET['twg_random'])) { $randomimage = $_GET['twg_random']; $randomimage = replaceInput($randomimage); } else $randomimage = false; if (isset($_GET['twg_random_display'])) { if (isset($_GET['twg_random'])) { if (isset($_SESSION['twg_random' . $_GET['twg_random']])) { $image = $_SESSION['twg_random' . $_GET['twg_random']]; $image = replaceInput($image); $image_enc = urlencode($image); } else { // if external html page was open toooo long we jump to the first image $image = false; $image_enc = false; } } if (isset($_GET['twg_random'])) { if (isset($_SESSION['twg_random_album' . $_GET['twg_random']])) { $twg_album = $_SESSION['twg_random_album' . $_GET['twg_random']]; $twg_album = replaceInput($twg_album); $album_enc = urlencode($twg_album); } else { // if external html page was open toooo long we jump to the first image $twg_album = false; $album_enc = false; } } } // randomimagesize if (isset($_GET['twg_random_size'])) { $randomimagesize = $_GET['twg_random_size']; $randomimagesize = replaceInput($randomimagesize); } else $randomimagesize = $thumb_pic_size; if (isset($_GET['twg_random_subdir'])) { $twg_random_subdir = true; } else $twg_random_subdir = false; $dataXmlHttp = false; $browserXmlHttp = false; $menuXmlHttp = false; $menuXmlAutohide = false; if (isset($_GET['twg_xmlhttp'])) { if ($_GET['twg_xmlhttp'] == 'd') { $dataXmlHttp = true; } if ($_GET['twg_xmlhttp'] == 'r') { $browserXmlHttp = true; } if ($_GET['twg_xmlhttp'] == 'm') { $menuXmlHttp = true; } if ($_GET['twg_xmlhttp'] == 'h') { $menuXmlAutohide = true; } } if (isset($_GET['twg_precachexml'])) { $precachexml = true; } else { $precachexml = false; } if (isset($_GET['twg_nojs'])) { $browserNoJS = true; } else { $browserNoJS = false; } ?>