📄 reportinterval.jsp
字号:
<%--
* @author Pushkala
* @version 1.0
*
* Development Environment : Oracle9i JDeveloper
*
* Name of the File : ReportInterval.jsp
*
* Creation/Modification History :
*
* Pushkala 12-Aug-2003 Created
*
* Overview of Application :
*
* This JSP assists the site administrators to configure the
* timer for reporting the trading activity on the site.
*
--%>
<%-- Set Context type and characterset --%>
<%@page contentType="text/html;charset=WINDOWS-1252" language="java" %>
<%@page import="java.util.Collection" %>
<%@page import="java.util.Iterator" %>
<%@page import="oracle.otnsamples.ibfbs.usermanagement.ejb.TimerInfo" %>
<html>
<head>
<title>OTN Financial Brokerage System : Admin Report Interval Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<link rel="stylesheet" href="includes/contents.css" type="text/css">
</head>
<%
// Get the eventname
String eventName = request.getParameter("EVENTNAME");
// Get the username from session
String userName = (String) session.getAttribute("USERNAME.RESPONSE");
// Get the Report Interval timer information from session
Collection tiColl = (Collection) session.getAttribute("ADMINTIMERINFO.RESPONSE");
TimerInfo timerInfo = null;
// Set an iterator and iterate through the collection to get Timer info
Iterator tiIter = tiColl.iterator();
if (tiIter.hasNext()) {
timerInfo = (TimerInfo) tiIter.next();
}
%>
<body text="#000000" bgcolor="#FFFFEA" >
<!-- Start of Company Logo-->
<jsp:include page="TitleGifs.jsp" flush="true"/>
<!-- End of Company Logo-->
<b>
<font face="Verdana, Times New Roman, Times, serif" color="#990000" size="2">
Welcome <%= userName %>
</font>
</b>
<table width="100%" border="0" bgcolor="#008000" cellpadding="0" cellspacing="0" >
<tr>
<td align="left" class="midTime">
<Script>writeDate();</Script>
</td>
<td align="right"> <span class="midTime"> </span> </td>
</tr>
</table>
<jsp:include page="ShowError.jsp" flush="true"/>
<table width="100%" border="1" cellpadding="0" cellspacing="0" height="70%"
bgcolor="#FFFFEA" bordercolor="#008000" >
<tr>
<td width="22%" bordercolor="#FFFFEA" valign="center" bgcolor="#FFFFD5">
<!-- Start of Admin Operations List -->
<jsp:include page="AdminLeftList.jsp" flush="TRUE"/>
<!-- End of Admin Operations List -->
</td>
<td bordercolor="#FFFFEA" valign="center" align="center">
<table width="80%">
<tr>
<td valign="top">
<br>
<form name="frmUpload" method="post" action="controllerservlet" >
<br>
<b><font face='Verdana, Times New Roman' color='#990000' size='2'>
Set the Report Interval
</font>
<br><br>
<font face='Verdana, Times New Roman' color='#008000' size='2'>
Send Tradedetails Report every,
<%
String timerhours = "0"; // Default
if (timerInfo != null) { // Get timer hours
timerhours = timerInfo.getTimerHours().toString();
}
%>
<input type="text" name="TIMERHOURS" maxlength="2" size="3"
value="<%=timerhours%>" > Hour and
<%
String timermins = "15"; // Default
if (timerInfo != null) { // Get timer minutes
timermins = timerInfo.getTimerMinutes().toString();
}
%>
<input type="text" name="TIMERMINS" maxlength="2" size="3"
value="<%=timermins%>"> Minutes
<p align="center">
<A href="javascript:submitForm('CONFIGREPORTINTERVAL');">
<IMG border="0" src="images/config.gif"></A>
</p>
</font>
<br>
<input type="hidden" name="EVENTNAME" >
<input type="hidden" name="CALLOUT_EVENT" value="<%=eventName%>">
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Start of Footer -->
<jsp:include page="Footer.jsp" flush="false"/>
<!-- End of Footer -->
<script>
// This function sets the EventName parameter and submits the Form
function submitForm(doEvent) {
// Set EVENTNAME form field
document.frmUpload.EVENTNAME.value=doEvent;
if(doEvent == "CONFIGREPORTINTERVAL" ) {
if(!validInterval(document.frmUpload.TIMERHOURS,document.frmUpload.TIMERMINS))
return;
}
// Submit the form
document.frmUpload.submit();
}
function validInterval(hour,minutes) {
if(hour.value == "" )
hour.value = "0";
if(minutes.value == "")
minutes.value = "0";
if(isNaN(hour.value)) {
alert(" Hour must be a Number ");
return false;
}
if(isNaN(minutes.value)) {
alert(" Minutes must be a Number ");
return false;
}
if(parseInt(hour.value) < 0) {
alert(" Hour cannot be less than zero ");
return false;
}
if((parseInt(minutes.value) < 15) && (parseInt(hour.value) <= 0) ) {
alert(" Report interval should be minimum of 15 minutes ");
return false;
}
return true;
}
// This function appends the current date to the document
function writeDate() {
var today = new Date();
//Thursday, April 09, 2002,06:43 FORMAT
document.write(today.toLocaleString());
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -