Kompatibilitätsproblem bei noki Script
Hallo ich hoffe Ihr könnt mir hier helfen.
Ich habe folgende Problem: Im Internet bin ich auf das noki messenger script gestoßen welches ich dringend für ein Projekt in der Ausbildung benötige.
Es funktioniert auch mit dem iexplorer 5.5 und höher allerdings stellte sich ein Kompatibilitätsproblem mit anderen Browsern heraus. (z.B. Netscape etc.)
Ich habe für ein besseres Verständnis das Script mal bei lycos hochgeladen und zum laufen gebracht.
http://members.lycos.co.uk/office2000/login.php
Zum einloggen:
Es scheint als ob es bei anderen Browsern ein Interpretationsproblem bei dem top.php Script gibt. Ich habe es allerdings nicht gefunden. Daher werde ich es hier einmal posten in der Hoffnung das der eine oder andere mr hierbei helfen kann.
Es ist wirklich dringend und ich bin für jede Hilfe dankbar! Wenn ich mich vielleicht irgendwie revanchieren kann lasst es mich wissen.
MfG Tim
Hallo ich hoffe Ihr könnt mir hier helfen.
Ich habe folgende Problem: Im Internet bin ich auf das noki messenger script gestoßen welches ich dringend für ein Projekt in der Ausbildung benötige.
Es funktioniert auch mit dem iexplorer 5.5 und höher allerdings stellte sich ein Kompatibilitätsproblem mit anderen Browsern heraus. (z.B. Netscape etc.)
Ich habe für ein besseres Verständnis das Script mal bei lycos hochgeladen und zum laufen gebracht.
http://members.lycos.co.uk/office2000/login.php
Zum einloggen:
Code:
Benutzername: test
Psswort: test
Es scheint als ob es bei anderen Browsern ein Interpretationsproblem bei dem top.php Script gibt. Ich habe es allerdings nicht gefunden. Daher werde ich es hier einmal posten in der Hoffnung das der eine oder andere mr hierbei helfen kann.
Code:
top.php:
__________________________________________
<?
require("config.php");
require("functions.php");
$db = MYSQL_CONNECT($hostname, $usernamedb, $passworddb);
mysql_select_db($dbName,$db);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<link href="core.css" rel=stylesheet>
<html>
<head>
<title>im_top</title>
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<script>
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("img/Online.gif","img/Away.gif","img/NA.gif","img/Offline.gif","img/msg.gif")
function msg_popup(){
reWin=window.open(theUrl,'im_window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=407,height=186,top=100,left=100')
window.location.reload();
}
// function added to reload top.php after x seconds to help clean the buffer
var t;
function clear_buffer() {
t = setTimeout("window.location.reload()",10000);
}
</script>
</head>
<body onload="clear_buffer" bgproperties="fixed" bgcolor="#E5E5E5" text="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" rightmargin="2" BOTTOMMARGIN="0">
<div id="imTable" width="100%"></div>
<?
// Original Server Push function
// Coded by Blaine Garrett (artattack.to)
// Complete rewrite by myself (Bob Scheff - noki.onslaught.to)
function im_refresh(){
$last_timeout_prevention = 0;
$get_time = time(); // grabs current time
$ping_time = 5; // number of seconds to "ping"
$sleep_time = 3; // sleeps for 3 seconds
if(($get_time - $last_timeout_prevention) > $ping_time)
{
// update time stamp and ping the browser
$last_timeout_prevention = $get_time;
?>
<script>document.all.imTable.innerHTML=<? echo imList(); ?>;</script>
<?
flush(); // flushes buffer
}
flush(); // after first call to function does a flush
sleep($sleep_time); // sleeps for x amount of time
im_refresh();
}
/* First call to im_refresh function */
im_refresh();
### imList function. Grabs users, ims, etc. ######################################################
// content is in js format for server DHTML push
function imList(){
include("timestamp_check.php");
global $db;
global $username;
$im_prefs = mysql_query("SELECT * FROM members_data WHERE username='$username'", $db);
$my_pref_count = 0;
$im_status = mysql_result($im_prefs,$my_pref_count, "im_status");
$im_popup = mysql_result($im_prefs,$my_pref_count, "im_popup");
/* Updates the timestamp to track user activity */
$current_timestamp = date("i");
$update_timestamp = mysql_query("UPDATE members_data SET timestamp='$current_timestamp' WHERE username='$username'", $db);
$content = "";
$content .= "'<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"160\">'+\n";
$content .= "'<td height=\"16\"><font class=\"logo\"><b>'+\n";
$content .= "' <span style=\"height:0px;filter:progid:dximagetransform.microsoft.shadow(color=#FFFFFF,direction=135,strength=1\">IM Status '+\n";
$content .= "'<img src=\"img/$im_status.gif\"></td>'+\n";
$content .= "'</tr>'+\n";
$content .= "'</table>'+\n";
$content .= "'<br>'+\n";
$content .= "'<font class=\"menu\"> <span style=\"height:0px;filter:progid:dximagetransform.microsoft.shadow(color=#FFFFFF,direction=135,strength=1)\"><b>ONLINE</b>'+\n";
$content .= "' <hr align=\"center\" size=\"1\" width=\"99%\" color=\"#BBBBBB\" noshade></span></font>'+\n";
/* Get all online users */
$online_users = mysql_query("SELECT * FROM members_data WHERE im_status !='Offline'", $db);
while($my_online = mysql_fetch_array($online_users)){
if(!(trim($my_online["username"]) == $username)){
$on_im_data = mysql_query("SELECT * FROM im_data WHERE to_user='$username' AND from_user='$my_online[username]' LIMIT 1", $db);
$count_IM = mysql_num_rows($on_im_data);
if(mysql_num_rows($on_im_data) >= "1"){
while($online_im = mysql_fetch_array($on_im_data)){
/* Get total num of IMs to you */
$num_on_msg = mysql_num_rows($on_im_data);
if(mysql_num_rows($on_im_data) != "0"){
$content .= "'<font class=\"fnt1\"> <a href=\"javascript:msg_popup(theUrl=\'receive.php?im_id=$online_im[id]&from_user=$online_im[from_user]\')\">'+\n";
$content .= "'<img src=\"img/msg.gif\" align=\"absmiddle\" border=\"0\" alt=\"Read your IM from $online_im[from_user]!\"> $online_im[from_user]</a> <font class=\"count\"><b>($count_IM)</b></font><br>'+\n"; }
else{
$content .= "'<font class=\"fnt1\"> <a href=\"javascript:msg_popup(theUrl=\'receive.php?im_id=$online_im[id]&from_user=$online_im[from_user]\')\">'+\n";
$content .= "'<img src=\"img/msg.gif\" align=\"absmiddle\" border=\"0\" alt=\"Read your IM from $online_im[from_user]!\"> $online_im[from_user]</a><br>'+\n"; }
/* If set to yes, your incoming message will auto popup */
if($im_popup == "yes"){
$content .= "window.open('receive.php?im_id=$online_im[id]&from_user=$online_im[from_user]','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=407,height=186,top=100,left=100');\n";
} # end of if($im_popup)
} # end of while($online_im)
} # end of mysql_num_rows
else{
$content .= "'<font class=fnt1> <a href=\"javascript:msg_popup(theUrl=\'send.php?from_user=$username&to_user=$my_online[username]\')\">'+\n";
$content .= "'<img src=\"img/$my_online[im_status].gif\" align=\"absmiddle\" border=\"0\" alt=\"Send an IM to $my_online[username]!\"> $my_online[username]</a><br>'+\n";
}
} # end of !trim
} # end of while($my_online)
$content .= "'<br>'+\n";
$content .= "'<font class=menu> <span style=height:0px;filter:progid:dximagetransform.microsoft.shadow(color=#FFFFFF,direction=135,strength=1><b>OFFLINE</b>'+\n";
$content .= "' <hr align=center size=1 width=99% color=#BBBBBB noshade></span></font>'+\n";
/* Get all offline users */
$offline_users = mysql_query("SELECT * FROM members_data WHERE im_status='Offline'", $db);
while($my_offline = mysql_fetch_array($offline_users)){
if(!(trim($my_offline["username"]) == $username)){
$off_im_data = mysql_query("SELECT id,from_user,to_user FROM im_data WHERE to_user='$username' AND from_user='$my_offline[username]' LIMIT 1", $db);
if(mysql_num_rows($off_im_data) >= "1"){
while($offline_im = mysql_fetch_array($off_im_data)){
if(mysql_num_rows($off_im_data) != "0"){
$num_off_msg = mysql_num_rows($off_im_data);
$content .= "'<font class=\"fnt1\"> <a href=\"javascript:msg_popup(theUrl=\'receive.php?im_id=$offline_im[id]&from_user=$offline_im[from_user]\')\">'+\n";
$content .= "'<img src=\"img/msg.gif\" align=\"absmiddle\" border=\"0\" alt=\"Read your Offline IM from $offline_im[from_user]!\"> $offline_im[from_user]</a><br>'+\n"; }
else{
$content .= "'<font class=\"fnt1\"> <a href=\"javascript:msg_popup(theUrl=\'receive.php?im_id=$offline_im[id]&from_user=$offline_im[from_user]\')\">'+\n";
$content .= "'<img src=\"img/msg.gif\" align=\"absmiddle\" border=\"0\" alt=\"Read your Offline IM from $offline_im[from_user]!\"> $offline_im[from_user]</a><br>'+\n"; }
} # end of while($offline_im)
} # end of mysql_num_rows
else{
$content .= "'<font class=\"fnt1\"> <a href=\"javascript:msg_popup(theUrl=\'send.php?from_user=$username&to_user=$my_offline[username]\')\">'+\n";
$content .= "'<img src=\"img/Offline.gif\" align=\"absmiddle\" border=\"0\" alt=\"Send an Offline IM to $my_offline[username]!\"> $my_offline[username]</a><br>'+\n"; }
} # end of !trim
} # end of while($my_offline)
/* last $content used to close js tags */
$content .="''";
return $content;
} # end of im_list function
?>
</body>
</html>
Es ist wirklich dringend und ich bin für jede Hilfe dankbar! Wenn ich mich vielleicht irgendwie revanchieren kann lasst es mich wissen.
MfG Tim
Zuletzt bearbeitet: