<% option explicit Response.Buffer = TRUE Dim AuthUser,pos,FileSys,InStream,BugID,Conn,Comm,RS Dim FldArray,i,FldLinks,dTitle,Desc,fCreate,st,wi,c,fSt Dim mx,mxc,fn,fname,ColTot,ibase,inext,ff,fbase,coln,colh,ColNb Response.Expires = 0 rem get user name AuthUser = Request.ServerVariables("AUTH_USER") pos=instr(1,AuthUser,"\") if pos>0 then AuthUser = mid(AuthUser,pos+1) end if %> <% rem add content of cached file for possible values of checked fields IncludeItemCache if Request.QueryString("BugID") = "" then BugID = Session("BugID") else BugID = Request.QueryString("BugID") end if Response.Write "[Bug " & BugID & " - Windows NT Bugs]" Set Conn = Server.CreateObject("ADODB.Connection") Set Comm = Server.CreateObject("ADODB.Command") Set RS = Server.CreateObject("ADODB.Recordset") Conn.Open Session("DSN") Set Comm.ActiveConnection = Conn RS.CursorType = adOpenStatic Set RS.Source = Comm FldArray = Application("fld" & Application("dbCache")(Session("DBSOURCE"))) Dim fdict Set fdict = CreateObject("Scripting.Dictionary") rem generates list of mandatory fields Response.Write "" rem check for links ( related bugs, file attachments ) associated with this bug Dim LinkType(10) mx = UBound(LinkType) for i = 0 to mx LinkType(i) = "loff" next if BugID<>"CREATE" then Comm.CommandText = "Select Type from links where BugID=" & BugID RS.Open if NOT RS.EOF then FldLinks = RS.GetRows() mx = UBound(FldLinks,2) mxc = UBound(LinkType) for i = 0 to mx if FldLinks(0,i) < mxc then LinkType( FldLinks(0,i) ) = "lon" end if next end if RS.Close end if coln = Array("Status","Opened","Resolved","Closed","Project") colh = Array(200,200,200,200,200) ColNb = Array(8,9,6,4,16) ColTot = ColNb(0)+ColNb(1)+ColNb(2)+ColNb(3)+ColNb(4) fname = "Status,AssignedTo,IssueType,Severity,Priority,Accessibility,ChangedDate,ChangedBy," fname = fname & "OpenedDate,OpenedBy,OpenedRev,Source,SourceID,BetaID,HowFound,Lang,LangSup," fname = fname & "ResolvedDate,ResolvedBy,Resolution,FixedRev,Cause,CodeChange," fname = fname & "ClosedDate,ClosedBy,KBArticle,SR," fname = fname & "Component,SubComp,Owner,Processor,NumCPU,Software,Urgency,Regression,ShowStop,SubStatus,CustPri,TrackingNumber,VendorNm,CCList,IsPerf,Class,Title,Description" if BugID <> "CREATE" then Comm.CommandText = "Select " & fname & " from bugs where BugID=" & BugID fname = fname & "," Set RS.Source = Comm RS.CursorType = adOpenStatic RS.Open dTitle = RS(ColTot) Desc = Rs(ColTot+1) fCreate = FALSE else fname = fname & "," dTitle = "" Desc = "" fCreate = TRUE end if Response.Write "" Response.Write "
" st = "position:absolute; left:10; top:0" Response.Write "
" if fCreate then Response.Write "" Response.Write "" Response.Write "" Response.Write "
" rem iterates through columns, access RAID once for each column because rem ADO can't handle all the fields in RAID at once. wi=154 mxc = UBound(ColNb) ibase = 1 fbase = 0 for c = 0 to mxc fSt = TRUE for ff = 1 to colNb(c) inext = instr(ibase,fname,",") i = fdict.Item(mid(fname,ibase,inext-ibase)) if true then if fSt then rem position fieldset st = "position:absolute; left:" & FldArray(2,i)*1.12-4 & "; top:" & FldArray(3,i)*2.4-24 & ";width:" & wi Response.Write "
" Response.Write "" & coln(c) & "" fSt = FALSE end if rem check if field validation function necessary if FldArray(0,i) = "Status" then fn = " onkeypress=" & chr(34) & "return false;" & chr(34) ElseIf FldArray(7,i) = 2 then rem numeric fields fn = " onkeypress=" & chr(34) & "return ckdigit();" & chr(34) ElseIf FldArray(7,i) = 9 then rem Rev fields fn = " onkeypress=" & chr(34) & "return ckdotdigit();" & chr(34) else fn = "" end if rem associate title to each field name rem all fields are initialy disabled if instr(1,FldArray(6,i),chr(34)) then rem Response.Write "" Response.Write "" else Response.Write "" end if rem display current value Response.Write "" end if ibase = inext + 1 fbase = fbase + 1 next Response.Write "
" & FldArray(6,i) & "
" & FldArray(1,i) & ":
" & FldArray(1,i) & ":
" next if NOT fCreate then Rs.Close end if %>
         
Links:
<% rem textarea for existing bug description rem we want to prevent modifications to this filed can't disable it rem because this would also disable scroll bar - we just prevent keypress events if fCreate then Response.Write "" Response.Write "