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

📄 index.asp

📁 一个超级漂亮的班级主页asp代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			IF rs("power")>1 THEN
					icn_sex="img/icn_adm1.gif"
			ELSEIF rs("sex")=True THEN
					icn_sex="img/icn_gg.gif"
			ELSE
					icn_sex="img/icn_mm.gif"
			END IF
			'总管判断
			if DEF_sysadm=rs("name") then
				icn_sex="img/icn_admsys.gif"
			end if
		%>
			<table align="center" width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="rde">
			<tr>
				<td width="20" align="center" class="rdr">
					<% =i %>
				</td>
				<td width="160" align="center" class="rdr">
					<img src="<% =icn_sex %>" border="0" align="absmiddle">&nbsp;<a href="viewinfo.asp?id=<% =rs("ID") %>" title="查看该同学详细资料"><% =rs("name") %></a>
				</td>
				<td align="center">
					<% =rs("cnt_water") %>吨
				</td>
			</tr>
			</table>

		<%  	rs.MoveNext
			Next
		END IF
		rs.close
%>
</td>
</tr></table>




<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" class="rdd"><tr>
<td width="200" valign="top" style="padding:4px;">
<img src="img/skin/<% =defstyle %>/classvote.gif" border="0">
<br>
<%
dim max_vote,vtid2
dim frontvote
max_vote=conn.Execute("SELECT MAX(v_ID) FROM tblvote WHERE v_enable=false",0,1)(0)
IF isNumeric(max_vote) AND max_vote>0 THEN
	vtid2=conn.Execute("SELECT v_topicID FROM tblvote WHERE v_ID="&max_vote,0,1)(0)
	sqlstr="SELECT m.ID,t.t_topic,t.t_author,t.t_kind FROM tblmates AS m INNER JOIN tbltalk AS t ON m.name=t.t_author WHERE t_ID="&vtid2
	rs.open sqlstr,conn,1,1
	vkind=rs("t_kind")
	frontvote="<font color="&colight&">近期调查:"&unhtml(rs("t_topic"))&"</font>"
	Response.Write frontvote

%>
		<br>发起人:<a href="viewinfo.asp?id=<% =rs("ID") %>" title="查看该同学详细资料"><% =rs("t_author") %></a>
<%
	rs.close

	'参与人数和票数
	dim voters,piaos
	piaos=conn.Execute("SELECT COUNT(v_ID) FROM tblvote WHERE v_enable=True AND v_topicID="&vtid2,0,1)(0)
	voters=conn.Execute("SELECT COUNT(*) FROM (SELECT v_voter FROM tblvote WHERE v_topicID="&vtid2&" AND v_enable=True GROUP BY v_voter)",0,1)(0)
%>
		<br>参与同学:<font class="ft1"><% =voters %></font>人&nbsp;
		总票数:<font class="ft1"><% =piaos %></font>票

<%
END IF
%>

</td>
<td>
<%
IF isNumeric(max_vote) AND max_vote>0 THEN
						dim vonly1
						vonly1=conn.Execute("SELECT v_only1 FROM tblvote WHERE v_topicID="&vtid2,0,1)(0)
						if vonly1=true then
							opkind="radio"
							vopname="vop"
						else
							opkind="checkbox"
							vopname="vop()"
						end if
						sqlstr="SELECT v_option,count(*) AS piaoshu FROM tblvote WHERE v_topicID="&vtid2&" GROUP BY v_option ORDER BY count(*) DESC"
						rs.open sqlstr,conn,1,1
						%>
						<form name="fmvote" action="votepoll.asp" method="post">
						<input type="hidden" name="isradio" value="<% =vonly1 %>">
						<input type="hidden" name="topicID" value="<% =vtid2 %>">
						<input type="hidden" name="hid_kind2" value="<% =vkind %>">
						<table width="480" height="20" border="0" cellpadding="0" cellspacing="2" align="right">
						<tr>
						<th width="7%" height="25" class="rdbar">排名</th>
						<th width="75%" height="25" class="rdbar">投票项目</th>
						<th class="rdbar">目前票数</th>
						</tr>
						<%
						dim zi
						dim opkind,vchkstr
						For zi=1 to rs.Recordcount
							if vonly1=true and zi=1 then
								vchkstr="checked"
							else
								vchkstr=""
							end if
						%>
						<tr>
						<th class="rde"><% =zi %></th>
						<td height="25" class="rde"><input name="<% =vopname %>" type="<% =opkind %>" value="<% =unhtml(rs("v_option")) %>" <% =vchkstr %>><% =unhtml(rs("v_option")) %></td>
						<% if piaos<1 then %>
						<td class="rde"><font class="ft1">0</font> <font color="<% =colight %>">(0%)</font></td>
						<% else %>
						<td class="rde"><font class="ft1"><% =rs("piaoshu")-1 %></font> <font color="<% =colight %>">(<% =CINT((rs("piaoshu")-1)/piaos*1000)/10 %>%)</font></td>
						<% end if %>
						</tr>
						<%
						rs.MoveNext
						Next
						%>
						<tr>
						
						<th height="25" colspan="3" align="right" style="background:<% =bg2 %>"><input type="submit" name="cmdpoll" value="我要投票" class="an">&nbsp;</th>
						
						</tr>
						</table>
						</form>
						<%
					rs.close
ELSE
	Response.Write "(暂时没有调查项目)"
END IF

%>
</td>
</tr></table>



