index.asp
来自「1.理解Winsock编程模型; 2.掌握Winsock编程的基本方法」· ASP 代码 · 共 1,347 行 · 第 1/4 页
ASP
1,347 行
<a href="shownews.asp?id=<%=rs("newsid")%>" target="_blank"><%=aa(8)%></a>
<%
end if
else%>
<%=aa(8)%>
<%
end if
rs.close
set rs=nothing
else %>
<%=aa(8)%>
<%
end if
%>
</td>
<%
else
%>
<td width="70"> </td>
<%
end if %>
</tr>
</table> </td>
</tr>
</table>
<table width="777" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="289" bgcolor="#FFFFFF"> </td>
<td width="488" bgcolor="#FFFFFF"><div align="right"><font color="#0066FF">您好今天是</font>
<script language="JavaScript">
today=new Date();
year=today.getYear();
month=today.getMonth()+1;
day=today.getDate();
if (year < 2000) year += 1900;
document.write("<font color='ff0000'>");
document.write(year+"年"+month+"月"+day+"日");
document.write("</font>");
</script>
<font color="#0066FF">星期</font>
<script language="JavaScript">
today=new Date();
dayofweek=today.getDay();
Day=new Array(7);
Day[0]="日"; Day[1]="一";
Day[2]="二"; Day[3]="三";
Day[4]="四"; Day[5]="五";
Day[6]="六";
document.write("<font color='ff0000'>");
document.write(Day[dayofweek]);
document.write("</font>");
</script> </div></td>
</tr>
</table>
<table width="777" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/111.gif" width="777" height="100" border="0"></td>
</tr>
</table>
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="170" valign="top" bgcolor="#eeeeee">
<table width="170" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="23" background="images/a03.gif"> <table width="80" height="23" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">学院简介</div></td>
</tr>
</table></td>
</tr>
<tr>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from lm where lm='学院简介'"
rs.open sql,conn,3,2
IF NOT rs.eof then
id=rs("id")
end if
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql = "select * from news where lm='"&id&"'"
rs.open sql,conn,3,2
%>
<td height="143" valign="top" background="images/a91.gif" bgcolor="#FFFFFF">
<table width="50%" border="0">
<tr>
<td> </td>
</tr>
</table>
<table width="95%" border="0" align="center">
<tr>
<td>
<MARQUEE direction=up height=100 onmouseout=this.scrollDelay=10 onmouseover=this.scrollDelay=500 scrollAmount=1 scrollDelay=10 border="0" width="100%">
<% if not rs.eof then %>
<a href="shownews.asp?id=<%=rs("newsid")%>" target="_blank"><%=rs("content")%></a>
<% else %>
暂无信息
<% end if %>
</MARQUEE>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF">
<div align="left"><img src="images/007.gif" width="165" height="1">
</div></td>
</tr>
</table>
<div align="left">
<table width="170" height="287" border="0" cellpadding="0" cellspacing="0" bordercolor="#eeeeee">
<tr>
<td height="38" valign="top"><img src="images/a8.gif" width="170" height="38"></td>
</tr>
<tr>
<td width="170" height="245" valign="top" background="images/a9.gif" bgcolor="#eeeeee">
<MARQUEE direction=up height=200 onmouseout=this.scrollDelay=10 onmouseover=this.scrollDelay=500 scrollAmount=1 scrollDelay=10 border="0" width="100%">
<% set rs = server.createobject("adodb.recordset")
sql = "select top 5 * from News where newsclass='院内公告' order by pubdate desc"
rs.open sql,conn,3,2
if rs.eof then
response.Write" 暂时没有信息"
else
do while not rs.eof
if rs("tupian")=true then %>
<table width="170" border="0">
<tr>
<td width="170"> <img src="images/011.gif" width="16" height="16"><a href="tshownews.asp?id=<%=rs("newsid")%>" title=<%=rs("title")%> target="_blank"> <% weiguang1(rs("title")) %></a><br>
<img src="images/007.gif" width="165" height="1"></td>
</tr>
</table>
<%else%>
<table width="170" border="0">
<tr>
<td width="170"> <img src="images/011.gif" width="16" height="16"><a href="shownews.asp?id=<%=rs("newsid")%>" title=<%=rs("title")%> target="_blank"> <% weiguang1(rs("title")) %></a><br>
<img src="images/007.gif" width="165" height="1"></td>
</tr>
</table>
<%
end if
rs.movenext
loop
rs.close
end if
%>
</marquee> </td>
</tr>
</table>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25">
<div align="center">校内链接</div></td>
</tr>
<tr>
<td valign="top" bgcolor="#eeeeee">
<p align=center>
<SELECT
style="FONT-SIZE: 9pt; WIDTH: 152px; COLOR: #000000; HEIGHT: 122px; BACKGROUND-COLOR: #ffffff"
onchange=javascript:window.open(this.options[this.selectedIndex].value)
size=1 name=select1>
<option>教学院、系、部</option>
<option value=http://www2.sjzue.edu.cn/sjyjjx/index.htm>经贸学院→</option>
<option value=http://www2.sjzue.edu.cn/sjympa/index.html>公共管理学院→</option>
<option value=http://www2.sjzue.edu.cn/sjyckx/index.htm>会计学院→</option>
<option value=http://www2.sjzue.edu.cn/sjysxy/index.htm>商学院→</option>
<option value=http://www2.sjzue.edu.cn/sjywfx/index.htm>法学院→</option>
<option value=http://www2.sjzue.edu.cn/sjygsx/default.htm>管理科学与工程学院→</option>
<option value=http://www2.sjzue.edu.cn/sjyrwsk/index.htm>人文与社会科学学院→</option>
<option value=http://www2.sjzue.edu.cn/sjyygx/index.htm>外国语学院→</option>
<option value=http://www2.sjzue.edu.cn/sjyxgx/index.htm>信息工程学院→</option>
<option value=http://www2.sjzue.edu.cn/sjykcy/index.htm>勘察技术学院→</option>
<option value=http://www2.sjzue.edu.cn/sjyzyxy/index.htm>资源学院→</option>
<option value=http://www2.sjzue.edu.cn/sjychx/index.htm>工程学院</option>
<option value=http://www2.sjzue.edu.cn/sjybsy/index.htm>宝石与材料工艺学院→</option>
<option value=http://www2.sjzue.edu.cn/sjygjy/index.htm>国际交流学院→</option>
<option value=http://www2.sjzue.edu.cn/sjyzjy/index.htm>职业技术学院→</option>
<option value=http://www2.sjzue.edu.cn/sjycjy/sjycjy.htm>成人教育学院→</option>
<option>华信学院</option>
<option value=http://www2.sjzue.edu.cn/sjytyb/tyb3/index.htm>体育部→</option>
<option value=htt??t?礐?????·??????p://www2.sjzue.edu.cn/sjyjcb/index.asp>数理学院→</option>
<option value=http://www2.sjzue.edu.cn/netcenter/index.htm>现代教育技术中心→</option>
<option>培训中心</option>
</select>
</p>
<p align=center>
<select
style="FONT-SIZE: 9pt; WIDTH: 152px; COLOR: #000000; HEIGHT: 122px; BACKGROUND-COLOR: #ffffff"
onChange=javascript:window.open(this.options[this.selectedIndex].value)
size=1 name=select2>
<option value=http://www2.sjzue.edu.cn/sjyyb/index.htm>党政机关</option>
<option>党办、院办→</option>
<option>组织部</option>
<option value=http://www2.sjzue.edu.cn/hxnet/index.php>宣传部→</option>
<option value=http://www2.sjzue.edu.cn/sjyrsc/index.php>人事处→</option>
<option value=http://jw.sjzue.edu.cn/sjyjwc/index.asp>教务处→</option>
<option value=http://www2.sjzue.edu.cn/sjykjc/kjch1.htm>科技处→</option>
<option value=http://202.206.152.10/tsgwy/index.asp>图书馆→</option>
<option>博物馆</option>
<option value=http://www2.sjzue.edu.cn/sjyxsc/index.asp>学生处→</option>
<option value=http://www2.sjzue.edu.cn/sjytw/sjzuetw.htm>团委→</option>
<option value=http://www2.sjzue.edu.cn/sjytw/su/sjzuesu.htm>学生会→</option>
<option value=http://www2.sjzue.edu.cn/sjyhqjt/index.htm>后勤集团→</option>
<option value=http://www2.sjzue.edu.cn/sjyyjsc/index.htm>研究生处→</option>
<option value=http://www2.sjzue.edu.cn/sjylgb/home.htm>老干部处→</option>
<option value=http://www2.sjzue.edu.cn/sjycwc/index.htm>财务设备处→</option>
<option value=http://www2.sjzue.edu.cn/sjycbzx/index.php>学术传播中心→</option>
</select>
</p>
<p align=center>
<SELECT
style="FONT-SIZE: 9pt; WIDTH: 151px; COLOR: #000000; BACKGROUND-COLOR: #ffffff"
onchange=javascript:window.open(this.options[this.selectedIndex].value)
size=1 name=select3>
<option>科研机构</option>
<option>水资源重点实验室</option>
<option>资环研究所</option>
<option>经济研究所</option>
<option value=http://www2.sjzue.edu.cn/sjygls/web/index.htm>现代管理研究所→</option>
<option>地球动力与应用研究所</option>
<option value=http://www2.sjzue.edu.cn/sjygds/index.htm>光电技术研究所→</option>
</select>
</p></td>
</tr>
</table>
</div></td>
<td width="607" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5"><img src="images/b1.gif" width="607" height="41"></td>
</tr>
<tr>
<td width="11"> </td>
<td width="8" background="images/b8.gif"> </td>
<td width="560"><table height="100" cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr>
<td width=285 rowspan="2" align=right valign=top >
<% set rs = server.createobject("adodb.recordset")
sql = "select top 8 * from News where newsclass='学院动态' order by pubdate desc"
rs.open sql,conn,3,2
do while not rs.eof
if rs("tupian")=true then %>
<table width="100%" border="0">
<tr>
<td> <a href="tshownews.asp?id=<%=rs("newsid")%> " title=<%=rs("title")%> target="_blank"><img src="images/003.gif" width="12" height="12" border="0"> <% weiguang(rs("title")) %></a><br>
<img src="images/006.gif" width="264" height="1"></td>
</tr>
</table>
<%else%>
<table width="100%" border="0">
<tr>
<td height="21"> <a href="shownews.asp?id=<%=rs("newsid")%>" title=<%=rs("title")%> target="_blank"><img src="images/003.gif" width="12" height="12" border="0"> <% weiguang(rs("title")) %></a><br>
<img src="images/006.gif" width="264" height="1"></td>
</tr>
</table>
<%
end if
rs.movenext
loop
rs.close
%>
</td>
<td width=40 rowspan="2" valign=center background=images/b9.jpg>
<table height="100%" cellspacing=0 cellpadding=0 width=40
border=0>
<tbody>
<tr>
<td><img height=13 src="images/b6.gif"
width=40></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><img height=13 src="images/b6.gif"
width=40></td>
</tr>
</tbody>
</table></td>
<% set rs = server.createobject("adodb.recordset")
sql = "select top 1 * from News where newsclass='学院动态' and tupian=true order by pubdate desc"
rs.open sql,conn,3,2
if not rs.eof then
id=rs("newsid")
set rs1 = server.createobject("adodb.recordset")
sql1 = "select * from sptp where spid="&id&""
rs1.open sql1,conn,3,2
%>
<td width=235 height="78" valign=top><div align="center"><a href="tshownews.asp?id=<%=rs("newsid")%>" target="_blank"><img src="<%=rs1("FilePath")%>" width="211" height="157" border="0"></a>
</div></td>
</tr>
<tr>
<td valign=top><div align="center"><a href="tshownews.asp?id=<%=rs("newsid")%>" target="_blank"><%=rs("title")%></a></div></td>
</tr>
<%
rs.close
rs1.close
set rs=nothing
set rs1=nothing
else%>
<td width=235 height="78" valign=top><div align="center"><img src="" width="211" height="157" border="0">
</div></td>
</tr>
<tr>
<td valign=top><div align="center">无图片新闻</div></td>
</tr>
<%
end if
%>
<tr>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?