You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

14 years ago
<?php
/*
* Created on 20.08.2007
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
/******************************************************************************
13 years ago
* Dieser Skript enthaelt Funktionen fuer das versenden von Nachrichten wichtig ist
14 years ago
* Dabei werden die Info's ueber einen bbCode umgesetzt
*******************************************************************************
* Autor: Pascal Proksch
* Erstellungsdatum: 20.08.2007
* Zuletzt veraendert: 03.10.2007
*******************************************************************************/
13 years ago
include_once('../path.inc.php'); // get the path ;)
include_once(ROOT_PATH.'/include/config/db.inc.php');
include_once(ROOT_PATH.'/include/sqlwrapper.inc.php');
14 years ago
function getChatMessages(){
$result = db_query('SELECT *, Minute(zeit) as m, Hour(zeit) as h, DAY(zeit) as d , MONTH(zeit) as mon FROM ag_chat ORDER BY ID desc');
$resultstring = '';
while ($row = mysqli_fetch_array($result)) {
$h = $row['h'];
14 years ago
if($h < 10){ $h = "0".$h;}
$m = $row['m'];
14 years ago
if($m < 10){ $m = "0".$m;}
$resultstring = $row['d'].'.'.$row['mon'].' '.$h.':'.$m.' '.$row['user'].': '.$row['nachricht'].'<br>'.$resultstring;
14 years ago
}
return $resultstring;
}
echo getChatMessages();
?>