Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

help me (avatar chat)

countdown innerHTML

  • Please log in to reply
No replies to this topic

#1 dxd

dxd

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 24 May 2011 - 04:00 AM

I am working on a avatar chat but when you log in it just becomes white

demo Demonet (its on danish)

plizz help

the code to chat.php the error is there i think
include("ban-system/checkban.php");

if(!$frame) {

?>

<title>Chatten</title>

<script language="javascript"> 
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 1;
if(isNS) 
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 0;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;


<frameset rows="0%,100%" framespacing="0" border="0" frameborder="0">
  <frame src="sider.php?side=frame">
  <frame src="chat.php?frame=true" scrolling="no">
</frameset><noframes></noframes>


<?

exit;

}

session_start();

if(!$username) {

print "

<script>

alert('Ingen data af bruger fundet. Prøv at logge på igen. Hvis det fortsætter, kontakt admin.');

window.top.close();

</script>

";

exit;

}

include("../sql.php");

$select_info = mysql_query("SELECT onlinechat,figur,toj1,toj2,toj3,toj4,rum,vaerelse,felt,namecolor FROM users WHERE username = '$username'");

$row_info = mysql_fetch_array($select_info);

if($row_info[onlinechat]=="0") {

$select_info2 = mysql_query("SELECT id FROM rum WHERE(owner='$username')");

if(mysql_num_rows($select_info2)>0) {

$row_info2 = mysql_fetch_array($select_info2);

$rum=$row_info2[id];

} else {

$rum=1;

}

?>

<html>

<head>

<meta name="Generator" content="Stone's WebWriter 4">

<link rel="stylesheet" href="chat.css">

</head>

<body onLoad="myaction.document.location = 'sider.php?side=skiftrum&rum=<?=$rum?>';" topmargin=0 leftmargin=0 oncontextmenu="return false" ondragstart="return false" onselectstart="return false">

<iframe id="myaction" name="myaction" class="float" style="visibility:hidden"></iframe>

<table id="loading" class="float" style="background-color:black;z-index:1;height:100%;width:100%;font-size:30;font-weight:bold;text-align:center;vertical-align:middle">

<tr>

<td id="loadingbox">

Opretter forbindelse til serveren.<br>

Et øjeblik.

</td>

</tr>

</table>

</body>

</html>

<?

exit;

} else {

$rum=$row_info[rum];

}

$select_rum = mysql_query("SELECT id,background,navn,vaerelser FROM rum WHERE(id='$rum')");

$row_rum = mysql_fetch_array($select_rum);

$select_id = mysql_query("SELECT id FROM chat ORDER BY id DESC LIMIT 1");

$row_id = mysql_fetch_array($select_id);

$vaerelser[] = "Stue";

$vaerelser[] = "WC";

$vaerelser[] = "Køkken";

$vaerelser[] = "Soveværelse";

if($row_info[vaerelse]) {

$row_rum[background] = strtolower($vaerelser[$row_info[vaerelse]]);

$row_rum[navn] = $vaerelser[$row_info[vaerelse]];

}

mysql_query("UPDATE users SET startfrom='$row_id[id]' WHERE(username='$username')");

?>

<html>

<head>

<link rel="stylesheet" href="chat.css">

<script>

<?

include("jscript.php");

?>

</script>

</head>

<body topmargin="0" leftmargin="0" onLoad="document.all['loadbar'].width='60%';init();load.location='load.php?action=init';countdown();move('<?=$row_info[felt]?>');" background="../grafik/design/framepic.gif" ondblclick="return false;" onselectstart="return false">

<table id="loading" class="float" style="background-color:black;z-index:1;height:40;width:60;font-size:30;font-weight:bold;text-align:center;vertical-align:middle;bottom:0;">

<tr>

<td id="loadingbox">Henter data...<br>

<table cellspacing="0" cellpadding="0" style="border-style:solid;border-width:1;border-color:white;width:100">

<tr>

<td width="20%" id="loadbar" bgcolor="white"> </td>

<td> </td>

</tr>

</table>

</td>

</tr>

</table>

<span id="rumbg" class="float" style="top:21;left:4;width:500;height:350;background-image:url('..grafik\bg<?=$row_rum[background]?>.jpg')">

<span id="kasse" class="float" style="filter:alpha(opacity=50);width:60;height:70;top:999;left:999"><img src="../gfx/chat/mark.gif"></span>

<span id="rumitems" class="float" style="width:480;height:100%"></span>

<span id="rumusers" class="float" style="width:200;height:100%">

