Jump to content
php.lv forumi

kas tie pa failiem


goma smile

Recommended Posts

kas tie pa failiem .asp ?? ka var uz php partaisit

 

rekas vina ieksa

 

 

<!-- #include file="Config.inc" -->

<html>

<head>
<title>Forum v1.00 :: Created by Tjoekbezoer (c)</title>

<body bgcolor="<%= BackgroundColor %>"  link="<%= LinkColor %>" vlink="<%= LinkColorVisited %>" alink="<%= LinkColorActive %>">
<!-- #include file="Style.inc" -->
</head>

<%= note %>

<%
'If the querystring for accessing a board is empty (id1), then display the board survey
If Request.Querystring("id1") = "" Then
%>
<table width=<%= TableSurveyAllWidth %> border=0 cellspacing=0 cellpadding=5>

<tr>
<td colspan=2 class="Left" align=left width="<%= TableSurveyBoardsWidth %>"><font face="Arial" color="Black" size=3><b>Boards:</b></font></td>
<td class="Middle" align=left width="<%= TableSurveyPostsWidth %>"><font face="Arial" color="Black" size=3><b>Posts:</b></font></td>
<td class="Right" align=left width="<%= TableSurveyReactionsWidth %>"><font face="Arial" color="Black" size=3><b>Reactions:</b></font></td>
</tr>

<tr><td height=10></tr>

<%

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(vPath & "messages.mdb"))


'Display all the topics defined in Config.inc
i=0
j=1
For Each topic in Topics
sSQLP = "SELECT Count(*) AS amount FROM messages WHERE Id1 =" & j & " AND OriginalMessage = 'Yes'"
Set Posts = oConn.Execute(sSQLP)
sSQLR = "SELECT Count(*) AS amount FROM messages WHERE Id1 =" & j & " AND OriginalMessage = 'No'"
Set Reactions = oConn.Execute(sSQLR)

Response.Write "<tr style='font-family=Arial;color=Black;font-size=14px'>"
Response.Write"<td class='ContLeft'><img src='Images/Folder.gif' width=40 height=30></td>"
Response.Write "<td class='ContMiddle' width=70% height=60 align=left>"
Response.Write "<a href='index.asp?id1=" & TopicID(i) & "'><font color='Black'>" & topic & "</font></a><br>"
Response.Write "<font size=1 face='Verdana'>" & TopicDesc(i) & "</font>"
Response.Write "</td>"
Response.Write "<td class='ContMiddle'>" & Posts("amount").Value & "</td>"
Response.Write "<td class='ContRight'>" & Reactions("amount").Value & "</td>"
Response.Write "</tr><tr><td height=10></td></tr>"
i = i+1
j = j + 1
Next

Response.Write "</table>"

'If id1 querystring is not empty, display the board with that id1 number
Else
%>


<%
Id1 = Request.Querystring("id1")
Board = Id1 - 1

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(vPath & "messages.mdb"))


sSQL = "SELECT Id1, Id2, Id3, Titel, Name, LastReaction, LastReactionId, Locked FROM messages WHERE OriginalMessage = 'Yes' AND Id1 = " & Id1 & " ORDER BY LastReaction DESC"

Set Forum = oConn.Execute(sSQL)
%>

<font style="font-family=<%= BoardStandardFontFace %>;color=<%= BoardStandardFontColor %>;font-size=<%= BoardStandardFontSize %>">

<font size=4>Board: <b><%= Topics(Board) %></b></font><br>
<br>

<< <a href="index.asp">Back to the Board Survey</a> | <a href="Form_Message.asp?id1=<%= Id1 %>">Create new discussion</a> >><br>
<br>

<table border=0 cellspacing=0 cellpadding=0 width=100%>

<tr style="font-family=<%= BoardTitleFontFace %>;color=<%= BoardTitleFontColor %>;font-size=<%= BoardTitleFontSize %>;font-weight=Bold">
<td colspan=2 class="Left" align=left width=50%>Title:</td>
<td class="Middle" align=left>Reactions:</td>
<td class="Middle" align=left nowrap>Started by:</td>
<td class="Right" align=left nowrap>Last reaction:</td>
</tr>


<% Do While NOT Forum.EOF %>
<tr style="font-family=<%= BoardThreadFontFace %>;color=<%= BoardThreadFontColor %>;font-size=<%= BoardThreadFontSize %>" bgcolor="<%= TableThreadColorLight %>">
<td align=left>
<% 'Checking if Thread is Locked
Locked = Forum("Locked").Value
If Locked = "Yes" Then
%>
<img src="Images/Lock.gif" width=17 height=16 alt="This means it's a closed discussion. You need a password to access this discussion." border=0>
<% Else %><b></b><% End If %>
</td>
<td align=left height=35>
<% If Session("Mod") = "Yes" Then %>
<a href="Delete.asp?Id2=<%= Forum("Id2").Value %>" target="_new"><font color="Red"><b>DEL</b></font></a> | 
<% End If %>
<a href="message.asp?id3=<% =Forum("Id3").Value %>"><% =Forum("Titel").Value %></a>
</font>
</td>
<td align=left>
<% id2 = Forum("Id2").Value %>	
<%
sSQLR = "SELECT Count(*) AS amount FROM messages WHERE Id2 =" & id2 & " AND OriginalMessage = 'No'"
Set Reacties = oConn.Execute(sSQLR)
%>
    <%= Reacties("amount").Value %>
</font>
</td>
<td align=left>
<% =Forum("Name").Value %>
</font>
</td>
<td align=left>
<% =Forum("LastReaction").Value %>
</font>
</td>
</tr>

<%
Forum.MoveNext
If Forum.EOF Then
%>
<tr><td></td></tr>
<% Else %>

<tr style="font-family=<%= BoardThreadFontFace %>;color=<%= BoardThreadFontColor %>;font-size=<%= BoardThreadFontSize %>" bgcolor="<%= TableThreadColorDark %>">
<td align=left>
<% 'Checking if Thread is Locked
Locked = Forum("Locked").Value
If Locked = "Yes" Then
%>
<img src="Images/Lock.gif" width=17 height=16 alt="This means it's a closed discussion. You need a password to access this discussion." border=0>
<% Else %><b></b><% End If %>
</td>
<td align=left height=35>
<% If Session("Mod") = "Yes" Then %>
<a href="Delete.asp?Id2=<%= Forum("Id2").Value %>" target="_new"><font color="Red"><b>DEL</b></font></a> | 
<% End If %>
<a href="message.asp?id3=<% =Forum("Id3").Value %>"><% =Forum("Titel").Value %></a>
</font>
</td>
<td align=left>
<% id2 = Forum("Id2").Value %>	
<%
sSQLR = "SELECT Count(*) AS amount FROM messages WHERE Id2 =" & id2 & " AND OriginalMessage = 'No'"
Set Reacties = oConn.Execute(sSQLR)
%>
    <%= Reacties("amount").Value %>
</font>
</td>
<td align=left>
<% =Forum("Name").Value %>
</font>
</td>
<td align=left>
<% =Forum("LastReaction").Value %>
</font>
</td>
</tr>
<%
Forum.MoveNext
End If
Loop
%>


</table>
<% End If %>


</table>

Edited by goma smile
Link to comment
Share on other sites

×
×
  • Create New...