asp script
Hvordan kan jeg fx sætte maks på en tilmelding fx hvis nu jeg har 50 pladser og når de er tilmeldt skal den lukke selv eller side der er flere ledige pladserjeg bruger nedenstående nu
<% If strMode=6 Then %>
<form action="lblogin.asp" method="post" enctype="multipart/form-data">
<table width="606" border="0">
<tr>
<td width="600" bgcolor="#0066FF"><font size="2" face="Verdana" color="#FFFFFF"><strong>Tilmeldinger</strong></font></td>
</tr>
<tr>
<td width="600">
<table width="600" border="1">
<tr bgcolor="#CCCCCC">
<td width="335"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tilmelder</font></td>
<td width="50"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Antal voksne</font></td>
<td width="50"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Antal børn</font></td>
<td width="50"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Betalt</font></td>
<td width="75"> </td>
<td width="50"> </td>
</tr>
<%
Dim AntalV, AntalB
AntalV=0
AntalB=0
GetTilmeldinger
If not objRS.Eof Then
While not objRS.Eof
Response.Write "<tr>"
Response.Write "<td width='335'>"
If objRS("Medlem")=1 Then
Response.Write "<font face='verdana' size='1' color='#000000'>"
Else
Response.Write "<font face='verdana' size='1' color='#FF0000'>"
End If
Response.Write objRS("Navn") & "<br>"
Response.Write objRS("Adresse") & "<br>"
Response.Write objRS("Postnr") & " " & objRS("Distrikt") & "<br>"
Response.Write objRS("Telefon") & " - " & objRS("EMail")
Response.Write "</font></td>"
Response.Write "<td width='50' align='right'><font face='verdana' size='1'>" & objRS("NumV") & "</font></td>"
Response.Write "<td width='50' align='right'><font face='verdana' size='1'>" & objRS("NumB") & "</font></td>"
Response.Write "<td width='50' align='center'><font face='verdana' size='1'>"
If objRS("Betalt")=1 Then
Response.Write "Betalt"
End If
Response.Write "</font></td>"
Response.Write "<td width='75' align='center'><font face='verdana' size='1'>"
If objRS("Betalt")=0 Then
Response.Write "<a href='lbregbetal.asp?AID=" & strNr & "&TID=" & objRS("TID") & "&Betal=1'>[Registrer betaling]</a>"
Else
Response.Write "<a href='lbregbetal.asp?AID=" & strNr & "&TID=" & objRS("TID") & "&Betal=0'>[Fjern betaling]</a>"
End If
Response.Write "</font></td>"
Response.Write "<td width='50' align='center'><font face='verdana' size='1'><a href='slettilmelding.asp?TId=" & objRS("TID") & "&AId=" & strNr & "'>[slet]</font></td>"
AntalV=AntalV+objRS("NumV")
AntalB=AntalB+objRS("NumB")
objRS.MoveNext
WEnd
End If
%>
<tr bgcolor="#CCCCCC">
<td width="335"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Total</font></td>
<td width="50" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><% Response.Write AntalV %></font></td>
<td width="50" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><% Response.Write AntalB %></font></td>
<td width="175" colspan="3"> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<% End If %>