config.asp

来自「完整的网址站」· ASP 代码 · 共 112 行

ASP
112
字号
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../mdb.asp"-->
<%
	dim conn
	dim connstr
	dim startime
        mdb="../"&mdb
	'startime=timer()
	Set conn = Server.CreateObject("ADODB.Connection")
	connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(mdb)
'如果你的服务器采用较老版本Access驱动,请用下面连接方法
'connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(mdb)
	conn.Open connstr

sub CloseConn()
	conn.close
	set conn=nothing
end sub

sql="select * from happywz_CONFIG"
set rs1=conn.execute(sql)
webemail=rs1("email")
webtitle=rs1("title")
webname=rs1("name")
webgao=rs1("gao")
weburl=rs1("url")
webupopen=rs1("upopen")
weblogo=rs1("logo")
weblogo2=rs1("logo2")
webkeywords=rs1("keywords")
webdescription=rs1("description")
webcopyright=rs1("copyright")
webxs20gg=rs1("xs20gg")
webv=rs1("v")
webstat=webcopyright+"<br><a href='http://www.happywz.com'>PowerBy: 开心网址 版本:V4.1 生成Html版</a>"
rs1.close
set rs1=nothing
sub diserror()%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=weburl%>/inc/style.css" type="text/css">
</head>
<body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"><p>&nbsp;</p><table width="300" height=180  cellspacing="0" cellpadding="0" align="center" class=td1111>
  <tr> 
    <td align="center"  class=main_title height=30 style="font-size:14px; color:#ff0000;"><b>系 统 错 误 提 示</b></td>
  </tr>
  <tr> 
    <td align="center" bgcolor="#FFFFFF" height=100><%=errmsg%></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF" height=40 class="chinese"><input type="button" name="close2" value="返  回"  onClick="javascript:history.go(-1)" class="button">  <input type="button" name="close2" value="关  闭"  onClick="window.close();return false;" class="button"></td>
  </tr>
</table>
</body>
<%end sub%>
<%sub disok()%>
<HTML>
<HEAD>
<TITLE>系 统 提 示</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=weburl%>/inc/style.css" type="text/css">
</head>
<body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"><p>&nbsp;</p><table width="300" height=180  cellspacing="0" cellpadding="0" align="center" class=td1111>
  <tr> 
    <td align="center"  class=main_title height=30 style="font-size:14px; color:#ff0000;"><b>系 统 提 示</b></td>
  </tr>
  <tr> 
    <td align="center" bgcolor="#FFFFFF" height=100><%=errmsg%></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF" height=40 class="chinese"><input type="button" name="close2" value="返  回"  onClick="javascript:history.go(-1)" class="button">  <input type="button" name="close2" value="关  闭"  onClick="window.close();return false;" class="button"></td>
  </tr>
</table>
</body>
<%end sub
function htmlencode2(str)
    dim result
    dim l
    if isNULL(str) then 
       htmlencode2=""
       exit function
    end if
    l=len(str)
    result=""
	dim i
	for i = 1 to l
	    select case mid(str,i,1)
              case chr(13)
	                result=result+"<br>"
	           case chr(34)
	                result=result+"&quot;"
              case chr(32)	           
	                'result=result+"&nbsp;"
	                if i+1<=l and i-1>0 then
	                   if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9)  then	                      
	                      result=result+"&nbsp;"
	                   else
	                      result=result+" "
	                   end if
	                else
	                   result=result+"&nbsp;"	                    
	                end if
	           case chr(9)
	                result=result+"    "
	           case else
	                result=result+mid(str,i,1)
         end select
       next 
       htmlencode2=result
   end function
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?