Rev 6510 | Rev 6615 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| wAddApplicationUser |'| |'=====================================================%><%Option explicitResponse.Expires = 0%><!--#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"--><!--#include file="common/_form_window_common.asp"--><!--#include file="common/_rtree_common.asp"--><%'------------ ACCESS CONTROL ------------------%><%'------------ VARIABLE DEFINITION -------------Dim rsUserDim parViewIdDim parProjId'Dim objFormCollector'------------ CONSTANTS DECLARATION -----------Const LIMG_USER = "<img src='images/i_user.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"Const LIMG_USER_DISABLED = "<img src='images/i_user_disabled.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"Const LIMG_ROLE = "<img src='images/i_role.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"'------------ VARIABLE INIT -------------------Set objFormCollector = CreateObject("Scripting.Dictionary")parProjId = Request("proj_id")parViewId = NiceInt(Request("view_id"), -1)'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------------------Sub AddViewUser ()On Error Resume NextOraDatabase.Parameters.Add "USER_ID_LIST", Request("user_id_list"), ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "PROJ_ID", parProjId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "VIEW_ID", parViewId, ORAPARM_INPUT, ORATYPE_NUMBERobjEH.TryORA ( OraSession )objEH.ErrorRedirect = FALSEOraDatabase.ExecuteSQL _"BEGIN ADD_AUTOBUILD_FAILURE_INFO ( :PROJ_ID, :VIEW_ID, :USER_ID_LIST ); END;"objEH.CatchORA ( OraSession )OraDatabase.Parameters.Remove "USER_ID_LIST"OraDatabase.Parameters.Remove "PROJ_ID"OraDatabase.Parameters.Remove "VIEW_ID"End Sub'--------------------------------------------------------------------------------------------------------------------------'------------ RUN BEFORE PAGE RENDER ----------' --- Get Form details from DB (for edit forms only) ---'-------------------------------------------------------' --- Load Validation Rules ---' --- Enter Form Validation Rule Changes here... ----'----------------------------------------------------If CBool(Request("action")) ThenIf objForm.IsValidOnPostBack ThenCall AddViewUser()If objEH.Finally ThenCall ReloadParentWindow()Call Destroy_All_ObjectsResponse.EndEnd IfEnd IfEnd If'----------------------------------------------%><html><head><title>Release Manager <%=parProjId%>-<%=parViewId%></title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="images/release_manager_style.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" onLoad="self.focus();"><table border="0" cellspacing="0" cellpadding="10"><tr><td bgcolor="#FFFFFF" class="body_txt">Search for User or select from the list.</td></tr><form class="form_tight" name="FormSearch" method="post" action="<%=ScriptName%>"><tr><td background="images/bg_quicksearch.gif" class="body_txt"><table width="100" border="0" cellspacing="3" cellpadding="0"><tr><td nowrap class="body_txtw"><strong>User Search</strong> </td><td><input name="filter" type="text" class="body_txt" size="20" value="<%=Request("filter")%>"></td><td><input name="btn" type="image" src="images/b_search.gif" width="16" height="16" border="0"></td></tr></table></td></tr><%'=objPMod.ComposeHiddenTags()%><input type="hidden" name="view_id" value="<%=parViewId%>"><input type="hidden" name="proj_id" value="<%=parProjId%>"></form><form name="FormName" method="post" action="<%=ScriptName%>"><tr><td background="images/bg_drk_bage_pane.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td> </td><td align="right"><input name="btn" type="submit" class="form_btn" value="Add"><input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();"></td></tr></table></td></tr><tr><td><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="messages/_msg_inline.asp"--><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><%Dim startPosition, pageNumber, navigator, totalRecords, lastRecordConst MAX_ROWS = 50 ' Maximum number of rows displayedOraDatabase.Parameters.Add "APP_ID", APPLICATION_ID, ORAPARM_INPUT, ORATYPE_NUMBER'--- Set filters ---If Request("filter") <> "" ThenOraDatabase.Parameters.Add "FULL_NAME", "%"& Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "USER_NAME", Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "DOMAIN_NAME", Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2ElseOraDatabase.Parameters.Add "FULL_NAME", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "USER_NAME", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "DOMAIN_NAME", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2End IfOraDatabase.Parameters.Add "VIEW_ID", parViewId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PROJ_ID", parProjId, ORAPARM_INPUT, ORATYPE_NUMBERSet rsUser = OraDatabase.DbCreateDynaset( GetQuery ("GetApplicationUserList.sql") , ORADYN_DEFAULT )OraDatabase.Parameters.Remove "APP_ID"OraDatabase.Parameters.Remove "FULL_NAME"OraDatabase.Parameters.Remove "USER_NAME"OraDatabase.Parameters.Remove "DOMAIN_NAME"OraDatabase.Parameters.Remove "VIEW_ID"OraDatabase.Parameters.Remove "PROJ_ID"'--- Get page number ---pageNumber = 0If Request("pg") <> "" ThenpageNumber = CInt(Request("pg"))End If'--- Set Cursor start position ---startPosition = pageNumber * MAX_ROWS + 1If (NOT rsUser.BOF) AND (NOT rsUser.EOF) ThenrsUser.MoveTo ( startPosition ) ' Set starting cursor pointEnd If'--- Construct Navigatornavigator = ""If (NOT rsUser.BOF) AND (NOT rsUser.EOF) ThentotalRecords = rsUser.RecordCount ' Get total number of records'--- Create "Previous" linkIf pageNumber > 0 Thennavigator = navigator &"<a href='"& ScriptName &"?view_id="& parViewId &"&pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>« Previous</a>"End If'--- Create "Next" linkIf ( startPosition + MAX_ROWS ) < totalRecords Thennavigator = navigator &" <a href='"& ScriptName &"?view_id="& parViewId &"&pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next »</a>"End IfEnd If'--- Calculate Last Record ---If totalRecords > 0 ThenlastRecord = ( startPosition - 1 + MAX_ROWS ) _+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )End If%><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="left"><td colspan="2" class="body_row"> </td></tr><tr><td align="left" class="body_row"><%If totalRecords > 0 ThenResponse.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecordsElseResponse.write "No Results."End If%></td><td align="right" class="body_scol"><%=navigator%></td></tr></table><!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><div style="min-height:300px;max-height:500px;overflow:scroll;"><table width="100%" border="0" cellspacing="3" cellpadding="0"><tr><td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td><td width="30%" align="left" nowrap background="images/bg_table_col.gif" class="body_col">Full Name </td><td width="30%" align="left" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td><td width="30%" align="left" nowrap background="images/bg_table_col.gif" class="body_col">User Email</td></tr><%'--- Render rows ---Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do ' Limit the number of rows displayed%><tr><td align="center"><input type="checkbox" name="user_id_list" value="<%=rsUser("user_id")%>" <%If rsUser("user_id") < 1 Then%>disabled<%End If%>></td><td nowrap class="body_row"><%=Eval( rsUser("user_image") ) & rsUser("full_name")%></td><td class="body_rowg"><%=rsUser("user_name")%></td><td class="body_rowg"><%=rsUser("user_email")%></td></tr><%rsUser.MoveNext%><%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%><tr><td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><%End If%><%LooprsUser.Close()Set rsUser = Nothing%></table></div><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="right" class="body_scol"><%=navigator%></td></tr></table></td></tr><%=objPMod.ComposeHiddenTags()%><input type="hidden" name="view_id" value="<%=parViewId%>"><input type="hidden" name="action" value="true"></form></table></body></html><%'------------ RUN AFTER PAGE RENDER -----------Set objFormCollector = Nothing'----------------------------------------------%><!-- DESTRUCTOR -------><!--#include file="common/destructor.asp"-->