open('minichat')) $flag = true; elseif(!$moder) $flag = false; if ($flag){ $html = ""; require_once SYSTEM_DIR.'/classes/parse.class.php'; $parse = new ParseFilter(); $parse->safe_mode = true; $result = $this->query("SELECT id, name as gast_name, message, date, ip, user_id, mgroup FROM ".PREFIX."_chat m ORDER BY date DESC LIMIT 0,".$chatconfig['limit'].""); if (!$moder){$m_group = 4;} $PHP_SELF = $config['http_home_url']; while ($row = $this->get_row($result)){ $lang['mchat_mess'] = "Сообщение"; $row['date'] = strtotime($row['date']); $row['name'] = stripslashes($row['gast_name']); $go_page = "href=\"".$config['http_home_url']."user/".urlencode($row['name'])."/\""; $go_page .= "onClick=\"return dropdownmenu(this, event, Chat_UserMenu('".htmlspecialchars($go_page)."', '".$row['user_id']."', ".$m_group.", '".$row['id']."', '".$row['name']."', '".$lang['mchat_mess']."'), '170px')\""; $color = $user_group[$row['mgroup']]['colour']; $author = "".$row['name'].""; $date = mcdate($chatconfig['timestamp'],$row['date']); $message = stripslashes($row['message']); $html .= "
"; } $this->free(); if (!$moder) $cache->save('minichat', $html); } else $html = $cache->open('minichat'); return $html; } } ?>