* @link http://pioder.gim2przemysl.int.pl/ * @license GNU GPL v3 **/ if ( !defined('IN_uF') ) { die('Hacking attempt'); } class ShoutBox { function new_message($message,$uid) { $time = time(); $sql = "INSERT INTO ".SHOUTBOX_TABLE." VALUES ('', '$uid', '$message','$time')"; DataBase::sql_query($sql,'GENERAL','Could not add shoutbox message.'); } function read_messages($limit) { $sb_content = ''; $rank_mod = ($_SESSION['uid']>0) ? User::UserInformation($_SESSION['uid'],'rank') : 0; global $user; global $default_skin; $sql = "SELECT * FROM ".SHOUTBOX_TABLE." ORDER BY `time` LIMIT $limit"; $query = DataBase::sql_query($sql,'CRITICAL', 'Could not read shoutbox table'); while($sb_msg = @mysql_fetch_array($query)) { $del_edit_msg = ($rank_mod>0) ? 'x e' : ' '; $sb_content .= '