Last change
on this file since 1 was 1, checked in by george, 17 years ago |
Prvotní import všeho
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | <?
|
---|
2 | header('Refresh: 5');
|
---|
3 | session_start();
|
---|
4 |
|
---|
5 | echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
6 | <html><head><title>Chat frame</title>
|
---|
7 | <meta http-equiv="Content-Language" content="cs">
|
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
|
---|
9 | </head><body>');
|
---|
10 |
|
---|
11 | if(array_key_exists('nick',$_GET))
|
---|
12 | {
|
---|
13 | $_SESSION['nick'] = $_GET['nick'];
|
---|
14 | include_once('webchatsend.php');
|
---|
15 | Send('Alive','');
|
---|
16 | }
|
---|
17 |
|
---|
18 | include_once('/a/html/is/db.php');
|
---|
19 | DB_Init('localhost','root','','is');
|
---|
20 | DB_Query('SET CHARACTER SET latin2');
|
---|
21 |
|
---|
22 | $List = array();
|
---|
23 | echo('<table style="height: 100; font-family: Arial;" width="100%" cellspacing="0" cellpadding="2" border="1" bgcolor="#d0d0d0"><tr><td bgcolor="#ffffff" width="90%" valign="top" style="font-size: 14px;">');
|
---|
24 |
|
---|
25 | DB_Select('sunrisechat_history','*,UNIX_TIMESTAMP(time)',' roomtype=0 ORDER BY time DESC LIMIT 0,24');
|
---|
26 | while($List[] = DB_Row());
|
---|
27 | array_pop($List);
|
---|
28 | $List = array_reverse($List);
|
---|
29 | foreach($List as $Row)
|
---|
30 | {
|
---|
31 | $Text = htmlspecialchars($Row['text']);
|
---|
32 | if(substr($Text,0,strlen($_SESSION['nick'])) == $_SESSION['nick']) $Text = '<strong><'.$Row['nick'].'> '.$Text.'</strong>';
|
---|
33 | else $Text = '<'.$Row['nick'].'> '.$Text;
|
---|
34 | echo('['.date('H:i:s',$Row['UNIX_TIMESTAMP(time)']).'] <span style="color: #'.dechex($Row['color']).'">'.$Text.'</span><br>');
|
---|
35 | }
|
---|
36 | echo('</td></tr></table>
|
---|
37 | </body></html>');
|
---|
38 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.