Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'   Reference SDK
'   _wform_reference_sdk.asp
'
'   This page is designed to be loaded into an iframe as a form of popup
'   The page expects a function closeIFrame() in the parent form to handle closing
'=====================================================
%>
<%
Option explicit
Response.Expires = 0    ' always load the page, dont store
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<%
'------------ ACCESS CONTROL ------------------
isPopupWindow = TRUE
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim parFRsdk_id
Dim parFRsdktag_id
Dim bLoggedIn, bAuthorised

'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parFRsdk_id = QStrPar("FRsdk_id")
parFRsdktag_id = QStrPar("FRsdktag_id")
If parFRsdk_id = "" Then parFRsdk_id = "-1"
If parFRsdktag_id = "" Then parFRsdktag_id = "-1"
bLoggedIn = objAccessControl.UserLogedIn
bAuthorised = canActionControlInProject("AddReleaseReference")
'----------------------------------------------
%>
<%
Sub Get_Projects ( NNsdk_id )
        Dim rsTemp, Query_String, tempLINK, selStr
        Query_String = "SELECT * FROM SDK_NAMES ORDER BY  UPPER( SDK_NAME )"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        
        Response.write "<select name='FRsdk_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
    Response.write "<option disabled selected value=''>Select SDK Family</option>"
                While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                        tempLINK = scriptName &"?FRsdk_id="& rsTemp.Fields("SDK_ID") &"&FRsdktag_id=&rtag_id="& parRtag_id &"&"& objPMod.ComposeURL()
                        
            selStr = ""
                        If NNsdk_id = Cstr(rsTemp.Fields("SDK_ID")) Then selStr = " selected"
                Response.write "<option value='"& tempLINK &"'" & selStr & ">"& UCase(rsTemp.Fields("SDK_NAME")) &"</option>"
                        rsTemp.MoveNext
                WEnd
        Response.write "</select>"
        
        rsTemp.Close
        Set rsTemp = nothing
End Sub

Sub Get_Release_Labels ( NNsdk_id, NNsdktag_id )
        Dim rsTemp, Query_String, tempLINK, selStr
        Query_String = "SELECT SDKTAG_ID,SDKTAG_NAME FROM SDK_TAGS WHERE sdk_id = "& NNsdk_id &"  AND  SDK_STATE='R' ORDER BY UPPER(SDKTAG_NAME)"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        
        Response.write "<select name='FRsdktag_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
                If NNsdk_id <> "-1" Then
                        Response.write "<option disabled selected value=''>Select SDK Version</option>"
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                tempLINK = scriptName &"?FRsdktag_id="& rsTemp.Fields("sdktag_id") &"&FRsdk_id="& NNsdk_id  &"&rtag_id="& parRtag_id &"&"& objPMod.ComposeURL()
                                
                selStr = ""
                                If NNsdktag_id = Cstr(rsTemp.Fields("sdktag_id")) Then selStr = " selected"
                        Response.write "<option value='"& tempLINK &"'" & selStr & ">"& (rsTemp.Fields("sdktag_name")) &"</option>"
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"
        
        rsTemp.Close
        Set rsTemp = nothing
End Sub

%>
<html>
<head>
<title>Release Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="images/common.js"></script>
<script language="JavaScript">
function actionForm()
{
    MM_validateForm('FRsdk_id','SDK','R','FRsdktag_id','Version','R');
    if( document.MM_returnValue )
    {
        parent.closeIFrame('sdk_add_release.asp?rtag_id='+ <%=parRtag_id%> + "&sdk_id=" + <%=parFRsdk_id%> + "&sdktag_id=" +  <%=parFRsdktag_id%> );
    }
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<form name="refSdk">
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
    <tr class="wform_ttl_bg"> 
      <td class="panel_bg" width="1%" height="1%">
        <img src="images/i_change_group_off.gif" width="22" height="25" hspace="5">
      </td>
      <td nowrap width="50%">Reference an SDK</td>
      <td align="right" width="50%"> 
<%If bLoggedIn AND bAuthorised Then%>
        <input type="submit" name="btn" value="Add" class="form_btn_comp" onClick="actionForm();return false">
<%End If%>
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
      </td>
      <td align="right" width="5px" nowrap></td>
    </tr>
    <tr> 
      <td height="100%" width="1%">&nbsp;</td>
      <td valign="top" nowrap colspan="3"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
          <tr> 
<%If NOT bLoggedIn Then%>
            <td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not logged in</td>
<%ElseIf NOT bAuthorised Then %>    
            <td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not Authorized to perform this action</td>
<%Else%>
            <td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><strong>NOTE:</strong> You can only reference a released SDK.</td>
<%End If%>
          </tr>
          <tr class="form_field_bg"> 
            <td width="1%" nowrap class="form_field">SDK</td>
            <td nowrap width="100%" class="form_text"> 
              <%Call Get_Projects (parFRsdk_id)%>
            </td>
          </tr>
          <tr class="form_field_bg"> 
            <td width="1%" nowrap class="form_field">Version</td>
            <td nowrap width="100%" class="form_text"> 
              <%Call Get_Release_Labels ( parFRsdk_id,  parFRsdktag_id )%>
              <input type="hidden" name="RefSdk_id" value="<%=parFRsdk_id%>">
                          <input type="hidden" name="RefSdkTag_id" value="<%=parFRsdktag_id%>">
                          <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
              <input type="hidden" name="action" value="true">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
</body>
</html>


<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->