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


PHP Ajax::action方法代码示例

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


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

示例1: clearTimeout

                if ($("#webplayer").is(":visible")) {
                    clearTimeout(tSlideshow);
                    tSlideshow = null;

                    $("#aslideshow").height($(document).height())
                      .css({'display': 'inline'});

                    iSlideshow = true;
                    refresh_slideshow();
                }
            }
            function refresh_slideshow()
            {
                if (iSlideshow != null) {
                    <?php 
echo Ajax::action('?page=index&action=slideshow', '');
?>
;
                } else {
                    init_slideshow_check();
                }
            }
            function stop_slideshow()
            {
                if (iSlideshow != null) {
                    iSlideshow = null;
                    $("#aslideshow").css({'display': 'none'});
                }
            }
            function update_action()
            {
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:header.inc.php

示例2: T_

        </div>
<?php 
}
if (AmpConfig::get('show_similar')) {
    echo Ajax::observe('similar_artist_link', 'click', Ajax::action('?page=index&action=similar_artist&artist=' . $artist->id, 'similar_artist'));
    ?>
        <div id="similar_artist" class="tab_content">
        <?php 
    UI::show_box_top(T_('Similar Artists'), 'info-box');
    echo T_('Loading...');
    UI::show_box_bottom();
    ?>
        </div>
<?php 
}
if (AmpConfig::get('show_concerts')) {
    echo Ajax::observe('concerts_link', 'click', Ajax::action('?page=index&action=concerts&artist=' . $artist->id, 'concerts'));
    ?>
        <div id="concerts" class="tab_content">
        <?php 
    UI::show_box_top(T_('Events'), 'info-box');
    echo T_('Loading...');
    UI::show_box_bottom();
    ?>
        </div>
<?php 
}
?>
    </div>
</div>
开发者ID:axelsimon,项目名称:ampache,代码行数:30,代码来源:show_artist.inc.php

示例3: refresh

 * 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
?>

<script type="text/javascript" language="javascript">
// Set refresh interval (in seconds)
var refreshInterval=<?php 
echo $refresh_limit;
?>
;

function refresh()
{
    <?php 
echo Ajax::action($ajax_url, '');
?>
;
}
$(document).ready(function() {
window.setInterval(function(){refresh();}, refreshInterval * 1000);
});
</script>
开发者ID:nioc,项目名称:ampache,代码行数:30,代码来源:javascript_refresh.inc.php

示例4: T_

        <ul id="tabs">
            <li class="tab_active"><a href="#artists"><?php 
echo T_('Artists');
?>
</a></li>
            <li><a id="songs_link" href="#songs"><?php 
echo T_('Songs');
?>
</a></li>
        </ul>
    </div>
    <div id="tabs_content">
        <div id="artists" class="tab_content" style="display: block;">
<?php 
$browse->show_objects($object_ids, true);
$browse->store();
?>
        </div>
<?php 
echo Ajax::observe('songs_link', 'click', Ajax::action('?page=index&action=songs&label=' . $label->id, 'songs'));
?>
        <div id="songs" class="tab_content">
        <?php 
UI::show_box_top(T_('Songs'), 'info-box');
echo T_('Loading...');
UI::show_box_bottom();
?>
        </div>
    </div>
</div>
开发者ID:cheese1,项目名称:ampache,代码行数:30,代码来源:show_label.inc.php

示例5: T_

            echo $is_democratic;
        }
        ?>
><?php 
        echo T_('Democratic');
        ?>
</option>
            <?php 
    }
    ?>
            <option value="web_player" <?php 
    if (isset($is_web_player)) {
        echo $is_web_player;
    }
    ?>
><?php 
    echo T_('Web Player');
    ?>
</option>
        </select>
        <?php 
    echo Ajax::observe('play_type_select', 'change', Ajax::action('?page=stream&action=set_play_type', 'play_type_select', 'play_type_form'));
    ?>
    </form>
<?php 
} else {
    echo T_(ucwords(AmpConfig::get('play_type')));
}
?>
</div>
开发者ID:nioc,项目名称:ampache,代码行数:30,代码来源:show_playtype_switch.inc.php

示例6: T_

    }
    ?>

            </select>
        <?php 
    echo Ajax::observe('catalog_select', 'change', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id, 'catalog_select', 'catalog_choice'));
    ?>
        </form>
    <?php 
}
?>
    <?php 
if (in_array('show_art', $allowed_filters)) {
    ?>
        <?php 
    echo T_('Toggle Artwork');
    ?>
&nbsp;<input id="show_artCB" type="checkbox" <?php 
    echo Art::is_enabled() ? 'checked="checked"' : '';
    ?>
/>
        <?php 
    echo Ajax::observe('show_artCB', 'click', Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id, ''));
    ?>
    <?php 
}
// if show_art
?>
    </div>
</li>
开发者ID:cheese1,项目名称:ampache,代码行数:30,代码来源:browse_filters.inc.php

示例7: rawurlencode

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
$web_path = AmpConfig::get('web_path');
UI::show_box_top($wartist['name'], 'info-box');
if (AmpConfig::get('lastfm_api_key')) {
    echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&fullname=' . rawurlencode($wartist['name']), 'artist_info'));
    ?>
    <div id="artist_biography">
        <?php 
    echo T_('Loading...');
    ?>
    </div>
<?php 
}
UI::show_box_bottom();
?>

<?php 
if (AmpConfig::get('wanted')) {
    echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=wanted_missing_albums&artist_mbid=' . $wartist['mbid'], 'missing_albums'));
    ?>
    <div id="missing_albums"></div>
<?php 
}
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_missing_artist.inc.php

示例8: T_

        </td>
</tr>
</table>

<?php 
require AmpConfig::get('prefix') . '/templates/show_rules.inc.php';
?>

<div class="formValidation">
        <input type="submit" value="<?php 
echo T_('Enqueue');
?>
" />
</div>
</form>
<?php 
UI::show_box_bottom();
?>
<div id="browse">
<?php 
if (is_array($object_ids)) {
    $browse = new Browse();
    $browse->set_type('song');
    $browse->save_objects($object_ids);
    $browse->show_objects();
    $browse->store();
    echo Ajax::observe('window', 'load', Ajax::action('?action=refresh_rightbar', 'playlist_refresh_load'));
}
?>
</div>
开发者ID:nioc,项目名称:ampache,代码行数:30,代码来源:show_random.inc.php

示例9: show_objects


//.........这里部分代码省略.........
             $box_req = AmpConfig::get('prefix') . '/templates/show_users.inc.php';
             break;
         case 'artist':
             $box_title = T_('Artists') . $match;
             Artist::build_cache($object_ids, 'extra');
             $box_req = AmpConfig::get('prefix') . '/templates/show_artists.inc.php';
             break;
         case 'live_stream':
             require_once AmpConfig::get('prefix') . '/templates/show_live_stream.inc.php';
             $box_title = T_('Radio Stations') . $match;
             $box_req = AmpConfig::get('prefix') . '/templates/show_live_streams.inc.php';
             break;
         case 'playlist':
             Playlist::build_cache($object_ids);
             $box_title = T_('Playlists') . $match;
             $box_req = AmpConfig::get('prefix') . '/templates/show_playlists.inc.php';
             break;
         case 'playlist_song':
             $box_title = T_('Playlist Songs') . $match;
             $box_req = AmpConfig::get('prefix') . '/templates/show_playlist_songs.inc.php';
             break;
         case 'playlist_localplay':
             $box_title = T_('Current Playlist');
             $box_req = AmpConfig::get('prefix') . '/templates/show_localplay_playlist.inc.php';
             UI::show_box_bottom();
             break;
         case 'smartplaylist':
             $box_title = T_('Smart Playlists') . $match;
             $box_req = AmpConfig::get('prefix') . '/templates/show_smartplaylists.inc.php';
             break;
         case 'catalog':
             $box_title = T_('Catalogs');
             $box_req = AmpConfig::get('prefix') . '/templates/show_catalogs.inc.php';
             break;
         case 'shoutbox':
             $box_title = T_('Shoutbox Records');
             $box_req = AmpConfig::get('prefix') . '/templates/show_manage_shoutbox.inc.php';
             break;
         case 'tag':
             Tag::build_cache($object_ids);
             $box_title = T_('Tag Cloud');
             $box_req = AmpConfig::get('prefix') . '/templates/show_tagcloud.inc.php';
             break;
         case 'video':
             Video::build_cache($object_ids);
             $box_title = T_('Videos');
             $box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
             break;
         case 'democratic':
             $box_title = T_('Democratic Playlist');
             $box_req = AmpConfig::get('prefix') . '/templates/show_democratic_playlist.inc.php';
             break;
         case 'wanted':
             $box_title = T_('Wanted Albums');
             $box_req = AmpConfig::get('prefix') . '/templates/show_wanted_albums.inc.php';
             break;
         case 'share':
             $box_title = T_('Shared Objects');
             $box_req = AmpConfig::get('prefix') . '/templates/show_shared_objects.inc.php';
             break;
         case 'song_preview':
             $box_title = T_('Songs');
             $box_req = AmpConfig::get('prefix') . '/templates/show_song_previews.inc.php';
             break;
         case 'channel':
             $box_title = T_('Channels');
             $box_req = AmpConfig::get('prefix') . '/templates/show_channels.inc.php';
             break;
         case 'broadcast':
             $box_title = T_('Broadcasts');
             $box_req = AmpConfig::get('prefix') . '/templates/show_broadcasts.inc.php';
             break;
         default:
             // Rien a faire
             break;
     }
     // end switch on type
     Ajax::start_container('browse_content_' . $type, 'browse_content');
     if ($this->get_show_header()) {
         if (isset($box_req) && isset($box_title)) {
             UI::show_box_top($box_title, $class);
         }
     }
     if (isset($box_req)) {
         require $box_req;
     }
     if ($this->get_show_header()) {
         if (isset($box_req)) {
             UI::show_box_bottom();
         }
         echo '<script type="text/javascript">';
         echo Ajax::action('?page=browse&action=get_filters&browse_id=' . $this->id, '');
         echo ';</script>';
     } else {
         if (!$this->get_use_pages()) {
             $this->show_next_link();
         }
     }
     Ajax::end_container();
 }
