Blame | Last modification | View Log | RSS feed
<%'===============================================================' Archived Version Browser'===============================================================%><!--#include file="class/classSortHelper.asp"--><%'------------ Variable Definition -------------Dim parFLpkg_version, parFLuser_nameDim imgLock, fieldRelease_Date, fieldReleased_By, fieldDownloadFullReleaseNotesDim rsVBDim rowColor, imgPointerDim URLstringDim anchorNameDim filterInUse'------------ Constants Declaration -----------Const IMGBG_ROW_HI = "background='images/bg_row_hi.gif'"Const IMGBG_ROW = "bgcolor='#FFFFFF'"Const IMG_PONTER = "<img src='images/i_pointer.gif' width='6' height='11' hspace='3'>"Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"Const IMG_DOWNLOAD = "<img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'>"'------------ Variable Init -------------------If Request("filter_reset") <> "" ThenparFLpkg_version = "*"parFLuser_name = "*"filterInUse = FALSEElseparFLpkg_version = Request( "FLpkg_version" )parFLuser_name = Request( "FLuser_name" )filterInUse = Is_Filter_In_Use ( "FLpkg_version, FLuser_name" )End If'----------------------------------------------%><%'-----------------------------------------------------------------------------------------------------------------------------------Function Get_All_Versions ( nPkg_id )Get_All_Versions = _" SELECT PV.PV_ID, PV.PKG_VERSION, PV.DLOCKED, PV.MODIFIED_STAMP, USR.FULL_NAME, usr.user_name, USR.USER_EMAIL, PV.COMMENTS, PV.PKG_LABEL, PV.IS_PATCH, PV.RELEASE_NOTES_INFO "&_" FROM ARCHIVE_MANAGER.PACKAGE_VERSIONS PV, USERS USR "&_" WHERE PV.MODIFIER_ID = USR.USER_ID "&_" AND PV.PKG_ID = :PKG_ID"&_" /*-- Manual Filer --*/"&_" "& Construct_Filter ( parFLpkg_version, "pv.pkg_version" ) &_" /*------------------*/"Get_All_Versions = Replace( Get_All_Versions, ":PKG_ID", nPkg_id)End Function'-----------------------------------------------------------------------------------------------------------------------------------Function Construct_Filter ( sPar_val, sCol_name )Select Case sPar_valCase EmptyConstruct_Filter = "AND "& sCol_name &" IS NULL"Case "*"Construct_Filter = ""Case ElseIf InStr( sPar_val, "*") > 0 Then' Asterisk found in string. Use LIKEConstruct_Filter = "AND "& sCol_name &" LIKE '"& Replace( sPar_val, "*", "%" ) &"'"Else' No asterisk. Use =Construct_Filter = "AND "& sCol_name &" = '"& sPar_val &"'"End IfEnd SelectEnd Function'-----------------------------------------------------------------------------------------------------------------------------------Function Is_Filter_In_Use ( sFilters )Dim filters, filterNameIs_Filter_In_Use = FALSEfilters = Split( Replace( sFilters, " ", "" ), "," )For Each filterName In filtersIf Request( filterName ) <> "*" ThenIs_Filter_In_Use = TRUEExit ForEnd IfNextEnd Function'-----------------------------------------------------------------------------------------------------------------------------------%><!--------------- ACTION BUTTONS --------------------------><form name="filter" method="get" action="<%=scriptName%>"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1" valign="middle" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="5" height="35"></td><td width="100%" valign="middle" background="images/bg_action_norm.gif"></td><td width="1" valign="middle" background="images/bg_action_norm.gif"><a href="javascript:;" onClick="self.close();"><img src="images/abtn_close.gif" width="46" height="25" hspace="5" border="0" alt="Close this window."></a></td></tr></table><!--------------------- CAPTION ----------------------------><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="lbox_ttl_b" background="images/bg_action_dark.gif" align="center"><%=sPkg_Name%></td></tr></table><!------------------ VERSION LIST --------------------------><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td background="images/bg_action_norm.gif"><div id="LayerVersions" style="height: 350px; overflow: auto;" name="LayerVersions"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td width="1" nowrap background="images/bg_action_dark.gif"><img src="images/spacer.gif" width="15" height="10"></td><td width="1" nowrap background="images/bg_action_dark.gif"> </td><td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Version <br><input name="FLpkg_version" type="text" class="form_ifilter" value="<%=parFLpkg_version%>" size="15"></td><td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Last Mod. Date </td><td width="100%" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Reason for this version</td><td width="1" valign="top" nowrap background="images/bg_action_dark.gif" class="form_field">Last Modified <br></td></tr><%Dim aVersions, lastRow, i, objSortHelperSet rsVB = OraDatabase.DbCreateDynaset( Get_All_Versions ( parPkg_id ), cint(0))' Descending orderIf rsVB.RecordCount > 0 ThenaVersions = rsVB.GetRows()lastRow = UBound( aVersions, 2 )Set objSortHelper = New SortHelper' Sort versionsCall objSortHelper.VersionSort( aVersions, 0, lastRow, rsVB.FieldIndex("pkg_version") )' Descending orderFor i = lastRow To 0 Step -1%><% ' Highlight row caserowColor = IMGBG_ROWimgPointer = ""If CStr( aVersions( rsVB.FieldIndex("pv_id"), i ) ) = parPv_id ThenrowColor = IMGBG_ROW_HIimgPointer = IMG_PONTEREnd If' Official/Unofficial caseimgLock = IMG_NOT_OFFICIAL'fieldRelease_Date = ""'fieldReleased_By = ""If (aVersions( rsVB.FieldIndex("dlocked"), i ) = "Y") OR (aVersions( rsVB.FieldIndex("dlocked"), i ) = "A") ThenimgLock = IMG_OFFICIALEnd IffieldRelease_Date = EuroDateTime ( aVersions( rsVB.FieldIndex("modified_stamp"), i ) )fieldReleased_By = "<a href='mailto:"& aVersions( rsVB.FieldIndex("user_email"), i ) &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& aVersions( rsVB.FieldIndex("full_name"), i ) &" <"& aVersions( rsVB.FieldIndex("user_email"), i ) &">'>"& aVersions( rsVB.FieldIndex("user_name"), i ) &"</a>"' Full Release Notes availabilityfieldDownloadFullReleaseNotes = ""If NOT IsNull( aVersions( rsVB.FieldIndex("release_notes_info"), i ) ) OR ( InStr( aVersions( rsVB.FieldIndex("release_notes_info"), i ), "MGS:") < 1) ThenfieldDownloadFullReleaseNotes = "<a href='"& enumHTTP_PKG_ARCHIVE & aVersions( rsVB.FieldIndex("release_notes_info"), i ) &"' target='_blank'><img src='images/i_download_small.gif' alt='Download full release notes.' width='16' height='16' hspace='2' border='0'></a>"End IfanchorName = "ANC_"& aVersions( rsVB.FieldIndex("pv_id"), i )If aVersions( rsVB.FieldIndex("is_patch"), i ) = "Y" ThenURLstring = "_wform_archived_versions_history_release_notes.asp?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorNameElseURLstring = scriptName &"?"& Persists_Query_String( "pv_id="& aVersions( rsVB.FieldIndex("pv_id"), i ) ) &"#"& anchorNameEnd If%><tr <%=Set_Row_Style ( URLstring )%>><td align="right" background="images/bg_action_dark.gif"><%=imgPointer%></td><td align="center" valign="top" <%=rowColor%>><%=imgLock%></td><td valign="top" nowrap <%=rowColor%>><a name="<%=anchorName%>"></a><a href="<%=URLstring%>" class="txt_linked"><%=aVersions( rsVB.FieldIndex("pkg_version"), i )%></a></td><td valign="top" nowrap <%=rowColor%> class="form_item"><%=fieldRelease_Date%></td><td valign="top" <%=rowColor%> class="form_item"><%=NewLine_To_BR ( To_HTML( aVersions( rsVB.FieldIndex("comments"), i ) ) )%></td><td valign="top" nowrap <%=rowColor%> class="form_item"><%=fieldReleased_By%></td></tr><%NextEnd If%></table></div></td></tr></table><input type="hidden" name="rtag_id" value="<%=parRtag_id%>"><input type="hidden" name="pkg_id" value="<%=parPkg_id%>"><input type="hidden" name="rfile" value="<%=parRfile%>"><input type="hidden" name="OLDpv_id" value="<%=parOLDpv_id%>"><input type="hidden" name="filter_reset" value=""></form>