<% if (isNull(request.cookies("cookieUserID"))) or (request.cookies("cookieUserID")="") then response.redirect "index.asp" end if %>
<% 'Events.. if len(request.querystring("chkSel")) > 0 then 'its lengthy, bu i don car s = "DELETE FROM tblNotes WHERE NoteID IN (" & request.querystring("chkSel") & ");" 'response.write s 'response.end cn.execute(s) end if 'Pageload.. 'check to see if tbl exists, add table is not rst = cn.execute("IF OBJECT_ID ('adrates.dbo.tblNotes','U') IS NOT NULL SELECT 1 as blnExists else SELECT 0 as blnExists") 'response.Write(rst("blnExists")) if rst("blnExists") = 0 then cn.execute("CREATE TABLE adrates.dbo.tblNotes([NoteID] [int] IDENTITY(1,1) NOT NULL,[refUserID] [int] NOT NULL,[memNotes] varchar(255) NULL, [strDate] varchar(12) NOT NULL) ON [PRIMARY]") end if Dim LB Dim strWhere Dim i Dim s LB = request.querystring("LB") response.write "" x = swapIt(x) response.write "" x = swapIt(x) i = 1 s = "SELECT NoteID, refUserID, LEFT(memNotes,75) AS memNotes, LEFT(strDate, 8) as strDate, strUserName FROM tblNotes LEFT JOIN tblUser ON UserID = refUserID ORDER BY tblNotes.strDate DESC, strUserName" set rst = cn.execute(s) 'viewrs(rst) 'response.Write 'print_rr(Request.Cookies) UID = getUserID(Request.Cookies("cookieUserID")) UTYPE = getUserType(Request.Cookies("cookieUserID")) while not rst.eof 's = "SELECT refStaffID FROM tblClientPublication WHERE refStaffID = " & rst("StaffID") & ";" 'set rst2 = cn.execute(s) if cint(rst("refUserID")) = cint(UID) OR UTYPE = 47 then chkSelect = "" else chkSelect = " " end if response.write "" x = swapIt(x) i = i + 1 rst.movenext wend rst.close cn.close response.write "" %>
" response.write "
NotesDelete
" & i & "" & rst("strUserName") & "" & rst("memNotes") &"" & apDate(rst("strDate")) & "" & chkSelect & "