您的位置:首页 > 其它

免费会员发布信息限制为5条的实现

2011-07-20 17:08 197 查看
1,会员数据表需要有字段:

  会员等级  限制条数

  gradeid limit

默认值 3(普通会员) 5

类型 int int

2,关键实现:

判断当天发布信息记录的条数统计数和limit的比较

备注:

具体实现代码:

<%
if p_z_Z_Type="卖" then
set gssql1=conn.execute("select gradeid,limit from Websen_corporation where id="&gsid&"")
'set gssql1=conn.execute("select gradeid from Websen_corporation where id="&gsid&"")
gsgradeid1 =gssql1(0)
limit1 =gssql1(1)
'limit1=5
if gsgradeid1 =3 then
set totil1=conn.execute("select count(info_id) from Websen_Info where ( YEAR(limitDate) = YEAR(getdate()) AND MONTH(limitDate) = MONTH(getdate()) AND DAY(limitDate) = DAY(getdate()) ) and gsid="&gsid&" and type='卖' ")
'set totil1=conn.execute("select count(info_id) from Websen_Info where ( YEAR(dateandtime) = YEAR(getdate()) AND MONTH(dateandtime) = MONTH(getdate()) AND DAY(dateandtime) = DAY(getdate()) ) and gsid="&gsid&" and type='卖' ")
totil1=totil1(0)
totil2=limit1-totil1
if totil2=0 then
response.write"您今天已经发布了<font color=#FF0000>"&limit1&"</font>条供应信息。不能在发布供应信息了!想发布更多信息<a href=/hy.html target=_blank><font color=#FF0000>立即升级为VIP会员!</font></a>"
else
response.write"你今天还能发布<font color=#FF0000>"&totil2&"</font>条供应信息!想发布更多信息<a href=/hy.html target=_blank><font color=#FF0000>立即升级为VIP会员!</font></a>"
end if
end if
end if
%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: