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


PHP Ajax::text方法代码示例

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


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

示例1: T_

    <?php 
// decide width of rating (5 stars -> 20% per star)
$width = $rate * 20;
if ($width < 0) {
    $width = 0;
}
//set the current rating background
echo '<li class="current-rating" style="width:' . $width . '%" >';
echo T_('Current rating: ');
if ($rate <= 0) {
    echo T_('not rated yet') . "</li>\n";
} else {
    printf(T_('%s of 5'), $rate);
}
echo "</li>\n";
for ($i = 1; $i < 6; $i++) {
    ?>
      <li>
          <?php 
    echo Ajax::text($base_url . '&rating=' . $i, '', 'rating' . $i . '_' . $rating->id . '_' . $rating->type, '', 'star' . $i);
    ?>
      </li>
    <?php 
}
?>
  </ul>
       <?php 
echo Ajax::text($base_url . '&rating=-1', '', 'rating0_' . $rating->id . '_' . $rating->type, '', 'star0');
?>
</div>
开发者ID:nioc,项目名称:ampache,代码行数:30,代码来源:show_object_rating.inc.php

示例2: display

 /**
  * Display an item art.
  * @param string $object_type
  * @param int $object_id
  * @param string $name
  * @param int $thumb
  * @param string $link
  * @param boolean $show_default
  * @param string $kind
  * @return boolean
  */
 public static function display($object_type, $object_id, $name, $thumb, $link = null, $show_default = true, $kind = 'default')
 {
     if (!Core::is_library_item($object_type)) {
         return false;
     }
     if (!$show_default) {
         // Don't show any image if not available
         if (!self::has_db($object_id, $object_type, $kind)) {
             return false;
         }
     }
     $size = self::get_thumb_size($thumb);
     $prettyPhoto = $link == null;
     if ($link == null) {
         $link = AmpConfig::get('web_path') . "/image.php?object_id=" . $object_id . "&object_type=" . $object_type;
         if (AmpConfig::get('use_auth') && AmpConfig::get('require_session')) {
             $link .= "&auth=" . session_id();
         }
         if ($kind != 'default') {
             $link .= '&kind=' . $kind;
         }
     }
     echo "<div class=\"item_art\">";
     echo "<a href=\"" . $link . "\" title=\"" . $name . "\"";
     if ($prettyPhoto) {
         echo " rel=\"prettyPhoto\"";
     }
     echo ">";
     $imgurl = AmpConfig::get('web_path') . "/image.php?object_id=" . $object_id . "&object_type=" . $object_type . "&thumb=" . $thumb;
     if ($kind != 'default') {
         $imgurl .= '&kind=' . $kind;
     }
     echo "<img src=\"" . $imgurl . "\" alt=\"" . $name . "\" height=\"" . $size['height'] . "\" width=\"" . $size['width'] . "\" />";
     if ($prettyPhoto) {
         if ($size['width'] >= 150) {
             echo "<div class=\"item_art_play\">";
             echo Ajax::text('?page=stream&action=directplay&object_type=' . $object_type . '&object_id=' . $object_id . '\' + getPagePlaySettings() + \'', '<span class="item_art_play_icon" title="' . T_('Play') . '" />', 'directplay_art_' . $object_type . '_' . $object_id);
             echo "</div>";
         }
         $libitem = new $object_type($object_id);
         echo "<div class=\"item_art_actions\">";
         if ($GLOBALS['user']->has_access(50) || $GLOBALS['user']->has_access(25) && $GLOBALS['user']->id == $libitem->get_user_owner()) {
             echo "<a href=\"javascript:NavigateTo('" . AmpConfig::get('web_path') . "/arts.php?action=find_art&object_type=" . $object_type . "&object_id=" . $object_id . "&burl=' + getCurrentPage());\">";
             echo UI::get_icon('edit', T_('Edit/Find Art'));
             echo "</a>";
             echo "<a href=\"javascript:NavigateTo('" . AmpConfig::get('web_path') . "/arts.php?action=clear_art&object_type=" . $object_type . "&object_id=" . $object_id . "&burl=' + getCurrentPage());\" onclick=\"return confirm('" . T_('Do you really want to reset art?') . "');\">";
             echo UI::get_icon('delete', T_('Reset Art'));
             echo "</a>";
         }
         echo "</div>";
     }
     echo "</a>\n";
     echo "</div>";
     return true;
 }
