<div id="left">
<?php
include_once($setting['sitepath'].'/includes/pagination.class.php');
echo '<table class="dataTable" cellspacing="0" cellpadding="0" border="1"  width="95%" >';
echo '<tr><th width="15%">Full News</th><th width="25%">Date</th><th width="65%">'.$setting['sitename'].' News</th>';
$result = yasDB_select("SELECT count(id) FROM `news` ");
$query_data = $result->fetch_array(MYSQLI_NUM);
$numrows = $query_data[0];
$pageurl = new pagination($numrows, $setting['seo'], 'news', 20, 3);
$query = yasDB_select("SELECT * FROM news ORDER BY `id` asc LIMIT " . $pageurl->start . ", " . $pageurl->limit);
while ($row = $query->fetch_array(MYSQLI_ASSOC)) {
	$rowurl = $row['news_text'];
	$rowurl = str_replace(" ", "-", $rowurl);
	$rowurl = str_replace("'", "_", $rowurl);
	$rowurl = str_replace('"', "_", $rowurl);
	$rowurl = str_replace('/', "_", $rowurl);
	$rowurl = str_replace("\\", "_", $rowurl);
	$rowurl = rawurlencode($rowurl);
	$id = $row['id'];
	$news = $row['date'];
	$news = strip_tags(html_entity_decode($row['news_text']), "<a><href><img>");
	if ( $setting['seo']=='yes' ) {
		$newslink = $setting['siteurl'].'shownews/'.$id.'.html';
	} else {
		$newslink = $setting['siteurl'] . 'index.php?act=shownews&id='.$id;
	}				
	 echo '<tr><td><a href="'.$newslink.'"><img src="'.$setting['siteurl'].'/templates/' . $setting['theme'] . '/skins/'.$setting['skin'].'/images/buttons/click.png" height="60" width="60" alt="Click me"></a></td><td>'.$row['date'].'</td><td>'.$news.'</td></tr>';
}
echo "</table>";
echo $pageurl->showPagination();
?>