% if (isNull(request.cookies("ckyUserID"))) or (request.cookies("ckyUserID")="") then response.redirect "index.asp" end if %> <% rowCount = 0 if getUserType(Request.Cookies("ckyUserID"))<>47 then 'response.redirect "home.asp" blnAdmin = false else blnAdmin = true end if if (request.QueryString("btnSave") = "Save") and (blnAdmin) then ShowID = request.QueryString("ShowID") strName = fixquote(request.QueryString("strName")) strAppearing = fixquote(request.QueryString("strAppearing")) strHost = fixquote(request.QueryString("strHost")) strDetails = fixquote(request.QueryString("strDetails")) lngReach = request.QueryString("lngReach") strDeadline = fixquote(request.QueryString("strDeadline")) if ShowID > 0 then s = "SELECT * From tblShow WHERE strName = '" & strName & "' AND ShowID <> " & ShowID set rst = cn.execute(s) if not rst.eof then response.Write "" lngID = ShowID else s = "Update tblShow Set " & _ "strName = '" & strName & "', " & _ "strAppearing = '" & strAppearing & "', " & _ "strDeadline = '" & strDeadline & "', " & _ "strHost = '" & strHost & "', " & _ "strDetails = '" & strDetails & "', " & _ "lngReach = " & lngReach & _ " WHERE ShowID = " & ShowID set rst1 = cn.execute(s) end if rst.close else s = "SELECT * From tblShow WHERE strName = '" & strName & "'" set rst = cn.execute(s) if not rst.eof then btnAdd = true response.Write "" else s = "Insert Into tblShow (" & _ "strName, " & _ "strAppearing, " & _ "strDeadline, " & _ "strHost, " & _ "strDetails, " & _ "lngReach) " & _ "values ( " & _ "'" & strName & "', " & _ "'" & strAppearing & "', " & _ "'" & strDeadline & "', " & _ "'" & strHost & "', " & _ "'" & strDetails & "', " & _ lngReach & ")" set rst2 = cn.execute(s) end if rst.close end if elseif (request.QueryString("btnDelete") = "Delete") and (blnAdmin) then intNotDeleted=0 arrID = split(Request.QueryString("arrID"),",") for i = 0 to ubound(arrID) s = "Select * From tblContact WHERE refShowID = " & arrID(i) set rst = cn.execute(s) if not rst.eof then intNotDeleted = intNotDeleted + 1 else s = "Delete From tblShow WHERE ShowID = " & arrID(i) set rst2 = cn.execute(s) end if rst.close next if intNotDeleted > 0 then Response.Write "" end if end if %>