开发者ID:cheese1,项目名称:ampache,代码行数:66,代码来源:art.class.php

示例3: T_

</th>
            <th class="cel_add"></th>
            <th class="cel_artist"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=artist', T_('Artist'), 'sort_song_artist' . $browse->id);
?>
</th>
            <th class="cel_album"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=album', T_('Album'), 'sort_song_album' . $browse->id);
?>
</th>
            <th class="cel_tags"><?php 
echo T_('Tags');
?>
</th>
            <th class="cel_time"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=time', T_('Time'), 'sort_song_time' . $browse->id);
?>
</th>
        <?php 
if (AmpConfig::get('ratings')) {
    ?>
            <th class="cel_rating"><?php 
    echo T_('Rating');
    ?>
</th>
        <?php 
}
?>
        <?php 
if (AmpConfig::get('userflags')) {
    ?>
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_songs.inc.php

示例4: T_

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

示例5: T_

            <?php 
echo Ajax::button('?action=basket&type=artist&id=' . $artist->id, 'add', T_('Add all to temporary playlist'), 'add_' . $artist->id);
?>
            <?php 
echo Ajax::text('?action=basket&type=artist&id=' . $artist->id, T_('Add all to temporary playlist'), 'add_text_' . $artist->id);
?>
        </li>
        <li>
            <?php 
/* HINT: Artist Fullname */
?>
            <?php 
echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id, 'random', T_('Random all to temporary playlist'), 'random_' . $artist->id);
?>
            <?php 
echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id, T_('Random all to temporary playlist'), 'random_text_' . $artist->id);
?>
        </li>
        <!--<?php 
