Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?
$id=(int)$_GET['id'];
$id=abs($id);
$id=htmlspecialchars(addslashes(trim($id)));
if (!$id) {
include "error/errormsgno.php";
include "footer.php";
exit;
}
else {
include "config.php";
$a=mysql_query("SELECT * FROM news ORDER by `id`") or die(mysql_error());
$aresult=mysql_num_rows($a);
$query=mysql_query("SELECT * from `news` WHERE `id` = '$id' ORDER BY `id` DESC LIMIT 5") or die(mysql_error());
$b=mysql_num_rows($query);
if ($b < 1) {
include "error/errormsgno.php";
include "footer.php";
exit;
}
else {
$row=mysql_fetch_array($query);
$r=$row['read'] + 1;
$update = mysql_query("UPDATE `news` SET `read` = '$r' WHERE `id` = '$id'") or die(mysql_error());
}
$text=$row['text'];
$text=nl2br($text);
echo '
<table width="100%" cellpadding="0" cellspacing="2" border="0">
<tr><td colspan="2" style="color:#579ff3; padding-left:7px; margin:1px;">
<h2>'.$row['name'].'</h2></td></tr>
<tr><td width="83" style="border:1px dotted #dbdbdb;"><center><img style="padding:3px; max-width:200px;" border="0" src="'.$row['picture'].'"></center></td>
<td style=" border:1px dotted #dbdbdb; padding-left:6px;">
<p class="urok">Автор:
<a href="profile.php?user='.$row['author'].'">'.$row['author'].'</a></p>
<p class="urok">Добавен на: '.$row['date'].'</p>
<p class="urok">Видян :<b>'.$row['read'].'</b> пъти</p>
<p class="urok">Източник :<a href = "'.$row['url'].'" />Тук</a></p>
</td></tr>
<tr>
<td colspan="2" style="padding:5px;">
'.$text.'
</td></tr>
</table>
';
}
?>