<span id="you" class="float" style="width:60;height:70">

<img class="float" src="../grafik/figurer/root/<?=$row_info[figur]?>.gif"><img class="float" src="../grafik/figurer<?=$row_info[toj1]?>.gif"><img class="float" src="../grafik/figurer<?=$row_info[toj3]?>.gif"><img class="float" src="../grafik/figurer<?=$row_info[toj2]?>.gif"><img class="float" src="../grafik/figurer<?=$row_info[toj4]?>.gif"><span class="names" style="color:<?=$row_info[namecolor]?>;"><?=$username?></span>

<span id="bubble<?=$username?>" class="bubble"><table cellspacing="0" cellpadding="0"><tr><td><img src="../grafik/tale/top_left.gif"></td><td style="background-color:white;border-width:0;border-top-width:1;border-color:black;border-style:solid;font-size:1"> </td><td><img src="../grafik/tale/top_right.gif"></td></tr><tr><td background="../grafik/tale/left.gif" style="font-size:1"> </td><td id="bubbleb<?=$username?>" style="color:black;background-color:white"></td><td background="../grafik/tale/right.gif"> </td></tr><tr><td valign="top"><img src="../grafik/tale/bottom_left.gif"></td><td background="../grafik/tale/bottom.gif" style="font-size:1"> </td><td><img src="../grafik/tale/bottom_right.gif"></td></tr></table></span>

</span>

</span>

<span id="rightpage" class="float" style="top:0;left:504;width:274;height:350;">

<iframe src ="sider.php?side=main" width=274 height=350 frameborder="0" name="rightpage">

</iframe>

</span>

<span id="rumnavn" style="top:0;position:absolute;width:100%;text-align:left;font-weight:bold;color:00FF00;filter:glow(color='green',strength='5')">         <?=$row_rum[navn]?> [<?=$row_rum[id]?>]</span>

<script>document.all['loadbar'].width='40%';</script>

<?

$x=0;

$y=0;

for($i=1;$i<=72;$i++) {

$select_felt = mysql_query("SELECT id,type,value FROM felter WHERE(rum='$row_rum[id]' && felt='$i')");

$row_felt = mysql_fetch_array($select_felt);

print "<img id=\"felt$i\" src=\"../gfx/chat/.gif\" class=\"float\" style=\"width:60;height:35;top:$y;left:".($x+10)."\""; if($row_felt[type]=="") { print " onmousedown=\"move('$i',".(10+$x).",$y)\""; } elseif($row_felt[type]=="javascript") { print " onclick=\"$row_felt[value]\""; } print " onmouseover=\"kasse('".(10+$x)."','$y')\">\n";

if($i%8==0) {$y+=35;

$x=-60;

}

$x+=60;

}

?>

<img id="felt99" src="../gfx/chat/.gif" class="float" style="left:500;top:500";>

<span id="itemsbox" class="float" style="width:80;filter:alpha(opacity=50);visibility:hidden;z-index:2">

<table align="center" cellspacing="0" cellpadding="0" width="100%" height="100%">

<tr>

<td height="1"><img src="../gfx/chat/box_top_left.gif"></td>

<td background="../gfx/chat/box_top.gif">

<span id="itemsboxtitle" onMouseDown="drags()" onMouseUp="dragapproved=false" style="padding-top:1;font-weight:bold;color:white;width:55;"></span>

<span style="color:white;text-align:right;width:15"><a onClick="document.all['itemsbox'].style.visibility='hidden'"><b>X</b></a></span>

</td>

<td><img src="../gfx/chat/box_top_right.gif"></td>

</tr>

<tr>

<td background="../gfx/chat/box_left.gif">

<td bgcolor="black"><span id="itemsboxtekst" style="color:white;height:100%;width:100%;text-align:center;"></span></td>

<td background="../gfx/chat/box_right.gif">

</tr>

<tr>

<td height="1"><img src="../gfx/chat/box_bottom_left.gif"></td>

<td background="../gfx/chat/box_bottom.gif"></td>

<td><img src="../gfx/chat/box_bottom_right.gif"></td>

</tr>

</table>

</span>

<span id="box" class="float" style="top:25;left:25;height:300;width:450;filter:alpha(opacity=50);visibility:hidden;z-index:2;bgcolor:black">

<table align="center" cellspacing="0" cellpadding="0" width="100%" height="100%">

<tr>

<td height="1"><img src="../gfx/chat/box_top_left.gif"></td>

<td background="../gfx/chat/box_top.gif">

