This repository was archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnews.php
More file actions
48 lines (45 loc) · 1.78 KB
/
news.php
File metadata and controls
48 lines (45 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<td id="news" align="left" valign="top" rowspan="2">
<table width="640" cellpadding="0" cellspacing="0">
<tr><td colspan="2" class="topbr"></td></tr>
<tr class="newstitletr"><td class="title"> Íîâîñòè </td></tr>
<tr><td colspan="2" class="newsborder"></td></tr>
<tr><td colspan="2" class="newstop"></td></tr>
<tr><td class="text" colspan="2">
<table width = '100%' cellspacing = '0' cellpadding = '0' border = '0' class = "tbl">
<?error_reporting(0); if (!isset($_GET['id'])&&!isset($_GET['do'])){
if($cp_login){echo "<td width=90% align=right><a href=./?s=news&do=newsadd>[Äîáàâèòü íîâîñòü]</a></td>";}
echo "<table width=100% align=center border=0 cellspacing='4' cellpadding='0'>";
switchConnection(1, "realmd");
$result=dbquery("SELECT * FROM site_news order by id desc limit $news_count") or die("eror");
if (dbrows($result) != 0)
{
while ($data=dbarray($result))
{
echo "<tr>
<td><p><b><a href= '".$site_url."?s=news&id=$data[id]'> $data[title] </a></b></p>$data[short_text]</td>
</tr>
<tr>
<td align=right><font size='1'>Ðàçìåùåíî: $data[date] îò <b>$data[name]</b></font></td>
</tr>";
}
}
else echo "<tr>
<td colspan=2 align=center>Íåò íîâîñòåé</td>
</tr>
</table>";
} elseif (isset($_GET['id'])) {
$id = $_GET['id'];
switchConnection(1, "realmd");
$result=dbquery("SELECT * FROM site_news where id=$id") or die("eror");
$result=dbarray($result);?>
<h2> <? echo $result[title] ?></h2>
<p><table width=85%><tr><td width=80%>Äàòà: <? echo $result[date] ?></td><td>Îò êîãî: <? echo $result[name] ?></td></tr></table></p><br><br>
<table width=95%><?echo $result[full_text] ?></table>
<br><br>
<a href="javascript:scroll(0,0)">ââåðõ</a>
</table>
<? }
elseif ($_GET['do']==newsadd) include "./engine/newsadd.php";
?>
</table>
</table>