//-*- 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
*/
require_once 'db/DatabaseFactory.class.php';
$db = DatabaseFactory::getInstance()->getDatabase( 'chat' );
$result=$db->GetAll("SELECT Friend,COUNT(Friend) AS count FROM chat_notify GROUP BY Friend ORDER BY count DESC LIMIT 30");
?>
Lieblinge
|
Die Chatter, die ihr am häufigsten zu euren Freunden gemacht habt, werden zu einem Liebling des Schulhofchats.
|
| Platz |
Spitzname |
Zum Freund gemacht |
$i=1;
foreach($result as $i => $row){
$i++;
if($i<11){
$tb_color="#a0ffa0";
}elseif($i>10 && $i<21){
$tb_color="#ffffa0";
}else{
$tb_color="#ffa0a0";
}
echo '| '.$i.'. | '.$row['Friend'].' | '.$row['count'].' mal | ';
$i++;
}
?>
|