} // re-initialize video dimensions if needed if (isImageVideo() & !is_null($_zp_flash_player)) { $_zp_current_image->updateDimensions(); } // Display the page itself if (!is_null($_zp_HTML_cache)) { $_zp_HTML_cache->startHTMLCache(); } // Include the appropriate page for the requested object, and a 200 OK header. header("HTTP/1.0 200 OK"); header("Status: 200 OK"); include $obj; } else { // If the requested object does not exist, issue a 404 and redirect to the theme's // 404.php page, or a 404.php in the zp-core folder. list($album, $image) = rewrite_get_album_image('album', 'image'); $_zp_gallery_page = '404.php'; $errpage = THEMEFOLDER . '/' . UTF8ToFilesystem($theme) . '/404.php'; header("HTTP/1.0 404 Not Found"); header("Status: 404 Not Found"); if (file_exists(SERVERPATH . "/" . $errpage)) { include $errpage; } else { include ZENFOLDER . '/404.php'; } } exposeZenPhotoInformations($obj, $_zp_loaded_plugins, $theme, $_zp_filters); if (!is_null($_zp_HTML_cache)) { $_zp_HTML_cache->endHTMLCache(); }
$theme = setupTheme($albumobj); $custom = $_zp_themeroot . '/functions.php'; if (file_exists($custom)) { require_once $custom; } $_zp_gallery_page = 'password.php'; $_zp_script = $_zp_themeroot . '/password.php'; if (!file_exists(internalToFilesystem($_zp_script))) { $_zp_script = SERVERPATH . '/' . ZENFOLDER . '/password.php'; } header('Content-Type: text/html; charset=' . LOCAL_CHARSET); header("HTTP/1.0 302 Found"); header("Status: 302 Found"); header('Last-Modified: ' . ZP_LAST_MODIFIED); include internalToFilesystem($_zp_script); exposeZenPhotoInformations($_zp_script, array(), $theme); exitZP(); } } $image_path = $imageobj->localpath; $suffix = getSuffix($image_path); switch ($suffix) { case 'wbm': case 'wbmp': $suffix = 'wbmp'; break; case 'jpg': $suffix = 'jpeg'; break; case 'png': case 'gif':
$errpage = THEMEFOLDER . '/' . internalToFilesystem($theme) . '/404.php'; header('Content-Type: text/html; charset=' . LOCAL_CHARSET); header("HTTP/1.0 404 Not Found"); header("Status: 404 Not Found"); zp_apply_filter('theme_headers'); if (file_exists(SERVERPATH . "/" . $errpage)) { if ($custom) { require_once $custom; } include $errpage; } else { include ZENFOLDER . '/404.php'; } } //$_zp_script_timer['theme script load'] = microtime(); exposeZenPhotoInformations($_zp_obj, $_zp_loaded_plugins, $theme); //$_zp_script_timer['expose information'] = microtime(); db_close(); // close the database as we are done echo "\n"; list($usec, $sec) = explode(' ', array_shift($_zp_script_timer)); $first = $last = (double) $usec + (double) $sec; $_zp_script_timer['end'] = microtime(); foreach ($_zp_script_timer as $step => $time) { list($usec, $sec) = explode(" ", $time); $cur = (double) $usec + (double) $sec; printf("<!-- " . gettext('Zenphoto script processing %1$s:%2$.4f seconds') . " -->\n", $step, $cur - $last); $last = $cur; } if (count($_zp_script_timer) > 1) { printf("<!-- " . gettext('Zenphoto script processing total:%.4f seconds') . " -->\n", $last - $first);