📄 main.jsp
字号:
<%--
* @author Pushkala
* @version 1.0
*
* Development Environment : Oracle9i JDeveloper
*
* Name of the File : Main.jsp
*
* Creation/Modification History :
* Pushkala 26-Apr-2002 Created
* Elangovan 13-May-2002 Modified Dynamic News and Stock Rates,
* QuickQuote functionality.
*
* Overview of Application :
*
* This JSP displays dynamic news for some important stock symbols and
* hosts the QuickQuote service. The Quick Quote service, displays the stock rate
* for any symbol handled by this Financial Brokerage system.
*
--%>
<%-- Set Context type and characterset --%>
<%@page contentType="text/html;charset=WINDOWS-1252" language="java" %>
<%@page import="java.net.URLDecoder" %>
<%@page import="java.util.ArrayList" %>
<%@page import="oracle.otnsamples.ibfbs.toplink.News" %>
<%@page import="oracle.otnsamples.ibfbs.toplink.Stockrate" %>
<html>
<head>
<title>Welcome to OTN Financial Brokerage System </title>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<link rel="stylesheet" href="includes/contents.css" type="text/css">
<script>
// This function appends current datetime to the document
function writeDate() {
var today = new Date();
//Thursday, April 09, 2002,06:43 FORMAT
document.write(today.toLocaleString());
}
// This function validates the form and submits it. The stock rate is
// displayed in a new window.
function submitForm() {
var symbol = document.frmGetQuote.SYMBOL.value;
if(symbol != "") {
var queryString = "EVENTNAME=GETQUOTE&SYMBOL="+symbol;
window.open("controllerservlet?"+queryString,"QuickQuote",
"width=300,height=240,resizable=no,menubar=no,toolbar=no,directories=no,"+
"location=no,scrollbars=no,status=no");
} else {
alert(" Enter a SYMBOL ");
}
}
function showSymbols() {
var settings = "width=400,height=320,resizable=no,menubar=no,toolbar=no,"+
"directories=no,location=no,scrollbars=no,status=no";
window.open("controllerservlet?EVENTNAME=SYMBOLLOOKUP","symbollookup",settings);
}
</script>
</head>
<body text="#000000" bgcolor="#FFFFEA" OnLoad="tickinit()" >
<!-- Start of Company Logo-->
<jsp:include page="TitleGifs.jsp" flush="true"/>
<!-- End of Company Logo-->
<table width="100%" border="0" bgcolor="#008000" cellpadding="0" cellspacing="0">
<tr>
<td align="left" class="midTime"> <Script>writeDate();</Script></td>
<td align="right">
<a href="controllerservlet?EVENTNAME=SIGNUP" class="midlog">Sign Up</a>
<span class="midTime"> <b>|</b> </span>
<a href="controllerservlet?EVENTNAME=LOGINPAGE" class="midlog">Login</a>
<span class="midTime">to View Profile / Trade! </span>
</td>
</tr>
</table>
<%
// Get the latest stock rates for ticker and News
ArrayList marketData = (ArrayList) session.getAttribute("FIRSTPAGE.RESPONSE");
ArrayList stockRatesList = null;
ArrayList newsData = null;
if(marketData != null) {
// Get the Stock Rates for all symbols
stockRatesList = (ArrayList) marketData.get(0);
// Get the News
newsData = (ArrayList)marketData.get(1);
String color1 = "#FF6633";
String color2 = "#008000";
int ratesLen = stockRatesList.size();
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr >
<td background="images/bktick.gif" valign="bottom" height="26">
<A name="tickpos">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -