<?php require('management/admin_functions/session.php'); ?>
<?php require('management/admin_layout/header.php'); ?>
<ul id="breadcrumbs">
<li><a href="index.php"><?php echo $lang['main_navigation']; ?></a></li>
<li><a href="blog.php" class="actual">Blog</a></li>
</ul>
<div class="clear_blog"></div>
<p><a href="blog_posts_new.php" class="quickbutton"><?php echo $lang['create_article']; ?></a></p>
<div class="clear_blog"></div>
<?php
$count = mysql_query("SELECT blog_id FROM articles") OR die(mysql_error());
include('../framework/navigation.php');
$query = "SELECT * FROM articles ORDER BY blog_id DESC LIMIT $start,$entries";
$result = mysql_query($query) OR die(mysql_error());
if(!$result) {
echo '<p class="false">' . $lang['no_articles_available'] . '</p>' . mysql_error();
}else{
if(intval(mysql_num_rows($result)) == 0) {
echo '<p class="false">' . $lang['no_articles_available'] . '</p>';
}else{
echo '<table width="100%" class="tables">
<tr>
<td width="5%"><strong>ID</strong></td>
<td width="45%"><strong>' . $lang['title'] . '</strong></td>
<td width="15%"><strong>' . $lang['date'] . '</strong></td>
<td width="15%" align="center"><strong>' . $lang['comments'] . '</strong></td>
<td width="10%" align="center"><strong>' . $lang['blank_edit'] . '</strong></td>
<td width="10%" align="center"><strong>' . $lang['blank_delete'] . '</strong></td>
</tr>';
while($row = mysql_fetch_assoc($result)) {
echo '<tr>
<td width="5%">' . (int)$row['blog_id'] . '</td>
<td width="45%">' . htmlentities($row['blog_title'], ENT_QUOTES) . '</td>
<td width="15%">' . date('d.m.Y - H:i', strtotime($row['blog_date'])) . '</td>
<td width="15%" align="center"><a href="blog_comments_edit.php?id=' . (int)$row['blog_id'] . '"><img src="../style/images/admin/icons/comments.png" alt="' . $lang['comments'] . '" title="' . $lang['comments'] . '" border="0"></a></td>
<td width="10%" align="center"><a href="blog_posts_edit.php?blog_id=' . (int)$row['blog_id'] . '"><img src="../style/images/admin/icons/edit.png" alt="' . $lang['blank_edit'] . '" title="' . $lang['blank_edit'] . '" border="0"></a></td>
<td width="10%" align="center"><a href="blog_posts_delete.php?blog_id=' . (int)$row['blog_id'] .'"><img src="../style/images/admin/icons/delete.png" alt="' . $lang['blank_delete'] . '" title="' . $lang['blank_delete'] . '" border="0"></a></td>
</tr>';
}
echo '</table>
<div class="cleaning"></div>';
echo '<div id="navigation">
<span class="pages">' . $lang['page'] . ' ' . $page . ' ' . $lang['of'] . ' ' . $allsites . '</span>';
echo $link_string;
echo '</div>
<div class="clear_navi"></div>';
}
}
?>
<?php require('management/admin_layout/footer.php'); ?>