%@ Language=VBScript %> <% '***************************************************** ' File Name: edit_issue_admin.asp ' Purpose: shows issue information for editing ' Developer: Brian Kane/John Yu ' Create Date: February 5, 1999 ' Revisions: '***************************************************** 'declare variables Dim iFilter 'error code for returning filtered user recordset Dim rsUsers 'recordset of users in filter Dim rsIssue 'recordset of issue Dim rsIssueUser 'recordset of user info for user associated with issue Dim rsComments 'recordset of comments associated with issue Dim iErrIssue 'error message integer for issue Dim iErrComments 'error message integer for comments Dim iErrUser 'error message integer for user info 'call functions 'if admin is doing text filter search for user... If Request("TextFilter") <> "" Then NarrowSearch() End If 'page is called with IssueID querystring. get 'all pertinent issue, comment, and user info 'for this issue... If Request("IssueID") <> "" Then FetchIssue(CInt(Request("IssueID"))) FetchComments(CInt(Request("IssueID"))) FetchUser(rsIssue("HDUserSSN")) End If '******************************************************* ' Function: NarrowSearch ' Purpose: selects users from CSA table based on ' last name, first name characters entered ' in form ' Inputs: search string ' Returns: recordset of applicable users '******************************************************* Function NarrowSearch() Set rsUsers = Server.CreateObject("ADODB.Recordset") iFilter = oIT.GetUsersFilter(rsUsers,CStr(Replace(Request("TextFilter"),"'","''"))) End Function '***************************************************** ' Function: FetchIssue ' Purpose: gets issue recordset for viewing ' Inputs: IssueID ' Returns: passes recordset '***************************************************** Function FetchIssue(iIssueID) Set rsIssue = Server.CreateObject("ADODB.Recordset") iErrIssue = oIT.GetIssues(rsIssue,iIssueID) If iErrIssue < 0 Then Response.Redirect("error.asp?Message=IssueIDNonExistent") End If End Function '***************************************************** ' Function: FetchComments ' Purpose: gets comments recordset for viewing ' Inputs: IssueID ' Returns: passes recordset '***************************************************** Function FetchComments(iIssueID) Set rsComments = Server.CreateObject("ADODB.Recordset") iErrComments = oIT.ListComments(rsComments,iIssueID) End Function '***************************************************** ' Function: FetchUser ' Purpose: gets user recordset for viewing ' Inputs: User SSN ' Returns: passes recordset '***************************************************** Function FetchUser(vUserSSN) Set rsIssueUser = Server.CreateObject("ADODB.Recordset") iErrUser = oIT.GetUser(rsIssueUser,vUserSSN) End Function '************************************************************** ' Function: SetDropdown ' Purpose: to set the dropdown value with recordset value, ' if the recordset exists ' Inputs: recordset field ' Returns: nothing '************************************************************** Function SetDropdown(item) If IsObject(rsIssue) Then If Not isNull(rsIssue(item)) Then SetDropdown = rsIssue(item) Else SetDropdown = 0 End If End If End Function %>