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

📄 gupiao.asp

📁 宁波娱乐在线城市,丰富的内容版块
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<% 
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
		Response.Write("对不起,您不是社区用户,请先注册!")
        Response.End
end if
%>
<html><head>
<META http-equiv=Content-Type content=text/html; charset=gb2312>
<META HTTP-EQUIV="luxiaoqing" CONTENT="no-cache">
<meta http-equiv="refresh" content="<%=Gupiao_Setting(1)%>">
<title><%=Gupiao_Setting(5)%>-<%=membername%></title>
<!--#include file="css.asp"-->
<script language="JavaScript">
window.resizeTo(screen.availWidth,screen.availHeight);
</script>
</head><body bgcolor="#ffffff" text="#000000" style="FONT-SIZE: 9pt" topmargin=5 leftmargin=0 oncontextmenu=self.event.returnValue=false onselectstart=self.event.returnValue=false>
<!--#include file="chufa.asp"--> 
<!--
'=========================================================
' File: Gupiao.asp
' Version:1.0
' Date: 2003-1-20
' Script Written by Nev
'=========================================================
-->
<table width="98%" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#0066CC">
	<TR>
		<TD BACKGROUND="Images/topbg.gif" height=9 colspan=3>
	</TD>
	</TR>
	<tr>
		<td valign=center align=middle height=23 background="Images/Header.gif"><font class="big"><b><%=Gupiao_Setting(5)%>大厅</b></font></td>
	</tr>
</table>
<table border=0><tr><td height="3"></td></tr></table>
<table width="98%" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#0066CC">
<tr bgcolor="#DCE2F1"><td width="200">
	<table cellspacing=1 cellpadding=0 width="100%" border=0 bgcolor="0066CC">
		<tr bgcolor="#E4E8EF"> 
			<td height=25 background='images/lan.gif' align=center><font color="#FFFFFF"><%=Custom_Setting(0)%></font></td>
		</tr>		
		<tr valign=top bgcolor="#0"> 
			<td align=center width="100%"> 
				<table cellspacing=1 cellpadding=0 border=0 width="198" height="54">
					<tr><td></td><td align=center><%=Custom_Setting(1)%></td></tr>
				</table>			
			</td>
		</tr>
	</table>
</td>
<td width="5"></td>
<td width="*">	
	<table cellspacing=1 cellpadding=0 width="100%" border=0 bgcolor="#0066CC" align=center>
		<tr>
			<td height="25" background='images/lan.gif' align="center">&nbsp;<font color="#00CC00">〓 <a href="announcements.asp"><font color="#FFFFFF">股市公告板</font></a> 〓</font></td>
		</tr>
		<tr>
			<td height="54" bgcolor="#E4E8EF" align="center" id="content" style="FILTER: revealTrans(Transition=12, Duration=2);">
<SCRIPT LANGUAGE='JavaScript' SRC='inc/ad.js' TYPE='text/javascript'></script>
<SCRIPT LANGUAGE='JavaScript' TYPE='text/javascript'>
messages = new Array()
mescolor = new Array()
<%
		set rs=gpconn.execute("select top 5 * from StockNews order by id desc")
		if rs.bof and rs.eof then
%>			
				messages[0]="欢迎光临股票交易所"
				mescolor[0]="blue"
				messages[1]="证监会提醒:股市风险莫测,谨慎入市!"
				mescolor[1]="red"
<%
		else
			i=0
			do while not rs.eof 
%>			
				messages[<%=i%>]="<% response.Write rs("Title")&" <font color=gray>("&rs("AddTime")&")</font><br>"%>"
				mescolor[<%=i%>]="<% response.Write rs("color")%>"
<%
				i=i+1
				rs.movenext
			loop
%>			
			messages[<%=i%>]="证监会提醒:股市风险莫测,谨慎入市!"
			mescolor[<%=i%>]="blue" 
<%
		end if
		rs.close		
