Exemplo n.º 1
0
function view_player()
{
    global $input;
    global $template_folder;
    global $appname;
    // 0) Sanity checks
    if (!ezmam_album_exists($input['album'])) {
        error_print_http(404);
        log_append('warning', 'view_player: tried to access non-existant album ' . $input['album']);
        exit;
    }
    if (!ezmam_album_token_check($input['album'], $input['token'])) {
        error_print_http(403);
        log_append('warning', 'view_player: tried to acces album ' . $input['album'] . ' with invalid token ' . $input['token']);
        die;
    }
    // 1) Retrieving all assets' metadata
    $asset_list = ezmam_asset_list_metadata($input['album']);
    // 2) Add links to each asset
    foreach ($asset_list as &$asset) {
        $high_cam_link = '';
        $low_cam_link = '';
        $high_slide_link = '';
        $low_slide_link = '';
        if ($asset['metadata']['record_type'] == 'camslide' || $asset['metadata']['record_type'] == 'cam') {
            $high_cam_link = get_link_to_media($input['album'], $asset['name'], 'high_cam') . "&origin=" . $appname;
            $low_cam_link = get_link_to_media($input['album'], $asset['name'], 'low_cam') . "&origin=" . $appname;
        }
        if ($asset['metadata']['record_type'] == 'camslide' || $asset['metadata']['record_type'] == 'slide') {
            $high_slide_link = get_link_to_media($input['album'], $asset['name'], 'high_slide') . "&origin=" . $appname;
            $low_slide_link = get_link_to_media($input['album'], $asset['name'], 'low_slide') . "&origin=" . $appname;
        }
        $asset['links'] = array('high_cam' => $high_cam_link, 'low_cam' => $low_cam_link, 'high_slide' => $high_slide_link, 'low_slide' => $low_slide_link);
    }
    template_repository_path($template_folder . get_lang());
    require_once template_getpath('player_header.php');
    require_once template_getpath('player_content.php');
    require_once template_getpath('player_footer.php');
}
Exemplo n.º 2
0
/**
 * Returns the content to put in a share popup
 * @global type $input
 * @global type $repository_path
 * @global type $user_files_path
 */
function share_popup()
{
    global $input;
    global $repository_path;
    global $ezplayer_url;
    $album = $input['album'];
    $asset = $input['asset'];
    $current_time = $input['time'];
    $type = $input['type'];
    $display = $input['display'];
    ezmam_repository_path($repository_path);
    $asset_meta = ezmam_asset_metadata_get($album, $asset);
    switch ($display) {
        case 'share_time':
            $share_time = $ezplayer_url . '/index.php?action=view_asset_bookmark' . '&album=' . $album . '&asset=' . $asset . '&t=' . $current_time . '&type=' . $type;
            include_once template_getpath('popup_share_time.php');
            break;
        case 'share_link':
            if ($type == 'cam') {
                $asset_meta['high_src'] = get_link_to_media($album, $asset, 'high_cam') . '&origin=link';
                $asset_meta['low_src'] = get_link_to_media($album, $asset, 'low_cam') . '&origin=link';
            } else {
                $asset_meta['high_src'] = get_link_to_media($album, $asset, 'high_slide') . '&origin=link';
                $asset_meta['low_src'] = get_link_to_media($album, $asset, 'low_slide') . '&origin=link';
            }
            include_once template_getpath('popup_download.php');
            break;
    }
}
Exemplo n.º 3
0
/**
 * Displays the popup with a link to the media
 */
function popup_media_url()
{
    global $input;
    global $repository_path;
    global $ezmanager_url;
    ezmam_repository_path($repository_path);
    $media_url = get_link_to_media($input['album'], $input['asset'], $input['media']) . "&origin=link";
    $media_url_web = get_link_to_media($input['album'], $input['asset'], $input['media'], false) . "&origin=link";
    require_once template_getpath('popup_media_url.php');
    $url = $ezmanager_url;
    require_once template_getpath('popup_media_url.php');
}