开发者ID:axelsimon,项目名称:ampache,代码行数:101,代码来源:browse.class.php

示例10: intval

    <?php 
    }
    ?>
    </div>
<?php 
}
?>

<br /><br /><br />
<?php 
if (isset($_GET['show_tag'])) {
    $show_tag = intval($_GET['show_tag']);
    ?>
<script>
$(document).ready(function () {
    <?php 
    echo Ajax::action('?page=tag&action=add_filter&browse_id=' . $browse2->id . '&tag_id=' . $show_tag, '');
    ?>
});
</script>
<?php 
}
if (!count($object_ids)) {
    ?>
<span class="fatalerror"><?php 
    echo T_('Not Enough Data');
    ?>
</span>
<?php 
}
Ajax::end_container();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_tagcloud.inc.php

示例11:

?>
</span>
            <?php 
if (!$browse->is_static_content()) {
    ?>
            <span><input type="checkbox" id="browse_<?php 
    echo $browse->id;
    ?>
_use_alpha_<?php 
    echo $is_header;
    ?>
" value="true" <?php 
    echo $browse->get_use_alpha() ? 'checked' : '';
    ?>
 onClick="javascript:<?php 
    echo Ajax::action("?page=browse&action=options&browse_id=" . $browse->id . "&option=use_alpha&value=' + \$('#browse_" . $browse->id . "_use_alpha_" . $is_header . "').is(':checked') + '" . $argument_param, "browse_" . $browse->id . "_use_alpha_" . $is_header);
    ?>
"><?php 
    echo T_('Alphabet');
    ?>
</span>
            <?php 
}
?>
        <?php 
if ($browse->get_use_pages()) {
    ?>
            <span>|</span>
            <span>
                <form id="browse_<?php 
    echo $browse->id;
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:list_header.inc.php

示例12: Date

echo AmpConfig::get('iframes') ? "onLoad='forceIframe();'" : "";
?>
>
        <?php 
if (AmpConfig::get('sociable') && AmpConfig::get('notify')) {
    ?>
        <script type="text/javascript" language="javascript">
            var lastrefresh = new Date().getTime();
            var refresh_sociable_interval=<?php 
    echo AmpConfig::get('refresh_limit');
    ?>
;
            function refresh_sociable()
            {
                <?php 
    echo Ajax::action('?page=index&action=shoutbox&since=\' + lastrefresh + \'', '');
    ?>
;
                lastrefresh = new Date().getTime();
            }
            $(document).ready(function() {
                window.setInterval(function(){refresh_sociable();}, refresh_sociable_interval * 1000);
            });
        </script>
        <div id="live_shoutbox"></div>
        <?php 
}
?>
        <div id="aslideshow">
            <div id="aslideshow_container">
                <div id="fslider"></div>
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:header.inc.php

示例13: T_

        <div class="np_cell cel_similar">
            <label><?php 
    echo T_('Similar Songs');
    ?>
</label>
            <p><?php 
    echo T_('Loading...');
    ?>
</p>
        </div>
    </div>
</div>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
    <?php 
    echo Ajax::action('?page=index&action=similar_now_playing&media_id=' . $media->id . '&media_artist=' . $media->artist, 'similar_now_playing');
    ?>
});
</script>
<?php 
}
?>

