Rev 121 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'=====================================================' ADD NEW Runtime Dependency' --- PROCESS FORM ---'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont store%><%' Page Access Condition%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/common_dbedit.asp"--><%' Set rfile parameter. This is a return page after LoginCall objPMod.StoreParameter ( "rfile", "runtime_dependencies.asp" )'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login.asp"--><!--#include file="_access_control_general.asp"--><!--#include file="_access_control_project.asp"--><%'------------ Variable Definition -------------Dim rtdArray()'------------ Constants Declaration -----------Const COL_pkg_name = 0Const COL_pkg_version = 1'------------ Variable Init -------------------'----------------------------------------------%><%Sub Add_Runtime_Dependency ( ARRrtd, NNpv_id, NNuser_id )Dim iFor i = 0 To UBound( ARRrtd, 2 )OraDatabase.ExecuteSQL "BEGIN Add_Runtime_Dependency ( "& NNpv_id &", "&_"'"& ARRrtd( COL_pkg_name, i ) &"', "&_"'"& ARRrtd( COL_pkg_version, i ) &"', "&_NNuser_id &" ); END;"NextEnd SubSub Populate_rtdArray ( NNpkg_list, ARRrtd )Dim depList, lastItem, i, recCnt, pkg_name, pkg_versionDim rsTemp, Query_StringQuery_String = _" SELECT pkg_id, pkg_name"&_" FROM packages"&_" WHERE pkg_id IN ("& NNpkg_list &")"Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))recCnt = 0While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))ReDim Preserve ARRrtd( 1, recCnt )ARRrtd( COL_pkg_name, recCnt ) = rsTemp("pkg_name")ARRrtd( COL_pkg_version, recCnt ) = Trim( Request( "pkgn"& rsTemp("pkg_id") ) ) ' Trim extra spacesrecCnt = recCnt + 1rsTemp.MoveNextWEndrsTemp.CloseSet rsTemp = nothingEnd Sub%><%'----------------------- MAIN LINE ---------------------------'--- Process submition ---If (Request("pv_id") <> "") AND (Request("rtag_id") <> "") Then' All mendatory parameters FOUND'COMPLETE THE REQUEST...Call Populate_rtdArray ( Request("pkg_list"), rtdArray )Call Add_Runtime_Dependency ( rtdArray, Request("pv_id"), objAccessControl.UserId )Response.Redirect("runtime_dependencies.asp?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id"))ElseResponse.write "Some mendatory parameters are missing!" & "<br>" 'TODOResponse.write QSTR_AllEnd If%><!-- DESTRUCTOR -------><!--#include file="common/destructor.asp"-->