Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<body bgcolor="#ff097558">
2
 
3
<?
4
/* database info, or include a config.php file
5
a config file would just contain the info from $db_host through the mysql_select_db ... )); */
6
include('config.php');
7
 
8
/* Set the query and get the last 15 posts, change LIMIT 15 to what ever you want, or just remove it. */
9
$sql = mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 15");
10
echo "<table>";
11
while($r=mysql_fetch_array($sql)){
12
    /* this checks to see if the poster had an email address */
13
    if(!$r['email']){ $mail = ""; }else{
14
        $mail = "<a href=mailto:$r[email]></a>";
15
    }
16
    /* this checsk to see if hte user had a website */
17
    if(!$r['site']){ $site = "$r[author]"; }else{
18
        $site = "<a href=$r[site]>$r[author]</a>";
19
    }
20
 
21
    /* To modify the way the shouts are displayed, edit this.
22
date is formated by gmdate() (same as date()), so check php.net to change the way the date's displayed */
23
 echo "<tr> 
24
    <td><font face=\"Arial\" color=\"Blue\"> 
25
    <b>$mail $site</b> ".gmdate("", $r['date'])." 
26
    <br>$r[message] 
27
    </font> 
28
    <hr></td> 
29
    </tr>";
30
}
31
echo "</table>";
32
 
33
?> 
34
 
35
<meta http-equiv="refresh" content="3">