<%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| RequestViewCointent.asp | '| | '===================================================== %> <% Option explicit ' Good idea to set when using redirect Response.Expires = 0 ' always load the page, dont store %> <% '------------ Variable Definition ------------- Dim rsView Dim sURL Dim IMG_locked Dim relContentsSTR Dim parScriptName Dim parRtagId Dim nOperation '------------ Constants Declaration ----------- Const LIMG_LOCKED = "" Const imgAdded = "" Const imgRemoved = "" '------------ Variable Init ------------------- parScriptName = Request("script_name") parRtagId = Request("rtag_id") '---------------------------------------------- %> <% '------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------ %> <% '------------------------ MAIN LINE --------------------------------- If (Request("envtab") = "") OR (Request("rtag_id") = "") OR (Request("view_id") = "") OR (Request("script_name") = "") Then Response.write "ERROR: Missing Parameters at "& ScriptName End If '-------------------------------------------------------------------- %> <% OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "VIEW_ID", Request("view_id"), ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "RECORD_SET", NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR ' Decide which environment list is to be displayed Select Case CInt( Request("envtab") ) Case enumENVTAB_WORK_IN_PROGRESS OraDatabase.ExecuteSQL "BEGIN PK_WORK_IN_PROGRESS.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;" Case enumENVTAB_PLANNED OraDatabase.ExecuteSQL "BEGIN PK_PLANNED.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;" Case enumENVTAB_RELEASED OraDatabase.ExecuteSQL "BEGIN PK_RELEASE.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;" Case Else OraDatabase.ExecuteSQL "BEGIN PK_ENVIRONMENT.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;" End Select Set rsView = OraDatabase.Parameters("RECORD_SET").Value OraDatabase.Parameters.Remove "RTAG_ID" OraDatabase.Parameters.Remove "VIEW_ID" OraDatabase.Parameters.Remove "RECORD_SET" ' Retrun if no records found If rsView.RecordCount < 1 Then relContentsSTR = "No packages found." End If ' Get view content While ((NOT rsView.BOF) AND (NOT rsView.EOF)) sURL = parScriptName &"?pv_id="& rsView("pv_id") &"&rtag_id="& parRtagId IMG_locked = "" If rsView.Fields("dlocked") = "Y" Then IMG_locked = LIMG_LOCKED ' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge ' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user ' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate ' what the intended action is to be, once the pending item is approved. ' Obviously, this functionality only applies if viewing the PENDING or ALL environment tabs. ' With regard to the operation value, A = Added, S = Subtracted nOperation = " " If (CInt(Request("envtab")) = enumENVTAB_PLANNED OR CInt(Request("envtab")) = enumENVTAB_ALL) Then nOperation = rsView.Fields("operation") ' NB. this field is only availble if earlier query was PK_PLANNED.GET_VIEW_CONTENT or PK_ENVIRONMENT.GET_VIEW_CONTENT If nOperation = "A" Then IMG_locked = imgAdded ElseIf nOperation = "S" Then IMG_locked = imgRemoved End If End If relContentsSTR = relContentsSTR & "" & VBNewLine If rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" Then relContentsSTR = relContentsSTR & " "& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) &""& VBNewLine Else relContentsSTR = relContentsSTR & " "& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) &""& VBNewLine End If relContentsSTR = relContentsSTR & " "& rsView.Fields("pkg_name") &"" & VBNewLine relContentsSTR = relContentsSTR & " "& rsView.Fields("pkg_version") &"" & VBNewLine relContentsSTR = relContentsSTR & " "& IMG_locked &"" relContentsSTR = relContentsSTR & "" & VBNewLine rsView.MoveNext WEnd rsView.Close Set rsView = nothing relContentsSTR = "" & relContentsSTR & "
" ' Response the content Response.write relContentsSTR %> <% Call Destroy_All_Objects %>