require_once SERVERPATH . "/" . ZENFOLDER . '/functions-controller.php'; require_once SERVERPATH . "/" . ZENFOLDER . '/controller.php'; $_index_theme = $_zp_script = ''; $_zp_page_check = 'checkPageValidity'; //$_zp_script_timer['controller'] = microtime(); // Display an arbitrary theme-included PHP page if (isset($_GET['p'])) { $_index_theme = prepareCustomPage(); // Display an Image page. } else { if (in_context(ZP_IMAGE)) { $_index_theme = prepareImagePage(); // Display an Album page. } else { if (in_context(ZP_ALBUM)) { $_index_theme = prepareAlbumPage(); // Display the Index page. } else { if (in_context(ZP_INDEX)) { $_index_theme = prepareIndexPage(); } else { $_index_theme = setupTheme(); } } } } //$_zp_script_timer['theme setup'] = microtime(); $_zp_script = zp_apply_filter('load_theme_script', $_zp_script, $zp_request); $custom = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($_index_theme) . '/functions.php'; if (file_exists($custom)) { require_once $custom;
static function loadScript($script, $request) { global $_zp_current_admin_obj, $_zp_gallery_page, $_myFavorites, $_zp_current_album, $_zp_conf_vars, $_myFavorites; if ($_myFavorites && isset($_REQUEST['instance'])) { $_myFavorites->instance = sanitize(rtrim($_REQUEST['instance'], '/')); if ($_myFavorites->instance) { $_myFavorites->setTitle($_myFavorites->getTitle() . '[' . $_myFavorites->instance . ']'); } } if ($_zp_gallery_page == "favorites.php") { if (zp_loggedin()) { $_zp_current_album = $_myFavorites; add_context(ZP_ALBUM); prepareAlbumPage(); $_zp_gallery_page = 'favorites.php'; } else { $script = false; } } return $script; }