Subversion Repositories DevTools

Rev

Rev 119 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0    ' always load the page, dont store
%>
<%
'=====================================================
'                                       Issue Notes
'=====================================================
%>
<!--#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/_popup_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim parPv_id
Dim parIss_db
Dim parIss_id
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parPv_id = QStrPar("pv_id")
parIss_db = QStrPar("iss_db")
parIss_id = QStrPar("iss_id")
'----------------------------------------------
%>
<%
Function Get_Notes( NNPv_id, NNiss_db, NNiss_id )
        Dim rsTemp, Query_String
        Query_String = _
        " SELECT notes"&_
        " FROM cq_issues"&_
        " WHERE pv_id = "& NNPv_id &" AND iss_db="& NNiss_db &" AND iss_id="& NNiss_id
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
        If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
                Get_Notes = rsTemp.Fields("notes")
        End If
        rsTemp.Close
        Set rsTemp = nothing
End Function

Sub Update_Issue_Notes ( NNPv_id, NNiss_db, NNiss_id, SSparNotes )
        Dim rsTemp, Query_String
        Query_String = _
        " SELECT notes"&_
        " FROM cq_issues"&_
        " WHERE pv_id = "& NNPv_id &" AND iss_db="& NNiss_db &" AND iss_id="& NNiss_id
        Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
        'update fields
        rsTemp.Edit
        rsTemp.Fields("notes").Value = SSparNotes
        rsTemp.Update
        
        rsTemp.Close
        Set rsTemp = nothing
End Sub
%>
<%
'Process submition
If CBool(QStrPar("action")) Then
        Call Update_Issue_Notes ( parPv_id, parIss_db, parIss_id, QStrPar("FRnotes") )
        Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
        Call CloseWindow
Else
        '------------ Action Requirements -------------------
        If NOT objAccessControl.UserLogedIn Then
                ' NOT AUTHENTICATED
                Call OpenInParentWindow("login.asp?rfile=fixed_issues.asp"& QSTR_All)
                Call CloseWindow
                
        End If
        
End If
%>
<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" type="text/javascript">
// Verify if comments are too long and not HTML
<!--
function ValidString(ob,sz) {
        var val, maxchars, HTMLchr;
        maxchars=sz;
        HTMLchr=/[\<\>\'\"]+/i;
        val=MM_findObj(ob);
        val=val.value;
        if (val.length>maxchars) {
                alert('Notes are too long!\n\nMaximum of '+ maxchars +' characters is allowed!');
                document.validstr_returnValue = false;
        } else if (val.match(HTMLchr)) {
                alert('Notes contain invalid characters like \'< > quotes\'');
                document.validstr_returnValue = false;
        } else {
                document.validstr_returnValue = true;
        }
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.notes.FRnotes.focus();">
<form name="notes" method="post" action="<%=scriptName%>">
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
    <tr> 
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_note.gif" width="18" height="22" hspace="5"></td>
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">Issue Notes</td>
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
        <input type="submit" name="btn" value="Submit" class="form_btn_comp" onClick="ValidString('FRnotes',255);return document.validstr_returnValue;">
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
      </td>
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap> 
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
    </tr>
    <tr> 
      <td height="100%" width="1%">&nbsp;</td>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
          <tr> 
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
            <td nowrap width="100%">&nbsp; </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
              <textarea name="FRnotes" cols="60" rows="10" class="form_item" id="FRnotes"><%=Get_Notes( parPv_id, parIss_db, parIss_id )%></textarea>
                          <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
                          <input type="hidden" name="pv_id" value="<%=parPv_id%>">
                          <input type="hidden" name="iss_db" value="<%=parIss_db%>">
                          <input type="hidden" name="iss_id" value="<%=parIss_id%>">
              <input type="hidden" name="action" value="true">
            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td nowrap width="100%"> 
              <p>&nbsp;</p>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
    </tr>
  </table>
</form>
</body>
</html>


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