本文整理汇总了PHP中UI::show_box_bottom方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::show_box_bottom方法的具体用法?PHP UI::show_box_bottom怎么用?PHP UI::show_box_bottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI::show_box_bottom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_home
/**
* display_home
* This display the module in home page
*/
public function display_home()
{
if (@is_readable(AmpConfig::get('prefix') . '/config/motd.php')) {
echo '<div id="motd">';
UI::show_box_top(T_('Message of the Day'));
require_once AmpConfig::get('prefix') . '/config/motd.php';
UI::show_box_bottom();
echo '</div>';
}
}
示例2: foreach
*
* 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/>.
*
*/
UI::show_box_top(T_('Shoutbox'));
?>
<div id="shoutbox">
<?php
foreach ($shouts as $shout_id) {
$shout = new Shoutbox($shout_id);
$shout->format();
?>
<div id="shout<?php
echo $shout->id;
?>
" class="shout <?php
echo UI::flip_class();
?>
">
<?php
echo $shout->get_display(true, true);
?>
</div>
<?php
}
?>
</div>
<?php
UI::show_box_bottom();
示例3: show_objects
//.........这里部分代码省略.........
$box_title = $argument['title'];
}
} else {
$allow_group_disks = false;
}
$box_req = AmpConfig::get('prefix') . '/templates/show_albums.inc.php';
break;
case 'user':
$box_title = T_('Users') . $match;
$box_req = AmpConfig::get('prefix') . '/templates/show_users.inc.php';
break;
case 'artist':
$box_title = T_('Artists') . $match;
Artist::build_cache($object_ids, true, $limit_threshold);
$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_searches.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);
$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;
示例4: display_home
/**
* display_home
* This display the module in home page
*/
public function display_home()
{
$xmlstr = file_get_contents($this->feed_url);
$xml = simplexml_load_string($xmlstr);
if ($xml->channel) {
UI::show_box_top($xml->channel->title);
$i = 0;
echo '<div class="home_plugin"><table class="tabledata">';
foreach ($xml->channel->item as $item) {
echo '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"><td>';
echo '<div>';
echo '<div style="float: left; font-weight: bold;"><a href="' . $item->link . '" target="_blank">' . $item->title . '</a></div>';
echo '<div style="float: right;">' . date("Y/m/d H:i:s", strtotime($item->pubDate)) . '</div>';
echo '</div><br />';
echo '<div style="margin-left: 30px;">';
if (isset($item->image)) {
echo '<div style="float: left; margin-right: 20px;"><img src="' . $item->image . '" style="width: auto; max-height: 48px;" /></div>';
}
echo '<div>' . $item->description . '</div>';
echo '</div>';
echo '</td></tr>';
$i++;
if ($i >= $this->maxitems) {
break;
}
}
echo '</table></div>';
UI::show_box_bottom();
}
}
示例5: verify_catalog
/**
* verify_catalog
* This function verify the catalog
*/
public function verify_catalog()
{
require AmpConfig::get('prefix') . '/templates/show_verify_catalog.inc.php';
ob_flush();
flush();
$verified = $this->verify_catalog_proc();
+UI::show_box_top();
echo '<strong>';
printf(T_('Catalog Verify Done. %d of %d files updated.'), $verified['updated'], $verified['total']);
echo "</strong><br />\n";
echo "<br />\n";
UI::show_box_bottom();
ob_flush();
flush();
return true;
}
示例6: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
if ($options == null) {
$options = array('gather_art' => true, 'parse_playlist' => false);
}
$this->count = 0;
$this->added_songs_to_gather = array();
$this->added_videos_to_gather = array();
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . UI::find_template('show_adds_catalog.inc.php');
flush();
}
/* Set the Start time */
$start_time = time();
// Make sure the path doesn't end in a / or \
$this->path = rtrim($this->path, '/');
$this->path = rtrim($this->path, '\\');
// Prevent the script from timing out and flush what we've got
set_time_limit(0);
/* Get the songs and then insert them into the db */
$this->add_files($this->path, $options);
if ($options['parse_playlist'] && count($this->_playlists)) {
// Foreach Playlists we found
foreach ($this->_playlists as $full_file) {
$result = $this->import_playlist($full_file);
if ($result['success']) {
$file = basename($full_file);
}
// end if import worked
}
// end foreach playlist files
}
/* Do a little stats mojo here */
$current_time = time();
if ($options['gather_art']) {
$catalog_id = $this->id;
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . UI::find_template('show_gather_art.inc.php');
flush();
}
$this->gather_art($this->added_songs_to_gather, $this->added_videos_to_gather);
}
/* Update the Catalog last_update */
$this->update_last_add();
$time_diff = $current_time - $start_time ?: 0;
$rate = number_format($time_diff > 0 ? $this->count / $time_diff : 0, 2);
if ($rate <= 0) {
$rate = T_('N/A');
}
if (!defined('SSE_OUTPUT')) {
UI::show_box_top();
}
UI::update_text('', sprintf(T_('Catalog Update Finished. Total Time: [%s] Total Media: [%s] Media Per Second: [%s]'), date('i:s', $time_diff), $this->count, $rate));
if (!defined('SSE_OUTPUT')) {
UI::show_box_bottom();
}
}
示例7: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
// Prevent the script from timing out
set_time_limit(0);
if ($options != null) {
$this->authcode = $options['authcode'];
}
if (!defined('SSE_OUTPUT')) {
UI::show_box_top(T_('Running SoundCloud Remote Update') . '. . .');
}
$this->update_remote_catalog();
if (!defined('SSE_OUTPUT')) {
UI::show_box_bottom();
}
return true;
}
示例8: verify_catalog
/**
* verify_catalog
* This function verify the catalog
*/
public function verify_catalog()
{
if (!defined('SSE_OUTPUT')) {
require AmpConfig::get('prefix') . UI::find_template('show_verify_catalog.inc.php');
ob_flush();
flush();
}
$verified = $this->verify_catalog_proc();
if (!defined('SSE_OUTPUT')) {
UI::show_box_top();
}
UI::update_text('', sprintf(T_('Catalog Verify Done. %d of %d files updated.'), $verified['updated'], $verified['total']));
if (!defined('SSE_OUTPUT')) {
UI::show_box_bottom();
}
return true;
}
示例9: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
if ($options == null) {
$options = array('gather_art' => true, 'parse_playlist' => true);
}
$this->count = 0;
require AmpConfig::get('prefix') . '/templates/show_adds_catalog.inc.php';
flush();
/* Set the Start time */
$start_time = time();
// Make sure the path doesn't end in a / or \
$this->path = rtrim($this->path, '/');
$this->path = rtrim($this->path, '\\');
// Prevent the script from timing out and flush what we've got
set_time_limit(0);
/* Get the songs and then insert them into the db */
$this->add_files($this->path, $options);
if ($options['parse_playlist'] && count($this->_playlists)) {
// Foreach Playlists we found
foreach ($this->_playlists as $full_file) {
$result = $this->import_playlist($full_file);
if ($result['success']) {
$file = basename($full_file);
}
// end if import worked
}
// end foreach playlist files
}
/* Do a little stats mojo here */
$current_time = time();
if ($options['gather_art']) {
$catalog_id = $this->id;
require AmpConfig::get('prefix') . '/templates/show_gather_art.inc.php';
flush();
$this->gather_art();
}
/* Update the Catalog last_update */
$this->update_last_add();
$time_diff = $current_time - $start_time ?: 0;
$rate = intval($time_diff > 0 ? $this->count / $time_diff : false) ?: T_('N/A');
UI::show_box_top();
echo "\n<br />" . printf(T_('Catalog Update Finished. Total Time: [%s] Total Songs: [%s] Songs Per Second: [%s]'), date('i:s', $time_diff), $this->count, $rate);
echo '<br /><br />';
UI::show_box_bottom();
}
示例10: display_home
/**
* display_home
* This display the module in home page
*/
public function display_home()
{
if (AmpConfig::get('sociable')) {
$user_id = $GLOBALS['user']->id;
if ($user_id) {
$activities = Useractivity::get_friends_activities($user_id, $this->maxitems);
if (count($activities) > 0) {
UI::show_box_top(T_('Friends Timeline'));
Useractivity::build_cache($activities);
foreach ($activities as $aid) {
$activity = new Useractivity($aid);
$activity->show();
}
UI::show_box_bottom();
}
}
}
}
示例11: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
UI::show_box_top(T_('Running Remote Update') . '. . .');
$this->update_remote_catalog();
UI::show_box_bottom();
return true;
}
示例12: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
if (!defined('SSE_OUTPUT')) {
UI::show_box_top(T_('Running Remote Update') . '. . .');
}
$this->update_remote_catalog();
if (!defined('SSE_OUTPUT')) {
UI::show_box_bottom();
}
return true;
}
示例13: show_objects
/**
* show_objects
* This takes an array of objects
* and requires the correct template based on the
* type that we are currently browsing
*/
public function show_objects($object_ids = null, $argument = null)
{
if ($this->is_simple() || !is_array($object_ids)) {
$object_ids = $this->get_saved();
} else {
$this->save_objects($object_ids);
}
// Limit is based on the user's preferences if this is not a
// simple browse because we've got too much here
if (count($object_ids) > $this->get_start() && !$this->is_simple() && !$this->is_static_content()) {
$object_ids = array_slice($object_ids, $this->get_start(), $this->get_offset(), true);
} else {
if (!count($object_ids)) {
$this->set_total(0);
}
}
// Load any additional object we need for this
$extra_objects = $this->get_supplemental_objects();
$browse = $this;
foreach ($extra_objects as $class_name => $id) {
${$class_name} = new $class_name($id);
}
$match = '';
// Format any matches we have so we can show them to the masses
if ($filter_value = $this->get_filter('alpha_match')) {
$match = ' (' . $filter_value . ')';
} elseif ($filter_value = $this->get_filter('starts_with')) {
$match = ' (' . $filter_value . ')';
/*} elseif ($filter_value = $this->get_filter('regex_match')) {
$match = ' (' . $filter_value . ')';
} elseif ($filter_value = $this->get_filter('regex_not_match')) {
$match = ' (' . $filter_value . ')';*/
} elseif ($filter_value = $this->get_filter('catalog')) {
// Get the catalog title
$catalog = Catalog::create_from_id($filter_value);
$match = ' (' . $catalog->name . ')';
}
$type = $this->get_type();
// Set the correct classes based on type
$class = "box browse_" . $type;
debug_event('browse', 'Called for type {' . $type . '}', '5');
// Switch on the type of browsing we're doing
switch ($type) {
case 'song':
$box_title = T_('Songs') . $match;
Song::build_cache($object_ids);
$box_req = AmpConfig::get('prefix') . '/templates/show_songs.inc.php';
break;
case 'album':
$box_title = T_('Albums') . $match;
Album::build_cache($object_ids);
$allow_group_disks = $argument;
$box_req = AmpConfig::get('prefix') . '/templates/show_albums.inc.php';
break;
case 'user':
$box_title = T_('Manage Users') . $match;
$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;
//.........这里部分代码省略.........
示例14: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
// Prevent the script from timing out
set_time_limit(0);
if ($options != null) {
$this->authcode = $options['authcode'];
}
UI::show_box_top(T_('Running Dropbox Remote Update') . '. . .');
$this->update_remote_catalog();
UI::show_box_bottom();
return true;
}
示例15: add_to_catalog
/**
* add_to_catalog
* this function adds new files to an
* existing catalog
*/
public function add_to_catalog($options = null)
{
// Prevent the script from timing out
set_time_limit(0);
UI::show_box_top(T_('Running Subsonic Remote Update') . '. . .');
$this->update_remote_catalog();
UI::show_box_bottom();
return true;
}