欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

BBS(php & mysql)完整版(七)

程序员文章站 2022-08-11 15:38:20
//下面是  top.js      function kb_keepitinie(then...
//下面是  top.js      

function kb_keepitinie(thename,thewanttop,thewantleft) {
therealtop=parseint(document.body.scrolltop)
thetruetop=thewanttop+therealtop
document.all[thename].style.top=thetruetop
therealleft=parseint(document.body.scrollleft)
thetrueleft=thewantleft+therealleft
document.all[thename].style.left=thetrueleft
}
function kb_keepitinnn(thename,thewantx,thewanty) {
thereallay=document.layers[thename]
thebadx=self.pageyoffset
thebady=self.pagexoffset
therealx=thebadx+thewantx
therealy=thebady+thewanty
thereallay.moveto(therealy,therealx)
}
ie4=(document.all)?1:0
nn4=(document.layers)?1:0

//if (ie4)
//setinterval('kb_keepitinie("kbstatic",0,0)',1)
//if (nn4)
//setinterval('kb_keepitinnn("kbstatic",0,0)',1)


//下面是menu.php

<div id="layer1" style="position:absolute; left:31px; top:1px; width:560px; height:46px; z-index:5">
<script language="javascript1.2">fwloadmenus();
</script></div>


<script language="javascript">
<!--
if (ie4)
setinterval('kb_keepitinie("layer1",0,31)',1)
if (nn4)
setinterval('kb_keepitinnn("layer1",0,31)',1)
//-->
</script>

//下面是 menuhead.php
<?
echo "<script language=javascript1.2 src='js/menu_comment.js'></script><script language=javascript1.2 src='js/fw_menu.js'></script><script language=javascript1.2 src='js/top.js'></script>";
?>


//下面为mysql.inc

<?
$link=mysql_pconnect("localhost","xiaoyang","xiaoyang")or die(mysql_error());
$link1=mysql_select_db("database")or die(mysql_error());



?>