-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
42 lines (41 loc) · 1.38 KB
/
index.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
<?php
include_once ('/var/www/radio/test/connect.php');
if (!isset($_GET['ajax'])) {
include_once ('/var/www/radio/test/header.php');
}
echo ' <div id="content">';
$query = mysql_query ("SELECT *, DATE_FORMAT(`Date`, '%d.%m.%Y') AS 'time' FROM `News` ORDER BY `date` DESC LIMIT 10");
while ($result = mysql_fetch_array($query)) {
$id = $result['ID'];
$title = $result['Name'];
$about = $result['About'];
$picture = $result['Picture'];
$date = $result['time'];
echo ' <div id="article">';
echo ' <div id="title">';
echo ' <h1>'.$title.'</h1>';
echo ' </div>';
echo ' <div id="text">'.$about.'</div>';
echo ' <div id="image">';
echo ' <img src="'.$picture.'" width="200" title="'.$title.'" tabindex="0" />';
echo ' </div>';
echo ' </div>';
echo ' <div id="footer_article">';
echo ' <div id ="date">'.$date.'<hr>';
echo ' <button onclick="window.location.href=\'/test/article/?id='.$id.'\'">Комментарии</button>';
//echo ' <a href="article/index.php?id='.$id.'">Комментарии</a>';
echo ' </div>';
echo ' </div>';
echo ' <hr>';
}
echo ' </div>';
echo ' <div id="load">';
echo ' <script src="../test/conf/podgruzka.js"></script>';
echo ' <img src="../test/img/loading.gif" id="imgLoad">';
echo ' <div>Загрузить еще</div>';
echo ' </div>';
echo '</div>';
if (!isset($_GET['ajax'])) {
include_once ('/var/www/radio/test/footer.php');
}
?>