Expand|Select|Wrap|Line Numbers
- <%@ Language =vbscript%>
- <% Option Explicit %>
- <html>
- <head><TITLE>VOICE OF BARAUNIANS</TITLE></head>
- <body>
- <!--#include file="front.inc"-->
- <div style="Position:Absolute; width:700; TOP:0; left:180; background-color:#f0f0f0">
- <%
- Dim conn
- dim objrs
- Dim R
- Dim R1
- Dim vtopsub
- dim vtopid
- dim vempno
- Dim countloop
- Dim replycount
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.Open("DSN=ORACLE; User Id = STARTER; Password = STARTER")
- Set R = Server.CreateObject("ADODB.Recordset")
- Set R1 = Server.CreateObject("ADODB.Recordset")
- Set R = Conn.Execute("SELECT top_id, top_sub, launch_by, launch_dt FROM topmaster order by top_id ")
- %>
- <div style="Position:Absolute; top:100; left:0; width:820; height:472; background-color:skyblue">
- <table border=0>
- <tr>
- <td align='center' colspan='10%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Top Id</b></font></td>
- <td align='center' colspan='40%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Topic</b></font></td>
- <td align='center' colspan='40%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Employee Name</b></font></td>
- <td align='center' colspan='20%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Posted Date</b></font></td>
- <td align='center' colspan='10%' bgcolor='#f0f0f0'><font face="arial" size=2><b>No.Of Reply</b></font></td>
- <td align='center' colspan='10%' bgcolor='#f0f0f0'><font face="arial" size=2><b>Reply</b></font></td>
- </tr>
- <%
- If Not R.EOF Then
- R.Movefirst
- countloop = 1
- Do While Not R.EOF%>
- <tr>
- <td align='right' colspan='10%'><font face="arial" size=2><%Response.Write R("top_id")%></font></td>
- <td align='left' colspan='40%'><font face="arial" size=2><a href=voice.asp><%Response.Write R("top_sub")%></a></font></td>
- <td align='left' colspan='40%'><font face="arial" size=2><%Response.Write R("launch_by")%></font></td>
- <td align='center' colspan='20%'><font face="arial" size=2><%Response.Write R("launch_dt")%></font></td>
- <%Set R1 = Conn.Execute("SELECT top_id, rep_id from topic where top_id = " & R("top_id"))
- If R1.Recordcount >= 0 Then
- replycount = R1.Recordcount
- else
- replycount = 0
- end if %>
- <td align='center' colspan='10%'><font face="arial" size=2><%Response.Write replycount%></font></td>
- <td> <input type="radio" name="vtopid" value="<%=R("top_id") %>"></td>
- </tr>
- <%countloop = countloop + 1
- If countloop <= 10 Then
- R.Movenext
- Else
- R.Movenext
- End If
- Loop %>
- <%
- If Not R.EOF Then
- Response.Cookies("top_id") = vtopid
- end if
- %>
- </table>
- <table width=765>
- <tr>
- <td align='right'><input type="submit" name="submit" value="Reply" onclick="reply()"></td>
- <td><input type ="button" value="EXIT" onClick="window.close()"></td>
- </tr>
- </table>
- <%end if%>
- </div>
- <%conn.close
- Set conn = Nothing
- %>
- <script language="Javascript">
- function brvoice()
- {
- window.location = "brvoice.asp"
- }
- function reply()
- {
- window.location = "voicereply.asp"
- }
- function voice()
- {
- window.location = "voice.asp"
- }
- function newtopic()
- {
- window.location = "newtopic.asp"
- }
- </script>
- </body>
- </html>
- asp code for display row detail after clicked but it only disply firs record please correct the code where is logic failed.
- <% @ Language =vbscript%>
- <% Option Explicit %>
- <html>
- <head><TITLE>VOICE OF BARAUNIANS</TITLE></head>
- <body>
- <!--#include file="front.inc"-->
- <%If Request.Cookies("userid") = "" Then
- Response.Redirect "login.asp"
- Else%>
- <div style="Position:Absolute; width=700; TOP:100; left:180; background-color: #e0e0e0">
- <%
- Dim conn
- Dim R
- Dim R1
- Dim i
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.Open("DSN=ORACLE; User Id = STARTER; Password = STARTER")
- Set R = Server.CreateObject("ADODB.Recordset")
- Set R1 = Server.CreateObject("ADODB.Recordset")
- Set R = Conn.Execute("SELECT a.top_id, a.top_sub, a.launch_by, a.launch_dt, a.msg,b.rep_id, b.rep_by, b.rep_dt, b.reply FROM topmaster a,topic b ")
- %>
- <table border=2 width=700 >
- <tr>
- <td align='center' bgcolor='lightgrey'>Topic Id</td><td colspan='10%' align='right'><%Response.Write R("top_id")%></td>
- </tr>
- <tr>
- <td align='center' bgcolor='lightgrey'>Topic Subject</td><td colspan='10%' align='right'><%Response.Write R("top_sub") %></td>
- </tr>
- <tr>
- <td align='center' bgcolor='lightgrey'>Employee Name</td><td colspan='40%' align='right'><%Response.Write R("launch_by") %></td>
- </tr>
- <tr>
- <td align='center' bgcolor='lightgrey'>Posted Date</td><td colspan='40%' align='right'><%Response.Write R("launch_dt")%></td>
- </tr>
- <tr>
- <td align='center' bgcolor='lightgrey'>No.Of Reply</td>
- </tr>
- <table><b> VOICE</b>
- <tr><td colspan='10%' align='left'><%Response.Write R("msg")%></td></tr>
- </table>
- <%
- conn.close
- Set conn = Nothing
- %>
- <script language="Javascript">
- function brvoice()
- {
- window.location = "brvoice.asp"
- }
- function voicereply()
- {
- window.location = "voicereply.asp"
- }
- function voice()
- {
- window.location = "reply.asp"
- }
- </script>
- <br>
- <table border=1; width = 700>
- <tr>
- <table align="center">
- <tr>
- <td align="center"><input type="button" name="post voice" value="Vew Report" onclick= "voice()">
- <td align="center"><input type="button" name="post voice" value="Reply" onclick= "voicereply()">
- <td><input type="button" name="Back" value="Back" onclick="brvoice()"></td>
- </td>
- </td>
- </tr>
- </table>
- </tr>
- </table>
- <% End If %>
- </body>
- </html>