Free member publishing information is limited to 5

Source: Internet
Author: User

1. fields are required for the member data table:

Maximum number of member levels

Gradeid limit

Default Value: 3 (ordinary member) 5

Int int type

2. Key implementation:

Compare the number of records released on the current day with the limit

Note:

ImplementationCode:

<%
If p_z_z_type = "" then
Set gssql1=conn.exe cute ("select gradeid, limit from websen_corporation where id =" & gsid &"")
'Set gssql1=conn.exe cute ("select gradeid from websen_corporation where id =" & gsid &"")
Gsgradeid1 = gssql1 (0)
Limit1 = gssql1 (1)
'Limit1 = 5
If gsgradeid1 = 3 then
Set totil1=conn.exe cute ("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 = 'sell '")
'Set totil1=conn.exe cute ("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 = 'sell '")
Totil1 = totil1 (0)
Totil2= limit1-totil1
If totil2 = 0 then
Response. Write "you have released <font color = # ff0000>" & limit1 & "</font> supply information today. The supply information cannot be published! To publish more information, <a href =/hy.html target = _ blank> <font color = # ff0000> Upgrade to VIP member now! </Font> </a>"
Else
Response. Write "You can also publish <font color = # ff0000>" & totil2 & "</font> supply information today! To publish more information, <a href =/hy.html target = _ blank> <font color = # ff0000> Upgrade to VIP member now! </Font> </a>"
End if
End if
End if
%>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.