<span id="boxtitle" style="padding-top:1;font-weight:bold;color:white;width:430;"></span>

<span style="color:white;text-align:right;width:10"><a onClick="document.all['box'].style.visibility='hidden'"><b>X</b></a></span>

</td>

<td><img src="../gfx/chat/box_top_right.gif"></td>

</tr>

<tr>

<td background="../gfx/chat/box_left.gif"></td>

<td bgcolor="black"><span id="boxtekst" style="color:white;height:282;width:100%;overflow:auto"></span></td>

<td background="../gfx/chat/box_right.gif"></td>

</tr>

<tr>

<td height="1"><img src="../gfx/chat/box_bottom_left.gif"></td>

<td background="../gfx/chat/box_bottom.gif"></td>

<td><img src="../gfx/chat/box_bottom_right.gif"></td>

</tr>

</table>

</span>

<?

if($row_rum[vaerelser]>($row_info[vaerelse]+1)) {

print "<span class=\"float\" style=\"z-index:2;right:5;top:5\"><a onclick=\"skiftrum($rum,($row_info[vaerelse]+1))\"><img alt=\"".$vaerelser[($row_info[vaerelse]+1)]."\" src=\"../gfx/chat/arrow_right.gif\"></a></span>";

}

if($row_info[vaerelse]!=0) {

print "<span class=\"float\" style=\"z-index:2;left:5;top:5\"><a onclick=\"skiftrum($rum,($row_info[vaerelse]-1))\"><img alt=\"".$vaerelser[($row_info[vaerelse]-1)]."\" src=\"../gfx/chat/arrow_left.gif\"></a></span>";

}

?>

<span id="discon" class="float" style="width:100%;text-align:center;green:red;font-size:18;font-weight:bold;visibility:hidden">Forbindelse afbrudt!<br><font size=1>Kontakt venligst en adminstrator!</span>

</span>

<span class="float" id="marquee" style="top:4;left:3;color:white;width:778"><link rel=\"stylesheet\" href=\"../css.css\"><a href="sider.php?side=main" target="rightpage">Forside</a> - <a href="sider.php?side=rumliste" target="rightpage">Navigator</a> - <a href="sider.php?side=listitems" target="rightpage">Hånd</a> - <a href="sider.php?side=friends" target="rightpage">Venner</a> - <a href="sider.php?side=onlinebrugere" target="rightpage">Brugere online</a> - <a href="sider.php?side=soeg" target="rightpage">Søg</a> - <a href="../post.php" target="rightpage">Post</a> - <a href="sider.php?side=funktioner" target="rightpage">Funktioner</a> - <a href="sider.php?side=indstillinger" target="rightpage">Indstillinger</a> - <a href="sider.php?side=guide" target="rightpage">Guide</a> - <a onClick="window.top.close();">Log af</a><? $select_auth = mysql_query("SELECT status FROM users WHERE(username='$username')");

$row_auth = mysql_fetch_array($select_auth); if($row_auth[status] == "admin"){ ?> - <a href="../admin.php" target="rightpage">Admin</a><? } ?> <a onClick="window.location.reload()"><img src="../gfx/btns/opdater_lilleknap.gif" border="0" class="float"></a></span>

<span class="float" style="overflow:auto;left:770;top:383"><a onClick="document.all['tekstbox'].innerHTML = ''">#</a></span>

<span id="tekstbox" class="float" style="overflow:auto;left:3;top:394;width:780;height:40">

</span>

<span id="status1" class="float" style="top:375;left:9999;width:166;text-align:center"></span>

<span id="status2" class="float" style="top:375;left:9999;width:160;filter:alpha(opacity=0)"></span>

<span id="countdown" class="float" style="bottom:5;left:5000;" align="right">Loading</span>

<span class="float" style="top:374;left:3">

<script>

function clearText(thefield){

if (thefield.defaultValue==thefield.value) thefield.value = ""

} 

</script>  

<form name="beskedform" action="sider.php" target="myaction"><input type="hidden" name="side" value="send"><input name="mes" value="Skriv din besked her og tryk enter!" maxlength="100" style="border:1 solid white;background-color:transparent;width:760px;color:white;text-align:center" onFocus="clearText(this)" autocomplete="off"></span>

<iframe id="myaction" name="myaction" class="float" style="visibility:hidden">

<iframe id="load" class="float" style="visibility:hidden">

</body>

</html>

Edited by WingedPanther, 24 May 2011 - 04:41 AM.
add code tags (the # button)

  • 0





Also tagged with one or more of these keywords: countdown, innerHTML

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download