📄 history.php
字号:
<?php/** PHP STOCK TRACKER* -----------------* A multi-user utility for creating and managing stock* watchlists and historical analysis.* Copyright (C) 2005 Joshua Eldridge (joshuae74@hotmail.com)*** This program is free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA** See the COPYING file for full details.*/// Prevent this page from being accessed directly as// it should always be called from within index.phpif (!defined('IN_VALID')) { die("Error: This File Cannot Be Accessed Directly");}require_once('inc/navigation.inc.php');$symbol = getCleanVar($_GET, 'symbol');if($symbol == '') { die('No Symbol!');}$end_date = getCleanVar($_GET, 'end');if($end_date == '') { $time = strtotime('-1 day'); $end = date('Y-n-j', $time);} else { $end = $end_date;}$quote = new Quote($symbol);$header = '<a href="index.php?pg=home#' . $quote->stock_symbol . '">Back Home</a>';$header .= '<h3>' . $quote->stock_name;$header .= '<br>(' . $quote->stock_symbol . ')</h3>';$data = get_rolling_dates($quote->stock_id, $end);$chart_data = array_reverse($data);$_SESSION['stock_history_data'] = $chart_data;$_SESSION['stock_history_symbol'] = $symbol;$rows = count($data) + 1;$html = '<table border="1">';foreach($data as $date) { static $first_pass = 1; if($first_pass == 1) { $html .= '<tr><td><b>' . $date[0] . '</b></td><td>' . $date[1] . '</td><td rowspan="' . $rows . '">'; $html .= InsertChart("gr/charts.swf","inc/history_chart.inc.php", 640, 480, '#ffffff', true); $html .= '</td></tr>'; $first_pass = 0; } else { $html .= '<tr><td><b>' . $date[0] . '</b></td><td>' . $date[1] . '</td></tr>'; } $last_date = $date[0];}$html .= '</table>';$dates = getSingleArray($data, 0);$last_date = end($dates);$next_link = '<a href="index.php?pg=history&symbol=' . $quote->stock_symbol . '&end=' . $last_date . '">Get Previous Period</a><br>';$next_link .= '<a href="download.php?ts=' . $symbol . '">Download ' . $symbol . ' History</a>';echo $header;echo $next_link;echo $html;require_once('inc/footer.inc.php');?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -