当前位置: 首页>>代码示例>>PHP>>正文


PHP Ajax::button方法代码示例

本文整理汇总了PHP中Ajax::button方法的典型用法代码示例。如果您正苦于以下问题:PHP Ajax::button方法的具体用法?PHP Ajax::button怎么用?PHP Ajax::button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ajax的用法示例。


在下文中一共展示了Ajax::button方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

    foreach ($fields as $key => $field) {
        ?>
    <td><?php 
        echo $instance[$key];
        ?>
</td>
    <?php 
    }
    ?>
    <td>
        <a href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/localplay.php?action=edit_instance&instance=<?php 
    echo $uid;
    ?>
"><?php 
    echo UI::get_icon('edit', T_('Edit Instance'));
    ?>
</a>
        <?php 
    echo Ajax::button('?page=localplay&action=delete_instance&instance=' . $uid, 'delete', T_('Delete'), 'delete_instance_' . $uid);
    ?>
    </td>
</tr>
<?php 
}
?>
</table>
<?php 
UI::show_box_bottom();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_localplay_instances.inc.php

示例2: T_

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>
<td class="cel_play">
    <span class="cel_play_content">&nbsp;</span>
    <div class="cel_play_hover">
    <?php 
if (AmpConfig::get('directplay')) {
    echo Ajax::button('?page=stream&action=directplay&object_type=tvshow_season&object_id=' . $libitem->id, 'play', T_('Play'), 'play_season_' . $libitem->id);
    if (Stream_Playlist::check_autoplay_append()) {
        echo Ajax::button('?page=stream&action=directplay&object_type=tvshow_season&object_id=' . $libitem->id . '&append=true', 'play_add', T_('Play last'), 'addplay_season_' . $libitem->id);
    }
}
?>
    </div>
</td>
<?php 
if (Art::is_enabled()) {
    ?>
<td class="cel_cover">
    <?php 
    Art::display('tvshow_season', $libitem->id, $libitem->f_name, 6, $libitem->link);
    ?>
</td>
<?php 
}
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_tvshow_season_row.inc.php

示例3: T_

            </select>
        </td>
    </tr>
    <tr>
        <td>
            <?php 
echo Ajax::button('?page=random&action=add_rule', 'add', T_('Add Rule'), 'add_random_rule');
echo T_('Add Rule');
?>
        </td>
        <td>
            <?php 
echo Ajax::button('?page=random&action=save_rules', 'download', T_('Save Rules As'), 'save_random_rules');
echo T_('Save Rules As');
?>
        </td>
        <td colspan="2">
            <?php 
echo Ajax::button('?page=random&action=load_rules', 'cog', T_('Load Saved Rules'), 'load_random_rules');
echo T_('Load Saved Rules');
?>
        </td>
    </tr>
    <tr>
        <td colspan="4">
            <div id="rule_status"></div>
        </td>
    </tr>
</table>
<?php 
UI::show_box_bottom();
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_dynamic.inc.php

示例4: T_

    ?>
    <div class="album_group_disks_title"><span> <?php 
    echo $c_title;
    ?>
</span></div>
    <div class="album_group_disks_actions">
        <?php 
    if ($show_direct_play) {
        echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $c_album->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'directplay_full_' . $c_album->id);
        if (Stream_Playlist::check_autoplay_append()) {
            echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $c_album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $c_album->id);
        }
    }
    if ($show_playlist_add) {
        echo Ajax::button('?action=basket&type=album&' . $c_album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $c_album->id);
        echo Ajax::button('?action=basket&type=album_random&' . $c_album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $c_album->id);
    }
    ?>
        <?php 
    if (Access::check('interface', '25')) {
        ?>
            <?php 
        if (AmpConfig::get('sociable')) {
            ?>
                <a href="<?php 
            echo AmpConfig::get('web_path');
            ?>
/shout.php?action=show_add_shout&type=album&id=<?php 
            echo $c_album->id;
            ?>
"><?php 
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_album_group_disks.inc.php

示例5: T_

                <?php 
        }
        ?>
        <?php 
    }
    ?>
            </div>
        </td>
        <td class="cel_song"><?php 
    echo $song->f_link;
    ?>
</td>
        <td class="cel_add">
            <span class="cel_item_add">
                <?php 
    echo Ajax::button('?action=basket&type=song&id=' . $song->id, 'add', T_('Add to temporary playlist'), 'add_' . $nb . '_' . $song->id);
    ?>
                <a id="<?php 
    echo 'add_playlist_' . $nb . '_' . $song->id;
    ?>
