AzuraCast/app/modules/stations/views/streamers/index.phtml

90 lines
3.5 KiB
PHTML
Raw Normal View History

<?php $this->layout('main', ['title' => _('Streamer/DJ Accounts'), 'manual' => true]) ?>
<div class="row">
<div class="col-md-8">
<div class="card">
<div class="card-header ch-alt">
<h2><?=_('Streamer/DJ Accounts') ?></h2>
<a class="btn bgm-blue btn-float" href="<?=$url->routeFromHere(array('action' => 'edit')) ?>"><i class="zmdi zmdi-plus"></i></a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="25%">
<col width="15%">
<col width="15%">
<col width="45%">
</colgroup>
<thead>
<tr>
<th><?=_('Actions') ?></th>
<th><?=_('Username') ?></th>
<th><?=_('Password') ?></th>
<th><?=_('Notes') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($streamers as $row): ?>
<tr class="vertical-align-middle <?php if (!$row->is_active): ?>text-muted<?php endif; ?>">
<td>
<a class="btn btn-sm btn-primary" href="<?=$url->routeFromHere(array('action' => 'edit', 'id' => $row->id)) ?>">Edit</a>
<a class="btn btn-sm btn-danger" href="<?=$url->routeFromHere(array('action' => 'delete', 'id' => $row->id)) ?>">Delete</a>
</td>
<td><code><?=$this->e($row->streamer_username) ?></code></td>
<td><code><?=$this->e($row->streamer_password) ?></code></td>
<td><?=nl2br($this->e($row->comments)) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header ch-alt">
<h2><?=_('Connection Information') ?></h2>
</div>
<div class="card-body card-padding">
<?php
$frontend_type = $station->frontend_type;
$frontend_info = (array)$station->frontend_config;
if ($frontend_type == 'icecast'):
?>
<h4><?=_('IceCast Clients') ?></h4>
<dl>
<dt><?=_('Server') ?>:</dt>
<dd><?=$server_url ?></dd>
<dt><?=_('Port') ?>:</dt>
<dd><?=(int)$frontend_info['port'] ?></dd>
<dt><?=_('Mount Name') ?>:</dt>
<dd>/radio.mp3</dd>
</dl>
<h4><?=_('ShoutCast 1.x Legacy Clients') ?></h4>
<dl>
<dt><?=_('Server') ?>:</dt>
<dd><?=$server_url ?></dd>
<dt><?=_('Port') ?>:</dt>
<dd><?=(int)$frontend_info['port']+1 ?></dd>
<dt><?=('Username') ?>:</dt>
<dd>(Leave blank)</dd>
<dt><?=_('Password') ?>:</dt>
<dd><?=$frontend_info['streamer_pw'] ?></dd>
</dl>
<?php
endif;
?>
</div>
</div>
</div>
</div>