%>
dotransition()
</SCRIPT>			
			</td>
		</tr>
	</table>
</td>
<td width="5"></td>
<td width="200">
	<table cellspacing=1 cellpadding=0 width="100%" border=0 bgcolor="0066CC">
		<tr bgcolor="#E4E8EF"> 
			
          <td height=25 background='images/lan.gif' align=center><font color="#FFFFFF">电子挂历</font></td>
		</tr>		
		<tr valign=top bgcolor="#000000"> 
			<td align=center width="100%"> 
				<table cellspacing=1 cellpadding=0 border=0 width="198" height="54">
					<tr>
						<td><img src="images/clock/cb.gif" name="a"><img src="images/clock/cb.gif" name="b"><img src="images/clock/colon.gif" name="c"><img src="images/clock/cb.gif" name="d"><img src="images/clock/cb.gif" name="e"><img src="images/clock/colon.gif" name="f"><img src="images/clock/cb.gif" name="g"><img src="images/clock/cb.gif" name="h"><img src="images/clock/cam.gif" name="j"></td>
						<td align="right"><font color="#CCCCCC"><%=WeekdayName(Weekday(Date))%></font>&nbsp;</td>
					</tr>
					<tr>
                <td colspan="2" align="right"><font color="#CCCCCC"><%=DatePart("yyyy", Date) & " 年 " & DatePart("m", Date) & " 月 " & DatePart("d", Date) & " 日"%></font>&nbsp;</td>
              </tr>
				</table>			
			</td>
		</tr>
	</table>
</td></tr>
</table>
<table border=0><tr><td height="3"></td></tr></table>
<table border="2" width="98%" bgcolor="#666666" cellspacing="1" cellpadding="3" bordercolorlight="#000000" bordercolordark="#6E6E6E"  align="center">
  <tr bgcolor="#666666"> 
    <td height="25" align="center" background="Images/lan.gif"><font color=#ffffff>代号</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>股票名称</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>经营者</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>交易量</font></td>
 	<td align="center" background="Images/lan.gif"><font color=#ffffff>昨收盘价</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>成交价</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>买入笔数</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>卖出笔数</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>成交量</font></td>
	<td align="center" background="Images/lan.gif"><font color=#ffffff>涨跌幅</font></td>
  </tr>
<%  
	dim CurrentPrice,ZangDieRange,sstop	'股票当前价格,股票涨跌幅度,股票状态(停牌,涨停,跌停等)
	Dim ColExp 		'综合指数
	Dim color
	stats="股市大厅"
	call GPOnline()	 	'在线股民        
	sql= "select * from 股票 order by sid"         
	set rs=gpconn.execute(sql)         
	DO while not RS.EOF  
		if rs("当前价格")<=1 then           
			color="#ffffff"           
		elseif rs("开盘价格")<rs("当前价格") then           
			color="#FF0000"           
		elseif rs("开盘价格")>rs("当前价格") then          
			color="#00FF00"           
		elseif rs("开盘价格")=rs("当前价格") then             
			color="#FFCC00"          
		end if          
		ZangDieRange=csng((rs("当前价格")-rs("开盘价格"))/rs("开盘价格"))
		CurrentPrice=formatnumber(rs("当前价格"),2,true)
		if CurrentPrice<=Trade_Setting(11)+0 then
			sstop=4
			ZangDieRange="<b>停牌</b>"
		elseif ZangDieRange>=Trade_Setting(9)+0 then          
			sstop=1
			ZangDieRange="<b>涨停</b>"         
		elseif ZangDieRange<=-Trade_Setting(10)+0 then 
			sstop=2 
			ZangDieRange="<b>跌停</b>" 
		elseif ZangDieRange=0 then
			sstop=3
			ZangDieRange="0.00 %"
		else       
			sstop=0
		end if   
