Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| wAddToApplication |'| |'=====================================================%><%Option explicitResponse.Expires = 0%><!--#include file="common/globals.asp"--><!--#include file="common/config.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/_popup_window_common.asp"--><!--#include file="common/_user_common.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><%'------------ VARIABLE DEFINITION -------------Dim objFormCollector'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------Set objFormCollector = CreateObject("Scripting.Dictionary")'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------------------Sub AddToApplication ()On Error Resume NextOraDatabase.Parameters.Add "USER_ID_LIST", Request("user_id"), ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "APP_ID", Request("new_app_id"), ORAPARM_INPUT, ORATYPE_NUMBERobjEH.TryORA ( OraSession )OraDatabase.ExecuteSQL "BEGIN pk_User.Add_Application_User ( :USER_ID_LIST, :APP_ID, NULL ); END;"objEH.CatchORA ( OraSession )OraDatabase.Parameters.Remove "USER_ID_LIST"OraDatabase.Parameters.Remove "APP_ID"End Sub'--------------------------------------------------------------------------------------------------------------------------Sub DisplayApplicationCombo()Dim rsQry, sqlStrOraDatabase.Parameters.Add "USER_ID", Request("user_id"), ORAPARM_INPUT, ORATYPE_NUMBERsqlStr = "SELECT app_id, application_name FROM applications WHERE app_id NOT IN " &_"(SELECT app_id FROM user_applications WHERE user_id = :USER_ID)"Set rsQry = OraDatabase.DbCreateDynaset( sqlStr, cint(0))If rsQry.BOF OR rsQry.EOF ThenResponse.write "<option value='-1' selected>No Applications Available</option>"& VBNewLineElseResponse.write "<option class='body_txt' selected value='"& rsQry("app_id") &"'>"& rsQry("application_name") &"</option>"& VBNewLinersQry.MoveNextEnd IfWhile ((NOT rsQry.BOF) AND (NOT rsQry.EOF))Response.write "<option class='body_txt' value='"& rsQry("app_id") &"'>"& rsQry("application_name") &"</option>"& VBNewLinersQry.MoveNextWEnd' Clean uprsQry.Close()Set rsQry = nothingOraDatabase.Parameters.Remove "USER_ID"End Sub'--------------------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------Call GetUserDetails ( parUser_id, objUserCollector )If Request("action") <> "" AND Request("new_app_id") <> "-1" ThenCall AddToApplication()If objEH.Finally ThenCall OpenInParentWindow ( Request("rfile") &"?"& objPMod.ComposeURLWith("user_id,tree") )Call CloseWindow()End IfEnd If'----------------------------------------------%><html><head><title>Access Manager</title><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="scripts/access_manager.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script></head><body background="images/bg_bage_pane.gif" leftmargin="0" topmargin="0" onLoad="self.focus();"><table width="100%" border="0" cellspacing="0" cellpadding="10"><tr><td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="images/i_application_lrg.gif" width="18" height="18" hspace="0" align="absmiddle" border="0" > Add Application User</span> <br>Select application name.</td></tr><form name="FormName" method="post" action="<%=SCRIPT_NAME%>"><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="self.close();"></td></tr></table></td></tr><tr><td background="images/bg_form.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"><img src="images/spacer.gif" width="60" height="200"></td><td width="100%"><table width="100%" border="0" cellspacing="2" cellpadding="0"><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><%If NOT objEH.Finally Then%><tr><td class="form_iname"> </td><td><%objEH.DisplayMessage()%></td></tr><%End If%><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><tr><td colspan="2" class="body_ttl3">Add <%=objUserCollector("full_name")%> to Application:</td></tr><tr><td><img src="images/spacer.gif" height="10"></td></tr><tr><td nowrap class="form_iname" valign="top">Application Name</td><td valign="top" align="left"><select name='new_app_id' class='form_iname'><%Call DisplayApplicationCombo()%></select></td></tr><tr><td width="30%" class="form_iname"> </td><td width="70%"> </td></tr></table></td></tr></table></td></tr><%=objPMod.ComposeHiddenTags()%><input type="hidden" name="action" value="true"></form></table></body></html><%'------------ RUN AFTER PAGE RENDER -----------Set objFormCollector = Nothing'----------------------------------------------%><!--#include file="common/globals_destructor.asp"-->