⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 download.php

📁 股票监视器是一个简单的实用工具
💻 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.*/require_once('INCLUDES.inc.php');set_time_limit(300);$symbol = strtoupper(getCleanVar($_GET, 'ts'));if($symbol != "") {	$sql = "SELECT a.stock_symbol as 'Ticker Symbol', a.stock_name as 'Stock Name', b.trade_date as 'Trade Date', b.opened 'Open', b.last_trade as 'Close', b.low as 'Low', b.high as 'High', b.volume as 'Volume' FROM stocks_info a, stocks_data b WHERE a.stock_id = b.stock_id AND a.stock_symbol='" . $symbol ."'";	$filepart = "_" . $symbol;} else {	$sql = "SELECT a.stock_symbol as 'Ticker Symbol', a.stock_name as 'Stock Name', b.trade_date as 'Trade Date', b.opened 'Open', b.last_trade as 'Close', b.low as 'Low', b.high as 'High', b.volume as 'Volume' FROM stocks_info a, stocks_data b, stocks_watchlists c WHERE a.stock_id = b.stock_id AND b.stock_id = c.stock_id AND c.user_id = " . $SESSION['user_id'];	$filepart = "_ALL";}header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");header ("Cache-Control: no-cache, must-revalidate");    header ("Pragma: no-cache");    header ("Content-type: application/x-msexcel");header ("Content-Disposition: attachment; filename=Historical_Stock_Data" . $filepart . ".xls");header ("Content-Description: PHP/INTERBASE Generated Data" ); $db = getConn();if($rs = $db->Execute($sql)) {	$rs->MoveFirst();	rs2tabout($rs); # send to stdout directly}$db->Close();?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -