<% Set oConn = Server.CreateObject ("ADODB.Connection") Set oRS=Server.CreateObject("ADODB.Recordset") strConn = Application("liveConn") oConn.Open strConn id = Request.QueryString("id") strLive = Request.Form("frmLive") If strLive="on" then strLive ="1" else strLive ="0" end if if Request.Form.Count > 0 then oConn.Execute "UPDATE siteUTBG SET fldContent='" & ValidateSQL(Request.Form("copy_h")) & "',fldLive=" & strLive & " WHERE fldid=" & id id = "" else oRS.Open "SELECT * FROM siteUTBG ORDER BY fldID,fldCat1,fldCat2", oConn, 0, 1, 1 oRS.MoveFirst do while not oRS.EOF if cint(id) = cint(oRS("fldID")) then titleStr = oRS("fldContent") blLive = oRS("fldLive") end if oRS.MoveNext loop oRS.MoveFirst oRS.Close end if %>
<%end if%>
Admin
 <% if id <> "" then response.write "Live: " Call InsertEditor("frm_copy","copyhtml", "siteUTBG", "fldContent", "fldid=" & id)%>
<% end if%>
<% oRS.Open "SELECT * FROM siteUTBG ORDER BY fldID, fldCat1,fldCat2", oConn, 0, 1, 1 do while not oRS.EOF if id = oRS("fldID") then titleStr = oRS("fldContent") end if %> <%=oRS("fldid")%> : <%=oRS("fldDesc")%>
<% oRS.MoveNext loop if id <> "" then %>
<% Function ValidateSQL(sSQLtext) dim strOutput strOutput=sSQLtext If len(strOutput) > 0 then strOutput=Replace(strOutput,"'","''") strOutput=Replace(strOutput,"","—") strOutput=Replace(strOutput,"","—") strOutput=Replace(strOutput,"—","—") strOutput=Replace(strOutput,"–","—") strOutput=Replace(strOutput,"’","’") strOutput=Replace(strOutput,"‘","’") strOutput=Replace(strOutput,"é","é") strOutput=Replace(strOutput,"…","…") strOutput=Replace(strOutput,"“","“") strOutput=Replace(strOutput,"”","“") strOutput=Replace(strOutput,"ö","Ö") strOutput=Replace(strOutput,"£","£") strOutput=Replace(strOutput,"©","©") strOutput=Replace(strOutput,"ő","ö") strOutput=Replace(strOutput,"ç","Ç") strOutput=Replace(strOutput,"û","û") strOutput=Replace(strOutput,"ü","û") strOutput=Replace(strOutput,"²","²") strOutput=Replace(strOutput,"½","½") strOutput=Replace(strOutput,"Ç","Ç") strOutput=Replace(strOutput,"’","'") strOutput=Replace(strOutput,"è","è") strOutput=Replace(strOutput,"ë","ë") strOutput = Replace(strOutput, "", "") strOutput = Replace(strOutput, "", "") strOutput = Replace(strOutput, "", "") strOutput = Replace(strOutput, "", "") Else strOutput="" end if ValidateSQL = strOutput End function %>