degerli arkadaslar sorunu buldum navruz arkadasimizin sunmus oldugu Flashchat modülünü kurmustum ve (block-Who_is_Online_Flashchat) bu block u aktivlestirdim Flashchat da kim online oldugunu gösterdigi anda bu hatayi veriyor blocku pasiflestirdim su an sorun yok kodlara bakarmisiniz.
saygilar
<?php
/**
* This file is part of
* pragmaMx - Web Content Management System.
* Copyright by pragmaMx Developer Team - http://www.pragmamx.org
*
* pragmaMx is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* $Revision: 1.12.2.4 $
* $Author: tora60 $
* $Date: 2008/01/23 12:02:06 $
*/
defined('mxMainFileLoaded') or die('access denied');
/**
* Einstell Variablen
*/
$onlinelistsize = 8; # Hoehe des Selectfeld der Onlinuser (Online-Liste)
//sohbet
$sohbetlistsize = 8; # Sohbette bulunanlar
//sohbet
$showuserlistall = 0; # Wenn Online-Liste immer erscheinen soll, 1=Ja, 0=nein
$showbuddy = 1; # Buddylink (Messenger) anzeigen , 1=Ja, 0=nein
// User, die nicht angezeigt werden sollen, Namen mit Komma trennen!
$excludedusers = "Texsterdsgf, Knaxllerfgfd";
$imagedir = "images/maaxon";
$pm_module_name = "Private_Messages";
/**
* Ende Einstell Variablen
*/
$thisfile = basename(__file__);
$mxblockcache = false;
global $prefix, $user_prefix, $bgcolor1, $bgcolor2, $bgcolor3, $txtcolor1, $txtcolor2;
if (@file_exists("language/maaXoN/maaXoN-" . $GLOBALS['currentlang'] . ".php")) {
include_once("language/maaXoN/maaXoN-" . $GLOBALS['currentlang'] . ".php");
} else {
include_once("language/maaXoN/maaXoN-english.php");
}
// Variablen initialisieren
$username = "";
if (MX_IS_USER) {
$cookie = mxGetUserSession();
$username = $cookie[1];
$uid = $cookie[0];
}
// SQL-bedingung fuer excluded Users erstellen
$exusers = explode (",", $excludedusers);
if (!MX_IS_ADMIN) {
while (list($key, $val) = each($exusers)) {
$xexusers[] = trim($val);
}
}
$xexusers[] = $GLOBALS['anonymous'];
$excludedusers = "'" . implode("','", mxAddSlashesForSQL($xexusers)) . "'";
// Anzahl aller User und hoechste uid ermitteln
$totalmembers = 0;
$qry = "select COUNT(uid), MAX(uid) from ${user_prefix}_users where user_stat=1;";
list($totalmembers, $lastuid) = sql_fetch_row(sql_query($qry));
// neusten User ermitteln
$lastuid = (empty($lastuid)) ? 0 : $lastuid;
$qry = "select uname from ${user_prefix}_users where uid = $lastuid;";
$result = sql_query($qry); # neusten User ermitteln
list($lastuser) = sql_fetch_row($result);
$past = time() - MX_SETINACTIVE_MINS ;
// Alle Gaeste ermitteln
$guest_online_num = 0;
$result = sql_query("SELECT Count(ip) FROM ${prefix}_visitors WHERE time>" . $past . " AND uid=0;");
list($guest_online_num) = sql_fetch_row($result);
// Alle User ermitteln, evtl auflisten
$member_online_num = 0;
$whoonlineselect = "";
$smallunmae = strtolower($username);
$result = sql_query("SELECT uname FROM ${user_prefix}_users
WHERE ((uname Not In (" . $excludedusers . ")) AND (user_lastvisit >= " . $past . ") AND (user_stat=1) AND (user_lastmod<>'logout'))
ORDER BY uname");
while (list($uname2) = sql_fetch_row($result)) {
$sel = (strtolower($uname2) == $smallunmae) ? " selected " : "";
$uname3 = mxCutString($uname2, 18, "..", ""); # Kurzen Usernamen erstellen
$whoonlineselect .= "<option value=\"" . $uname2 . "\" " . $sel . " title=\"" . $uname2 . "\">" . $uname3 . "</option>\n"; # options fuer auswahlselect erstellen
$member_online_num++; # Anzahl User hochzaehlen
}
//Sohbet
$sohbet_online_num=0;
$result = sql_query("SELECT uid, uname ,userid FROM ${prefix}fc_connections,${user_prefix}_users WHERE uid=userid limit 20 ");
while ($row = sql_fetch_assoc($result)) {
$unames=$row[uname];
//$result = sql_query("SELECT uname FROM ${user_prefix}_users WHERE uid='" . $uids . "'");
//while ($row = sql_fetch_assoc($result)) {
$sel = (strtolower($unames) == $smallunmae) ? " selected " : "";
$unames2 = mxCutString($unames, 18, "..", "");
$sohbetonlineselect .= "<option value=\"\" " . $sel . " title=\"" . $unames . "\">" . $unames2 . "</option>\n"; # options fuer auswahlselect erstellen
$sohbet_online_num++;
//}
//
}
if ($sohbetlistsize >= $sohbet_online_num) {
$sohbetlistsize = $sohbet_online_num + 1;
}
if ($sohbet_online_num==0){$sohbetlistsize=0;}
//Sohbet son
// Private Nachrichten
$countpm = 0;
$countpmunread = 0;
if (MX_IS_USER) { // Wenn aktueller User registriert ist (kein Gast)
$pmactiv = (mxModuleAllowed($pm_module_name)) ? 1 : 0; # feststellen ob pm-modul aktiv ist
if ($pmactiv) { // falls pm-modul aktiv ist
$qry = "SELECT read_msg, Count(msg_id) FROM ${prefix}_priv_msgs WHERE to_userid=" . $uid . " group by read_msg;";
$result = sql_query($qry);
while (list($read_msg, $nums) = sql_fetch_row($result)) {
if ($read_msg == 0) { // wenn angemeldeter User
$countpmunread = $nums; # Anzahl ungelesene ermitteln
} else {
$countpm = $nums; #++; # Anzahl aller pm's ermitteln
}
}
}
// else{
// $checkpmtime=0; # private Nachrichten nicht abfragen!
// }
}
// Usergaestebuch
$content_ug = "";
if (MX_IS_USER) { // Wenn aktueller User registriert ist (kein Gast)
if (mxModuleAllowed("UserGuest")) { // falls gaestebuch vorhanden
$qry = "SELECT Count(gid) FROM ${prefix}_userguest WHERE touserid='" . $uid . "' AND touser = '" . $username . "' AND dummy=0;";
$result = sql_query($qry);
list($gbnewentries) = sql_fetch_row($result);
// Usergaestebuch
if (!empty($gbnewentries)) {
$content_ug .= "<div align=\"left\"><a href=\"modules.php?name=UserGuest&op=view&touser=" . urlencode($username) . "\">
<img src=\"$imagedir/tcake.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOGUESTBOOK . "\"></a> \n
<b>" . mxValueToString($gbnewentries, 0) . " </b><a href=\"modules.php?name=UserGuest&op=view&touser=" . urlencode($username) . "\">";
if ($gbnewentries == 1) {
$content_ug .= "" . _BWOGUESTBOOK1 . "";
} else {
$content_ug .= "" . _BWOGUESTBOOK2 . "";
}
$content_ug .= "</a></div>";
}
}
}
// weitere Variablen initialisieren zur Zeitberechnung :(
// Creating SQL parameter
$gestern = mktime(0, 0, 0, date ("m") , date ("d")-1, date("Y"));
$heute = mktime(0, 0, 0, date ("m") , date ("d"), date("Y"));
// Heute neu angemeldete User ermitteln
$qry = "SELECT COUNT(uid) from ${user_prefix}_users WHERE user_regtime >= $heute and user_stat=1 and uname not in($excludedusers);";
list($userCount) = sql_fetch_row(sql_query($qry));
// Gestern neu angemeldete User ermitteln
$qry = "SELECT COUNT(uid) from ${user_prefix}_users WHERE user_regtime >= $gestern and user_regtime < $heute and user_stat=1 and uname not in($excludedusers);";
list($userCount2) = sql_fetch_row(sql_query($qry));
// Ausgabe ...................................
$content = "\n<!-- $thisfile output start -->\n<div align=\"center\">\n"
. "<a href=\"modules.php?name=Your_Account\"><img src=\"$imagedir/people.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPICS . "\"></a>\n"
. "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0px; margin-bottom: 5px;\">\n"
. "\n<tr>\n<td>" . _BWOTOTALMEMBERS . "</td>\n<td align=\"right\">\n<b>" . mxValueToString($totalmembers, 0) . "</b></td>\n</tr>\n"
. "\n<tr>\n<td>" . _BWOTODAYMEMBERS . "</td>\n<td align=\"right\">\n<b>" . mxValueToString($userCount, 0) . "</b></td>\n</tr>\n"
. "\n<tr>\n<td>" . _BWOYESTERDAYMEMBERS . "</td>\n<td align=\"right\">\n<b>" . mxValueToString($userCount2, 0) . "</b></td>\n</tr>\n"
. "\n<tr>\n<td>" . _BWOMEMBERS1 . "</td>\n<td align=\"right\">\n<b>" . mxValueToString($member_online_num, 0) . "</b></td>\n</tr>\n"
. "\n<tr>\n<td>" . _BWOGUESTES . "</td>\n<td align=\"right\">\n<b>" . mxValueToString($guest_online_num, 0) . "</b></td>\n</tr>\n"
. "</table>\n";
if (MX_IS_USER) {
// zuletzt angemeldeter User
$content .= "<div style=\"border: 0px; margin-bottom: 5px;\">" . _BWOLATEMEMBER . "<br>\n<a href=\"modules.php?name=Userinfo&uname=" . urlencode($lastuser) . "\">$lastuser</a></div>\n";
}
if (MX_IS_USER || MX_IS_ADMIN || $showuserlistall) { // Wenn angemeldeter User oder Admin oder Liste immer erscheinen soll
// Onlineliste anzeigen wenn User online sind
if ($member_online_num > 0) {
if ($onlinelistsize >= $member_online_num) {
$onlinelistsize = $member_online_num + 1;
}
if (!MX_IS_USER || !$pmactiv) {
$script = "";
} else {
$script = " onDblClick=\"whob_clickit()\"";
$content .= "<script language=\"JavaScript\" type=\"text/javascript\">\n<!--\n";
$content .= "function whob_clickit(){\n";
$content .= " var y=document.onlineuserinfo.uname.selectedIndex; \n";
$content .= " var x=document.onlineuserinfo.uname.options[y].value; \n";
$content .= " window.open('modules.php?name=$pm_module_name&file=buddy&op=compose&to='+x, '" . md5(time()) . "','left=370,top=150,width=360,height=200,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,status=no');\n";
$content .= " return false;\n";
$content .= " }\n//-->\n";
$content .= "</script>\n";
}
// background-color: $bgcolor1; font-size: 9px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: $txtcolor1; width: 90%; border: 0px $bgcolor1;
$content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0px; margin-bottom: 5px;\">\n";
$content .= "\n<tr>\n<td colspan=\"2\" align=\"center\">\n";
$content .= "<img src=\"$imagedir/guy_hand.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPICS . "\" align=\"absmiddle\">\n<b>" . _BWOONLINELIST . "</b>\n<img src=\"$imagedir/girl_hand.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPICS . "\" align=\"absmiddle\"><br>\n";
$content .= "</td>\n</tr>\n";
$content .= "\n<tr>\n<td colspan=\"2\" align=\"center\">"; # select-options verwenden
$content .= "<form action=\"modules.php?test\" name=\"onlineuserinfo\" method=\"get\" style=\"border: 0px; margin-bottom: 5px; margin-top: 0px;\">";
$content .= "<input type=\"hidden\" name=\"name\" value=\"Your_Account\">";
$content .= "<input type=\"hidden\" name=\"op\" value=\"userinfo\">";
$content .= "<select name=\"uname\" size=\"$onlinelistsize\" style=\" background-color: $bgcolor1; font-size: 9px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: $txtcolor1; width: 90%; cursor: hand; border: 1px solid $bgcolor2; text-decoration: none; padding-left: 1px; padding-top: 1px; padding-bottom: 1px;\" $script>" . $whoonlineselect . "</select>";
$content .= "<br>\n<input type=\"image\" src=\"$imagedir/info.png\" alt=\"" . _BWOUSERINFO . "\" style=\"background-color: transparent; border: none;\">";
//Sohbet
$content .= "</form><br>\n";
$content .= "<img src=\"$imagedir/guy_hand.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPICS . "\" align=\"absmiddle\">\n<b>Sohbette Olanlar</b>\n<img src=\"$imagedir/girl_hand.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPICS . "\" align=\"absmiddle\"><br>\n";
if ($sohbet_online_num==0){
$content .= "Sohbette Kimse Yok";
}else{
$content .= "<select name=\"uname\" size=\"$sohbetlistsize\" style=\" background-color: $bgcolor1; font-size: 9px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: $txtcolor1; width: 90%; cursor: hand; border: 1px solid $bgcolor2; text-decoration: none; padding-left: 1px; padding-top: 1px; padding-bottom: 1px;\" >" . $sohbetonlineselect . "</select>";
}
$content .= "<a href=\"#\" onClick=\"window.open('chat/flashchat.php','sohbet','left=180, top=150, width=800,height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0'); return false;\"><img src=images/sohbet.gif></a><br>\n";
//Sohbet son
$content .= "</td>\n</tr>\n";
$content .= "</table>\n";
}
// private messages
if (MX_IS_USER && !empty($pmactiv)) {
// pm Liste
$content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0px; margin-bottom: 5px;\">\n";
if ($countpm) {
$content .= "\n<tr>\n<td colspan=\"3\" align=\"center\"><a href=\"modules.php?name=" . $pm_module_name . "\">" . _BWOPMSG . "</a></td>\n</tr>\n";
$content .= "\n<tr>\n<td align=\"center\"><a href=\"modules.php?name=" . $pm_module_name . "\"><img src=\"$imagedir/pmessage.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPMSG . "\"></a></td>\n";
$content .= "<td valign=\"top\">" . _BWOPMSGALL . ":<br>\n" . _BWOPMSGUNREAD . ":</td>\n";
$content .= "<td valign=\"top\" align=\"right\"><b>" . mxValueToString($countpm, 0) . "</b><br>\n";
$content .= ($countpmunread) ? "<img src=\"$imagedir/arrow-ani.gif\" alt=\"\" width=\"14\" height=\"9\" border=\"0\"> <b>" . mxValueToString($countpmunread, 0) . "</b>" : "<b>" . mxValueToString($countpmunread, 0) . "</b>";
$content .= "</td>\n</tr>\n";
} else {
$content .= "<tr><td><a href=\"modules.php?name=" . $pm_module_name . "\"><img src=\"$imagedir/pmessage.gif\" width=\"19\" height=\"19\" border=\"0\" alt=\"" . _BWOPMSG . "\" hspace=\"0\"></a></td><td><a href=\"modules.php?name=" . $pm_module_name . "\">" . _BWOPMSG . "</a></td></tr>\n";
}
$content .= "</table>\n";
// Buddy
if ($showbuddy) {
$themedir = MX_THEME_DIR . "/images";
$buddyimg = (@file_exists($themedir . "/buddy.gif")) ? $themedir . "/buddy.gif" : $imagedir . "/buddy.gif";
$buddyimg = mxCreateImage($buddyimg, _BWOBUDDIE, 0);
$windowname = md5($GLOBALS['sitename']);
$content .= "<a href=\"#\" onClick=\"window.open('modules.php?name=" . $pm_module_name . "&file=buddy','$windowname','left=180, top=150, width=240,height=350,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0'); return false;\">" . $buddyimg . "</a><br>\n";
}
}
// Usergaestebuch
$content .= $content_ug;
}
if (!MX_IS_USER) { // Gast no user
$content .= "<div align=\"justify\"><br>\n" . _BWOASREGISTERED . "</div>\n";
}
$content .= "</div>\n<!-- $thisfile output end -->\n";
// Blocktitel aus Sprachdatei auslesen
$blockfiletitle = _BWOMAAXONLINE;
?>