?? awardpane.asp
字號:
<% Option Explicit %>
<!--#include file="../../FS_Inc/Const.asp" -->
<!--#include file="../../FS_Inc/Function.asp" -->
<!--#include file="../../FS_InterFace/MF_Function.asp" -->
<!--#include file="../lib/strlib.asp" -->
<!--#include file="../lib/UserCheck.asp" -->
<!--#include file="lib/cls_award.asp"-->
<%'Copyright (c) 2006 Foosun Inc. Code by Einstein.liu
'no cache
response.expires=0
response.addHeader "pragma" , "no-cache"
response.addHeader "cache-control" , "private"
'-------------------------------------------
Dim awardRs,awardObj,currentDate,currentAwardID
currentAwardID=0
currentDate=DateValue(Now())
Set awardRs=User_Conn.execute("Select awardID from FS_ME_award where opened=0")
if not awardRs.eof then
currentAwardID=awardRs("awardID")
Set awardObj=New cls_award
awardObj.getAwardInfo(currentAwardID)
End if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=GetUserSystemTitle%></title>
<link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../FS_Inc/ProtoType.js"></script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body class="hback">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
<tr>
<td class="xingmu" height="20"><img src="../images/award.gif" alt="積分抽獎" border="0">積分抽獎</td>
</tr>
<%if currentAwardID=0 then%>
<tr>
<td class="hback"><img src="../images/alert.gif" />暫無抽獎活動</td>
</tr>
<%Else%>
<tr>
<td class="hback">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
<tr>
<td class="hback" width="400" height="120"><div id="awardPic" align="center"><img src="<%=awardObj.AwardPic%>" width="400" height="120" alt="第 <%=awardObj.awardid%> 期積分抽獎主題圖片" /></div></td>
<td class="hback" valign="top">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td class="hback" align="center"><strong>第 <%=awardObj.awardid%> 期</strong></td>
</tr>
<tr>
<td class="hback" align="center"><strong>主題:<%=awardObj.awardName%></strong></td>
</tr>
<tr>
<td class="hback" align="center">活動時間從<%=awardObj.award_startDate%>到<%=awardObj.award_EndDate%></td>
</tr>
<tr>
<td class="hback" align="center">離結束時間還有<font color="#FF0000"><%=(DateValue(awardObj.award_EndDate)-DateValue(Now()))%></font>天</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<%
Dim UserRs,Integral'當前會員積分
Dim onceMoreTF
onceMoreTF=false
'獲得當前會員積分--------------------------------
Set UserRs=User_Conn.execute("Select Integral from FS_ME_Users where UserNumber='"&session("FS_UserNumber")&"'")
if not UserRs.eof then
Integral=UserRs("Integral")
Else
Integral=0
End if
'------------------------------------------------
Dim PrizeArray,tr_count,i,joinNumber,Rs
tr_count=0
PrizeArray=split(awardObj.PrizeIDS,",")
if isArray(PrizeArray) then
for i=0 to Ubound(PrizeArray)
if not isNumeric(PrizeArray(i)) then exit for
awardObj.getPrizeInfo(PrizeArray(i))
joinNumber=User_Conn.execute("Select count(prizeID) from FS_ME_User_Prize where prizeID="&PrizeArray(i))(0)
if tr_count Mod 4=0 then
Response.Write("<tr>"&vbcrlf)
End if
Set Rs=User_Conn.execute("Select ID From FS_ME_User_Prize where prizeid="&PrizeArray(i)&" And usernumber='"&session("FS_UserNumber")&"'")
onceMoreTF=false
if not Rs.eof then
onceMoreTF=true
End if
Rs.close
Set Rs=nothing
Response.Write("<td class=""hback"">"&vbcrlf)
Response.Write("<table bodor=""0"" cellpadding=""1"" cellspacing=""1"" >"&vbcrlf)
Response.Write("<tr>"&vbcrlf)
Response.Write("<td><div><img src="""&awardObj.PrizePic&""" width=""80"" height=""80"" border=""0""></div></td>")
Response.Write("<td><div><img src=""../images/award.gif""/><font color=""red"">"&awardObj.PrizeName&"</font><img src=""../images/award.gif""/></div><div><font color=""red"">"&awardObj.PrizeGrade&"</font> 等獎</div><div><img src=""../images/moneyOrPoint.gif"" alt=""抽取該獎品所需要的積分""/> "&awardObj.prize_NeedPoint&" 積分</div><div>參加人數:"&joinNumber&"</div></td>")
Response.Write("</tr>"&vbcrlf)
Response.Write("<tr>"&vbcrlf)
if Clng(Integral)<Clng(awardObj.prize_NeedPoint) then
Response.Write("<td class=""hback"" clospan=""2""><img src=""../images/alert.gif""/><font color=""red"">積分不足</font></td>"&vbcrlf)
Elseif onceMoreTF Then
Response.Write("<td colspan=""2"" class=""hback""> <img src=""../images/alert.gif""/><font color=""red"">已參與過</font></td>")
Else
Response.Write("<td class=""hback"" clospan=""2""><a href=""#"" onclick=""joinAward("&PrizeArray(i)&","&awardObj.prize_NeedPoint&","&awardRs("awardID")&")""><img src=""../images/joinaward.bmp"" border=""0""/></a></td>"&vbcrlf)
End if
Response.write("</tr>"&vbcrlf)
Response.Write("</table>"&vbcrlf)
Response.Write("</td>")
tr_count=tr_count+1
if tr_count Mod 4=0 then
Response.Write("</tr>"&vbcrlf)
End if
next
if tr_count Mod 4<>0 then
for i=(tr_count Mod 4)+1 to 4
Response.Write("<td class=""hback"">"&vbcrlf)
Response.Write("<table bodor=""0"" cellpadding=""1"" cellspacing=""1"">"&vbcrlf)
Response.Write("<tr>"&vbcrlf)
Response.Write("<td></td>")
Response.Write("</tr>"&vbcrlf)
Response.Write("</table>"&vbcrlf)
Response.Write("</td>")
next
Response.Write("</tr>"&vbcrlf)
End if
End if
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
<%End if%>
</table>
</body>
</html>
<script language="javascript">
<!--
function checkIT(Obj)
{
Obj.firstChildNode.checked=true;
}
function joinAward(id,Integral,awardID)
{
var url="awardAction.asp"
var pars="action=join&awardID="+awardID+"&Integral="+Integral+"&prizeID="+id+"&rnd="+Math.random();
if(confirm("確定要進行該操作\n該次抽獎將消費積分 :"+Integral))
{
var myAjax = new Ajax.Request(url,{method: 'get', parameters: pars, onComplete: showResponse});
}
function showResponse(originalRequest)
{
var result=originalRequest.responseText;
var joinNumber;
alert(result);
location="awardPane.asp?rnd="+Math.random();
}
}
-->
</script>
<%
Set Conn=nothing
Set User_Conn=nothing
Set Fs_User = Nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -