<%@LANGUAGE="VBSCRIPT"%> <%@LANGUAGE="VBSCRIPT"%> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Insert Record: set variables If (CStr(Request("MM_insert")) = "form1") Then MM_editConnection = MM_website_STRING MM_editTable = "epaper" MM_editRedirectUrl = "" MM_fieldsStr = "epaperName|value|epaperEmail|value" MM_columnsStr = "epaperName|',none,''|epaperEmail|',none,''" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Insert Record: construct a sql insert statement and execute it Dim MM_tableValues Dim MM_dbValues If (CStr(Request("MM_insert")) <> "") Then ' create the sql insert statement MM_tableValues = "" MM_dbValues = "" For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End If MM_tableValues = MM_tableValues & MM_columns(MM_i) MM_dbValues = MM_dbValues & MM_formVal Next MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" If (Not MM_abortEdit) Then ' execute the insert Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_website_STRING Recordset1.Source = "SELECT * FROM epaper" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1.Open() Recordset1_numRows = 0 %> <% ' *** Visit Counter *** ' FELIXONE 2002 - SB by Felice Di Stefano - www.felixone.it Dim FX_count Dim FX_digit FX_digit = 5 Dim FX_dpath FX_dpath = Server.MapPath("FX_DataCounter") Dim FX_fpath FX_fpath = Server.MapPath("FX_DataCounter/counter.txt") set FX_fso = Server.CreateObject("Scripting.FileSystemObject") ' Check if directory and file exists, if not create it. If (Not FX_fso.fileExists(FX_fpath)) Then If (Not FX_fso.folderExists(FX_dpath)) Then FX_fso.CreateFolder(FX_dpath) End If Application.Lock() set FX_file = FX_fso.OpenTextFile(FX_fpath, 8, true) FX_file.write(0) FX_file.Close() Application.Unlock() End If ' Read file and update it once per session set FX_fobj = FX_fso.getfile(FX_fpath) set FX_file = FX_fobj.OpenAsTextStream(1,-2) FX_count = FX_file.Read(100) If (Session("FX_DataCounter") = "") Then Application.Lock() set FX_file = FX_fso.CreateTextFile(FX_fpath, 8, false) FX_file.write(FX_count+1) FX_file.Close() Application.Unlock() set FX_fso = nothing FX_count = FX_count+1 Session("FX_DataCounter") = FX_count End If ' Add leadings FX_numlength = Len(cStr(FX_count)) If (FX_numlength < FX_digit) Then FX_lead = cInt(FX_digit - FX_numlength) For i=1 To FX_lead FX_count = "0" & FX_count Next End If %> Banner

想知道進推部最新、最hot的第一手開課訊息,

絕不能錯過PLUGIN NEWS每期精采報導!

 第 1 期  第 2 期
 第 3 期  第 4 期
 第 5 期  第 6 期
 第 7 期  第 8 期
 第 9 期  第 10 期
 第 11 期  第 12 期
 第 13 期  第 14 期
 第 15 期  第 16 期
 第 17 期  第 18 期
 第 19 期  第 20 期
 第 21 期  第 22 期
 第 23  第 24 期
 第 25 期  第 26 期
 第 27 期  第 28 期
 第 29 期  第 30 期
 第 31 期  第 32

意見信箱合作提案課程委辦 │ 臺北醫學大學:http://www.tmu.edu.tw

 Copyright 2003 © 臺北醫學大學進修推廣部版權所有  盜用必究
請使用800*600解析度及IE瀏覽器 

地址:110 台北市信義區吳興街250號 (教研大樓1樓)

網址:http://dcee.tmu.edu.tw

E-mail:dcee@tmu.edu.tw   

電話:(02)23785855、23785856分機105、(02)2736-1661分機2419

傳真:(02)2738-7348

位置與交通路線

<% Recordset1.Close() Set Recordset1 = Nothing %>