if (Access::check('interface', '50')) {
    ?>
        <li>
            <a href="<?php 
    echo $web_path;
    ?>
/artists.php?action=update_from_tags&amp;artist=<?php 
    echo $artist->id;
    ?>
" onclick="return confirm('<?php 
    echo T_('Do you really want to update from tags?');
    ?>
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_artist.inc.php

示例6: get_display_follow

 /**
  * get_display_follow
  * Get html code to display the follow/unfollow link
  * @param int|null $display_user_id
  * @return string
  */
 public function get_display_follow($user_id = null)
 {
     if (!$user_id) {
         $user_id = $GLOBALS['user']->id;
     }
     if ($user_id === $this->id) {
         return "";
     }
     $followed = $this->is_followed_by($user_id);
     $html = "<span id='button_follow_" . $this->id . "' class='followbtn'>";
     $html .= Ajax::text('?page=user&action=flip_follow&user_id=' . $this->id, ($followed ? T_('Unfollow') : T_('Follow')) . ' (' . count($this->get_followers()) . ')', 'flip_follow_' . $this->id);
     $html .= "</span>";
     return $html;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:20,代码来源:user.class.php

示例7: T_

    </tbody>
    <tfoot>
        <tr class="th-bottom">
            <th class="cel_play essential"></th>
        <?php 
if (Art::is_enabled()) {
    ?>
            <th class="cel_cover"><?php 
    echo T_('Art');
    ?>
</th>
        <?php 
}
?>
            <th class="cel_tvshow essential persist"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=tvshow&sort=name', T_('TV Show'), 'tvshow_sort_name');
?>
</th>
            <th class="cel_episodes optional"><?php 
echo T_('Episodes');
?>
</th>
            <th class="cel_seasons optional"><?php 
echo T_('Seasons');
?>
</th>
            <th class="cel_tags optional"><?php 
echo T_('Tags');
?>
</th>
            <?php 
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_tvshows.inc.php

示例8: T_

?>
            <th class="cel_album"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'), 'album_sort_name_bottom');
?>
</th>
            <th class="cel_add"></th>
            <th class="cel_artist"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=artist', T_('Artist'), 'album_sort_artist');
?>
</th>
            <th class="cel_songs"><?php 
echo T_('Songs');
?>
</th>
            <th class="cel_year"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'), 'album_sort_year_bottom');
?>
</th>
            <th class="cel_tags"><?php 
echo T_('Tags');
?>
</th>
        <?php 
if (AmpConfig::get('ratings')) {
    ?>
            <th class="cel_rating"><?php 
    echo T_('Rating');
    ?>
</th>
        <?php 
}
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_albums.inc.php

示例9: T_

    ?>
</a>
</li>
<?php 
    if ($democratic->is_enabled()) {
        ?>
<li>
    <?php 
        echo Ajax::button('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, 'all', T_('Play'), 'play_democratic');
        ?>
    <?php 
        echo Ajax::text('?page=democratic&action=send_playlist&democratic_id=' . $democratic->id, T_('Play Democratic Playlist'), 'play_democratic_full_text');
        ?>
</li>
<li>
    <?php 
        echo Ajax::button('?page=democratic&action=clear_playlist&democratic_id=' . $democratic->id, 'delete', T_('Clear Playlist'), 'clear_democratic');
        ?>
    <?php 
        echo Ajax::text('?page=democratic&action=clear_playlist&democratic_id=' . $democratic->id, T_('Clear Playlist'), 'clear_democratic_full_text');
        ?>
</li>
<?php 
    }
}
?>
</ul>

</div>
<?php 
UI::show_box_bottom();
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_democratic.inc.php

示例10: T_

}
?>
            <th class="cel_release_date"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=release_date', T_('Release Date'), 'sort_video_release_date');
?>
</th>
            <th class="cel_codec"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=codec', T_('Codec'), 'sort_video_codec');
?>
</th>
            <th class="cel_resolution"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=resolution', T_('Resolution'), 'sort_video_rez');
?>
</th>
            <th class="cel_length"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=length', T_('Time'), 'sort_video_length');
?>
</th>
            <?php 
if (AmpConfig::get('show_played_times')) {
    ?>
            <th class="cel_counter optional"><?php 
    echo T_('# Played');
    ?>
</th>
            <?php 
}
?>
            <th class="cel_tags"><?php 
echo T_('Tags');
?>
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_videos.inc.php

示例11: T_

 * 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/>.
 *
 */
?>
<th class="cel_episode optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=tvshow_episode&sort=episode', T_('Episode'), 'sort_video_episode');
?>
</th>
<th class="cel_season optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=tvshow_episode&sort=season', T_('Season'), 'sort_video_season');
?>
</th>
<th class="cel_tvshow optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=tvshow_episode&sort=tvshow', T_('TV Show'), 'sort_video_tvshow');
?>
</th>
开发者ID:cheese1,项目名称:ampache,代码行数:30,代码来源:show_partial_tvshow_episodes.inc.php

示例12: T_

?>
</th>
            <th class="cel_max_counter optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=max_counter', T_('Max Counter'), 'sort_share_max_counter');
?>
</th>
            <th class="cel_allow_stream optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=allow_stream', T_('Allow Stream'), 'sort_share_allow_stream');
?>
</th>
            <th class="cel_allow_download optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=allow_download', T_('Allow Download'), 'sort_share_allow_download');
?>
</th>
            <th class="cel_expire optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=expire', T_('Expiry Days'), 'sort_share_expire');
?>
</th>
            <th class="cel_public_url essential"><?php 
echo T_('Public Url');
?>
</th>
            <th class="cel_action  essential"><?php 
echo T_('Actions');
?>
</th>
        </tr>
    </thead>
    <tbody>
    <?php 
foreach ($object_ids as $share_id) {
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_shared_objects.inc.php

示例13: T_

<?php

/* 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/>.
 *
 */
?>
<th class="cel_artist optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=clip&sort=artist', T_('Artist'), 'sort_video_artist');
?>
</th>
开发者ID:cheese1,项目名称:ampache,代码行数:27,代码来源:show_partial_clips.inc.php

示例14: T_

        <tr class="th-top">
            <th class="cel_play essential"></th>
            <th class="cel_name essential persist"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=broadcast&sort=name', T_('Name'), 'broadcast_sort_name');
?>
</th>
            <th class="cel_genre optional"><?php 
echo T_('Genre');
?>
</th>
            <th class="cel_started optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=broadcast&sort=started', T_('Started'), 'broadcast_sort_started');
?>
</th>
            <th class="cel_listeners optional"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=broadcast&sort=listeners', T_('Listeners'), 'broadcast_sort_listeners');
?>
</th>
            <th class="cel_action essential"><?php 
echo T_('Actions');
?>
</th>
        </tr>
    </thead>
    <tbody>
        <?php 
foreach ($object_ids as $broadcast_id) {
    $libitem = new Broadcast($broadcast_id);
    $libitem->format();
    ?>
        <tr class="<?php 
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_broadcasts.inc.php

示例15: T_

            <?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;
    ?>
" onclick="showEditDialog('tvshow_row', '<?php 
    echo $tvshow->id;
    ?>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_tvshow.inc.php


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