Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/admin/notice.php |
<script type="text/javascript">
function remove(id) {
jConfirm('Czy na pewno chcesz usunać ?', 'Potwierdzenie', function(r) {
if( r == true ) {
$.ajax({
type:"GET",
url:"/admin/notice/delete/"+id,
cache:false,
success:function(rsponse)
{
jAlert('Ogłoszenie zostało usunięte!', 'Podsumowanie', function() {
location.href = '/admin/notice';
});
}
});
}
});
}
</script>
<div id="page">
<!-- start message-blue -->
<?php if (isset($message_ok)):?>
<div class="n_ok"><p><?php echo $message_ok;?></div>
<?php endif;?>
<!-- start message-red -->
<?php if (isset($message)):?>
<div class="n_error"><p><?php echo $message;?></div>
<?php endif;?>
<div id="content">
<div class="main">
<div class="full_w">
<div class="h_title">Zarządzaj</div>
<h2>Ogłoszenia</h2>
<div class="entry">
<div class="sep"></div>
</div>
<table>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Tytuł</th>
<th scope="col" style="width: 65px;">Zmień</th>
</tr>
</thead>
<tbody>
<?php $n=0; foreach( $articles as $article ) : $n++; ?>
<?php
if( $article->status==0 ) $title = "<em>".$article->title."</em>"; else $title = "<strong>".$article->title."</strong>";
?>
<tr>
<td class="title" width="220"><a href="/ogloszenia/<?php echo $article->user_id; ?>/<?php echo $article->id; ?>" style="color: inherit;"><?php echo $title; ?></a></td><td width="300">[<?php echo Model_Article_Comment::getCount($article->id); ?>] komentarzy </td>
<td>
<a href="/admin/notice/edit/<?php echo $article->id; ?>"><img src="./static/images/edit.png" alt=""/></a>
<a href="#" onclick="remove('<?php echo $article->id; ?>'); return false;" class="confirm_button"><img src="./static/images/medialni_402.jpg" alt=""/></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="entry">
<a href="/admin/notice/edit" class="button add">Dodaj</a>
</div>
</div>
</div>
</div>
</div>