" onclick="showPlaylistDialog(event, 'song', '<?php 
    echo $song->id;
    ?>
')">
                    <?php 
    echo UI::get_icon('playlist_add', T_('Add to existing playlist'));
    ?>
                </a>
            </span>
        </td>
        <td class="cel_album"><?php 
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_recently_played.inc.php

示例6: T_

                    <?php 
    echo UI::get_icon('batch_download', T_('Batch Download'));
    ?>
                </a>
        <?php 
}
if ($libitem->has_access()) {
    ?>
                <a id="<?php 
    echo 'edit_playlist_' . $libitem->id;
    ?>
" onclick="showEditDialog('search_row', '<?php 
    echo $libitem->id;
    ?>
', '<?php 
    echo 'edit_playlist_' . $libitem->id;
    ?>
', '<?php 
    echo T_('Smart Playlist edit');
    ?>
', 'smartplaylist_row_')">
                    <?php 
    echo UI::get_icon('edit', T_('Edit'));
    ?>
                </a>
                <?php 
    echo Ajax::button('?page=browse&action=delete_object&type=smartplaylist&id=' . $libitem->id, 'delete', T_('Delete'), 'delete_playlist_' . $libitem->id);
}
?>
</td>
开发者ID:cheese1,项目名称:ampache,代码行数:30,代码来源:show_search_row.inc.php

示例7: switch

}
switch ($_REQUEST['action']) {
    case 'flip_state':
        if (!Access::check('interface', '75')) {
            debug_event('DENIED', $GLOBALS['user']->username . ' attempted to change the state of a song', '1');
            exit;
        }
        $song = new Song($_REQUEST['song_id']);
        $new_enabled = $song->enabled ? false : true;
        $song->update_enabled($new_enabled, $song->id);
        $song->enabled = $new_enabled;
        $song->format();
        //Return the new Ajax::button
        $id = 'button_flip_state_' . $song->id;
        $button = $song->enabled ? 'disable' : 'enable';
        $results[$id] = Ajax::button('?page=song&action=flip_state&song_id=' . $song->id, $button, T_(ucfirst($button)), 'flip_state_' . $song->id);
        break;
    case 'shouts':
        ob_start();
        $type = $_REQUEST['object_type'];
        $id = $_REQUEST['object_id'];
        if ($type == "song") {
            $media = new Song($id);
            $shouts = Shoutbox::get_shouts($type, $id);
            echo "<script type='text/javascript'>\r\n";
            echo "shouts = {};\r\n";
            foreach ($shouts as $id) {
                $shout = new Shoutbox($id);
                $shout->format();
                $key = intval($shout->data);
                echo "if (shouts['" . $key . "'] == undefined) { shouts['" . $key . "'] = new Array(); }\r\n";
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:song.ajax.php

示例8: T_

/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
/**
 *
 * LICENSE: GNU Affero General Public License, version 3 (AGPLv3)
 * Copyright 2001 - 2015 Ampache.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>
<div id="localplay-control">
<?php 
echo Ajax::button('?page=localplay&action=command&command=prev', 'prev', T_('Previous'), 'localplay_control_previous');
echo Ajax::button('?page=localplay&action=command&command=stop', 'stop', T_('Stop'), 'localplay_control_stop');
echo Ajax::button('?page=localplay&action=command&command=pause', 'pause', T_('Pause'), 'localplay_control_pause');
echo Ajax::button('?page=localplay&action=command&command=play', 'play', T_('Play'), 'localplay_control_play');
echo Ajax::button('?page=localplay&action=command&command=next', 'next', T_('Next'), 'localplay_control_next');
?>
</div>
开发者ID:cheese1,项目名称:ampache,代码行数:30,代码来源:show_localplay_control.inc.php

示例9: T_

    echo 'edit_podcast_' . $libitem->id;
    ?>
', '<?php 
    echo T_('Podcast edit');
    ?>
', 'podcast_')">
        <?php 
    echo UI::get_icon('edit', T_('Edit'));
    ?>
    </a>
    <span id="button_sync_<?php 
    echo $libitem->id;
    ?>
">
        <?php 
    echo Ajax::button('?page=podcast&action=sync&podcast_id=' . $libitem->id, 'file_refresh', T_('Sync'), 'sync_podcast_' . $libitem->id);
    ?>
    </span>
    <?php 
}
if (Access::check('interface', '75')) {
    ?>
    <a id="<?php 
    echo 'delete_podcast_' . $libitem->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/podcast.php?action=delete&podcast_id=<?php 
    echo $libitem->id;
    ?>
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_podcast_row.inc.php

示例10: T_

        $current_class = $key == '0' ? 'row-highlight' : UI::flip_class();
        $button = $song->enabled ? 'disable' : 'enable';
        ?>
        <tr id="<?php 
        echo $row_key;
        ?>
" class="<?php 
        echo $current_class;
        ?>
">
            <td class="cel_disable" id="<?php 
        echo $button_flip_state_id;
        ?>
">
                <?php 
        echo Ajax::button('?page=song&action=flip_state&song_id=' . $song_id, $button, T_(ucfirst($button)), 'flip_state_' . $song_id);
        ?>
            </td>
            <td class="cel_song"><?php 
        echo $song->f_link;
        ?>
</td>
            <td class="cel_artist"><?php 
        echo $song->f_artist_link;
        ?>
</td>
            <td class="cel_album"><?php 
        echo $song->f_album_link;
        ?>
</td>
            <td class="cel_length"><?php 
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_duplicates.inc.php

示例11: T_

</td>
        <td><?php 
    echo $democratic->f_level;
    ?>
</td>
        <td><?php 
    echo $democratic->f_primary;
    ?>
</td>
        <td><?php 
    echo $democratic->count_items();
    ?>
</td>
        <td>
        <?php 
    echo Ajax::button('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, 'all', T_('Play'), 'play_democratic');
    ?>
        <a href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/democratic.php?action=delete&amp;democratic_id=<?php 
    echo scrub_out($democratic->id);
    ?>
"><?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
</a>
        </td>
    </tr>
    <?php 
}
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_manage_democratic.inc.php

示例12: T_

            <?php 
        echo UI::get_icon('edit', T_('Edit'));
        ?>
        </a>
<?php 
    }
    if (Access::check('interface', '75') || $libitem->user_upload == $GLOBALS['user']->id && AmpConfig::get('upload_allow_edit')) {
        $icon = $libitem->enabled ? 'disable' : 'enable';
        $button_flip_state_id = 'button_flip_state_' . $libitem->id;
        ?>
        <span id="<?php 
        echo $button_flip_state_id;
        ?>
">
            <?php 
        echo Ajax::button('?page=song&action=flip_state&song_id=' . $libitem->id, $icon, T_(ucfirst($icon)), 'flip_song_' . $libitem->id);
        ?>
        </span>
<?php 
    }
    if (Catalog::can_remove($libitem)) {
        ?>
        <a id="<?php 
        echo 'delete_song_' . $libitem->id;
        ?>
" href="<?php 
        echo AmpConfig::get('web_path');
        ?>
/song.php?action=delete&song_id=<?php 
        echo $libitem->id;
        ?>
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_song_row.inc.php

示例13: T_

        ?>
</td>
    <td class="cel_artist"><?php 
        echo $media->f_artist_link;
        ?>
</td>
    <td class="cel_time"><?php 
        echo $media->f_time;
        ?>
</td>
    <?php 
        if (Access::check('interface', '100')) {
            ?>
    <td class="cel_admin">
    <?php 
            echo Ajax::button('?page=democratic&action=delete&row_id=' . $item['id'], 'disable', T_('Delete'), 'delete_row_' . $item['id']);
            ?>
    </td>
    <?php 
        }
        ?>
</tr>
<?php 
    }
    // end foreach
    ?>
</tbody>
<tfoot>
    <tr class="th-bottom">
        <th class="cel_action"><?php 
    echo T_('Action');
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_democratic_playlist.inc.php

示例14: T_

 * This program 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>
<td class="cel_play">
    <span class="cel_play_content">&nbsp;</span>
    <div class="cel_play_hover">
    <?php 
if (AmpConfig::get('directplay')) {
    echo Ajax::button('?page=stream&action=directplay&object_type=broadcast&object_id=' . $libitem->id, 'play', T_('Play'), 'play_broadcast_' . $libitem->id);
}
?>
    </div>
</td>
<td class="cel_name"><?php 
echo $libitem->name;
?>
</td>
<td class="cel_genre"><?php 
echo $libitem->f_tags;
?>
</td>
<td class="cel_started"><?php 
echo $libitem->started ? T_('Yes') : T_('No');
?>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_broadcast_row.inc.php

示例15: T_

            <?php 
    echo Ajax::button('?page=stream&action=directplay&object_type=tvshow&object_id=' . $tvshow->id, 'play', T_('Play all'), 'directplay_full_' . $tvshow->id);
    ?>
            <?php 
    echo Ajax::text('?page=stream&action=directplay&object_type=tvshow&object_id=' . $tvshow->id, T_('Play all'), 'directplay_full_text_' . $tvshow->id);
    ?>
        </li>
        <?php 
}
?>
        <?php 
if (Stream_Playlist::check_autoplay_append()) {
    ?>
        <li>
            <?php 
    echo Ajax::button('?page=stream&action=directplay&object_type=tvshow&object_id=' . $tvshow->id . '&append=true', 'play_add', T_('Play all last'), 'addplay_tvshow_' . $tvshow->id);
    ?>
            <?php 
    echo Ajax::text('?page=stream&action=directplay&object_type=tvshow&object_id=' . $tvshow->id . '&append=true', T_('Play all last'), 'addplay_tvshow_text_' . $tvshow->id);
    ?>
        </li>
        <?php 
}
?>
        <?php 
if (Access::check('interface', '50')) {
    ?>
        <li>
            <a id="<?php 
    echo 'edit_tvshow_' . $tvshow->id;
    ?>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_tvshow.inc.php


注:本文中的Ajax::button方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。