next up previous
Next: Other Files Up: Appendix I: Code Previous: reject.php

result.php

This file was developed in the early stages of this project as a prelude to portfolio.php. The following code is used to display the results obtained from entering a ticker symbol on a preceding page (the home page used during this project).
<HTML>
<HEAD><TITLE>Techlab 2002-2003</TITLE></HEAD>
<STYLE>  A {text-decoration: none;} A:hover {color: gold;}
BODY {SCROLLBAR-FACE-COLOR: "red";
      SCROLLBAR-HIGHLIGHT-COLOR: "gold";
      SCROLLBAR-SHADOW-COLOR: "gold";
      SCROLLBAR-3DLIGHT-COLOR: "red";
      SCROLLBAR-ARROW-COLOR: "gold";
      SCROLLBAR-TRACK-COLOR: "red";
      SCROLLBAR-DARKSHADOW-COLOR: "red";
     }
</STYLE>
<BODY BGCOLOR="#000040" TEXT="#FFFFFF" LINK="red" ALINK="red" VLINK="red">
<FONT FACE="arial" SIZE="-1">
<CENTER>
<A HREF="index.php">Home</A> 
| 
<A HREF="assign.html">Assignments</A> 
| 
<A HREF="journal.html">Journal</A> 
| 
<A HREF="progress.html">Progress</A> 
| 
<A HREF="proposal.html">Proposal</A> 
| 
<A HREF="techlab.html">Techlab</A>
<P>
<H3>An Online User Interface for<BR>Tracking Stock Portfolios</H3>
<P>
</CENTER>
<B>American Markets</B><BR>
<?php

//Day Date Month Year [Time (24-hour system)]
 print(date("l d F Y"));
 print(" [");
 print(date("H"));
 print(date("i"));
 print("]<P>");

//include fn.php for use below
 $dir='.';
 include($dir.'/fn.php');

// echo "<B>Major Indices</B><BR>";

//call retrieving function in fn.php for the major indices
//^DJI, ^IXIC, and ^GSPC are Yahoo! Finance designations for the indices
//retrieve obtains current value, change in points, and change in percent
//retrieve also continues printing in table started below
 echo "<TABLE CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=144><FONT SIZE=2 FACE=arial>";
 echo "Dow Jones Industrial</FONT></TD>";
 $markets = '^DJI';
 $quotes = retrieve($markets);

 echo "<TR><TD WIDTH=144><FONT SIZE=2 FACE=arial>NASDAQ Composite</FONT></TD>";
 $markets = '^IXIC';
 $quotes = retrieve($markets);

 echo "<TR><TD WIDTH=144><FONT SIZE=2 FACE=arial>Standard & Poor's 500</FONT></TD>";
 $markets = '^GSPC';
 $quotes = retrieve($markets);
 echo "</TABLE>";

/*
 echo "<P><FONT COLOR=gold>&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;</FONT><P>";
*/

/*
//LISTINGS
 echo "<TABLE><TR><TD WIDTH=243><FONT SIZE=2 FACE=arial>";
 echo "<B>Selected Quotes</B></FONT>";

 $markets = 'CSCO';
 echo "<TR><TD WIDTH=243><FONT SIZE=2 FACE=arial>Cisco Systems";
 echo" [$markets, NASDAQ]</FONT></TD>";
 $quotes = retrieve($markets);

 $markets = 'KO';
 echo "<TR><TD WIDTH=243><FONT SIZE=2 FACE=arial>Coca-Cola Company";
 echo " [$markets, NYSE]</TD>";
 $quotes = retrieve($markets);

 $markets = 'MSFT';
 echo "<TR><TD WIDTH=243><FONT SIZE=2 FACE=arial>Microsoft Corporation";
 echo " [$markets, NASDAQ]</TD>";
 $quotes = retrieve($markets);
 echo "</TABLE>";
*/

 echo "<P><FONT COLOR=gold>&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;</FONT><P>";

 echo "<TABLE CELLSPACING=0 CELLPADDING=0><TR><TD WIDTH=120><FONT SIZE=2 FACE=arial>$quote</FONT></TD>";
 retrieve ($quote);
 echo "</TABLE>";
 techdata ($quote);
?>
<!--
<FORM NAME="form" METHOD="post" ACTION="result.php">
<INPUT TYPE="text" NAME="quote" SIZE="6" MAXLENGTH="6">
<INPUT TYPE="submit" NAME="retrieve" VALUE="GET QUOTE!">
-->
<?php
 echo "<P><FONT COLOR=gold>&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;";
 echo "&#151;&#151;&#151;&#151;&#151;&#151;&#151;&#151;</FONT><P>";
?>
<P>Joseph Hess<BR>
<A HREF="mailto:jhess@lan.tjhsst.edu">jhess@lan.tjhsst.edu</A>
<P>
<FONT SIZE="-2">
LAST MODIFIED DECEMBER 2002<BR>
STOCK DATA RETRIEVED FROM <A HREF="http://finance.yahoo.com" TARGET="_new">
YAHOO! FINANCE</A><BR>
</BODY>
</HTML>


Joseph B. Hess 2003-06-13