ACC SHELL

Path : /srv/www/vhosts/tsisystem/app/views/articles/
File Upload :
Current File : //srv/www/vhosts/tsisystem/app/views/articles/admin_index.thtml

<div id="main">
  <div style="padding: 1em">

<div style="float: right; clear: both; text-align: right">
<?php if (empty($_SESSION['tinymce_disabled'])) { ?>
<?php echo $html->link('Plain HTML', '/admin/articles/toggle_html'); ?><br />
<?php } else {echo $html->link('W-like', '/admin/articles/toggle_html'); } ?>
</div>
<h1>Zprávy</h1>

<?php 
   echo $filter->setFiltering($filters);
   $pagination->setPaging($paging);
 ?>

<table width="100%" class="list" cellspacing="2">
<tr>
	<th><?php echo $pagination->sortLink('id', '#', 1); ?></th>
	<th>Typ</th>
	<th><?php echo $pagination->sortLink('title', 'Nadpis'); ?></th>
	<th>Obsah</th>
	<th>Aktuality.?</th>
	<th>Zobr.?</th>
	<th>Zobr. od</th>
	<th>Zobr. do</th>
	<th><?php echo $pagination->sortLink('created_d', 'Vloženo'); ?></th>
	<th>&nbsp;</th>
</tr>

<?php foreach ($articles as $row): ?>
<tr>
	<td><?php echo $row['Article']['id'] ?></td>
	<td><?php 
		   switch ($row['Article']['article_type']) {
			   case 0:
			   echo 'Novinka';
			   break;
			   case 1:
			   echo 'Výstavy..';
			   break;
			   case 2:
			   echo 'Publikace..';
			   break;
		   }
		   ?>
		   </td>
	<td><?php echo $row['Article']['title'] ?></td>
	<td><?php echo ssubstr(strip_tags($row['Article']['perex']), 0, 45) . '..'; ?></td>
	<td class="list_c"><?php echo $row['Article']['news'] ? 'Ano' : 'Ne' ?></td>
	<td class="list_c"><?php echo $row['Article']['published'] ? 'Ano' : 'Ne' ?></td>
	<td class="list_c"><?php $x = toDate($row['Article']['publish_from']); echo $x ? $x : '-' ?></td>
	<td class="list_c"><?php $x = toDate($row['Article']['publish_to']); echo $x ? $x : '-' ?></td>
	<td class="list_c"><?php echo toDateTime($row['Article']['created_d']) ?></td>
	<td class="list_c">
		<?php echo $html->link('Uprav','/admin/articles/edit/' . $row['Article']['id'])?>
		<?php echo $html->link('Smaž','/admin/articles/delete/' . $row['Article']['id'], array('onclick' => 'return confirm(\'Opravdu smazat?\')'))?>
	</td>
</tr>
<?php endforeach?>
</table>

<div class="pagination"><?php echo $pagination->pageNumbers(); ?></div>

<p />
<?php echo $html->link('Přidat zprávu', '/admin/articles/edit/0'); ?>
</div>
</div>

ACC SHELL 2018