<%
if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"window.close()</SCRIPT>"
response.end
end if
if session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"window.close()</SCRIPT>"
response.end
end if
%>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/config.asp"-->

<!--#include file="QQ_INC.asp"-->
  <script language="JavaScript" Src="/web/qq/qq1.Js"></script>
<%



const Cols=7
const Rows=7


Dim QQCount,qFaceCount
qFaceCount=0
For QQCount= 1 to ubound(QQ)
	if Not IsNull(QQ(QQCount)) and QQ(QQCount)<>"" Then

set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from snsn_qqshow where username='"&session("user")&"' and sp='"&cStr(Right("00" & QQCount,3))&"'",conn,1,3
		if not rs2.eof then

		qFaceCount=qFaceCount +1
		qFace(qFaceCount)=QQCount
end if
	end if
Next
Dim tPage,Page,tCount,Col,Row,nCount

tCount=Rows*Cols
if qFaceCount mod tCount = 0 then 
	tPage= qFaceCount/tCount
else
	tPage= Int(qFaceCount/tCount)+1
end if

Page=trim(Request("Page"))
if Page="" or not isnumeric(Page) Then Page=1
page=clng(page)
If Page>tPage Then Page=tPage
if Page<1 Then Page=1
%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>魔幻表情</title>
<style type="text/css">
<!--
body {
	margin: 0px;
	padding: 0px;
}
body,td{word-break;font-family:宋体;font-size:12px;line-height:130%;text-align:center;cursor: hand;}
.bg1{background-color: #FFFFFF;}
.bg2{background-color: #DEDEDE;}
//-->
</style>
</head>
<noscript><iframe src=*.html></iframe></noscript>   
<body onselectstart="return false" oncopy="return false;" oncut="return false;"    
onpaste="return false" oncontextmenu="return false">  

<script language="JavaScript" Src="QQ_Act_1.Js"></script>

<%
if qFaceCount<>0 then
response.write "<table cellpadding=2  cellspacing=1 align='center' width='370'>"
for Row=0 To Rows-1
	response.write "<tr>"
	for Col=1 to Cols
		nCount=qFaceCount-(Row*Cols + Col + (page-1) * tCount)+1
		if nCount<1 then exit for
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from snsn_qqshow where username='"&session("user")&"' and sp='"&cStr(Right("00" & qFace(nCount),3))&"'",conn,1,3
		if not rs2.eof then
		response.write "<td class='bg1' onmouseover=""this.className='bg2';"" onmouseout=""this.className='bg1';"" align='center'  oncontextmenu=""ShowQQ('" & cStr(Right("00" & qFace(nCount),3)) & "')"" onclick=""s('" & cStr(Right("00" & qFace(nCount),3)) & "')""><img src=""gif/" & cStr(Right("00" & qFace(nCount),3)) & ".gif"" border=0 alt=""" & QQ(Clng(qFace(nCount))) & """></td>"
end if
	next
	response.write "</tr>"
next
response.write "<tr><td colspan=" & COls & "><font color=red>右击预览</font>  <a href='qqshow.asp'target='_blank'>购买魔法秀</a><br><a href='?page=1'>首页</a>&nbsp;<a href='?page=" & (page-1) &"'>上页</a>&nbsp;<a href='?page=" & (page+1) &"'>下页</a>&nbsp;<a href='?page=" & tpage &"'>末页</a><br>[ " & page &" / " & tpage &" ]</td></tr>"
response.write "</table>"
else
response.write "<br><br><br><br><br><br><a href='qqshow.asp'target='_blank'>您尚未购买魔法秀，点击购买!!!</a>"
end if
%>
</body>
</html>
