source: trunk/alert/index.php

Last change on this file was 694, checked in by george, 15 years ago
  • Opraveno: Zobrazování novinek z webu ve hře.
File size: 538 bytes
Line 
1<?php
2
3include_once('../inc/html.php');
4include_once('../inc/config.php');
5include_once('../inc/database.php');
6include_once('../inc/system.php');
7$System = new System($Config);
8$db = $System->Database;
9$Html = new Html();
10
11echo('SERVERALERT:'."\n");
12$DbResult = $db->query('SELECT * FROM Article WHERE Time > DATE_SUB(NOW(), INTERVAL 30 DAY) ORDER BY Time DESC LIMIT 5');
13while($Article = $DbResult->fetch_assoc())
14{
15 echo('> '.$Html->HumanDate($Article['Time']).' '.$Article['Title']."\n".strip_tags($Article['Content'])."\n\n");
16}
17
18?>
Note: See TracBrowser for help on using the repository browser.