<?php
defined('ENGINE') or die("Pagina non accessibile direttamente");
?>
<?php
$action = (isset($_GET["action"])) ? trim ($_GET["action"]): '';
$pages = (isset($_GET["pagina"])) ? trim ((int)$_GET["pagina"]): '';
if(empty($action)){
$id = (isset($_GET["id"])) ? trim ((int)$_GET["id"]): '';
$db_id = mysql_real_escape_string($id);
$query = mysql_query ( "SELECT users.user as _user , news_categories.title as _cat , news.* FROM users
INNER JOIN news
ON users.id = news.id_user INNER JOIN news_categories
ON news_categories.id = news.id_categories WHERE news.id='".$db_id."' and news.active=1" );
$row = mysql_fetch_array ( $query );
if(empty($db_id)) {
echo "null";
}
elseif (mysql_num_rows ( $query ) == 0) { echo "Vuoto"; }
else
{
?><p style="text-align:center;font-size:15px;"><a href="index.php?m=news_categories&id=<?php echo $row["id_categories"]; ?>">Torna indietro</a></p>
<div id="post">
<h2><?php echo $row["title"]; ?></h2>
<div class="contents">
<?php echo bbcode_complete($row['news']); ?>
</div>
<ul class="info">
<li><strong>Autore: </strong><?php echo $row["_user"]; ?></li>
<li><strong>Data: </strong> <?php echo "".show_data($row["data"]).""; ?></li>
<li><strong>Categoria: </strong><?php echo $row["_cat"]; ?></li>
</ul>
</div>
<?php
}
?>
<?php
}
?>