* This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
?>

<div class="error_message">
    ®Non-existant_asset®

    <?php 
if (acl_has_album_permissions($album) && user_prefs_asset_bookmarks_list_get($_SESSION['user_login'], $album, $error_asset)) {
    ?>
        <div style="margin-top: 18px;">
            ®Error_asset_not_found®
            <form action="index.php?action=export_asset_bookmarks" method="post" name="export_asset_bookmarks_form" onsubmit="return false">
                <input type="hidden" name="album" value="<?php 
    echo $album;
    ?>
"/>
                <input type="hidden" name="asset" value="<?php 
    echo $asset;
    ?>
"/>
            </form>
            <br/><br/>
            <a class="button" style="width:300px;" href="javascript: remove_bookmarks('<?php 
Example #2
0
/**
 * Returns a bookmarks list to display in a popup (export_bookmarks / delete_bookmarks)
 * @global type $input
 * @global type $repository_path
 * @global type $user_files_path
 */
function bookmarks_popup()
{
    global $input;
    global $repository_path;
    global $user_files_path;
    $album = $input['album'];
    $asset = $input['asset'];
    $tab = $input['tab'];
    $source = $input['source'];
    ezmam_repository_path($repository_path);
    user_prefs_repository_path($user_files_path);
    if (isset($asset) && $asset != '') {
        $asset_meta = ezmam_asset_metadata_get($album, $asset);
        if ($tab == 'custom') {
            $bookmarks = user_prefs_asset_bookmarks_list_get($_SESSION['user_login'], $album, $asset);
        } else {
            $bookmarks = toc_asset_bookmark_list_get($album, $asset);
        }
    } else {
        if ($tab == 'custom') {
            $bookmarks = user_prefs_album_bookmarks_list_get($_SESSION['user_login'], $album);
        } else {
            $bookmarks = toc_album_bookmarks_list_get($album);
        }
    }
    switch ($input['display']) {
        case 'delete':
            include_once template_getpath('popup_delete_bookmarks.php');
            break;
        case 'export':
            include_once template_getpath('popup_export_bookmarks.php');
            break;
    }
}
Example #3
0
/**
 * Gets a specific bookmark from the list
 * @param type $user the user
 * @param type $album the album 
 * @param type $asset the asset
 * @param type $timecode the timecode of the bookmark
 * @return the bookmark if it exists; false otherwise
 */
function user_prefs_asset_bookmark_get($user, $album, $asset, $timecode)
{
    $assoc_asset_bookmarks = user_prefs_asset_bookmarks_list_get($user, $album, $asset);
    foreach ($assoc_asset_bookmarks as $bookmark) {
        if ($bookmark['timecode'] == $timecode) {
            return $bookmark;
        }
    }
    return false;
}