-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.php
51 lines (47 loc) · 1.81 KB
/
view.php
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
49
50
51
<?php
$q = $_GET['q'];
$id = $_GET['id'];
$issue = $_GET['issue'];
$method = $_GET['method'];
/**
* Други статии
*/
$otherTitles = "Select `id`, `title` from `articles` where `cat` = '$q' and `id` != $id and `issue` = '$issue' order by `id` DESC";
$otherTitles = mysql_query($otherTitles);
while($row = mysql_fetch_assoc($otherTitles)) {
$row['link'] = "index.php?q=$q&id=$row[id]&issue=$issue&method=full";
$others[] = $row;
}
/**
* Избраната статия
*/
$articleQuery = "Select * from `articles` where `id` = $id";
$articleQuery = mysql_query($articleQuery);
while($row = mysql_fetch_assoc($articleQuery)) {
$row['text'] = nl2br($row['text']);
$article[] = $row;
}
$article = $article[0];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php echo($err); ?>
<tr>
<td>
<div id="content">
<div id="full-box-header"><?php echo $article['title']; ?></div>
<div id="full-box"><img src="<?php echo $article['img']; ?>" width="285" height="220" class="pic"><?php echo $article['text']; ?><br /><br /><br />
<span class="author">Автор: <?php echo $article['author']; ?></span><br /><br /></div>
<div id="info">
<div id="edit">Инфо:<br /><br />
Автор: <?php echo $article['author']; ?><br />Публукуване: <?php echo $article['date']; ?><br />
Последна редакция:<br /><?php echo $article['edit']; ?><br /><br />
</div></div>
<div id="info">
<div id="edit">Други статии от броя:<br /><br />
<?php foreach($others as $otherTitle): ?>
<a href="<?php echo $otherTitle['link']; ?>" class="text-head" style="line-height:20px;"><?php echo $otherTitle['title']; ?></a><br /><br />
<?php endforeach; ?>
</div></div>
</div></td>
</tr>
</table>