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

📄 vote.asp

📁 本系统采用ASP作为开发环境
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% If session("Admin")<>"" Then
	Response.Redirect("Manage/Manager.asp")
 End if
  %>
<%
Response.Buffer=true 
If Request.Form("add")<>"" Then 
	Session("month")=cint(Session("month"))+1
	If Session("month")=13 Then 
		Session("month")=1 
		Session("year")=cint(Session("year"))+1
	End If 	
End If
If Request.Form("minus")<>"" Then 
	Session("month")=Session("month")-1 
	If Session("month")=0 Then 
		Session("month")=12 
		Session("year")=Session("year")-1
	End If 	
End If
If Session("year")="" Then 
	Session("year")=cint(year(date()))
	Session("month")=cint(month(date()))
	Session("day")=cint(day(date()))
End If 
If Request.Querystring("date")<>"" Then 
	Session("day")=Request.Querystring("date")
End If 	
times=cdate(Session("year")&"-"&Session("month")&"-"&Session("day"))
riqi=cint(Request.QueryString("date"))		
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charSet=gb2312">
<title>网络新闻中心--年度新闻人物评选!</title>
<link rel="stylesheet" href="Css/Style.css">
<script src="Js/Status.js"></SCRIPT>
<script src="Js/Manage.js"></script>
<script src="Js/Win.js"></script>
</head><body topmargin="0" leftmargin="0" onblur="ed()"> 
<!--#include file="Top.asp" --> 
<table width="800" height="1035" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999" bgcolor="#F7F3F7" class="wenbenkuang"> 
  <tr valign="middle" bgcolor="#214994"> 
    <td height="20" colspan="2"> <table width="724" height="20" border="0" align="center" cellpadding="0" cellspacing="0"> 
        <form method="post" action="Search.asp" name="search"> 
          <tr> 
            <td width="100" height="20"><div align="right"><span class="style6">站内新闻搜索</span></div></td> 
            <td width="129"><div align="center" class="style6"> 
                <div align="right">内容关键字: </div> 
              </div></td> 
            <td width="210"><input name="keyword" type="text" class="wenbenkuang" size="35"></td> 
            <td width="184"><div align="center"> 
                <Select name="id" class="wenbenkuang1"> 
                  <option value="1" Selected>时政要闻</option> 
                  <option value="2">经济动向</option> 
                  <option value="3">世界军事</option> 
                  <option value="4">科学教育</option> 
                  <option value="5">法治道德</option> 
                  <option value="6">社会现象</option> 
                  <option value="7">体育世界</option> 
                  <option value="8">时尚娱乐</option> 
                </Select> 
              </div></td> 
            <td width="101"><input name="Submit6" type="submit" class="go-wenbenkuang3" value="确认查询"></td> 
          </tr> 
        </form> 
      </table></td> 
  </tr> 
  <tr class="wenbenkuang"> 
    <td width="608" height="992" valign="top"> <table width="550" height="160" border="0" align="center" cellpadding="0" cellspacing="0"> 
<!-- #include file="Conn/conn.asp" --> 
<% sql="select sum(Numbers) as sum from tb_Vote"
rs.open sql,conn
If not rs.eof then
	sum=rs("sum")
end If
set rs=nothing
conn.close
set conn=nothing
%> 
        <!-- #include file="Conn/conn.asp" --> 
        <%
		sql="select * from tb_Vote"
		rs.open sql,conn
		j=0
		while not rs.eof
			j=j+1 
		%> 
        <tr> 
          <td><table width="550" height="60" border="0" align="center" cellpadding="0" cellspacing="0"> 
              <tr> 
                <td height="160" colspan="3"> <table width="550" height="55" border="0" cellpadding="0" cellspacing="0"> 
                    <tr> 
                      <td height="21"><table width="560" height="20" border="0" cellpadding="0" cellspacing="0"> 
                          <tr> 
                            <td width="27"><img src="Image/top1.gIf" width="27" height="21"></td> 
                            <td width="495" background="Image/top2.gIf"><div align="center"></div></td> 
                            <td width="37"><img src="Image/top3.gIf" width="37" height="21"></td> 
                          </tr> 
                        </table></td> 
                    </tr> 
                    <tr> 
                      <td> <table width="550" height="109" border="0" cellpadding="0" cellspacing="0" class="wenbenkuang"> 
                          <tr> 
                            <td height="107" colspan="3" valign="top"> <table width="557" height="106" border="0" cellpadding="0" cellspacing="0"> 
                                <tr> 
                                  <td width="140" align="center" valign="middle"><img src="Image/<%=rs("Pictrue")%>" width="120" height="97" alt=""></td> 
                                  <td width="417"><table width="400" height="100" border="0" align="center" cellpadding="0" cellspacing="0"> 
                                      <tr valign="top"> 
                                        <td width="47"><div align="center">姓名:</div></td> 
                                        <td width="152"><div align="left"><%=rs("Name")%></div></td> 
                                        <td width="43"><div align="center">籍贯:</div></td> 
                                        <td width="158"><div align="left"><%=rs("Address")%></div></td> 
                                      </tr> 
                                      <tr valign="top"> 
                                        <td><div align="center">年龄:</div></td> 
                                        <td><div align="left"><%=rs("Age")%></div></td> 
                                        <td><div align="center">职位:</div></td> 
                                        <td><div align="left"><%=rs("Job")%></div></td> 
                                      </tr> 
                                      <tr valign="top"> 
                                        <td><div align="center">简介:</div></td> 
                                        <td colspan="3" rowspan="2" align="left"> <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;<%=rs("Remark")%></div></td> 
                                      </tr> 
                                      <tr valign="top"> 
                                        <td>&nbsp;</td> 
                                      </tr> 
                                    </table></td> 
                                </tr> 
                                <tr> 
                                  <form name="form<%=j%>" method="post" action="VoteData.asp"> 
                                    <td height="20"><div align="center"> 
                                        <input name="id" type="hidden" id="id" value="<%=rs("ID")%>"> 
                                        <input name="Submit" type="submit" class="go-wenbenkuang3" value="投  票  支  持"> 
                                      </div></td> 
                                  </form> 
                                  <td height="20"><table height="20" border="0" cellpadding="0" cellspacing="0"> 
                                      <tr> 
                                        <td width="50">支持率:</td> 
                                        <% i=round(100*cdbl(rs("Numbers"))/cdbl(sum),2)%> 
                                        <td width="252" valign=middle><img src="Image/vote.gif" width="<%=i%>%" height="15" alt="">&nbsp;</td> 
                                        <td width="48" valign=middle>&nbsp;<%=i%>%</td> 
                                        <td width="67"><div align="center"><%=rs("Numbers")%>票</div></td> 
                                      </tr> 
                                    </table></td> 
                                </tr> 
                              </table></td> 
                          </tr> 
                        </table></td> 
                    </tr> 
                  </table></td> 
              </tr> 
            </table></td> 
        </tr> 
        <%
			rs.movenext
		 Wend
		set rs=nothing
		conn.close
		set conn=nothing
		%> 
      </table></td> 
    <td width="190"> <table width="180" height="974" border="0" align="center" cellpadding="0" cellspacing="0"> 
        <tr> 
          <td height="40" colspan="3"><div align="center"><a href="Vote.asp">年度新闻人物评选</a></div></td> 
        </tr> 
        <tr> 
          <td height="200" colspan="3"><!--#include file="Time.asp" --></td> 
        </tr> 
        <tr> 
          <td height="491" colspan="3"><table cellpadding="0" cellspacing="0"> 
              <tr> 
                <td width="27" height="21"><img src="Image/top1.gIf" width="27" height="21"></td> 
                <td width="113" valign="baseline" background="Image/top2.gIf"><div align="center">即 时 新 闻</div></td> 
                <td width="37"><img src="Image/top3.gIf" width="37" height="21"></td> 
              </tr> 
              <tr> 
                <td height="468" colspan="3"> <table width="177" height="468" border="0" align="center" cellpadding="0" cellspacing="0" class="wenbenkuang"> 
                    <tr> 
                      <td width="175" height="466" align="center" valign="top"> <table width="169" border="0" cellpadding="0" cellspacing="0"> 
                          <!-- #include File="Conn/conn.asp" --> 
                          <% 
												sql="Select top 16 * from tb_News where IssueDate=#"&Date()&"# order by IssueDate Desc,ID dESC"
												rs.open sql,conn
												While Not rs.Eof 
											%> 
                          <tr> 
                            <td height="10">&nbsp;</td> 
                            <td height="10">&nbsp;</td> 
                          </tr> 
                          <tr> 
                            <td width="31" height="18"> <div align="center"><img src="Image/i8.gIf" width="14" height="13"></div></td> 
                            <td width="138" height="18"> <a href="#" onclick="window.open('Show.asp?id=<%=rs("ID")%>','详细内容查看','width=630,height=400,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no')"> 
                              <%If len(cstr(rs("Title")))>10 Then Response.Write(left(cstr(rs("Title")),8)&"...") Else Response.Write(rs("Title")) End If %> 
                              </A> </td> 
                          </tr> 
                          <% 
													rs.movenext
												Wend
												Set rs=Nothing
												conn.Close
												Set conn=Nothing
											%> 
                        </table></td> 
                    </tr> 
                  </table></td> 
              </tr> 
            </table></td> 
        </tr> 
        <tr> 
          <td height="243" align="center"><table cellpadding="0" cellspacing="0"> 
              <tr> 
                <td width="27" height="21"><img src="Image/top1.gIf" width="27" height="21"></td> 
                <td width="113" valign="baseline" background="Image/top2.gIf"><div align="center">友 情 链 接</div></td> 
                <td width="37"><img src="Image/top3.gIf" width="37" height="21"></td> 
              </tr> 
              <tr> 
                <td height="220" colspan="3"> <table width="177" height="220" border="0" align="center" cellpadding="0" cellspacing="0" class="wenbenkuang"> 
                    <tr> 
                      <td width="175" height="169" align="center" valign="top"> <table width="169" border="0" align="center" cellpadding="0" cellspacing="0"> 
                          <!-- #include File="Conn/conn.asp" --> 
                          <% 
							sql="Select top 6 * from tb_Link order by IssueDate Desc,ID dESC"
							rs.open sql,conn
							While Not rs.Eof 
						  %> 
                          <tr> 
                            <td height="45" colspan="2"><div align="center"><a href="<%=rs("Address")%>"><img src="Image/IMG_link/<%=rs("Pictrue")%>" alt="<%=rs("Name")%>" width="160" height="38" border="0"></a></div></td> 
                          </tr> 
                          <% 
								rs.movenext
							Wend
							Set rs=Nothing
							conn.Close
							Set conn=Nothing
							%> 
                        </table></td> 
                    </tr> 
                  </table></td> 
              </tr> 
            </table></td> 
        </tr> 
      </table></td> 
  </tr> 
  <tr class="wenbenkuang"> 
    <td height="20" colspan="2" valign="top"> <table height="21" border="0" cellpadding="0" cellspacing="0"> 
        <!-- #include File="Conn/conn.asp" --> 
        <tr> 
          <% 
				sql="Select Count(*) as sum,Style from tb_News where IssueDate=#"&times&"# group by Style"
				rs.open sql,conn
				While Not rs.Eof 
											%> 
          <td width="53" height="20"><div align="center"><%=rs("Style")%></div></td> 
          <td width="52" height="20"><div align="center">共<font color="#FF0000"><%=rs("sum")%></font> 条</div></td> 
          <% 
					rs.movenext
				Wend
				Set rs=Nothing
				conn.Close
				Set conn=Nothing
			%> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
<!-- #include file="Bottom.asp" --> 
</body>
</html>

⌨️ 快捷键说明

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