コード例 #1
0
    if (AmpConfig::get('userflags')) {
        ?>
    <td class="cel_userflag" id="userflag_<?php 
        echo $libitem->id;
        ?>
_playlist"><?php 
        Userflag::show($libitem->id, 'playlist');
        ?>
</td>
    <?php 
    }
}
?>
<td class="cel_action">
<?php 
if (Access::check_function('batch_download') && check_can_zip('playlist')) {
    ?>
        <a rel="nohtml" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/batch.php?action=playlist&amp;id=<?php 
    echo $libitem->id;
    ?>
">
            <?php 
    echo UI::get_icon('batch_download', T_('Batch Download'));
    ?>
        </a>
<?php 
}
if (Access::check('interface', '25')) {
コード例 #2
0
        }
        ?>
            <?php 
        if (AmpConfig::get('share')) {
            ?>
                <?php 
            Share::display_ui('album', $c_album->id, false);
            ?>
            <?php 
        }
        ?>
        <?php 
    }
    ?>
        <?php 
    if (Access::check_function('batch_download') && check_can_zip('album')) {
        ?>
            <a rel="nohtml" href="<?php 
        echo $web_path;
        ?>
/batch.php?action=album&<?php 
        echo $c_album->get_http_album_query_ids('id');
        ?>
"><?php 
        echo UI::get_icon('batch_download', T_('Download'));
        ?>
</a>
        <?php 
    }
    ?>
        <?php 
コード例 #3
0
</td>
<td class="cel_random"><?php 
echo $libitem->random ? T_('Yes') : T_('No');
?>
</td>
<td class="cel_limit"><?php 
echo $libitem->limit > 0 ? $libitem->limit : T_('None');
?>
</td>
<td class="cel_owner"><?php 
echo scrub_out($libitem->f_user);
?>
</td>
<td class="cel_action">
        <?php 
if (Access::check_function('batch_download') && check_can_zip('search')) {
    ?>
                <a rel="nohtml" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/batch.php?action=search&amp;id=<?php 
    echo $libitem->id;
    ?>
">
                    <?php 
    echo UI::get_icon('batch_download', T_('Batch Download'));
    ?>
                </a>
        <?php 
}
if ($libitem->has_access()) {
コード例 #4
0
ファイル: share.class.php プロジェクト: cheese1/ampache
 public static function display_ui_links($object_type, $object_id)
 {
     echo "<ul>";
     echo "<li><a onclick=\"handleShareAction('" . AmpConfig::get('web_path') . "/share.php?action=show_create&type=" . $object_type . "&id=" . $object_id . "')\">" . UI::get_icon('share', T_('Advanced Share')) . " &nbsp;" . T_('Advanced Share') . "</a></li>";
     if (AmpConfig::get('download')) {
         $dllink = "";
         if ($object_type == "song" || $object_type == "video") {
             $dllink = AmpConfig::get('web_path') . "/play/index.php?action=download&type=" . $object_type . "&oid=" . $object_id . "&uid=-1";
         } else {
             if (Access::check_function('batch_download') && check_can_zip($object_type)) {
                 $dllink = AmpConfig::get('web_path') . "/batch.php?action=" . $object_type . "&id=" . $object_id;
             }
         }
         if (!empty($dllink)) {
             if (AmpConfig::get('require_session')) {
                 // Add session information to the link to avoid authentication
                 $dllink .= "&ssid=" . Stream::get_session();
             }
             echo "<li><a rel=\"nohtml\" href=\"" . $dllink . "\">" . UI::get_icon('download', T_('Temporary direct link')) . " &nbsp;" . T_('Temporary direct link') . "</a></li>";
         }
     }
     echo "<li style='padding-top: 8px; text-align: right;'>";
     $plugins = Plugin::get_plugins('external_share');
     foreach ($plugins as $plugin_name) {
         echo "<a onclick=\"handleShareAction('" . AmpConfig::get('web_path') . "/share.php?action=external_share&plugin=" . $plugin_name . "&type=" . $object_type . "&id=" . $object_id . "')\" target=\"_blank\">" . UI::get_icon('share_' . strtolower($plugin_name), $plugin_name) . "</a>&nbsp;";
     }
     echo "</li>";
     echo "</ul>";
 }
コード例 #5
0
ファイル: batch.php プロジェクト: cheese1/ampache
ob_end_clean();
//test that batch download is permitted
if (!defined('NO_SESSION') && !Access::check_function('batch_download')) {
    UI::access_denied();
    exit;
}
/* Drop the normal Time limit constraints, this can take a while */
set_time_limit(0);
$media_ids = array();
$default_name = "Unknown.zip";
$object_type = scrub_in($_REQUEST['action']);
$name = $default_name;
if ($object_type == 'browse') {
    $object_type = $_REQUEST['type'];
}
if (!check_can_zip($object_type)) {
    debug_event('batch', 'Object type `' . $object_type . '` is not allowed to be zipped.', 1);
    UI::access_denied();
    exit;
}
if (Core::is_playable_item($_REQUEST['action'])) {
    $id = $_REQUEST['id'];
    if (!is_array($id)) {
        $id = array($id);
    }
    $media_ids = array();
    foreach ($id as $i) {
        $libitem = new $object_type($i);
        if ($libitem->id) {
            $libitem->format();
            $name = $libitem->get_fullname();
コード例 #6
0
 *
 */
UI::show_box_top(T_('Options'), 'info-box');
?>
<div id="information_actions">
<ul>
<li>
    <?php 
echo Ajax::button('?action=basket&type=browse_set&browse_id=' . $browse->id, 'add', T_('Add Search Results'), 'add_search_results');
?>
    <?php 
echo T_('Add Search Results');
?>
</li>
    <?php 
if (Access::check_function('batch_download') && check_can_zip($_REQUEST['type'])) {
    ?>
<li>
    <a rel="nohtml" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/batch.php?action=browse&amp;type=<?php 
    echo scrub_out($_REQUEST['type']);
    ?>
&amp;browse_id=<?php 
    echo $browse->id;
    ?>
"><?php 
    echo UI::get_icon('batch_download', T_('Batch Download'));
    ?>
</a>