getCurrentTheme(); $_zp_themeroot = WEBPATH . "/$themepath/$theme"; if (!(false === ($requirePath = getPlugin('themeoptions.php', true)))) { require_once($requirePath); $optionHandler = new ThemeOptions(); /* prime the theme options */ } header ('Content-Type: text/html; charset=' . getOption('charset')); $obj = ''; if (isset($_GET['p'])) { $page = str_replace(array('/','\\','.'), '', $_GET['p']); if (substr($page, 0, 1) == "*") { include ($obj = ZENFOLDER."/".substr($page, 1) . ".php"); } else { $obj = "$themepath/$theme/$page.php"; if (file_exists(SERVERPATH . "/" . $obj)) { include($obj); } } } else if (in_context(ZP_IMAGE)) { include($obj = "$themepath/$theme/image.php"); } else if (in_context(ZP_ALBUM)) { if(isset($_GET['zipfile']) && is_dir(realpath(getAlbumFolder() . $_GET['album']))){ createAlbumZip($_GET['album']); } else { $cookiepath = WEBPATH; if (WEBPATH == '') { $cookiepath = '/'; } setcookie("zenphoto_search_params", "", time()-368000, $cookiepath); include($obj = "$themepath/$theme/album.php"); } } else if (in_context(ZP_INDEX)) { include($obj = "$themepath/$theme/index.php"); } if (!file_exists(SERVERPATH . "/" . $obj)) { echo ""; echo "\n\n\n\n\nZenphoto error: missing theme page."; echo "\n"; echo "\n\n"; } $a = explode("/", $obj); if ($a[count($a)-1] != 'full-image.php') { echo "\n"; } ?>