Beispiel #1
0
$template->assign('U_CANONICAL', make_picture_url(array('image_id' => $picture['current']['id'], 'image_file' => $picture['current']['file'])));
// +-----------------------------------------------------------------------+
// |                               sub pages                               |
// +-----------------------------------------------------------------------+
include PHPWG_ROOT_PATH . 'include/picture_rate.inc.php';
if ($conf['activate_comments']) {
    include PHPWG_ROOT_PATH . 'include/picture_comment.inc.php';
}
if ($metadata_showable and pwg_get_session_var('show_metadata') != null) {
    include PHPWG_ROOT_PATH . 'include/picture_metadata.inc.php';
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if ($conf['picture_menu'] and (!isset($themeconf['hide_menu_on']) or !in_array('thePicturePage', $themeconf['hide_menu_on']))) {
    if (!isset($page['start'])) {
        $page['start'] = 0;
    }
    include PHPWG_ROOT_PATH . 'include/menubar.inc.php';
}
include PHPWG_ROOT_PATH . 'include/page_header.php';
trigger_notify('loc_end_picture');
flush_page_messages();
if ($page['slideshow'] and $conf['light_slideshow']) {
    $template->pparse('slideshow');
} else {
    $template->parse_picture_buttons();
    $template->pparse('picture');
}
//------------------------------------------------------------ log informations
pwg_log($picture['current']['id'], 'picture');
include PHPWG_ROOT_PATH . 'include/page_tail.php';
Beispiel #2
0
    case 'f':
        $file = original_to_format(get_element_path($element_info), $format['ext']);
        $element_info['file'] = get_filename_wo_extension($element_info['file']) . '.' . $format['ext'];
        break;
}
if (empty($file)) {
    do_error(404, 'Requested file not found');
}
if ($_GET['part'] == 'e') {
    pwg_log($_GET['id'], 'high');
} else {
    if ($_GET['part'] == 'e') {
        pwg_log($_GET['id'], 'other');
    } else {
        if ($_GET['part'] == 'f') {
            pwg_log($_GET['id'], 'high', $format['format_id']);
        }
    }
}
$http_headers = array();
$ctype = null;
if (!url_is_remote($file)) {
    if (!@is_readable($file)) {
        do_error(404, "Requested file not found - {$file}");
    }
    $http_headers[] = 'Content-Length: ' . @filesize($file);
    if (function_exists('mime_content_type')) {
        $ctype = mime_content_type($file);
    }
    $gmt_mtime = gmdate('D, d M Y H:i:s', filemtime($file)) . ' GMT';
    $http_headers[] = 'Last-Modified: ' . $gmt_mtime;
Beispiel #3
0
    }
    if (!empty($page['items'])) {
        include PHPWG_ROOT_PATH . 'include/category_default.inc.php';
        $url = add_url_params(duplicate_index_url(), array('display' => ''));
        $selected_type = $template->get_template_vars('derivative_params')->type;
        $template->clear_assign('derivative_params');
        $type_map = ImageStdParams::get_defined_type_map();
        unset($type_map[IMG_XXLARGE], $type_map[IMG_XLARGE]);
        foreach ($type_map as $params) {
            $template->append('image_derivatives', array('DISPLAY' => l10n($params->type), 'URL' => $url . $params->type, 'SELECTED' => $params->type == $selected_type ? true : false));
        }
    }
    // slideshow
    // execute after init thumbs in order to have all picture informations
    if (!empty($page['cat_slideshow_url'])) {
        if (isset($_GET['slideshow'])) {
            redirect($page['cat_slideshow_url']);
        } elseif ($conf['index_slideshow_icon']) {
            $template->assign('U_SLIDESHOW', $page['cat_slideshow_url']);
        }
    }
}
//------------------------------------------------------------ end
include PHPWG_ROOT_PATH . 'include/page_header.php';
trigger_notify('loc_end_index');
flush_page_messages();
$template->parse_index_buttons();
$template->pparse('index');
//------------------------------------------------------------ log informations
pwg_log();
include PHPWG_ROOT_PATH . 'include/page_tail.php';
Beispiel #4
0
            }
        }
        $file = get_element_path($element_info);
        break;
    case 'r':
        $file = original_to_representative(get_element_path($element_info), $element_info['representative_ext']);
        break;
}
if (empty($file)) {
    do_error(404, 'Requested file not found');
}
if ($_GET['part'] == 'e') {
    pwg_log($_GET['id'], 'high');
} else {
    if ($_GET['part'] == 'e') {
        pwg_log($_GET['id'], 'other');
    }
}
$http_headers = array();
$ctype = null;
if (!url_is_remote($file)) {
    if (!@is_readable($file)) {
        do_error(404, "Requested file not found - {$file}");
    }
    $http_headers[] = 'Content-Length: ' . @filesize($file);
    if (function_exists('mime_content_type')) {
        $ctype = mime_content_type($file);
    }
    $gmt_mtime = gmdate('D, d M Y H:i:s', filemtime($file)) . ' GMT';
    $http_headers[] = 'Last-Modified: ' . $gmt_mtime;
    // following lines would indicate how the client should handle the cache