Rev 5635 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%Option explicitResponse.Expires = 0 ' always load the page, dont store%><%'=====================================================' EDIT MEMO Note' _wform_memo_edit.asp'=====================================================%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/common_dbedit.asp"--><!--#include file="common/_popup_window_common.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsTemp'------------ Constants Declaration -----------'------------ Variable Init -------------------'----------------------------------------------%><%Function Update_Memo_Message( SSmsg_id, SSmsg, SSexpdate )objEH.TryORA ( OraSession )On Error Resume NextOraDatabase.ExecuteSQL _" UPDATE message_board"&_" SET msg_details = '"& SSmsg &"', expiry_date = "& TO_ORADATE( SSexpdate ) &_" WHERE msg_id = "& SSmsg_idobjEH.CatchORA ( OraSession )End FunctionFunction Delete_Memo_Message( SSmsg_id )objEH.TryORA ( OraSession )On Error Resume NextOraDatabase.ExecuteSQL _" DELETE message_board"&_" WHERE msg_id = "& SSmsg_idobjEH.CatchORA ( OraSession )End FunctionFunction Get_Message_Details ( NNmsg_id )Get_Message_Details = _" SELECT * FROM message_board WHERE msg_id = "& NNmsg_idEnd Function%><%'Process submitionIf CBool(QStrPar("action")) AND QStrPar("btn") = "Update" ThenCall Update_Memo_Message ( QStrPar("FRmsg_id"), QStrPar("FRmsg"), QStrPar("FRexpdate") )ReloadParentWindow()Call Destroy_All_ObjectsResponse.EndElseIf CBool(QStrPar("action")) AND QStrPar("btn") = "Delete" ThenCall Delete_Memo_Message ( QStrPar("FRmsg_id") )ReloadParentWindow()Call Destroy_All_ObjectsResponse.EndEnd If%><html><head><title>Release Manager</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 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><!--#include file="_jquery_includes.asp"--><script language="JavaScript">$(document).ready(function(){$("#dateInput").datepicker({constrainInput: true,showOn: 'both',buttonImageOnly : true,buttonImage: "images/i_calendar.gif",buttonText: "Select Date",dateFormat : "D dd-M-yy",minDate : 1,changeYear : true,yearRange : "0000:2099",changeMonth: true});checkText();})// Before we submit the form// Grab the date and insert into a hidden field in a controlled formatfunction submitCheck(){var edate = $("#dateInput").val()//console.log("edate",edate);var d4 = $("#dateInput").datepicker("getDate");var d6 = $.datepicker.formatDate("dd/M/yy", new Date(d4));$("#FRexpdate").val(d6);//console.log ("Get:", d4, d6);return true;}// Update the Submit(Add) button based on the number of chars in the TextAreafunction checkText(){var count = ($("#textArea").val().length > 10);var but = $("#formSubmit");but.toggleClass("form_btn_comp", count);but.toggleClass("form_btn_comp_disabled", !count);but.prop("disabled", !count );}</script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.memo.FRmsg.focus();"><%Set rsTemp = OraDatabase.DbCreateDynaset( Get_Message_Details (QStrPar("FRmsg_id")), cint(0))%><form class="form_tight" name="memo" method="post" action="<%=scriptName%>?done=done<%=QSTR_All%>"><table border="0" cellspacing="0" cellpadding="2"><tr><td valign="top" nowrap colspan="2" class="wform_ttl" background="images/bg_form_lightgray.gif"><table border="0" cellspacing="1" cellpadding="2"><tr><td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Expiry Date </td><td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><input type="text" maxlength="15" size="15" class="form_item" value="<%=DisplayDate(rsTemp.Fields("expiry_date"))%>" id="dateInput" xxdisabled="disabled"></td></tr><tr><td colspan="2" nowrap class="form_field" background="images/bg_form_lightbluedark.gif" valign="top"><textarea name="FRmsg" cols="80" rows="12" class="form_item"><%=rsTemp.Fields("msg_details")%></textarea><input type="hidden" name="FRmsg_id" value="<%=QStrPar("FRmsg_id")%>"><input type="hidden" name="action" value="true"></td></tr></table></td></tr><tr><td align="right"><input type="submit" name="btn" value="Update" class="form_btn_comp" id="formSubmit" onClick="return submitCheck();"><input type="submit" name="btn" value="Delete" class="form_btn_comp" onClick="clickedButton=true;"><input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();"><input type="hidden" name="FRexpdate" value="" id="FRexpdate"></td></tr></table></form></body></html><!-- DESTRUCTOR -------><!--#include file="common/destructor.asp"-->