default.asp
来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 661 行 · 第 1/3 页
ASP
661 行
<%@ Language=VBScript%>
<!--#include file=include/conn.asp -->
<!--#include file=include/function.asp -->
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from BigClass order by BigClassID"
rs.Open rs.Source,conn,1,1
set rs2=server.CreateObject("ADODB.RecordSet") '专题
rs2.Source="select Top 10 * from Special order by SpecialID DESC "
rs2.Open rs2.Source,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=redcaff%></title>
<style type="text/css">
<!--
.box2 {
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #A0A0A0;
border-right-color: #A0A0A0;
border-bottom-color: #A0A0A0;
border-left-color: #A0A0A0;
}
.bk1 {
border: 1px solid #D8D8D8;
color: #E0E0E0;
}
-->
</style>
<link href="news.css" rel="stylesheet" type="text/css">
<link href="css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="#f2f2f2" text="#666666" topmargin="0" marginheight="0">
<style type="text/css">
#floater {
position: absolute;
left: 500;
top: 146;
width: 125;
visibility: visible;
z-index: 10;
}</style>
<!--#include file=include/top.asp -->
<div align="center">
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5" rowspan="2" background="images/bgimg_left.gif"> </td>
<td><table width="768" height="402" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="160" height="402" align="center" valign="top" bgcolor="#F4F4F4" >
<table border="0" cellpadding="0" width="100%" cellspacing="0" align="center">
<tr>
<td height="54" align="center" valign="bottom"><table width="100%" height="95%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="160" height="40" background="images/login.gif">
<div align="left"></div></td>
</tr>
<tr>
<td height="50"> <form method="POST" action="admin/CHKLOGIN.ASP">
<table width="100%" height="100%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr class="box">
<td width="768" height="35" align="right" valign="middle" bgcolor="F4F4F4">
<div align="center"> <font color="#FFFFFF" size="2">
</font>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><font size="2">用
户:</font></div></td>
<td height="25"> <div align="left">
<input name="UserName" class=textarea style="font-size: 8pt" size="10" maxlength="20">
</div></td>
</tr>
<tr>
<td><div align="center"><font size="2">密
码:</font> </div></td>
<td> <div align="left">
<input name="Passwd" type="password" style="font-size: 8pt" size="10" maxlength="20">
</div></td>
</tr>
<tr>
<td height="25"> <div align="center"><font color="#FFFFFF" size="2">
<input type="reset" name="Submit2" value="清除" class=bottonface1>
</font></div></td>
<td height="20"> <div align="center">
<input type="submit" name="Submit" value="确定" >
</div></td>
</tr>
</table>
</div></td>
</tr>
<td height="11" align="left" background="images/bt_bg.gif"></td>
</table>
<div align="right"></div>
</form></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30" align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td width="100%" bgcolor="#ffffff" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="160" height="40" align="left" background="images/zhuanti.gif"> </td>
</tr>
</table></td>
</tr>
<td height="5"><table width="100%" height="45" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
<%
while not rs2.EOF
TrString="<tr><td width=100% height=18 bgcolor=#F4F4F4> <font color=#5284AD><img src=images/icon_arrow_04.gif></font><a class=BAI1 href=Special_News.asp?SpecialID=" & rs2("SpecialID") &"&SpecialName="& rs2("SpecialName") &"> " & trim(rs2("SpecialName")) & "</a></td></tr>"
Response.Write TrString
rs2.MoveNext
wend
rs2.Close
set rs2=nothing
%>
</tr>
<tr>
<td height="10" bgcolor="#F4F4F4"> <div align="right" class="bai1"><a href=special.asp class="bai1">更多专题...</a></div></td>
</tr>
<tr>
<td height="11" background="images/bt_bg.gif"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="40" background="images/diaocha.gif"> </td>
</tr>
<tr>
<td height="20">
<%
set rs=server.CreateObject("adodb.recordset")
sql="select top 1 * from vote_bigclass order by ID DESC"
rs.open sql,conn,1,1
extendsid=rs("id")
if rs("choice")=true then
types=true
else
types=false
end if
%>
<table width="160" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td bgcolor="#F4f4f4">
<table width=100% border=0 align=center cellpadding=0 cellspacing=0>
<tr>
<td width=536 height="30" align="left" bgcolor="#F4f4f4">
<div align="left"></div>
<div align="center"><font color=666666><%=rs("title")%></font></div></td>
</tr>
</table>
<table width=100% height=125 border=0 align=center cellpadding=0 cellspacing=0>
<form name=form1 method=post action=vote_deal.asp?id=extendsid>
<tr>
<td valign=top bgcolor="f4f4f4">
<%
rs.close
set rs=nothing%>
<%set rs=server.CreateObject("adodb.recordset")
sql="select * from vote_smallclass where extends="&extendsid
rs.open sql,conn
if rs.eof and rs.bof then
response.write "您还没有添加投票选项!"
else
i=1
do while not rs.eof%>
<table width=100% border=0 cellspacing=0 cellpadding=3>
<tr>
<td width=15%><div align=left>
<%
if types=true then
if rs("IsDefault")=true then
%>
<input name=choice type=checkbox id=choice value=<%=rs("id")%>checked>
<%else%>
<input name=choice type=checkbox id=choice value=<%=rs("id")%>>
<%end if%>
<%else
if rs("IsDefault")=true then
%>
<input type=radio name=choice value=<%=rs("id")%> width="52" height="18"checked>
<%else%>
<input type=radio name=choice value=<%=rs("id")%>>
<%end if%>
<%end if%>
</div></td>
<td width=85%><div align=left><%=rs("choice")%></div></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?