Verdiğim Formu kendine göre editle basit bir forum örneği------- forum.asp - ---------------<% Response.Buffer = True %><% call esasUst %><%islek = Request.QueryString("islek")if islek = "catdel" thencall catdelend if%><%set objForum = server.createobject("ADODB.Recordset")sqlobjForum = "Select * from forumlar order by forumid asc"objForum.open sqlobjForum,baglantim,1,3sf = Request.querystring("sf")if sf="" then sf=1end if%>
<% If Session("Oturum") <> "Acik" Then %><%else%><% end if %><% set oSU = baglantim.execute("Select Top 1 * from UYELER order by U_ID desc") %>
Aktif Kullanıcı Sayısı:
Hoş geldin <% If Session("Oturum") <> "Acik" Then %>Ziyaretçi <%else%> <% Set objRead = baglantim.Execute("SELECT Count(*) AS toplam FROM MESAJLAR WHERE GIDEN = '"& Session("Uye_Adi") &"' AND GOR = True") Set objSpe = baglantim.Execute("SELECT Count(*) AS ozel FROM MESAJLAR WHERE TYPE=1") Set objNRead = baglantim.Execute("SELECT Count(*) AS okunmayan FROM MESAJLAR WHERE GIDEN = '"& Session("Uye_Adi") &"' AND OKUNDU = False AND GOR = True") Set getName = baglantim.Execute("SELECT * FROM UYELER WHERE U_ID = "& Session("Uye_Id")) %> <%=getName("AD")%><%end if%>
/cell-background.gif"> Forum Tanımı
/cell-background.gif">Konular
/cell-background.gif"> Cevaplar
/cell-background.gif">Son İleti
<%Set cat = Server.CreateObject("ADODB.Recordset")baglac = "Select * from forumcat order by adi asc" cat.Open baglac,baglantim,1,3if cat.eof or cat.bof thenResponse.write "Kategoriye Henüz Bir Forum Eklenmemiş"end if%><% for o=1 to 9999if cat.eof then exit for %>
<%Set cvps = Server.CreateObject("ADODB.Recordset")baglac = "Select * from forumcevaplar WHERE forumid = " & rec("forumid")cvps.Open baglac,baglantim,1,3topcvp = cvps.recordcount%> <%=topcvp%>
<%Set snkn = Server.CreateObject("ADODB.Recordset")baglac = "Select * from forumsorular WHERE forumid = " & rec("forumid") & " order by soruid desc"snkn.Open baglac,baglantim,1,3if not snkn.eof then %>(<%=snkn("tarih")%>) <%Set rsMember = Server.CreateObject("ADODB.Recordset")baglac = "Select * from UYELER where U_ID = " & snkn("yazan")rsMember.Open baglac,baglantim,1,3%>','','width=500,height=260,scrollbars=0')"><%=rsMember("U_ADI")%><% else %>
Konu Yok<% end if %>
<% rec.movenext %><% next %><% cat.movenext %><% next %>
/cell-background.gif"> Forum İstatistikleri
<% Set objList = Server.CreateObject("ADODB.RecordSet") objList.Open "SELECT * FROM UYELER ORDER BY U_ADI", baglantim, 3, 3 %> <%=objList.RecordCount%> kayıtlı kullanıcı, <% Set objList2 = Server.CreateObject("ADODB.RecordSet") objList2.Open "SELECT * FROM forumsorular ORDER BY soruid", baglantim, 3, 3 %> <%=objList2.RecordCount%> Konu açmış ve toplam <% Set objList3 = Server.CreateObject("ADODB.RecordSet") objList3.Open "SELECT * FROM forumcevaplar ORDER BY cevapid desc", baglantim, 3, 3 %> <%=objList3.RecordCount%> cevap göndermiş. En yeni üyemiz:<% Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "SELECT * FROM UYELER ORDER BY U_ID Desc", baglantim, 3, 3 %> ', 'Muratsoft', 'height=200,width=400')"> <%=rs("U_ADI")%> Şu Anki aktif Kullanıcılar: <% Session.LCID = 1033liste = DateAdd("n", -1 * dk_g, Now())Set objList=Server.CreateObject("Adodb.Recordset")Sorgu = "SELECT * FROM UYELER WHERE SON_TARIH >= #"&liste&"# ORDER BY SON_TARIH DESC"objList.Open Sorgu, Baglantim, 3, 3Session.LCID = lcid If objList.EOF Then uNumber = "0" Else uNumber = objList.RecordCount End If If uNumber = "0" Then Response.Write " Şu Anda Online Üye Yok " end if If uNumber = "0" AND Session("Oturum") = "Kapali" Then Response.Redirect Request.ServerVariables("HTTP_URL") For I = 1 To uNumber If Session("Oturum") = "Acik" Then Response.Write ""&objList("U_ADI")&", " Else Response.Write ""&objList("U_ADI")& ", " End If objList.MoveNext Next objList.Close Set objList = Nothing%>