?? index.asp
字號:
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"> <a href="viewinfo.asp?id=<% =rs("ID") %>" title="查看該同學(xué)詳細資料"><% =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&">近期調(diào)查:"&unhtml(rs("t_topic"))&"</font>"
Response.Write frontvote
%>
<br>發(fā)起人:<a href="viewinfo.asp?id=<% =rs("ID") %>" title="查看該同學(xué)詳細資料"><% =rs("t_author") %></a>
<%
rs.close
'參與人數(shù)和票數(shù)
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>參與同學(xué):<font class="ft1"><% =voters %></font>人
總票數(shù):<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">目前票數(shù)</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"> </th>
</tr>
</table>
</form>
<%
rs.close
ELSE
Response.Write "(暫時沒有調(diào)查項目)"
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>
<b>By</b> <a href="viewinfo.asp?id=<% =rs("ID") %>" title="查看該同學(xué)詳細資料"><% =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>)
點擊:<% =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>)
點擊:<% =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>發(fā)表于:<% =rs("t_datepub") %><br>點擊:<% =rs("t_clk") %> 回復(fù):<% =rs("t_re") %> 最后發(fā)表:<% =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> </div>
</td>
</tr></table>
<!--插入在線統(tǒng)計-->
<!--#include file="in_online.asp"-->
<!--插入網(wǎng)站置底-->
<!--#include file="in_bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -