以下是initializepage.asp 的源码
<%
Dim SqlLocalName
'数据库地址
Dim SqlUsername
'用户名
Dim SqlPassword
'密码
Dim SqlDatabaseName
'数据库名
Dim ScrStr,Rs,countb,newPP
SqlLocalName = Trim(Request.Form("SqlLocalName"))
SqlUsername = Trim(Request.Form("SqlUsername"))
SqlPassword = Trim(Request.Form("SqlPassword"))
SqlDatabaseName = Trim(Request.Form("SqlDatabaseName"))
If SqlLocalName <> "" And SqlUsername <> "" And SqlPassword <> "" And SqlDatabaseName <> "" Then
Set newPP = Server.CreateObject("LuttClas.SqlLink")
newpp.CodePassWord(SqlLocalName,SqlUsername)=SqlPassword
ScrStr = ScrStr & "<"
ScrStr = ScrStr & "%"&vbcrlf
ScrStr = ScrStr & "Const SqlLocalName = """&newPP.Get_LocalName&"""" & vbcrlf
ScrStr = ScrStr & "Const SqlUsername = """&newPP.Get_Username&"""" & vbcrlf
ScrStr = ScrStr & "Const SqlPassword ="""&newPP.Get_Password&"""" & vbcrlf
ScrStr = ScrStr & "Const SqlDatabaseName = """&SqlDatabaseName&""" "& vbcrlf
ScrStr = ScrStr & "%"
ScrStr = ScrStr & ">"&vbcrlf
Set newPP = Nothing
Call WriteFileA("data/TabName.asp",ScrStr)
End If
Function WriteFileA(fi1,okf)
Dim file1,fout,fso
file1=server.mappath(fi1)
Set fso = Server.CreateObject("Scripting.FileSystemObQian")
Set fout = fso.Createtextfile(file1,true)
fout.writeline okf
fout.close : Set fout = Nothing: Set fso = Nothing
Response.Redirect "InitializePage.asp"
End Function
Function checkqxer(quanxian)
Dim arrayqx,g
arrayqx=split(Session("QX"),",")
for g=0 to ubound(arrayqx)
if quanxian = arrayqx(g) then
checkqxer = true
exit function
else
checkqxer = false
end if
next
End Function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
<!--
.STYLE1 {font-size: x-small}
-->
</style>
</head>
<body bgcolor="#799AE1">
<h5>数据库连接</h5><hr>
<table width="50%" height="167" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#E8E8E8">
<form name="form1" method="post">
<tr height="30">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="5%"> </td>
<td width="34%"><span class="STYLE1">数据库连接地址:</span></td>
<td width="61%">
<input name="SqlLocalName" type="text" value="127.0.0.1">
</td>
</tr>
<tr>
<td> </td>
<td><span class="STYLE1">用户名:</span></td>
<td>
<input name="SqlUsername" type="text" value="sa">
</td>
</tr>
<tr>
<td> </td>
<td><span class="STYLE1">密
码:</span></td>
<td>
<input name="SqlPassword" type="password">
</td>
</tr>
<tr>
<td> </td>
<td><span class="STYLE1">数据库名称:</span></td>
<td>
<input name="SqlDatabaseName" type="text" value="RanUser" readonly>
</td>
</tr>
<tr>
<td height="40" colspan="3" align="center">
<input type="submit" name="Submit" value="提交">
</td>
</tr>
</form>
</table>
</body>
</html>