Home
Programme
Rooms
Purpose
Team
Forum
History
Community
Photogallery
Contact
<% Dim ShowFormBecauseOfError ShowFormBecauseOfError=False If Request("Action")="PostMessage" Then If Request("SenderName")="" Or Request("Comment")="" Then ShowFormBecauseOfError=True End If End If Dim Rst Set Rst=Server.CreateObject("ADODB.Recordset") If Request("Action")="ShowForm" Or ShowFormBecauseOfError Then Dim ParentID Dim NewNumber Dim NewPosKuerzel Dim Tail If Request("ReplyTo")="" Then ParentID=0 Else ParentID=CLng(Request("ReplyTo")) End If Rst.Open "SELECT Min(Num) FROM Forum WHERE ParentID=" & ParentID,DBCon If IsNull(Rst(0)) Then NewNumber=9999 Else NewNumber=Rst(0)-1 Rst.Close Rst.Open "SELECT PosKuerzel FROM Forum WHERE ID=" & ParentID,DBCon If Rst.EOF Then NewPosKuerzel="" Else NewPosKuerzel=Rst("PosKuerzel") End If Rst.Close Z=NewNumber Tail="" & Z Mod 10 : Z=Int(Z/10) Tail="" & Z Mod 10 & Tail : Z=Int(Z/10) Tail="" & Z Mod 10 & Tail : Z=Int(Z/10) Tail="" & Z Mod 10 & Tail NewPosKuerzel=NewPosKuerzel & Tail %>

 

METHOD=post> > > >
Name: ">
E-Mail:
Kommentar:
>Zurück
<% Else ' Nicht ShowForm, sondern PostMessage oder gar nix %>
?Action=ShowForm>Dein Kommentar

<% ' Posten, falls über Formular aufgerufen If Request("Action")="PostMessage" Then Rst.Open "SELECT * FROM Forum WHERE PosKuerzel='" & Request("NewPosKuerzel") & "'",DBCon If Rst.EOF Then Rst.Close Rst.Open "Forum",DBCon,2,2 Rst.AddNew Rst("PosKuerzel")=Request("NewPosKuerzel") Rst("ParentID")=CLng(Request("ParentID")) Rst("Num")=CLng(Request("NewNumber")) Rst("Datum")=Now() Rst("Name")=Server.HTMLEncode(Request("SenderName")) Rst("EMail")=Server.HTMLEncode(Request("SenderEMail")) Rst("Text")=Server.HTMLEncode(Request("Comment")) Rst.Update End If Rst.Close End If ' Nun das Forum anzeigen Rst.Open "SELECT * FROM Forum ORDER BY PosKuerzel",DBCon If Rst.EOF Then %> Das Forum enthält derzeit noch keine Einträge. <% Else Do Until Rst.EOF Response.Write "" Response.Write "
" Response.Write "" Response.Write " " Response.Write " " Response.Write " " Response.Write "
" If Len(Rst("PosKuerzel"))>4 Then For I=1 To (Len(Rst("PosKuerzel"))-4)/4 Response.Write "" Next Response.Write " " End If If Not IsNull(Rst("EMail")) And Rst("EMail")<>"" Then Response.Write "" Response.Write Rst("Name") Response.Write "" Else Response.Write "" & Rst("Name") & "" End If Response.Write " / " & Rst("Datum") & "Antworten
" Response.Write Rst("Text") Response.Write "
" Rst.MoveNext Loop End If Rst.Close End If ' ShowForm %>