Files
rm.rzeszow.pl/admin/templates/other/banner.php
2023-09-04 21:59:34 +02:00

53 lines
2.1 KiB
PHP

<div class="browse">
<table class='table_browse' style='margin:0;'>
<tr>
<th class='title' style='width:15px;'>Lp.</th>
<th class='title'>Tytuł</th>
<th class='title'>Link</th>
<th class='title' style='width: 25px;'>Aktywny</th>
<th class='title' style='width: 15px;'></th>
<th class='title' style='width: 15px;'></th>
<th class='title' style='width: 15px;'></th>
<th class='title' style='width: 15px;'></th>
</tr>
<?
$i = 0;
if ( is_array ( $this -> _banners ) ) foreach ( $this -> _banners as $baner )
{
?>
<tr class="menu<?=$i;?>">
<td class='cell'><?= $baner['lp'];?>.</td>
<td class='cell'><?= $baner['title'];?></td>
<td class='cell'><? echo mb_substr( $baner['link'] , 0 , 50 ); if ( strlen( $baner['link'] ) > 50 ) echo '...';?></td>
<td class='cell center'><?= $baner['enabled'];?></td>
<td class='cell'>
<?
if ( $baner['down'] )
{
?><div class='icon down_main' onClick='document.location.href="index.php?rw=down&amp;id=<?=$baner['id'];?>";'></div><?
}
?>
</td>
<td class='cell' style='text-align:center;'>
<?
if ( $baner['up'] )
{
?><div class='icon up_main' onClick='document.location.href="index.php?rw=up&amp;id=<?=$baner['id'];?>";'></div><?
}
?>
</td>
<td class='cell' style='text-align:center;'>
<a href='./?rw=edit&id=<?=$baner['id'];?>'><span class='icon edit' style='display:block;'></span></a>
</td>
<td class='cell'><a onclick="$.prompt( 'Na pewno chcesz usunąć wybrany element?', { title: 'Potwierdź?', submit: function(e,v,m,f) { if ( v == true ) document.location.href='./?rw=del&id=<?= $baner['id'];?>'; }, buttons: { 'tak': true, 'nie': false }, focus: 1 } )"><span class='icon delete' style='display:block;'></span></a></td>
</tr>
<?
$i++;
}
else
{
?><tr><td colspan='8'><div class='alert' style='text-align:center;'>Brak wyników</div></td></tr><?
}
?>
</table>
</div>