home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 July & August
/
Pcwk78a98.iso
/
Micrsoft
/
VJ
/
COMMON
/
WIZARD98
/
VIWZ1.DLL
/
1033
/
HTMX
/
1539
< prev
next >
Wrap
Text File
|
1998-02-24
|
4KB
|
140 lines
<%Response.Buffer=True%>
<SCRIPT RUNAT=Server LANGUAGE="VBScript">
'-------------------------------------------------------------------------------
' <%#Purpose#%>
' <%#Assumes#%>
' <%#Inputs#%>
'-------------------------------------------------------------------------------
Sub InsertField(strDBFieldName, strFormFieldName)
If Trim(Request(strFormFieldName)) <> "" Then
rsFeedback(strDBFieldName) = Trim(Request(strFormFieldName))
End If
End Sub
</Script>
<!--<%#CommConnServ#%>-->
<!--<%#CommBeginVIDGen#%>-->
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT ID="rsFeedback" WIDTH=151 HEIGHT=24
CLASSID="CLSID:7FAEED80-9D58-11CF-8F68-00AA006D27C2">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="3969">
<PARAM NAME="_ExtentY" VALUE="635">
<PARAM NAME="_StockProps" VALUE="0">
<PARAM NAME="DataConnection" VALUE="Northwind">
<PARAM NAME="CommandText" VALUE="SELECT Name, Email, Tel, Fax, CommentType, CommentArea, Comments, CommentDate FROM <%#FeedbackTable#%>">
</OBJECT>
-->
<%
Set <%#DBConn#%> = Server.CreateObject("ADODB.Connection")
<%#DBConn#%>.ConnectionTimeout = Session("<%#DBConn#%>_ConnectionTimeout")
<%#DBConn#%>.CommandTimeout = Session("<%#DBConn#%>_CommandTimeout")
<%#DBConn#%>.Open Session("<%#DBConn#%>_ConnectionString"), Session("<%#DBConn#%>_RuntimeUserName"), Session("<%#DBConn#%>_RuntimePassword")
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set rsFeedback = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT Name, Email, Tel, Fax, CommentType, CommentArea, Comments, CommentDate FROM <%#FeedbackTable#%>"
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = <%#DBConn#%>
rsFeedback.Open cmdTemp, , 1, 3
%>
<!--METADATA TYPE="DesignerControl" endspan-->
<%
On Error Resume Next
rsFeedback.AddNew
InsertField "Name","UserName"
InsertField "Email","UserEmail"
InsertField "Tel","UserTel"
InsertField "Fax","UserFax"
InsertField "CommentType","MessageType"
If Trim(Request("Subject")) = "(Other)" Then
InsertField "CommentArea","SubjectOther"
Else
InsertField "CommentArea","Subject"
End If
InsertField "Comments","Comments"
rsFeedback("CommentDate") = Now()
rsFeedback.Update
%>
<!--<%#EndVIDGen#%>-->
<% If Err Then %>
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="keywords" CONTENT="Microsoft Department Site Wizard, Feedback Form">
<TITLE><%#FbFrm#%></TITLE>
</HEAD>
<BASEFONT FACE="Arial, Helvetica, sans-serif">
<LINK REL=STYLESHEET HREF="./Stylesheets/<%#THEMENAME#%>/Style2.css">
<body background="./images/<%#THEMENAME#%>/Background/back2.jpg"
alink="#FF000" bgcolor="#FFFFFF" topmargin=20 leftmargin=10>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TH COLSPAN=2 NOWRAP ALIGN=Left BGCOLOR=Silver BACKGROUND="./Images/<%#THEMENAME#%>/Navigation/Nav1.jpg">
<FONT SIZE=6> Message: </FONT>
</TH>
</TR>
<TR>
<TD BGCOLOR=#FFFFCC COLSPAN=2>
<FONT SIZE=3><B>
<%Response.Write ("<%#UnableToAdd#%>")%>
</B></FONT>
</TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLSPACING=1 CELLPADDING=2 BORDER=0>
<TR>
<TD ALIGN=Left BGCOLOR=Silver><FONT SIZE=-1><B> Item</B></FONT></TD>
<TD WIDTH=100% ALIGN=Left BGCOLOR=Silver><FONT SIZE=-1><B><%#Desc#%></B></FONT></TD>
</TR>
<TR>
<TD><FONT SIZE=-1><B> <%#Src#%>:</B></FONT></TD>
<TD BGCOLOR=White><FONT SIZE=-1><%= Err.Source %></TD>
</TR>
<TR>
<TD NOWRAP><FONT SIZE=-1><B> <%#ErrNum#%>:</B></FONT></TD>
<TD BGCOLOR=White><FONT SIZE=-1><%= Err.Number %></FONT></TD>
</TR>
<TR>
<TD><FONT SIZE=-1><B> <%#Desc#%>:</B></FONT></TD>
<TD BGCOLOR=White><FONT SIZE=-1><%= Err.Description %></FONT></TD>
</TR>
<TR>
<TD COLSPAN=2><HR></TD>
</TR>
<TR>
<TD>
<FORM ACTION="Feedback.htm">
<INPUT TYPE="SUBMIT" VALUE="<%#BackToFbFrm#%>">
</FORM>
</TD>
<TD>
<FONT SIZE=-1>
<%#RetToPrev#%>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<% Else %>
<%Response.Redirect "Response.htm"%>
<% End If %>
</body>
</html>