%>
  <tr bgcolor="#3E3E3E" valign="bottom"> 
    <td height="20" width="6%" align="center"><a href="exchange.asp?sid=<%=rs("sid")%>"><font color=#FFCC00><%=rs("sid")%></font></a></td>
    <td height="20" width="14%" align="center"><a href="DispCompare.asp?sid=<%=rs("sid")%>"><font color="<%=color%>"><%=rs("企业")%></font></a></td>
    <td height="20" align="center"><%=iif(rs("经营者")="","<font color=#FFffff>-</font>","<a href='dispu.asp?Uid="&rs("uid")&"'><font color=#FFCC00>"&rs("经营者")&"</font></a>")%></td>
	<td height="20" align="center"><font color=#FFCC00><%=rs("交易量")%></font></td>
    <td height="20" align="center"><font color=#FFCC00><%=formatcurrency(rs("开盘价格"),2,true)%></font></td>
    <td height="20" align="center"><font color="<%=color%>"><%=formatcurrency(rs("当前价格"),2,true)%></font></td>
    <td height="20" align="center"><%=iif(rs("买入笔数")=0,"<font color=#ffffff>0</font>","<font color=#FFCC00>"&rs("买入笔数")&"</font>")%></td>
	<td height="20" align="center"><%=iif(rs("卖出笔数")=0,"<font color=#ffffff>0</font>","<font color=#FFCC00>"&rs("卖出笔数")&"</font>")%></td>
	<td height="20" align="right"><%=iif(rs("成交量")=0,"<font color=#ffffff>0&nbsp;</font>","<font color=#FFCC00>"&rs("成交量")&"&nbsp;</font>")%></td>
    <td height="20" align="center"><font color="<%=color%>"> 
<% 
		if sstop<>0 then
			response.write ""&ZangDieRange&""
		else
			response.write ""&formatnumber(ZangDieRange*100,2,true)&" %"
			ColExp=ColExp+ZangDieRange*100		'计算综合指数
		end if 
%>
      </font></td>
  </tr>
  <%        
		rs.MoveNext         
	Loop 
	rs.close
	set rs=Nothing
%>
</table>
<%
'==============个人股票管理=============
	if HaveAccount then
%>
	<br>
	<TABLE cellSpacing=1 cellPadding=2 width="98%" align=center bgColor="#666666" border=0>
		<TR bgcolor="#666666"> 
			<TD colSpan=10 height=23 valign="middle" background="Images/header.gif">&nbsp;<font color="#0066FF">〓 <font color="#FF0000">个股管理</font> 〓</font>&nbsp;&nbsp;欢迎您,<b><%=membername%></b>,您的持股情况如下:</TD>
		</TR>
	  <TR align=center bgColor=darkblue valign="middle" > 
		  <td background='Images/lan.gif' height=25><font color="#FFFFFF">代号</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">股票名称</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">拥有数量</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">持股成本</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">当前价格</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">持股价格</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">持股现值</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">每股盈亏</TD> 
		  <td background='Images/lan.gif' ><font color="#FFFFFF">总盈亏</TD>
		  <td background='Images/lan.gif' ><font color="#FFFFFF">盈亏率</TD> 
	  </TR>
<%
	Dim rst,AgvInPrice		'某股票当前价格 ,某股票平均买入价格   
	Dim MyGupiaoNum,MyGupiaoValue,MyGupiaoCost 		'个人持股总数,个人股票市值,个人股票成本             
	Dim YKStr,TotalGranRate  '盈亏情况,总盈亏率
	MyGupiaoNum=0 :	MyGupiaoValue=0 :	MyGupiaoCost=0
	sql="select d.*,g.当前价格 from [大户] d inner join [股票] g on d.sid=g.sid where d.uid="&MyUserID&" order by d.[持股数] desc"  
	set rs=gpconn.execute(sql)
	if rs.eof and rs.bof then
		RESPONSE.Write "<tr><td colspan=10 bgcolor='#8d9aca'>  你现在没有股票</tr>"
	else
		do while not rs.EOF   
			CurrentPrice=rs("当前价格")
			AgvInPrice=rs("平均价格")
			MyGupiaoNum=MyGupiaoNum+rs("持股数")
			MyGupiaoValue=MyGupiaoValue+rs("持股数")*CurrentPrice
			MyGupiaoCost=MyGupiaoCost+rs("持股数")*AgvInPrice	