<table align="center" width="700" height="25" border="0" cellspacing="0" cellpadding="0" class="rdd" style="border-top:1px solid #FFFFFF"><tr>
<td width="300" align="center" valign="top" class="rdkuang" style="padding-top:1px; padding-bottom:0px; padding-left:0px; padding-right:0px; background: <% =bg2 %>; border-style:dashed">
	<%
	sqlstr="SELECT p.p_ID,p.p_url,p.p_w,p.p_h,p.p_tip,p.p_author,p.p_belong,p.p_emo,m.ID FROM tblphoto AS p INNER JOIN tblmates AS m ON p.p_author=m.name WHERE p.p_ID=(SELECT MAX(p_ID) FROM tblphoto WHERE p_belong<0)"
	rs.open sqlstr,conn,0,1
		IF NOT(rs.eof AND rs.bof) THEN
	%>
		<table align="center" width="100%" height="22" border="0" cellpadding="0" cellspacing="0" class="intbl">
		<tr><td width="100%" height="22" align="center" class="rdbar">
		<b>最新上传照片</b>
	&nbsp;<b>By</b>&nbsp;<a href="viewinfo.asp?id=<% =rs("ID") %>" title="查看该同学详细资料"><% =rs("p_author") %></a>
		</td></tr>
		</table>


<table align="center" width="250" height="250" border="0" cellpadding="0" cellspacing="0">
<tr><td width="100%" height="100%" align="center" valign="middle">
		<a href="photoview.asp?id=<% =rs("p_ID") %>" target="_blank"><img src="<% =rs("p_url") %>" width="<% =rs("p_w") %>" height="<% =rs("p_h") %>" alt="点击以原尺寸打开照片" vspace="2" border="0"></a>
</td></tr>
</table>

		<table align="center" width="100%" height="25" border="0" cellpadding="0" cellspacing="0" class="intbl">
		<tr><td width="100%" align="center" valign="top" class="rdbar">
<a href="photoview.asp?id=<% =rs("p_ID") %>" target="_blank">
		品头论足:
		<%

			if rs("p_belong")=-1 then
		%>
			<img src="img/phmark/1.gif" align="absmiddle" border="0">(<b>0</b>)
			<img src="img/phmark/2.gif" align="absmiddle" border="0">(<b>0</b>)
			&nbsp;点击:<% =rs("p_emo") %>
		<%
			else
				if ABS(rs("p_belong"))<100000 then
					phgood=0
					phbad=ABS(rs("p_belong"))-1
				else
					phgood=ABS(rs("p_belong"))\100000
					phbad=(ABS(rs("p_belong")) mod 100000)-1
				end if
		%>
			<img src="img/phmark/1.gif" align="absmiddle" border="0">(<b><% =phgood %></b>)
			<img src="img/phmark/2.gif" align="absmiddle" border="0">(<b><% =phbad %></b>)
			&nbsp;点击:<% =rs("p_emo") %>
<%
			end if
%>
</a>
		</td></tr>

		<tr><td width="100%" valign="top" style="padding-left:2px; padding-right:2px">
		注语:
		<% 
			if rs("p_tip")="" then
				Response.Write "(无)"
			else
				Response.Write unhtml(rs("p_tip"))
			end if
		%>
		</td></tr>
		</table>
	<%
		ELSE
			Response.Write "<br>班级相册还没有照片!"
		END IF
	rs.close
	%>
</td>
<td valign="top" style="padding:4px;">
	<img src="img/skin/<% =defstyle %>/freshtopic.gif" border="0">
	<%
	'读取新话题
	sqlstr="SELECT t_ID,t_author,t_topic,t_datepub,t_datefre,t_re,t_clk,t_lastre,t_emotion FROM tbltalk WHERE t_isreply=False ORDER BY t_idfre DESC"
	rs.open sqlstr,conn,1,1
		IF NOT(rs.eof AND rs.bof) THEN
			tpcount2=conn.Execute("SELECT COUNT(t_ID) FROM tbltalk WHERE t_isreply=False",0,1)(0)
					if tpcount2>10 then
						tpcount2=10
					end if
		dim xscss,icn_top
			For i=1 To tpcount2
				if i mod 2=0 then
					xscss="rdd"
				else
					xscss="rde"
				end if
				icn_top="img/topic/"&rs("t_emotion")&".gif"

		'判断是否为投票主题
		IF rs("t_emotion")=0 THEN
			vttype="voteview.asp"
		ELSE
			vttype="talkview.asp"
		END IF
	'判断更新时间
	if isDate(rs("t_datefre"))=false then
		tfreshday=rs("t_datepub")
	else
		tfreshday=rs("t_datefre")
	end if
	%>
	<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0" class="<% =xscss %>">
	<tr>
		<td width="25" height="100%" class="rdr" align="center"><img src="<% =icn_top %>" border="0"></td>
		<td width="220" class="rdr"><a href="<% =vttype %>?id=<% =rs("t_ID") %>" title="主题:<% =stryin2(KillHTMLLabel(rs("t_topic"))) %><br>作者:<% =rs("t_author") %><br>发表于:<% =rs("t_datepub") %><br>点击:<% =rs("t_clk") %>&nbsp;回复:<% =rs("t_re") %>&nbsp;&nbsp;最后发表:<% =rs("t_lastre") %>"><% =unhtml(hhstr(rs("t_topic"),17)) %></a></td>
		<td align="center"><% =tfreshday %></td>
	</tr>
	</table>
	<%			rs.MoveNext
			Next
		END IF
	rs.close
	%>
	<div align="right"><a href="talkbook.asp">MORE…</a>&nbsp;</div>
</td>
</tr></table>



<!--插入在线统计-->
<!--#include file="in_online.asp"-->
<!--插入网站置底-->
<!--#include file="in_bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

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