<div class="np_group" id="np_group_4">
<?php 
if (AmpConfig::get('ratings')) {
    ?>
    <div class="np_cell cel_rating">
        <label><?php 
    echo T_('Rating');
    ?>
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_now_playing_row.inc.php

示例14: show_now_playing

 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
?>
<div id="now_playing">
    <?php 
show_now_playing();
?>
</div> <!-- Close Now Playing Div -->
<!-- Randomly selected albums of the moment -->
<?php 
if (Art::is_enabled()) {
    echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=random_albums', 'random_albums'));
    ?>
<div id="random_selection">
    <?php 
    UI::show_box_top(T_('Albums of the Moment'));
    echo T_('Loading...');
    UI::show_box_bottom();
    ?>
</div>
<?php 
}
?>
<!-- Recently Played -->
<div id="recently_played">
    <?php 
$data = Song::get_recently_played();
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_index.inc.php

示例15: show_objects


//.........这里部分代码省略.........
             $box_req = AmpConfig::get('prefix') . '/templates/show_tagcloud.inc.php';
             break;
         case 'video':
             Video::build_cache($object_ids);
             $video_type = 'video';
             $box_title = T_('Videos');
             $box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
             break;
         case 'democratic':
             $box_title = T_('Democratic Playlist');
             $box_req = AmpConfig::get('prefix') . '/templates/show_democratic_playlist.inc.php';
             break;
         case 'wanted':
             $box_title = T_('Wanted Albums');
             $box_req = AmpConfig::get('prefix') . '/templates/show_wanted_albums.inc.php';
             break;
         case 'share':
             $box_title = T_('Shared Objects');
             $box_req = AmpConfig::get('prefix') . '/templates/show_shared_objects.inc.php';
             break;
         case 'song_preview':
             $box_title = T_('Songs');
             $box_req = AmpConfig::get('prefix') . '/templates/show_song_previews.inc.php';
             break;
         case 'channel':
             $box_title = T_('Channels');
             $box_req = AmpConfig::get('prefix') . '/templates/show_channels.inc.php';
             break;
         case 'broadcast':
             $box_title = T_('Broadcasts');
             $box_req = AmpConfig::get('prefix') . '/templates/show_broadcasts.inc.php';
             break;
         case 'license':
             $box_title = T_('Media Licenses');
             $box_req = AmpConfig::get('prefix') . '/templates/show_manage_license.inc.php';
             break;
         case 'tvshow':
             $box_title = T_('TV Shows');
             $box_req = AmpConfig::get('prefix') . '/templates/show_tvshows.inc.php';
             break;
         case 'tvshow_season':
             $box_title = T_('Seasons');
             $box_req = AmpConfig::get('prefix') . '/templates/show_tvshow_seasons.inc.php';
             break;
         case 'tvshow_episode':
             $box_title = T_('Episodes');
             $video_type = $type;
             $box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
             break;
         case 'movie':
             $box_title = T_('Movies');
             $video_type = $type;
             $box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
             break;
         case 'clip':
             $box_title = T_('Clips');
             $video_type = $type;
             $box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
             break;
         case 'personal_video':
             $box_title = T_('Personal Videos');
             $video_type = $type;
             $box_req = AmpConfig::get('prefix') . '/templates/show_videos.inc.php';
             break;
         case 'label':
             $box_title = T_('Labels');
             $box_req = AmpConfig::get('prefix') . '/templates/show_labels.inc.php';
             break;
         case 'pvmsg':
             $box_title = T_('Private Messages');
             $box_req = AmpConfig::get('prefix') . '/templates/show_pvmsgs.inc.php';
             break;
         default:
             // Rien a faire
             break;
     }
     // end switch on type
     Ajax::start_container($this->get_content_div(), 'browse_content');
     if ($this->get_show_header()) {
         if (isset($box_req) && isset($box_title)) {
             UI::show_box_top($box_title, $class);
         }
     }
     if (isset($box_req)) {
         require $box_req;
     }
     if ($this->get_show_header()) {
         if (isset($box_req)) {
             UI::show_box_bottom();
         }
         echo '<script type="text/javascript">';
         echo Ajax::action('?page=browse&action=get_filters&browse_id=' . $this->id . $argument_param, '');
         echo ';</script>';
     } else {
         if (!$this->get_use_pages()) {
             $this->show_next_link($argument);
         }
     }
     Ajax::end_container();
 }
开发者ID:nioc,项目名称:ampache,代码行数:101,代码来源:browse.class.php


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