php. mysql论坛代码_BBS(php & mysql)完整版(五)

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

更新时间:2006年10月09日 00:00:00   作者:

//下面为menu_comment.js

function fwLoadMenus() {

if (window.fw_menu_0) return;

window.fw_menu_0 = new Menu("root",92,20,"Verdana, Arial, Helvetica, sans-serif",12,"#6666ff","#ffffff","#FF9999","#6666ff");

fw_menu_0.addMenuItem("Javascript","window.open('left.php', '_self');");

fw_menu_0.addMenuItem("Css快速入门","window.open('left.php', '_self');");

fw_menu_0.addMenuItem("JS在线资源","window.open('left.php', '_self');");

fw_menu_0.addMenuItem("相关论坛","window.open('php3.php?part=4&&p=1', '_self');");

fw_menu_0.fontWeight="solid";

fw_menu_0.hideOnMouseOut=true;

window.fw_menu_1 = new Menu("root",92,20,"Verdana, Arial, Helvetica, sans-serif",12,"#6666ff","#ffffff","#FF9999","#6666ff");

fw_menu_1.addMenuItem("Dreamwaver","window.open('left.php', '_self');");

fw_menu_1.addMenuItem("Firework","window.open('left.php', '_self');");

fw_menu_1.addMenuItem("Flash入门","window.open('left.php', '_self');");

fw_menu_1.addMenuItem("Html教程","window.open('left.php', '_self');");

fw_menu_1.addMenuItem("相关论坛","window.open('php3.php?part=3&&p=1', '_self');");

fw_menu_1.fontWeight="solid";

fw_menu_1.hideOnMouseOut=true;

window.fw_menu_2 = new Menu("root",86,20,"Verdana, Arial, Helvetica, sans-serif",12,"#6666ff","#ffffff","#FF9999","#6666ff");

fw_menu_2.addMenuItem("Mysql介绍","window.open('mysql1.php', '_self');");

fw_menu_2.addMenuItem("在线下载","window.open('mysql2.php', '_self');");

fw_menu_2.addMenuItem("学习教程","window.open('mysql4a.php', '_self');");

fw_menu_2.addMenuItem("Mysql论坛","window.open('php3.php?part=2&&p=1', '_self');");

fw_menu_2.fontWeight="solid";

fw_menu_2.hideOnMouseOut=true;

window.fw_menu_3 = new Menu("root",76,20,"Verdana, Arial, Helvetica, sans-serif",12,"#6666ff","#ffffff","#FF9999","#6666ff");

fw_menu_3.addMenuItem("安装配置","window.open('php1.php?id1=1&&id2=1', '_self');");

fw_menu_3.addMenuItem("程序代码","window.open('php2.php?id1=2&&id2=1', '_self');");

fw_menu_3.addMenuItem("学习教程","window.open('php4.php?id1=4&&id2=1', '_self');");

fw_menu_3.addMenuItem("PHP论坛","window.open('php3.php?part=1&&p=1', '_self');");

fw_menu_3.fontWeight="solid";

fw_menu_3.hideOnMouseOut=true;

fw_menu_3.writeMenus();

} // fwLoadMenus()

//下面是fw_menu.js

function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh) {

this.version = "990702 [Menu; menu.js]";

this.type = "Menu";

this.menuWidth = mw;

this.menuItemHeight = mh;

this.fontSize = fs||12;

this.fontWeight = "plain";

this.fontFamily = fnt||"arial,helvetica,verdana,sans-serif";

this.fontColor = fclr||"#000000";

this.fontColorHilite = fhclr||"#ffffff";

this.bgColor = "#555555";

this.menuBorder = 1;

this.menuItemBorder = 1;

this.menuItemBgColor = bg||"#cccccc";

this.menuLiteBgColor = "#ffffff";

this.menuBorderBgColor = "#777777";

this.menuHiliteBgColor = bgh||"#000084";

this.menuContainerBgColor = "#cccccc";

this.childMenuIcon = "arrows.gif";

this.items = new Array();

this.actions = new Array();

this.childMenus = new Array();

this.hideOnMouseOut = true;

this.addMenuItem = addMenuItem;

this.addMenuSeparator = addMenuSeparator;

this.writeMenus = writeMenus;

this.FW_showMenu = FW_showMenu;

this.onMenuItemOver = onMenuItemOver;

this.onMenuItemAction = onMenuItemAction;

this.hideMenu = hideMenu;

this.hideChildMenu = hideChildMenu;

if (!window.menus) window.menus = new Array();

this.label = label || "menuLabel" + window.menus.length;

window.menus[this.label] = this;

window.menus[window.menus.length] = this;

if (!window.activeMenus) window.activeMenus = new Array();

}

