第五章系統程式內容
此章列表說明 AspDoMySQL 之介面程式及其用途。
表 5.1 介面程式
介面程式名稱 用途 搭配類別 叫用方法
AddData.asp 新增主表紀錄 ImportData OpenForm1
AddData2.asp 新增子表紀錄 ImportData OpenForm2
AddPhoto.asp 新增相簿紀錄 ImportData OpenPhotoForm
AddPickData.asp 挑選紀錄存檔 ExportData addPickData
AspDrawGraphic.exe 繪圖程式 GraphicData DrawGraphic AspSetup.asp 系統設定 系統自動產生 無
BackupTblSQL.asp 備份資料表 ExportData BackupTBL
Calculator.asp 簡易計算機 Utility Calculator
Calender.asp 萬年曆 Utility Calender
ChangePSW.asp 變更密碼介面 ChangePSWSub.asp
ChangePSWSub.asp 密碼處理程式 InterFace ChangePSW
ChkPickData.asp 檢視挑檔紀錄 ExportData CheckData
CopyData.asp 設定拷貝屬性 ImportData SetCopyField
CopyDataSub.asp 拷貝紀錄 ImportData CopyData
DbManager.asp 資料庫功能表 無 無
DelData.asp 刪除紀錄 UpdateData Delete
DelFromTbl.asp 資料表配對刪除 UpdateData DeleteFromTable
DelMailList.asp 刪郵件紀錄 ExportData DeleteMailList
Download.asp 下載檔案 ExportData Download
DrawGraphic.asp 圖示資料 GraphicData DrawGraphic
EasyDoMySQL.html EasyDoMySQL 簡介 無 無
ExecProject.asp 執行 SQL 專案 UpdateData ExecuteProject
ExpoData.asp 匯出紀錄 ExportData Export
GetMailData .asp 產生郵寄資料 ExportData GetMailData
GetQrySQL.asp 設定工作條件 InterFace GetWork1
GetQryWork.asp 提示工作明細 InterFace ShowWork
GetRecord.asp 取出指定序號之紀
錄範例程式
ExportData GetRecord
GetTableMailACC.asp 取得郵寄帳號 ExportData GetMailACC
GetTrnField.asp 取得轉檔設定條件 UpdateData GetTrnField
GetTrnTable.asp 設定轉檔資料表 UpdateData GetTrnTable
1
ImpoData.asp 匯入紀錄 ImportData Import
InvestFix.asp 定期定額分析 Utility InvestByFix
InvestInput.asp 現金流量分析-線上
輸入
Utility InvestByFlowInp
InvestRate.asp 現值終值與年金轉
換
Utility InvestByRate
InvestTable.asp 現金流量分析-資料
表
Utility InvestByFlowTbl
LinkRight.asp ASP 查閱資料-線上
授權
LinkRightSub.asp
LinkRightSub.asp 線上授權處理程式 InterFace LinkRight
Login.asp 登入 LoginSub.asp
LoginSub.asp InterFace Login
Login2.asp 登入轉檔主機 Login2.asp
Logout.asp 登出 Logout.asp
Logout2.asp 登出轉檔主機 Logout2.asp
Main.html 首頁
Menu.asp 主功能表
MenuAdd.asp 新增紀錄功能表
MenuDelete.asp 刪除紀錄功能表
MenuExport.asp 匯出紀錄功能表
MenuGraphic.asp 圖示紀錄功能表
MenuMail.asp 郵件功能表
MenuPhoto.asp 相簿管理功能表
MenuProject.asp 執行專案功能表
MenuShow.asp 查閱紀錄功能表
MenuTransact.asp 轉檔功能表
MenuUpdate.asp 更新紀錄功能表
MenuUtility.asp 公用程式功能表
ModiData.asp 更新紀錄 UpdateData UpdateBySQL
PickData.asp 挑選紀錄 ExportData PickData
PivotData.asp 樞紐分析 ShowData PivotData
PostFile.asp 上傳檔案 UploadFilebyAsp.asp
PostFiledll.asp 上傳檔案-dll Uploadfile.asp
ReadFile.asp 上傳檔案 ReadUploadFile.asp
ReadUploadFile.asp 讀取上傳檔案內容 ReadUploadFile.asp
ReformSQlWhere.asp 重組SQL Interface ReformSQLWhere
ResetHost.asp 重設連線主機 Login.asp
ResetTrnPar.asp 重設轉檔條件 ShowTrnPar.asp
SendMail.asp 傳送郵件 ExportData SendTableMail SendMail
SetColTitle.asp 重設欄位抬頭 Interface
SetColTitle.asp
GetFieldList
SetExpProp.asp 設定匯出條件 ExpoData.asp
SetGraphicProp.asp 設定圖示條件 GraphicData SetGraphicProp
SetImpProp.asp 設定匯入條件 SetImpProp.asp
ImpoData.asp
SetMailField.asp 一般郵件表單 ExportData SetMailField
SetMailForm.asp 提示郵件表單 ExportData
SendMail.asp
GetMailACC
SetMailProp.asp 資料郵件表單 ExportData SetMailProp
SetPageProp.asp 頁面屬性設定 Interface SetPageProp
SetPhotoPath.asp 設定相簿路徑 ImportData SetPhotoPath
SetPivotField.asp 設定樞紐欄位 ShowData SetPivotField
SetQryorder.asp 設定排序條件 InterFace SetOrder
SetQrySQL.asp 設定 SQL 指令 InterFace SetSQL
SetQryWork.asp 提示資料表選單 InterFace ShowTable
SetSumField.asp 設定小計條件 ShowData SetSumField
SetTableMail.asp 製作資料郵件 ExportData GetMailData.asp SendMail.asp
GetKeyValue
setTrnField.asp 設定轉檔條件 UpdateData SetTrnField
SetUpdFld.asp 設定更新條件 UpdateData SetUpdateField
SetUpdSQL.asp 設定更新 SQL UpdateData SetUpdateSQL
SetWkDB.asp 提示資料庫選單 InterFace
SetWkDBsub.asp
GetWKDB
SetWkDBsub.asp 設定工作資料庫 無 無
SetWorkTable.asp 設定工作資料表 InterFace GetWorkTable
ShowAll.asp 顯示全部紀錄 ShowData ShowALL1
ShowBom.asp 提示展開條件 ShowData
ShowBomSub.asp
SetBomField
ShowBomSub.asp BOM 紀錄展開 ShowData DeBOM
ShowCrTblSQL.asp 資料表建表指令 ShowData ShowALL1
ShowDbStatus.asp 資料庫狀態 ShowData ShowALL1
ShowErrMessage.asp 提示錯誤信息 ShowData 取出 Message
showindex.asp 提示索引表 ShowData ShowALL1
ShowKey.asp 設定過濾條件 InterFace SetFilter
ShowMailList.asp 日誌管理 ExportData ShowMailList
ShowMailLog.asp 顯示傳送日誌 ExportData ShowMailLog
ShowPage.asp 逐頁顯示紀錄 ShowData ShowPage
3
ShowPhoto.asp 逐筆顯示相片 ShowData ShowPhoto
ShowRecord.asp 顯示全部紀錄 ShowData ShowALL1
showRelTbl.asp 顯示關聯紀錄 ShowData showOne/
showTwo
ShowRelXY.asp 設定迴歸條件 ShowData
ShowRelXYSub.asp
SetRelXY
ShowRelXYSub.asp 迴歸分析 ShowDat ShowRelXY
ShowRightTbl.asp 顯示權限表紀錄 ShowData ShowALL1
ShowSingle.asp 顯示單全部紀錄 ShowData ShowOne
ShowSqlFld.asp 顯示 SQL 欄位 InterFace ShowField
ShowStruct.asp 顯示資料結構 ShowData ShowALL1
ShowTable.asp 顯示資料表明細 ShowData ShowTblList
ShowTblStruct.asp 顯示資料表介面定 義
Interface ShowTblStru
ShowTrnAll.asp 顯示異動檔紀錄 ShowData ShowTrnALL
ShowTrnPar.asp 顯示轉檔條件 UpdateData ShowTrnPar
showWkStat.asp 顯示工作參數 無 無
StatData.asp 設定統計條件 ShowData SetStaField
statSub.asp 統計分析 ShowData statData
SumData.asp 小計分析 ShowData SumData
TrnDataBySet.asp 資料轉檔 UpdateData TrnDataBySet
upData.asp 更新紀錄 ImportData UpdateRecord
updateByKey.asp 設定更新條件 UpdateData SetUpdateValue
UploadFile.asp 上傳檔案-dll ImportData Upload
UploadFilebyAsp.asp 上傳檔案-Asp ASPFileUpload.file
Web.xml 設定網頁字型
↑H 回目錄
addData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.importData") 'AspObj.GetTblStruSession1
AspObj.openForm1 Set AspObj = Nothing
%>
↑H
5
addData2.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.importData") AspObj.GetTblStruSession2
AspObj.openForm2 Set AspObj = Nothing
%>
↑H
addPhoto.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
If Session("PhotoPath") = Empty then Response.Write "尚未指定相簿目錄!"
Response.End End if
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.importData") AspObj.GetTblStruSession1
AspObj.openPhotoForm
Set AspObj = Nothing
%>
↑H
7
AddPickData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.exportData") AspObj.addPickData
Set AspObj = Nothing
%>
↑H
BackupTblSQL.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("TBL1") = Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR> "
End If
If Session("strSQL") = Empty Then
Response.Write "欠來源資料表! </Center>"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.ExportData") AspObj.TBL1=Session("TBL1")
AspObj.BackupTBL Set AspObj = Nothing
%>
↑H
9
Calculator.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.Utility") AspObj.Calculator
Set ASpObj = Nothing
%>
↑H
Calender.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.Utility") AspObj.Calender
Set ASpObj = Nothing
%>
↑H
11
ChangePSW.asp
<%
Head = "變更密碼表單"
VPswd = Request("VPswd") NPswd = Request("NPswd")
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<body bgcolor="#FFFF99">
<h2 ALIGN="CENTER"><font color="#660033" Size=4> <%=Head%>
</font></h2>
<center>
<form Action="ChangePSWSub.asp" Method="POST" name="form1">
<table BORDER="1" CELLSPACING="0" bordercolordark="#660000"
bordercolorlight="#CC9966" bgcolor="#DDE3DF">
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>新密碼:</font>
</td>
<td><input Type="password" Name="NPswd" Size="12" Value="
<%=NPswd%>"> </td></tr>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>重輸密碼:
</font> </td>
<td><input Type="password" Name="VPswd" Size="12" Value="
<%=VPswd%>"></td></tr>
<Tr><Td ALIGN="RIGHT" bgcolor=lightblue>送出:</Td><Td><input Type
="Submit" Value=" 確 定 " Name="Submit"></Td></Tr>
</table><p>
</form>
</center>
</body>
</html>
↑H
ChangePSWSub.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.InterFace") AspObj.ChangePSW
Set AspObj = Nothing
%>
↑H
13
ChkPickData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.exportData") AspObj.FILT=Session("kstr")
AspObj.CheckData Set AspObj = Nothing
%>
↑H
CopyData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then
Response.Write "欠來源 SQL 指令! </Center>"
Response.End End If
If Session("strSQl2") = Empty Then
Response.Write "<Center> <BR> <BR>"
Response.Write "欠目的 SQL 指令!</Center>"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.importData") AspObj.wkType= Request("flFmt")
AspObj.FILT=Session("kstr") AspObj.setCopyField
Set AspObj = Nothing
%>
↑H
15
CopyDataSub.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.importData")
AspObj.wkType= Request("flFmt") AspObj.FILT=Session("kstr")
AspObj.copyData Set AspObj = Nothing
%>
↑H
DbManager.asp
<%
If Session("User") <>"root" And Session("User") <> "Admin" Then Response.End
End If
Session("strSQL") = Empty Session("strSQL2") = Empty Session("KFL1") = Empty Session("KFL2") = Empty Session("kstr") = Empty Session("OrderBy") = Empty Session("COLNA1") = Empty Session("COLNA2") = Empty Session("WKDB") = "mysql"
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>資料庫管理</title>
<base target="main">
</head>
<body Bgcolor="#D0E391">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td>
<script language="vbscript">
Sub goData()
window.location="menu.asp"
End Sub
</script>
<% If Session("User")<>"" Then %>
<a href="setWkDB.asp"><font color="blue" size="3">資料庫</font>
</a><br>
<a href="showTable.asp"><font color="blue" size="2">資料表明細</font>
</a><br><br>
<a href="showRightTbl.asp?TBL=Host"><font color="blue" size="2">
17
HOST 明細</font></a><br>
<a href="showRightTbl.asp?TBL=Db"><font color="blue" size="2">DB 明 細</font></a><br>
<a href="showRightTbl.asp?TBL=User"><font color="blue" size="2">
USER 明細</font></a><br><br>
<a href="setWorkTable.asp?wkType=1"><font color="blue" size="2">選取 資料表</font></a><br>
<a href="showStruct.asp"><font color="blue" size="2">資料表結構</font>
</a><br>
<a href="showIndex.asp"><font color="blue" size="2">索引表明細</font>
</a><br>
<a href="showCrTblSQL.asp"><font color="blue" size="2">建表 SQL
</font></a><br><br>
<a href="showRecord.asp"><font color="blue" size="2">查閱資料</font>
</a><br><br>
<a href="ShowDbstatus.asp?Work=DbStatus"><font color="blue" size="2">
資料表現狀</font></a><br>
<a href="ShowDbstatus.asp?Work=PcList"><font color="blue" size="2">連 線狀態</font></a><br><br>
<a href="LinkRight.asp?Work=AUTH"<font color="blue" size="2">連線授 權</font></a><br><br>
<a href="LinkRight.asp?Work=DROP"<font color="blue" size="2">連線停 權</font></a><br><br>
<a href="ResetHost.asp"<font color="blue" size="2">重設主機</font>
</a><br><br>
<% End If %>
<input type="button" value="主目錄" onclick="goData">
</td></tr></table></body>
</html>
↑H
DelData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
If InStr(Lcase(Session("strSQL")), " join ") > 0 Then Response.Write "關聯型 SQL 無法執行刪除!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.updateData") AspObj.FILT=Session("kstr")
AspObj.Delete
Set AspObj = Nothing
%>
↑H
19
DelFromTbl.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>
<BR> <BR>"
Response.Write "欠來源 SQL 指令!</Center>"
Response.End End If
If Session("strSQL2") = Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>
<BR> <BR>"
Response.Write "欠目的 SQL 指令!</Center>"
Response.End End If
If InStr(Lcase(Session("strSQL2")), " join ") > 0 Then Response.Write "關聯型 SQL 無法執行刪除!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.UpdateData") AspObj.FILT=Session("kstr")
AspObj.DeleteFromTable Set AspObj = Nothing
%>
↑H
DelMailList.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.exportData") AspObj.FILT=Session("kstr")
AspObj.deleteMailList Set AspObj = Nothing
%>
↑H
21
Download.asp
<%
If Session("PSWD") =Empty Or Session("User") = Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>"
& "沒有權限! </Center>"
Response.End End If
If Session("WKDB") =Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>"
& "尚未選取資料庫! </Center>"
Response.End End If
Dim AspObj
Session("kstr") = Empty
Set AspObj = Server.CreateObject("AspDoMySQL.exportData")
AspObj.DownLoad Set ASpObj = Nothing
%>
↑H
DrawGraphic.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.GraphicData") If AspObj.YField= Empty Then
Response.Write "尚未設定繪圖屬性..."
Response.End
Set ASpObj = Nothing End If
AspObj.DrawGraphic Set ASpObj = Nothing %>
↑H
23
EasyDoMySQL.html
<html>
<head>
<title>EasyDoMySQL On WEB</title>
</head>
<body bgcolor="#FFFF99" text="#000000" link="#006600" vlink=
"#669966" alink="#990000">
<!--msnavigation-->
<table bgcolor="#B6FF99" border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td valign="top" width="24"></td><!--msnavigation--><td valign="top">
<center>
<p></p><p></p><p></p><p></p><p></p>
<p> <font size="5"> EasyDoMySQL On WEB</font></p>
<p><font size="4"> 國立聯合大學 電子工程系</font></p>
<p> <font size="4"> 人工智慧實驗室</font></p>
<p></p><p></p><p></p><p></p><p></p><p></p>
</center>
</td></tr></table></body>
</html>
↑H
ExecProject.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("sqlID") = Empty Or Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.updateData") AspObj.executeProject
Set AspObj = Nothing
%>
↑H
25
ExpoData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
actFld =Request("actFld") keyFld =Request("keyFld") hasFld =Request("hasFld") fldNa =Request("fldNa") pagTTL =Request("pagTTL") ttLine =Request("ttLine") spLine =Request("spLine") svBykey =Request("svBykey") spKVL= Request("spKVL")
Response.Cookies("actFld") = actFld Response.Cookies("keyFld") = keyFld Response.Cookies("hasFld") = hasFld Response.Cookies("fldNa") = fldNa Response.Cookies("pagTTL") = pagTTL Response.Cookies("ttLine") = ttLine Response.Cookies("spLine") = spLine Response.Cookies("svBykey") =svBykey Response.Cookies("spKVL") =spKVL Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.exportData") AspObj.wkType= Request("flFmt")
AspObj.GetTblStruSession1 AspObj.FILT=Session("kstr") AspObj.Export
Set AspObj = Nothing
%>
↑H
GetMailData .asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.ExportData") Session("KSTR") =""
AspObj.FILT= Request("KeyVL")
AspObj.KFL1= Trim(Request("KeyFld")) AspObj.MLFLD= Trim(Request("ActFld") ) AspObj.GetTblStruSession1
AspObj.GetMailData Set AspObj = Nothing
%>
↑H
27
GetQrySQL.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
QueryString = Request.ServerVariables("QUERY_STRING") ParamList = Split( QueryString, "&" )
For I = 0 To UBound(ParamList) Param = Split(ParamList(I), "=") wktp = Left(Param(0), 3)
wid = Mid(Param(0), 4) ' 修改或刪除哪一筆 Next
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.InterFace")
AspObj.WKTYPE= wktp AspObj.SCTYPE= "SQL"
AspObj.SQLID1=wid '傳入選取工作代號 Session("SQLID1") = wid
If wid<>"" Then AspObj.getWork1
If wktp<>"PRJ" And wktp<>"TRN" And wktp<>"BCD" Then AspObj.GetTblStruSession1
Set AspObj = Nothing
If wktp<>"BCD" then Response.Redirect "showWkStat.asp"
%>
↑H
GetQryWork.asp
<%
If Session("PSWD") =Empty Or Session("User") = Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>"
& "沒有權限! </Center>"
Response.End End If
If Session("WKDB") =Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>"
& "尚未選取資料庫! </Center>"
Response.End End If
Dim AspObj
Session("kstr") = Empty
Set AspObj = Server.CreateObject("AspDoMySQL.InterFace") AspObj.WKTP= Request("wkType")
AspObj.showWork Set ASpObj = Nothing
%>
↑H
29
GetRecord.asp
<%
'// 測試取出記錄 '// RS1 : 傳出紀錄集 1 '// RS2 : 傳出紀錄集 2
'// REC1 : 傳出紀錄集 1 紀錄數 '// REC2 : 傳出紀錄集 2 紀錄數
'// GetRecord : 取出主表紀錄方法, 以 RowData 傳出資料串列, 資料間以 Chr(26)間隔
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.ExportData") If Session("WKTP") = "TBL" Then
AspObj.WKTYPE = "TBL"
AspObj.TBL1 = Session("TBL1") Else
AspObj.WKTYPE = "SQL"
End if
AspObj.OpenCon1 AspObj.OpenRs1
Set RS1 = AspObj.RS1 For j=0 To 1
For i=0 To RS1.Fields.Count -1 Response.Write RS1(i) & " "
Next
Response.Write "<BR>"
Rs1.MoveNext Next
Response.Write "Rec No = " & AspObj.REC1
Response.End AspObj.FILT=""
AspObj.CurPage=1 '//傳入紀錄序(第幾筆) AspObj.GetTblStruSession1
AspObj.GetRecord Dim rvl,vl
rvl=AspObj.RowData vl= Split(rvl,Chr(26)) For i=0 To Ubound(vl)
Response.Write vl(i) & "<BR>"
Next
Set AspObj = Nothing
%>
↑H
31
GetTableMailACC.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Set AspObj = Server.CreateObject("AspDoMySQL.ExportData") actFld = Request("actFld")
AspObj.MLGRP = actFld AspObj.getMailACC mlTO = AspObj.MLACC
Response.Redirect "SetTableMail.asp?INI=1&mlTo=" & mlTo Set AspObj = Nothing
%>
↑H
GetTrnField.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.UpdateData") AspObj.getTrnField
Set AspObj = Nothing
%>
↑H
33
GetTrnTable.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("Host2") = "" Then
Response.Write "尚未設定連線二參數!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.UpdateData") AspObj.SQL2= "Show Tables;"
AspObj.WKTYPE = "SQL"
AspObj.getTrnTable Set AspObj = Nothing
%>
↑H
ImpoData.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>
無 SQL 指令!</Center>"
Response.End End If
set fuFile = Server.CreateObject("ASPFileUpload.file") fuFile.Target = "I:\AspDoMySQL\ASpImport\"
fuFile.FileName =Request("file") fuFile.OverWrite = True
fuFile.Upload
Session("srcFile") = fuFile.FileName
set fufile = nothing If Err.number <> 0 Then
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>上 傳失敗!</Center>"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.importData") AspObj.wkType= Session("srcFmt")
AspObj.Import
Set AspObj = Nothing
%>
↑H
35
InvestFix.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.Utility") AspObj.InvestByFix
Set ASpObj = Nothing
%>
↑H
InvestInput.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.Utility") AspObj.InvestByFlowInp
Set ASpObj = Nothing
%>
↑H
37
InvestRate.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.Utility") AspObj.InvestByRate
Set ASpObj = Nothing
%>
↑H
InvestTable.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
If Session("strSQL") = Empty Then Response.Write "無 SQL 指令!"
Response.End End If
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.Utility") AspObj.InvestByFlowTbl
Set ASpObj = Nothing
%>
↑H
39
LinkRight.asp
<%
If Session("User") = Empty Then Response.Write "尚未連線..."
Response.End End If
Work =Request("Work") Head = "連線授權表單"
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<body bgcolor="#FFFF99">
<h2 ALIGN="CENTER"><font color="#660033" Size=4><%=Head%>
</font></h2>
<center>
<form Action="LinkRightSub.asp?wkType=<% =Work%>" Method="POST"
name="form1">
<table BORDER="1" bgcolor="#DDE3DF">
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>連線主機:
</font></td>
<td><input Type="Text" name="Host" Size="30" Value=LocalHost> </td>
</tr>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>資料庫:
</font></td>
<td><input Type="Text" name="WKDB" Size="16"> </td></tr>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>使用者名稱:
</font></td>
<td><input Type="Text" Name="User" Size=12"></td></tr>
<%If Work="AUTH" Then%>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>密碼:</font>
</td>
<td><input Type="password" Name="Pswd" Size="12"></td></tr>
<%End If%>
<Tr><Td ALIGN="RIGHT" bgcolor=lightblue>送出:</Td>
<Td><input Type="Submit" Value=" 確 定 " Name="Submit"></Td></Tr>
</table></form>
</center></body>
</html> ↑H
LinkRightSub.asp
<%
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.InterFace") AspObj.LinkRight
Set AspObj = Nothing
%>
↑H
41
Login.asp
<%
Set fs = CreateObject("Scripting.FileSystemObject") hstr = ""
str = Server.MapPath("/mysql/LinkHost.txt") If fs.FileExists(str) = True Then
Set fso = fs.OpenTextFile(str, 1, False) hstr = fso.Readall
End If fso.Close
Head = "連線登錄表單"
User = Request("User") Pswd = Request("Pswd") Host = Request("host") Driver = Request("Driver") If Host = "" Then Host = hstr If Driver = "" Then Driver ="3.51"
User="root"
Session("Passed") = False Session("kstr") = Empty Session("strSQL") = Empty Session("strSQL2") = Empty Session("sqlID") = Empty Session("sqlID2") = Empty Session("KFL1") = Empty Session("KFL2") = Empty
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<body bgcolor="#FFFF99">
<h2 ALIGN="CENTER"><font color="#660033" Size=4><%=Head%>
</font></h2>
<center>
<form Action="LoginSub.asp" Method="POST" name="form1">
<table BORDER="1" CELLSPACING="0" bordercolordark="#660000"
bordercolorlight="#CC9966" bgcolor="#DDE3DF">
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>主機位址:
</font></td>
<td><input Type="Text" name="Host" Size="30" Value= <%=Host%> </td>
</tr>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>驅動程式:
</font></td>
<td><input Type="Text" name="Driver" Size="30" Value= <%=Driver%>
</td> </tr>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>使用者名稱:
</font></td>
<td><input Type="Text" Name="User" Size="12" Value="<%=User%>">
</td></tr>
<tr><td ALIGN="RIGHT" bgcolor=lightblue><font Size=4>密碼:</font>
</td>
<td><input Type="password" Name="Pswd" Size="12" Value=
"<%=Pswd%>"></td></tr>
<Tr><Td ALIGN="RIGHT" bgcolor=lightblue>送出:</Td><Td><input Type="Submit" Value=" 確 定 " Name="Submit"></Td></Tr>
</table><p></form>
</center>
</body>
</html>
↑H
43
LoginSub.asp
<%
Dim AspObj
Set AspObj = Server.CreateObject("AspDoMySQL.InterFace") AspObj.Login
If AspObj.Right = True then
Session("User") = Request("User") Session("Pswd") = Request("Pswd") Session("Host") = Request("host") Session("Driver") = Request("Driver") set AspObj = Nothing
Response.Redirect "EasyDoMySQL.html"
else
set AspObj = Nothing
Response.Redirect "login.asp"
End if %>
↑H
Logout.asp
<%
Session("Passed") = False Session("User") = Empty Session("Pswd") = Empty Session("Driver") = Empty Session("WKDB") = Empty Session("strSQL") = Empty Session("OrderBy") = Empty Session("strSQL2") = Empty Session("sqlID") = Empty Session("sqlID2") = Empty
Session("ALWAD") = Empty Session("ALWDL") = Empty Session("ALWRD") = Empty Session("ALWUP") = Empty
Session("wKType") = Empty Session("COLNA1") = Empty Session("COLNA2") = Empty Session("TPLFMT") = Empty Session("SCTYPE") = Empty
Session("KFL1") = Empty Session("KFL2") = Empty Session("cKFL1") = Empty Session("cKFL2") =Empty Session("KSTR") = Empty
Session("mlMessage") = Empty Session("TBL1") = Empty Session("tREC") = Empty Session("tPage") = Empty Session("TBL2") = Empty Session("tREC2") = Empty Session("tPage2") = Empty Session("TBLSTRU") = Empty
45
Session("FldTP1") = Empty Session("FldLN1") = Empty Session("FldDFV1") = Empty
Session("TBLSTRU2")= Empty Session("FldTP2") = Empty Session("FldLN2") = Empty Session("FldDFV2") = Empty
Session("PageSize") = Empty
Session("Host2")=Host Session("Driver2")=Driver Session("WDB2")=WDB Session("User2")=User Session("Pswd2")=Pswd
Response.Write "<Center> <BR> <BR> <BR> <BR> <BR> <BR> <BR>" &
" Bye Bye! </Center>"
Response.End
%>
↑H
Main.html
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
<title>EasyDoMySQL On ASP Web</title>
<meta name="Microsoft Theme" content="expeditn 001, default">
<meta name="Microsoft Border" content="tlb, default"></head>
<frameset cols="108,*">
<frame name="contents" target="main" src="menu.asp">
<frame name="main" src="EasyDoMySQL.html">
</frameset>
</html>
↑H
47
Menu.asp
<html>
<head>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>登入</title>
<base target="main">
<meta name="Microsoft Theme" content="expeditn 001, default">
<meta name="Microsoft Border" content="tlb, default"></head>
<body Bgcolor="#D0E391">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
<script language="vbscript">
Sub goHome()
top.location="main.html"
End Sub
Sub goShow()
window.location="menuShow.asp"
End Sub
Sub goExport()
window.location="menuExport.asp"
End Sub
Sub goGraphic()
window.location="menuGraphic.asp"
End Sub
Sub goMail()
window.location="menuMail.asp"
End Sub
Sub goAdd()
window.location="menuAdd.asp"
End Sub
Sub goDelete()
window.location="menuDelete.asp"
End Sub
Sub goUpdate()
window.location="menuUpdate.asp"
End Sub
Sub goTransact()
window.location="menuTransact.asp"
End Sub
Sub goDB()
window.location="dbManager.asp"
End Sub
Sub goUtility()
window.location="menuUtility.asp"
End Sub
Sub goPhoto()
window.location="menuPhoto.asp"
End Sub
</script>
<a href="login.asp">登入</a>
<a href="logout.asp"> <font size="3">登出</font></a><br><br>
<a href="ChangePSW.asp"> <font size="3">修改密碼
</font></a><br><Br>
<input type="button" value="查閱資料" onclick="goShow"><br>
<input type="button" value="新增資料" onclick="goAdd"><br>
<input type="button" value="刪除資料" onclick="goDelete"><br>
<input type="button" value="更新資料" onclick="goUpdate"><br>
<input type="button" value="資料轉檔" onclick="goTransact"><br>
<input type="button" value="匯出資料" onclick="goExport"><br>
<input type="button" value="圖示資料" onclick="goGraphic"><br>
<input type="button" value="郵遞資料" onclick="goMail"><br>
49
<input type="button" value="相簿管理" onclick="goPhoto"><br><br>
<input type="button" value="資料庫" onclick="goDB"><br>
<input type="button" value="公用程式" onclick="goUtility"><br><br>
<input type="button" value="首 頁" onclick="goHome"><br>
</td></tr></table>
</body>
</html>
↑H
MenuAdd.asp
<%
Session("strSQL") = Empty Session("strSQL2") = Empty Session("KFL1") = Empty Session("KFL2") = Empty Session("kstr") = Empty Session("OrderBy") = Empty
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>資料新增</title>
<base target="main">
<body Bgcolor="#D0E391">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
<script language="vbscript">
Sub goHome()
window.location="menu.asp"
End Sub
</script>
<% If Session("User")<>"" Then %>
<font color="#000000" size="3">來源資料</font><br>
<a href="setWkDB.asp"><font color="blue" size="2">資料庫</font>
</a><br>
<a href="getQryWork.asp?wkType=BCD"><font color="blue" size="2">條 碼</font></a><br>
<a href="setWorkTable.asp?wkType=2"><font color="blue" size="2">資料 表</font></a><br>
<a href="getQryWork.asp?wkType=ADD"><font color="blue" size="2">選 取 SQL</font></a><br>
<a href="setColTitle.asp?Set=1"><font color="blue" size="2">欄位抬頭
</font> </a><br>
<a href="setPageprop.asp"><font color="blue" size="2">頁面屬性</font>
</a><br><br>
51
<a href="showSqlFld.asp"><font color="blue" size="2">欄位</font>
</a>
<a href="showWkstat.asp"><font color="blue" size="2">參數</font>
</a><br>
<a href="showTblStruct.asp"><font color="blue" size="2">結構
</font></a><br><br>
<a href="addData.asp"><font color="blue" size="2"> 輸入資料</a><br>
<br> <font color="#000000" size="3">過濾條件</font><br>
<a href="showKey.asp?wkType=Key"><font color="blue" size="2">鍵值
</font></a>
<a href="showKey.asp?wkType=Btw"><font color="blue" size="2">區間
</font></a><br>
<a href="showKey.asp?wkType=Any"><font color="blue" size="2">選擇
</font></a>
<a href="showKey.asp?wkType=Slf"><font color="blue" size="2">自訂
</font></a><br>
<a href="ReformSQLWhere.asp"><font color="red" size="2">重組 SQL</font></a>
<a href="showKey.asp?wkType=Del"><font color="red" font size="2">取消
</font></a><br><br>
<font color="#000000" size="3">查閱資料</font><br>
<a href="showPage.asp"><font color="blue" size="2">逐頁</font></a><br>
<a href="showAll.asp"><font color="blue" size="2">全部</font> </a>
<a href="showRelTbl.asp"><font color="blue" size="2">關聯</font>
</a><br><br>
<a href="copyData.asp"><font color="blue" size="2">複製資料</a><br>
<a href="PostFile.asp"><font color="blue" size="2">上傳資料</a><br>
<a href="ReadFile.asp"><font color="blue" size="2">讀取檔案</a><br>
<br>
<font color="#000000" size="3">匯入資料</font><br>
<a href="setImpProp.asp?srcFmt=TXT"><font color="blue" size="2">
Text</font></a>
<a href="setImpProp.asp?srcFmt=CSV"><font color="blue" size="2">
CSV</font></a><br>
<a href="setImpProp.asp?srcFmt=XML"><font color="blue" size="2">
XML</font></a><br><br>
<% End If %>
<input type="button" value="主 目 錄" onclick="goHome">
</td></tr></table>
</body>
</html>
↑H
53
MenuDelete.asp
%
Session("strSQL") = Empty Session("strSQL2") = Empty Session("KFL1") = Empty Session("KFL2") = Empty Session("kstr") = Empty Session("OrderBy") = Empty
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>刪除紀錄</title>
<base target="main">
</head>
<body Bgcolor="#D0E391">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
<script language="vbscript">
Sub goHome()
window.location="menu.asp"
End Sub
</script>
<% If Session("User")<>"" Then %>
<font color="#000000" size="3">刪除資料</font><br>
<a href="setWkDB.asp"><font color="blue" size="3">資料庫</font></a>
<br>
<a href="getQryWork.asp?wkType=DEL"><font color="blue" size="2">選 取 SQL</font></a><br>
<a href="setQryWork.asp?wkType=DEL"><font color="blue" size="2">自 訂 SQL</a><br><br>
<a href="modiData.asp?wkType=DEL"><font color="red" size="2">刪除 紀錄</font></a><br><br>
<a href="setWorkTable.asp?wkType=2"><font color="blue" size="2">資料 表</font></a><br>
<a href="showSqlFld.asp"><font color="blue" size="2">欄位</font> </a>
<a href="showWkstat.asp"><font color="blue" size="2">參數</font>
</a><br>
<a href="setPageprop.asp"><font color="blue" size="2">頁面</font> </a>
<a href="getQryWork.asp?wkType=BCD"><font color="blue" size="2">條 碼</font></a><br><br>
<a href="delData.asp?wkType=Key&INI=1"><font color="blue" size="2">
鍵值</font></a>
<a href="delData.asp?wkType=Btw&INI=1"><font color="blue" size="2">
區間</font></a><br>
<a href="delData.asp?wkType=Any&INI=1"><font color="blue" size="2">
選擇</font></a>
<a href="delData.asp?wkType=Slf&INI=1"><font color="blue" size="2">
自訂</font></a><br>
<a href="delData.asp?wkType=Rel&INI=1"><font color="blue" size="2">
關聯</font></a>
<a href="delData.asp?wkType=NoMatch&INI=1"><font color="blue"
size="2">失聯</font></a><br>
<a href="delData.asp?wkType=All&INI=1"><font color="red" size="2">
全部</font></a>
<a href="pickData.asp?wkType=DEL"><font color="blue" size="2">挑檔
</font></a><br>
<a href="delFromTbl.asp?wkType=Match"><font color="blue" size="2">
配對</font></a><br><br>
<% End If %>
<input type="button" value="主 目 錄" onclick="goHome">
</td></tr> </table></body>
</html>
↑H
55
MenuExport.asp
<%
Session("strSQL") = Empty Session("strSQL2") = Empty Session("KFL1") = Empty Session("KFL2") = Empty Session("kstr") = Empty Session("OrderBy") = Empty Session("COLNA1") = Empty Session("COLNA2") = Empty
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>資料查閱</title>
<base target="main">
</head>
<body Bgcolor="#D0E391">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
<script language="vbscript">
Sub goHome()
window.location="menu.asp"
End Sub
</script>
<% If Session("User")<>"" Then %>
<font color="#000000" size="3">資料來源</font><br>
<a href="setWkDB.asp"><font color="blue" size="3">資料庫</font>
</a><br>
<a href="setWorkTable.asp?wkType=1"><font color="blue" size="2">資料 表</font></a><br>
<a href="getQryWork.asp?wkType=QRY"><font color="blue" size="2">選 取 SQL</font></a><br><br>
<a href="setPageprop.asp"><font color="blue" size="2">頁面</font></a>
<a href="getQryWork.asp?wkType=BCD"><font color="blue" size="2">條 碼</font></a><br><br>
<a href="setQryWork.asp?wkType=QRY"><font color="blue" size="2">自 訂 SQL</a><br>
<a href="setQryorder.asp?wkType=SET"><font color="blue" size="2">排序
</a>
<a href="setQryorder.asp?wkType=DEL"><font color="red" size="2">取消
</a><br>
<font color="#000000" size="3">過濾條件</font><br>
<a href="showKey.asp?wkType=Key"><font color="blue" size="2">鍵值
</font></a>
<a href="showKey.asp?wkType=Btw"><font color="blue" size="2">區間
</font></a><br>
<a href="showKey.asp?wkType=Any"><font color="blue" size="2">選擇
</font></a>
<a href="showKey.asp?wkType=Slf"><font color="blue" size="2">自訂
</font></a><br>
<a href="ReformSQLWhere.asp"><font color="red" size="2">重組 SQL
</font> </a>
<a href="showKey.asp?wkType=Del"><font color="red" font size="2">取消
</font></a><br><br>
<font color="#000000" size="3">匯出資料</font><br>
<a href="setExpProp.asp?flFmt=TXT"><font color="blue" size="2"> Text
</font></a>
<a href="setExpProp.asp?flFmt=CSV"><font color="blue" size="2"> CSV
</font></a><br>
<a href="setExpProp.asp?flFmt=DOC"><font color="blue" size="2">Word
</font></a>
<a href="setExpProp.asp?flFmt=SQL"><font color="blue" size="2">SQL
</font></a><br>
<a href="setExpProp.asp?flFmt=XML"><font color="blue" size="2">XML
</font></a>
<a href="setExpProp.asp?flFmt=HTM"><font size="2">Html</font>
</a><br>
<a href="setExpProp.asp?flFmt=REC"><font color="blue" size="2">紀錄
</font></a>
<a href="setExpProp.asp?flFmt=RPT"><font color="blue" size="2">報表
</font></a><br>
<a href="pickData.asp?wkType=SHO"><font color="blue" size="2">挑檔
</font></a><br><br>
57
<a href="download.asp"><font color="blue" size="3">下 載</font></a>
<br><br>
<% End If %>
<input type="button" value="主 目 錄" onclick="goHome">
</td></tr></table></body>
</html>
↑H
MenuGraphic.asp
<%
Session("strSQL") = Empty Session("strSQL2") = Empty Session("KFL1") = Empty Session("KFL2") = Empty Session("kstr") = Empty Session("OrderBy") = Empty Session("COLNA1") = Empty Session("COLNA2") = Empty
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>圖示資料</title>
<base target="main">
</head>
<body Bgcolor="#D0E391">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
<script language="vbscript">
Sub goHome()
window.location="menu.asp"
End Sub
</script>
<% If Session("User")<>"" Then %>
<font color="#000000" size="3">資料來源</font><br>
<a href="setWkDB.asp"><font color="blue" size="3">資料庫</font></a>
<br>
<a href="setWorkTable.asp?wkType=1"><font color="blue" size="2">資料 表</font></a><br>
<a href="getQryWork.asp?wkType=QRY"><font color="blue" size="2">選 取 SQL</font></a><br><br>
<a href="setQryWork.asp?wkType=QRY"><font color="blue" size="2">自 訂 SQL</a><br>
<a href="setQryorder.asp?wkType=SET"><font color="blue" size="2">排序
</a>
59