%@ LANGUAGE="VBScript" %>
<%
Response.expires=0
If InStr(1,CStr(Request.ServerVariables("HTTP_USER_AGENT")),"MSIE5")<>0 Then
ie=true
Else
ie=false
End If
operator1 = CStr(Request.Form("operator1"))
firstname1 = CStr(Request.Form("firstname1"))
operator2 = CStr(Request.Form("operator2"))
firstname2 = CStr(Request.Form("firstname2"))
comments = CStr(Request.Form("comments"))
num_tlds = CInt(Request.Form("num_tlds"))
comments= Replace(comments,"'","''")
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open phdb_rd
Connection.BeginTrans
SQLstmt="select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') entrydate from dual"
On Error Resume Next
Set RS= Connection.Execute(SQLstmt)
entrydate = CStr(RS("entrydate"))
If Err.Number = 0 Then
SQLstmt=" insert into phoffline.log_entries (log_date,action,logid) "
SQLstmt= SQLStmt & " values (to_date('" & entrydate &"','MM/DD/YYYY HH24:MI:SS'),'TLD_ACTION',phoffline.logid.nextval)"
On Error Resume Next
response.write(SQLStmt & "
")
' Set RS= Connection.Execute(SQLstmt)
End If
If Err.Number = 0 Then
'
' fill comments
'
If comments<>"" Then
SQLstmt=" insert into phoffline.log_comments (logid,text) "
SQLstmt= SQLStmt & " values (phoffline.logid.currval,'" & CStr(comments) & "')"
response.write(SQLStmt & "
")
On Error Resume Next
' Set RS= Connection.Execute(SQLstmt)
End If
End If
If Err.Number = 0 Then
'
' fill operators
'
If Operator1<>"" Then
SQLstmt=" insert into phoffline.log_operators (logid,operator) "
SQLstmt= SQLStmt & " values (phoffline.logid.currval,'" & CStr(operator1) & "')"
response.write(SQLStmt & "
")
On Error Resume Next
' Set RS= Connection.Execute(SQLstmt)
End If
End If
If Err.Number = 0 Then
If Operator2<>"" Then
SQLstmt=" insert into phoffline.log_operators (logid,operator) "
SQLstmt= SQLStmt & " values (phoffline.logid.currval,'" & CStr(operator2) & "')"
response.write(SQLStmt & "
")
On Error Resume Next
' Set RS= Connection.Execute(SQLstmt)
End If
End If
For i=1 To num_tlds
If Err.Number = 0 Then
SQLstmt=" update phoffline.tld_data "
SQLstmt= SQLstmt & " set position=" & CStr(Request.Form("position" & CStr(i))) & ", "
SQLstmt= SQLstmt & " startdate=to_date('" & entrydate & "','MM/DD/YYYY HH24:MI:SS') "
SQLstmt= SQLstmt & " where order_set=" & CStr(Request.Form("os" & CStr(i)))
SQLstmt= SQLstmt & " and id=" & CStr(Request.Form("id" & CStr(i)))
response.write(SQLStmt & "
")
On Error Resume Next
' Set RS= Connection.Execute(SQLstmt)
End If
If Err.Number = 0 Then
SQLstmt=" insert into phoffline.tld_action_log (order_set,id,logid,action) "
SQLstmt= SQLstmt & " values (" & CStr(Request.Form("os" & CStr(i))) & "," & CStr(Request.Form("id" & CStr(i))) & ",phoffline.logid.currval,'INSTALL_TLDS')"
response.write(SQLstmt & "
")
On Error Resume Next
' Set RS= Connection.Execute(SQLstmt)
End If
Next
If Err.Number = 0 Then
Connection.RollbackTrans
' Connection.CommitTrans
Connection.Close
Set Connection=nothing
Set RS=nothing
%>
Error #<%= Err.Number %> occurred;
<%= Err.Description %>.
<% End If %>