//-*- C++ -*- /* ******************************************************************** ** ** Copyright (C) 1995-2000 Michael Oertel ** ** Copyright (C) 2000- PHPOpenChat Development Team ** ** http://www.ortelius.de/phpopenchat/ ** ** ** ** This program is free software. You can redistribute it and/or modify ** ** it under the terms of the PHPOpenChat License Version 1.0 ** ** ** ** This program is distributed in the hope that it will be useful, ** ** but WITHOUT ANY WARRANTY, without even the implied warranty of ** ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** ** ** ** You should have received a copy of the PHPOpenChat License ** ** along with this program. ** ** ******************************************************************** */ include ("defaults_inc.php"); /* * Open a database connection * The following include returns a database handle */ include ("connect_db_inc.php"); $db_handle=connect_db($DATABASEHOST,$DATABASEUSER,$DATABASEPASSWD); if(!$db_handle){ exit;//the error message is printed in connect_db_inc.php } if(!$_REQUEST['start']) $_REQUEST['start'] = 0; $result=mysql_query("SELECT Nick, Online, DATE_FORMAT(Zeit, '%d.%m.%Y - %H:%i') as Zeit, Raum FROM chat_data ORDER BY Online DESC limit ".($_REQUEST['start']*30).",30",$db_handle); $num=mysql_num_rows($result); ?>
|
if($_REQUEST['search_toplist']){ $chattersearch=mysql_query("SELECT Nick,Online FROM chat_data WHERE Nick='".mysql_real_escape_string($_REQUEST['search_toplist'])."'",$db_handle); $a=@mysql_fetch_array($chattersearch); $onlinetime = $a['Online']; $rank=mysql_query("SELECT count(*) AS count FROM chat_data WHERE Online>=$onlinetime",$db_handle); $b=@mysql_fetch_array($rank); if($b['count']>0){ echo '
| ";
echo "
|
||||||||||||
| 0){?>zurück | }?>weiter |