1<?php 2/* vim:set softtabstop=4 shiftwidth=4 expandtab: */ 3/** 4 * 5 * LICENSE: GNU Affero General Public License, version 3 (AGPL-3.0-or-later) 6 * Copyright 2001 - 2020 Ampache.org 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Affero General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Affero General Public License for more details. 17 * 18 * You should have received a copy of the GNU Affero General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 * 21 */ 22 23use Ampache\Repository\Model\Channel; 24use Ampache\Module\Api\Ajax; 25use Ampache\Module\Util\Ui; 26 27?> 28<?php if ($browse->is_show_header()) { 29 require Ui::find_template('list_header.inc.php'); 30} ?> 31<table class="tabledata striped-rows <?php echo $browse->get_css_class() ?>" data-objecttype="channel"> 32 <thead> 33 <tr class="th-top"> 34 <th class="cel_play essential"></th> 35 <th class="cel_id essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=channel&sort=id', '#', 'channel_sort_id'); ?></th> 36 <th class="cel_name essential persist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=channel&sort=name', T_('Name'), 'channel_sort_name'); ?></th> 37 <th class="cel_interface essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=channel&sort=interface', T_('Interface'), 'channel_sort_interface'); ?></th> 38 <th class="cel_port essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=channel&sort=port', T_('Port'), 'channel_sort_port'); ?></th> 39 <th class="cel_data optional"><?php echo T_('Stream Source'); ?></th> 40 <!--<th class="cel_random"><?php echo T_('Random'); ?></th> 41 <th class="cel_loop"><?php echo T_('Loop'); ?></th>--> 42 <th class="cel_streamtype optional"><?php echo T_('Stream Type'); ?></th> 43 <th class="cel_bitrate optional"><?php echo T_('Bitrate'); ?></th> 44 <th class="cel_startdate optional"><?php echo T_('Start Date'); ?></th> 45 <th class="cel_listeners optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=channel&sort=listeners', T_('Listeners'), 'channel_sort_listeners'); ?></th> 46 <th class="cel_streamurl essential"><?php echo T_('Stream URL'); ?></th> 47 <th class="cel_state optional"><?php echo T_('State'); ?></th> 48 <th class="cel_action essential"><?php echo T_('Actions'); ?></th> 49 </tr> 50 </thead> 51 <tbody> 52 <?php 53 foreach ($object_ids as $channel_id) { 54 $libitem = new Channel($channel_id); 55 $libitem->format(); ?> 56 <tr id="channel_row_<?php echo $libitem->id; ?>"> 57 <?php require Ui::find_template('show_channel_row.inc.php'); ?> 58 </tr> 59 <?php 60 } ?> 61 <?php if (!count($object_ids)) { ?> 62 <tr> 63 <td colspan="13"><span class="nodata"><?php echo T_('No channel found'); ?></span></td> 64 </tr> 65 <?php 66 } ?> 67 </tbody> 68</table> 69<?php if ($browse->is_show_header()) { 70 require Ui::find_template('list_header.inc.php'); 71 } ?> 72