%>
		<TR align="center" bgColor="#8d9aca"> 
			<TD><a href="exchange.asp?sid=<%=rs("sid")%>"><font color="#FFFF00"><%=rs("sid")%></font></a></TD>
			<TD><a href="exchange.asp?sid=<%=rs("sid")%>"><font color="#FFFF00"><%=rs("企业")%></font></a></TD>
			<TD><font color="#FFFF00"><%=rs("持股数")%></font></TD>
			<TD><font color="#FFFF00">¥<%=formatnumber(AgvInPrice*rs("持股数"),2,True)%></font></TD>
			<TD><font color="#FFFF00">¥<%=formatnumber(CurrentPrice,2,True)%></font></TD>
			<TD><font color="#FFFF00">¥<%=formatnumber(AgvInPrice,2,True)%></font></TD>
			<TD><font color="#FFFF00">¥<%=formatnumber(CurrentPrice*rs("持股数"),2,True)%></font></TD>
			<TD>
<%
			dim bj,TotalGain,GranRate		'单股盈亏,单个股票总盈亏,单个股票总盈亏率
			bj=CurrentPrice-AgvInPrice
			bj=formatnumber(bj,2,True)
			if bj>0 then
				response.write "<font color=#FF0000>↑"&bj&" 元</font>"
			elseif bj<0 then
				response.write "<font color=#00FF00>↓"&formatnumber(abs(bj),2,True)&" 元</font>"
			elseif bj=0 then
				response.write "<font color=#FFFFff>→ 0.000 元</font>"
			end if
			response.Write "</TD><TD>"
			
			TotalGain=bj*rs("持股数")
			GranRate=TotalGain*100/MyGupiaoCost
			if TotalGain>0 then 
				response.Write "<font color=#FF0000>↑"&formatnumber(TotalGain,2,True)&" 元</font></TD>" 
				response.Write "<TD><font color=#FF0000>↑"&formatnumber(GranRate,2,True)&" %</font></TD></tr>"
			elseif TotalGain<0 then
				response.Write "<font color=#00FF00>↓"&formatnumber(-TotalGain,2,True)&" 元</font></TD>"
				response.Write "<TD><font color=#00FF00>↓"&formatnumber(-GranRate,2,True)&" %</font></TD></tr>" 
			else
				response.Write "<font color=#FFFFff>→ 0.00 元</font></TD>" 
				response.Write "<TD><font color=#FFFFff>→ 0.00 %</font></TD></tr>"	
			end if	
			rs.MoveNext          
		Loop
		rs.close
	end if
	if MyGupiaoValue-MyGupiaoCost>0 then
		YKStr="<font color=red>+ "&formatnumber(MyGupiaoValue-MyGupiaoCost,2,-1)
	elseif MyGupiaoValue-MyGupiaoCost<0 then
		YKStr="<font color=#0066FF>- "&formatnumber(MyGupiaoCost-MyGupiaoValue,2,-1)
	else
		YKStr="<font color=#9900FF>0.00"
	end if
	YKStr=YKStr&" 元</font>" 
	if MyGupiaoCost=0 then
		TotalGranRate=0
	else	
		TotalGranRate=(MyGupiaoValue-MyGupiaoCost)*100/MyGupiaoCost
	end if	
%>	
		<TR align=center bgColor="#99CCFF" valign="middle"> 
			<TD background="Images/title.gif" height=20 colspan="2"><font color="#3366CC">合

⌨️ 快捷键说明

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