PHP NUKE 5.5 PM Problem

Begonnen von soxin, 29 April 2004, 19:39:03

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

soxin

Hi all,

habe eine Seite mit VKP 5.5 und eine mit Nuke 6 laufen ..

Bei beiden habe ich probleme mit den PMS ...

Beim automatischen öffnen der PMS via POPUP kommen manchmal 2 an .. nicht immer .. davon ist eine mit Inhalt und die andere leer...

Vermute mal da ist ein Fehler in der buddy5.php .. irgendwas mit dem refreshen oder so..

In die DB wird auf jedenfall nichts geschrieben, keinen leeren eintrag..

Hat jemand eine idee?

Hier der code der buddy5.php:
 
<?php

if (!IsSet($mainfile)) { include ("mainfile.php"); }
include('config.php');
include('functions.php');
include('auth.php');
include("language/buddy/lang-$lang.php");
global $sitename, $bgcolor4, $textcolor3, $textcolor4; $prefix;

    if(isset($user)) {
        $user2 = base64_decode($user);
        $cookie = explode(":", $user2);
        if($cookie[9]=="") $cookie[9]=$Default_Theme;
        if(isset($theme)) $cookie[9]=$theme;
        if(!$file=@opendir("./themes/$cookie[9]")) {
            include("./themes/$Default_Theme/theme.php");
            echo "<html><head>\n\n\n";

        } else {
            include("./themes/$cookie[9]/theme.php");
            echo "<html><head>\n\n\n";

        }
    } else {
        include("./themes/$Default_Theme/theme.php");

        echo "<html><head><title>$sitename</title>";
        echo "\n\n\n";
        echo "<body onload=setInterval('self.location.reload()',13000) bgcolor=$bgcolor4 text=$textcolor4 link=$textcolor1 alink=$textcolor1 vlink=$textcolor1 TOPMARGIN=5 LEFTMARGIN=2 MARGINWIDTH=2 MARGINHEIGHT=2>\n";
OpenTable();
echo "<center><font class=title><b>"._PLSLOGIN."</b></font></center>\n";
CloseTable();
echo "</body></html>\n";
        exit;
    }

function buddylist() {
global $cookie, $sitename, $bgcolor4, $textcolor3, $textcolor4, $prefix;

$sql = mysql_query("SELECT * FROM $prefix"._priv_msgs." WHERE to_userid = '$cookie[0]' AND read_msg='0'");

echo "<title>$sitename PageMessenger</title>";

if ($row = mysql_num_rows($sql)) {

        while ($msgs = mysql_fetch_array($sql)) {

echo "\n
var telwin = null;\n
telwin = open('buddy5.php?op=read&msg_id=$msgs[msg_id]', '$priv_msg[msg_time]', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=360, height=200');\n
\n\n";
        }
}

echo "\nfunction IM(IM) { var MainWindow = window.open (IM, \"_blank\",\"width=360,height=200,toolbar=no,location=no,menubar=no,scrollbars=auto,resizeable=no,status=no\");}\n</head>
<body onload=setInterval('self.location.reload()',12000) bgcolor=$bgcolor4 text=$textcolor4 link=$textcolor3>";
echo "<center><p><b><font class=title>$sitename PageMessenger</font></b></p><p><font class=tiny>"._DISCRIBE."</font></p>";
echo "<p><font>"._NOWON."</p>";
OpenTable();
$sql = mysql_query("SELECT username FROM $prefix"._session." where guest=0");
$member_online_num = mysql_num_rows($sql);

$i = 1;
while ($session = mysql_fetch_array($sql)) {


                if ($i == $member_online_num) {
                        $who_online .= "<A href=\"javascript:IM('buddy5.php?op=compose&to=$session[username]')\"><li> $session[username]</a><br>";

$result = mysql_query("SELECT uid, uname FROM $prefix"._users."");

                } else {

                   $who_online .= "<A href=\"javascript:IM('buddy5.php?op=compose&to=$session[username]')\"><li> $session[username]</a><br>";

$result = mysql_query("SELECT uid, uname FROM $prefix"._users."");

                }
       }

$i++;
echo "<p align=center><font>$who_online</font></p>";
CloseTable();
echo "<p><a href=buddy5.php?op=allusers>"._ALLU."</a></p></center></font>";
echo "</body></html>";
exit;
}

function allusers() {
global $cookie, $sitename, $bgcolor4, $textcolor3, $textcolor4, $prefix;

$sql = mysql_query("SELECT * FROM $prefix"._priv_msgs." WHERE to_userid = '$cookie[0]' AND read_msg='0'");

echo "<title>$sitename PageMessenger</title>";

if ($row = mysql_num_rows($sql)) {

        while ($msgs = mysql_fetch_array($sql)) {

echo "\n
var telwin = null;\n
telwin = open('buddy5.php?op=read&msg_id=$msgs[msg_id]', '$priv_msg[msg_time]', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=360, height=200');\n
\n\n";
        }
}

echo "\nfunction IM(IM) { var MainWindow = window.open (IM, \"_blank\",\"width=360,height=200,toolbar=no,location=no,menubar=no,scrollbars=auto,resizeable=no,status=no\");}\n</head>
<body onload=setInterval('self.location.reload()',13000) bgcolor=$bgcolor4 text=$textcolor4>";
echo "<center><p><b><font class=title>$sitename PageMessenger</font></b></p><p><font class=tiny>"._SENDMESS."</font></p><p><font class=tiny>"._CLICK."<a href=buddy5.php>"._HERE."</a>"._SEEON."</font></p></p>";
echo "<p><font>",_TITLE2."</p>";
OpenTable();
$sql = mysql_query("SELECT uname FROM $prefix"._users." order by uname");
$member_num = mysql_num_rows($sql);

$i = 1;
while ($userlist = mysql_fetch_array($sql)) {


                if ($i == $member_num) {
                        $who .= "<A href=\"javascript:IM('buddy5.php?op=compose&to=$userlist[uname]')\"><li> $userlist[uname]</a><br>";

$result = mysql_query("SELECT uid, uname FROM $prefix"._users."");

                } else {

                   $who .= "<A href=\"javascript:IM('buddy5.php?op=compose&to=$userlist[uname]')\"><li> $userlist[uname]</a><br>";

$result = mysql_query("SELECT uid, uname FROM $prefix".users."");

                }
       }

$i++;
echo "<p align=center><font>$who</font></p>";
CloseTable();
echo "<p><font><a href=buddy5.php>"._NOWON."</a></p>";
exit;
}

function compose($to, $subject) {
global $sitename, $bgcolor4, $textcolor3, $textcolor4, $prefix;
$res = mysql_query("SELECT uid, uname FROM $prefix"._users." WHERE uname='$to'");
$to_user = mysql_fetch_array($res);
$to_userid = $to_user[uid];
echo "<title>$sitename PageMessenger</title>
<body bgcolor=$bgcolor4 text=$textcolor4>";
echo "\n\n<!--\n";
echo "function x () {\n";
echo "return;\n";
echo "}\n";
echo "\n";
echo "function DoSmilie(addSmilie) {\n";
echo "\n";
echo "var addSmilie;\n";
echo "var revisedMessage;\n";
echo "var currentMessage = document.coolsus.msg_text.value;\n";
echo "revisedMessage = currentMessage+addSmilie;\n";
echo "document.coolsus.msg_text.value=revisedMessage;\n";
echo "document.coolsus.msg_text.focus();\n";
echo "return;\n";
echo "}\n";
echo "//-->\n";
echo "<FORM METHOD=POST ACTION=\"buddy5.php\" TARGET=_self name=coolsus>";
echo "<center><font><b>"._SENDM." $to</b></font></center>";
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="<? echo "$bgcolor2"; ?>" align="center">
<tr><td>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr><td> </font></td><td><input type=hidden name=to_userid value="<? echo "$to_userid"; ?>"></td></tr>
<? if ($subject == "") {
echo "<tr><td valign=\"top\"><font><b>"._SUBJECT."</b></font></td><td><input type=TEXT name=subject size=35 maxlength=50></td></tr>";
       } else {
       $subject = str_replace("Re: ", "", $subject);
echo "<tr><td valign=\"top\"><font><b>Subject:</b></font></td><td><input type=TEXT name=subject size=35 maxlength=50 value=\"Re: $subject\"></td></tr>";
} ?>
<tr><td valign="top"><font><b>Message:</b></font></td><td><textarea name=msg_text wrap=VIRTUAL cols=35 rows=5></textarea>
<br>
<?php
echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-? ');\"><IMG width=\"15\" height=\"22\" src=\"images/forum/icons/icon_confused.gif\" border=\"0\" alt=\":-?\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-( ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_frown.gif\" border=\"0\" alt=\":-(\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-D ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_biggrin.gif\" border=\"0\" alt=\":-D\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' ;-) ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_wink.gif\" border=\"0\" alt=\";-)\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-o ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_eek.gif\" border=\"0\" alt=\":-0\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' 8-) ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_cool.gif\" border=\"0\" alt=\"8-)\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-P ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_razz.gif\" border=\"0\" alt=\":-P\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-) ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_smile.gif\" border=\"0\" alt=\":-)\" hspace=\"5\"></A>";
     echo "<A href=\"javascript: x()\" onClick=\"DoSmilie(' :-| ');\"><IMG width=\"15\" height=\"15\" src=\"images/forum/icons/icon_mad.gif\" border=\"0\" alt=\":-|\" hspace=\"5\"></A>";

?>
</td>





</tr>
</table>
</td></tr>
</table>






<center>
<input type=HIDDEN name="op" value="send">
<input type=HIDDEN name="to" value="<? echo "$to"; ?>">
<input type=image src="images/im/sendim.gif" border=0 width="77" height="23">
<a href=# onClick='window.close()'><img src="images/im/closeim.gif" border=0 width="77" height="23"></a>
</form>
</center>
</body>
</html>
<?
exit;

}

function sendm($to, $to_userid, $msg_text, $subject) {
global $cookie, $cookie, $sitename, $bgcolor4, $textcolor3, $textcolor4, $prefix;

        $msg_text = bbencode($msg_text);
        $msg_text = str_replace("\n", "<BR>", $msg_text);
        $msg_text = smile($msg_text);
        $msg_text = make_clickable($msg_text);
        $subject = strip_tags($subject);
        $time = date("Y-m-d H:i");

        $subject = addslashes($subject);
        $msg_text = addslashes($msg_text);

        $sql = "INSERT INTO $prefix"._priv_msgs." (msg_image, subject, from_userid, to_userid, msg_time, msg_text) ";
        $sql .= "VALUES ('icon1.gif', '$subject', '$cookie[0]', '$to_userid', '$time', '$msg_text')";
        mysql_query($sql);
echo "<title>$sitename PageMessenger</title>\n";
echo "<body bgcolor=$bgcolor4 text=$textcolor4>\n";
OpenTable();
echo "<center><br><br><p><font><b>"._MESSAGTO." $to</b></p></font>\n";
echo "\n";
echo "<!--\n";
echo "setTimeout(\"self.close()\", 1000);\n";
echo "// --><div align=\"center\"><a href=# onClick='window.close()'><img src=\"images/im/closeim.gif\" border=0 width=\"77\" height=\"23\"></a><br><br>\n";
echo "<font class=\"tiny\">"._AUTOCLOSE."</font></div>\n";
CloseTable();
echo "</body></html>\n";
exit;
}

function readm($msg_id) {
global $cookie, $sitename, $bgcolor4, $textcolor3, $textcolor4, $prefix;
$sql = mysql_query("SELECT * FROM $prefix"._priv_msgs." WHERE msg_id=$msg_id AND to_userid='$cookie[0]' AND read_msg='0'");
$priv_msg = mysql_fetch_array($sql);

$from_userid = $priv_msg[from_userid];
$fromuser = mysql_query("select uname from $prefix"._users." where uid = '$from_userid'");
$fname = mysql_fetch_array($fromuser);
$from_user = $fname[uname];

$subject = stripslashes($priv_msg[subject]);
$message = stripslashes($priv_msg[msg_text]);

$msg_time = $priv_msg[msg_time];
$imagesub = $priv_msg[msg_image];

mysql_query("UPDATE $prefix"._priv_msgs." SET read_msg='1' WHERE msg_id='$priv_msg[msg_id]'");

echo "<title>"._INCOME." $from_user!</title></head>";
echo "<body bgcolor=$bgcolor4 text=$textcolor4>";
OpenTable();
?>
<font><b><? echo ""._FROM."" ?>:</b></font></td><td width=70%><font><? echo "$from_user"; ?></font></td></tr>
<tr><td valign="top" halign=right><font><b><? echo ""._SUBJECT."" ?>:</b></font></td><td width=70%><font><? echo "<img src=\"images/forum/subject/$imagesub\" border=0> $subject"; ?></font></td></tr>
<tr><td valign="top" halign=right><font><b><? echo ""._MESSAGE."" ?><br><br><a href="buddy5.php?op=compose&to=<? echo "$from_user"; ?>&subject=<? echo "$subject"; ?>"><? echo ""._REPLY."" ?></a></b></font></td><td valign=top width=70%><font><? echo "$message"; ?></font></td>
</tr>
<tr><td halign=right><font class=tiny><? echo ""._SENT."" ?></font></font></td><td width=70%><font class=tiny><? echo "$msg_time"; ?></font>
<?
CloseTable();
?>
</body>
</html>
<?
exit;
}

switch($op) {

        case "read":
        readm($msg_id, $msg_time);
        break;

        case "send":
        sendm($to, $to_userid, $msg_text, $subject);
        break;

        case "allusers":
        allusers();
        break;

        case "compose":
        compose($to, $subject);
        break;

        default:
        buddylist();
        break;
}

?>
 

soxin

hat mirt nichtmal jemand einen kleinen TIP

Bitttteee  :cry

soxin

Soviele Antworten  :cool:
Spitzen sache..

 :schout: ICH HABE IMMER NOCH KEINE LÖSUNG!

BowlingX

Ein Upgrade auf die aktuelle Version unseres "VKPS" schafft Abhilfe....
Kein Support über Mail, (ungefragter) PN oder ICQ, ausschließlich direkt im Forum!

soxin

@BowlingX
Ich möchte nicht updaten..
Hast du eine Idee woran das liegen könnte? :quest