function addMenuItem(label, action) {

this.items[this.items.length] = label;

this.actions[this.actions.length] = action;

}

function addMenuSeparator() {

this.items[this.items.length] = "separator";

this.actions[this.actions.length] = "";

this.menuItemBorder = 0;

}

// For NS6.

function FIND(item) {

if (document.all) return(document.all[item]);

if (document.getElementById) return(document.getElementById(item));

return(false);

}

function writeMenus(container) {

if (window.triedToWriteMenus) return;

if (!container && document.layers) {

window.delayWriteMenus = this.writeMenus;

var timer = setTimeout('delayWriteMenus()', 250);

container = new Layer(100);

clearTimeout(timer);

} else if (document.all || document.hasChildNodes) {

document.writeln('');

container = FIND("menuContainer");

}

window.fwHideMenuTimer = null;

if (!container) return;

window.triedToWriteMenus = true;

container.isContainer = true;

container.menus = new Array();

for (var i=0; i

container.menus[i] = window.menus[i];

window.menus.length = 0;

var countMenus = 0;

var countItems = 0;

var top = 0;

var content = '';

var lrs = false;

var theStat = "";

var tsc = 0;

if (document.layers) lrs = true;

for (var i=0; i

var menu = container.menus[i];

if (menu.bgImageUp) {

menu.menuBorder = 0;

menu.menuItemBorder = 0;

}

if (lrs) {

var menuLayer = new Layer(100, container);

var lite = new Layer(100, menuLayer);

lite.top = menu.menuBorder;

lite.left = menu.menuBorder;

var body = new Layer(100, lite);

body.top = menu.menuBorder;

body.left = menu.menuBorder;

} else {

content += ''+

'

n'+

'  

n'+

'     

n'+

'';

}

var x=i;

for (var i=0; i

var item = menu.items[i];

var childMenu = false;

var defaultHeight = menu.fontSize+6;

var defaultIndent = menu.fontSize;

if (item.label) {

item = item.label;

childMenu = true;

}

menu.menuItemHeight = menu.menuItemHeight || defaultHeight;

menu.menuItemIndent = menu.menuItemIndent || defaultIndent;

var itemProps = 'font-family:' + menu.fontFamily +';font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + ';';

if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';

if (document.all)

itemProps += 'font-size:' + menu.fontSize + ';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);';

else if (!document.layers) {

itemProps += 'font-size:' + menu.fontSize + 'px;'; // zilla wants 12px.

}

var l;

if (lrs) {

l = new Layer(800,body);

}

var dTag    = '

';

var dClose = '

'

if (menu.bgImageUp) {

menu.menuBorder = 0;

menu.menuItemBorder = 0;

dTag    = '

';

if (document.layers) {

dTag = '';

dClose = '';

}

}

var textProps = 'position:absolute;left:' + menu.menuItemIndent + ';top:1;';

if (lrs) {

textProps +=itemProps;

dTag = "";

dClose = "";

}

var dText    = '

'+ item +'&nbsp
n
'+ item +'&nbsp
';

if (item == "separator") {

content += ( dTag + '

} else if (childMenu) {

content += ( dTag + dText + '

'+%20menu.childMenuIcon%20+'
n' + dClose);

} else {

content += ( dTag + dText + dClose);

}

if (lrs) {

l.document.open("text/html");

l.document.writeln(content);

l.document.close();

content = '';

theStat += "-";

tsc++;

if (tsc > 50) {

tsc = 0;

theStat = "";

}

status = theStat;

}

countItems++;

}

if (lrs) {

// focus layer

var focusItem = new Layer(100, body);

focusItem.visiblity="hidden";

focusItem.document.open("text/html");

focusItem.document.writeln(" ");

focusItem.document.close();

} else {

content += '      

content += '   

n  
n
n';

}

i=x;

}

if (document.layers) {

container.clip.width = window.innerWidth;

container.clip.height = window.innerHeight;

container.onmouseout = mouseoutMenu;

container.menuContainerBgColor = this.menuContainerBgColor;

for (var i=0; i

proto = container.menus[i];

var menu = container.document.layers[i];

container.menus[i].menuLayer = menu;

container.menus[i].menuLayer.Menu = container.menus[i];

container.menus[i].menuLayer.Menu.container = container;

var body = menu.document.layers[0].document.layers[0];

body.clip.width = proto.menuWidth || body.clip.width;

body.clip.height = proto.menuHeight || body.clip.height;

for (var n=0; n

var l = body.document.layers[n];

l.Menu = container.menus[i];

l.menuHiliteBgColor = proto.menuHiliteBgColor;

l.document.bgColor = proto.menuItemBgColor;

l.saveColor = proto.menuItemBgColor;

l.onmouseover = proto.onMenuItemOver;

l.onclick = proto.onMenuItemAction;

l.action = container.menus[i].actions[n];

l.focusItem = body.document.layers[body.document.layers.length-1];

l.clip.width = proto.menuWidth || body.clip.width + proto.menuItemIndent;

l.clip.height = proto.menuItemHeight || l.clip.height;

if (n>0) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder;

l.hilite = l.document.layers[1];

if (proto.bgImageUp) l.background.src = proto.bgImageUp;

l.document.layers[1].isHilite = true;

if (l.document.layers[0].id.indexOf("menuSeparator") != -1) {

l.hilite = null;

l.clip.height -= l.clip.height / 2;

l.document.layers[0].document.bgColor = proto.bgColor;

l.document.layers[0].clip.width = l.clip.width -2;

l.document.layers[0].clip.height = 1;

l.document.layers[1].document.bgColor = proto.menuLiteBgColor;

l.document.layers[1].clip.width = l.clip.width -2;

l.document.layers[1].clip.height = 1;

l.document.layers[1].top = l.document.layers[0].top + 1;

} else if (l.document.layers.length > 2) {

l.childMenu = container.menus[i].items[n].menuLayer;

l.document.layers[2].left = l.clip.width -13;

l.document.layers[2].top = (l.clip.height / 2) -4;

l.document.layers[2].clip.left += 3;

l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;

}

}

body.document.bgColor = proto.bgColor;

body.clip.width  = l.clip.width +proto.menuBorder;

body.clip.height = l.top + l.clip.height

相关文章

1a1b05c64693fbf380aa1344a7812747.png

声明类成员或方法为static,就可以不实例化类而直接访问。不能通过一个对象来访问其中的静态成员(静态方法除外)。2010-06-06

4f55910a645b073bc4fc65dc10dc14bd.png

php中的变量作用范围的另一个重要特性就是静态变量(static 变量)。静态变量仅在局部函数域中存在且只被初始化一次,当程序执行离开此作用域时,其值不会消失,会使用上次执行的结果。2010-06-06

0ea3c7666119d5615e582f823fb3fad6.png

preg_filter()等价于preg_replace() 除了它仅仅返回(可能经过转化)与目标匹配的结果. 这个函数怎样工作的更详细信息请阅读 preg_replace()文档2012-02-02

4f96a78db829b1556ff16de21e013c7a.png

[FAQ]PHP中的一些常识:类篇...2006-10-10

8cc1031babc6aff2319f1c6af8544aa0.png

PHP中有着丰富的函数,MD5加密函数就是其中之一。2008-06-06

0c932a99bb7b6f23c937db507070cc7b.png

第4章 数据处理-php字符串的处理-郑阿奇(续) ,学习php的朋友可以参考下。2011-07-07

cca732bf65a93ed2ec0ac80c638460fe.png

下面是分页示例程序,看起来可能比较繁琐,但其实你只要用一下就会发现,一切原来如此简单2006-10-10

2d9f31f2af7b675a3d153d2b7f1035a7.png

进入2011年的暑假,已经要大三了,也该点更深刻的东西了。综合各方面的因素,决定还是先学习学习php,等有所掌获之后在去了解其他方面的东西。2011-07-07

b452cee8ec5cd9e58ab98eba17281e59.png

教你如何把一篇文章按要求分段...2006-10-10

f4838ec7e2d4da28e0b57d4e852dadd4.png

如何使用PHP获取网络上文件...2006-10-10

最新评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值