Thread: Loopadd problem
View Single Post
  #3 (permalink)  
Old August 22nd, 2008, 01:49 AM
beetle_jaipur beetle_jaipur is offline
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default

Hi,
Here is my asp part of coding
my site address : www.lotuseducation.co.in, if you want to have a look.

if you want to see inner pages: plz feel free to visit with this


and thanks for your reply, it gave me lot of support and encouragement

ashok sharma
***************************

<% if Session("LoginStatus") = "LotusStudent" then %>
<%  Response.Buffer=true
        Response.ExpiresAbsolute=0
%>
<%
dim LinkID, SubID, OptID
if Request.QueryString("LinkID")<>"" then
    LinkID = Request.QueryString("LinkID")
else
LinkID = ""
end if

if Request.QueryString("SubID")<>"" then
    SubID = Request.QueryString("SubID")
else
    SubID = ""
end if

if Request.QueryString("OptID")<>"" then
    OptID = Request.QueryString("OptID")
else
    OptID = ""
end if

%>

<%
Dim ObjPageLinksLSMainInbox__TabID
ObjPageLinksLSMainInbox__TabID = "LSMInBox"
If (Request.querystring("TabID")  <> "") Then
  ObjPageLinksLSMainInbox__TabID = Request.querystring("TabID")
End If
%>

<%
Dim ObjPageLinksLSMainInbox
Dim ObjPageLinksLSMainInbox_numRows

Set ObjPageLinksLSMainInbox = Server.CreateObject("ADODB.Recordset")
ObjPageLinksLSMainInbox.ActiveConnection = MM_Connection_STRING
ObjPageLinksLSMainInbox.Source = "SELECT *  FROM dbo.PageLinks  WHERE ( LinkMainTab ='" + Replace(ObjPageLinksLSMainInbox__TabID, "'", "''") + "' or LinkMainTab = 'Common Links' or LinkMainTab = 'Notice Board')"
ObjPageLinksLSMainInbox.CursorType = 0
ObjPageLinksLSMainInbox.CursorLocation = 2
ObjPageLinksLSMainInbox.LockType = 1
ObjPageLinksLSMainInbox.Open()

ObjPageLinksLSMainInbox_numRows = 0
%>

<%
Dim ObjMyResults__SID
ObjMyResults__SID = "06JPR000001"
If (Session("LoginID")  <> "") Then
  ObjMyResults__SID = Session("LoginID")
End If
%>

<%
if OptID = "Results" then
    Dim ObjMyResults
    Dim ObjMyResults_numRows

    Set ObjMyResults = Server.CreateObject("ADODB.Recordset")
    ObjMyResults.ActiveConnection = MM_Connection_STRING
    ObjMyResults.Source = "SELECT dbo.ResultsPath.TestName, dbo.ResultsPath.FilePath  FROM dbo.Results, ResultsPath  WHERE ( StudentID = '" + Replace(ObjMyResults__SID, "'", "''") + "' ) and dbo.results.TestNo = dbo.ResultsPath.TestNo"
    ObjMyResults.CursorType = 0
    ObjMyResults.CursorLocation = 2
    ObjMyResults.LockType = 1
    ObjMyResults.Open()

    ObjMyResults_numRows = 0
end if
%>

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
ObjPageLinksLSMainInbox_numRows = ObjPageLinksLSMainInbox_numRows + Repeat1__numRows
%>

<%
Dim Repeat3__numRows
Dim Repeat3__index

Repeat3__numRows = -1
Repeat3__index = 0
ObjMyResults_numRows = ObjMyResults_numRows + Repeat3__numRows
%>

<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
ObjPageLinksLSMainInbox_numRows = ObjPageLinksLSMainInbox_numRows + Repeat2__numRows
%>

<%
Dim RepeatNoticeBoard__numRows
Dim RepeatNoticeBoard__index

RepeatNoticeBoard__numRows = -1
RepeatNoticeBoard__index = 0
ObjPageLinks_numRows = ObjPageLinks_numRows + RepeatNoticeBoard__numRows
%>

</head>

<body>
<div id="MainBox">
<div id="ThreeColumns">
<div id="Section1">
  <div id="RoundRect_1">
  <h2>Main Options</h2>
  <div id="RRect_1">
    [list]
    <%
    While ((Repeat2__numRows <> 0) AND (NOT ObjPageLinksLSMainInbox.EOF))
    if ((ObjPageLinksLSMainInbox.Fields.Item("LinkSubTab" ).Value) = "Main")  
        then
    %>
    <li><a href=<%=(ObjPageLinksLSMainInbox.Fields.Item("Link HRef").Value)%>><%=(ObjPageLinksLSMainInbox.Fields .Item("LinkText").Value)%></a></li>
    <%
    end if
    Repeat2__index=Repeat2__index+1
    Repeat2__numRows=Repeat2__numRows-1
    ObjPageLinksLSMainInbox.MoveNext()
    Wend
    %>
    </ul>

    </div>
</div>

<div id="BottomRect_1">
</div>

  <div id="RoundRect_1">
  <h2>Available Options</h2>
    <% if OptID = "Results" then%>
    <div id="RRect_1">
    [list]
        <%
    if not ObjMyResults.BOF then
    ObjMyResults.Movefirst()
    While ((Repeat3__numRows <> 0) AND (NOT ObjMyResults.EOF))
    %>
    <li><a href=<%=(ObjMyResults.Fields.Item("FilePath").Valu e)%> target="_blank" ><%=(ObjMyResults.Fields.Item("TestName").Value)%> </a></li>
    <%
    Repeat3__index=Repeat3__index+1
    Repeat3__numRows=Repeat3__numRows-1
    ObjMyResults.MoveNext()
    Wend
    else
    Response.Write("<LI>No result found</LI>")
    end if
    %>
      </ul>
</div>
    <% else %>
    <div id="RRect_1">
    [list]
    <%
    ObjPageLinksLSMainInbox.movefirst()
    While ((Repeat1__numRows <> 0) AND (NOT ObjPageLinksLSMainInbox.EOF))
    if ((ObjPageLinksLSMainInbox.Fields.Item("LinkSubTab" ).Value) = LinkID) then
    %>
    <li><a href=<%=(ObjPageLinksLSMainInbox.Fields.Item("Link HRef").Value)%>><%=(ObjPageLinksLSMainInbox.Fields .Item("LinkText").Value)%></a></li>
    <%
    end if
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    ObjPageLinksLSMainInbox.MoveNext()
    Wend
    %>
      </ul>
    </div>
    <%end if %>
</div>

<div id="BottomRect_1">
</div>


<div id="RoundRect_1">
<h2>Lotus Info Zone</h2>
    <div id="RRect_1">
    [list]
    <%
    ObjPageLinksLSMainInbox.movefirst()
    While ((Repeat1__numRows <> 0) AND (NOT ObjPageLinksLSMainInbox.EOF))
    if ((ObjPageLinksLSMainInbox.Fields.Item("LinkMainTab ").Value) = "Common Links") then
    %>
    <li><a href=<%=(ObjPageLinksLSMainInbox.Fields.Item("Link HRef").Value)%>><%=(ObjPageLinksLSMainInbox.Fields .Item("LinkText").Value)%></a></li>
    <%
    end if
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    ObjPageLinksLSMainInbox.MoveNext()
    Wend
    %>
      </ul>

</div>
</div>

<div id="BottomRect_1">
</div>


<div id="Section3">
<%Select case OptID
    case "Results-" %>
    <div id="BottomRound_1"></div>

    <% case "ComAna" %>
    <div id="BottomRound_1"></div>

    <% case "AnswerKey" %>
    <div id="BottomRound_1"></div>

    <% case "Summary" %>
    <div id="BottomRound_1"></div>

    <% case "MyOMR" %>
    <div id="BottomRound_1"></div>

    <% case "Top10" %>
    <div id="BottomRound_1"></div>

    <% case else %>
    <% end select %>

    <div id="RoundedRect">
    <h2>Just see, what's new in your Inbox today</h2>
    <div id="Contents">
    <div id="TableDisplay">
    [list]
    <%
    ObjPageLinksLSMainInbox.movefirst()
    While ((RepeatNoticeBoard__numRows <> 0) AND (NOT ObjPageLinksLSMainInbox.EOF))

    if ((ObjPageLinksLSMainInbox.Fields.Item("LinkMainTab ").Value) = "Notice Board") then
    %>
    <li><a href=<%=(ObjPageLinksLSMainInbox.Fields.Item("Link Href").Value)%> target="_blank"><Strong> <%=(ObjPageLinksLSMainInbox.Fields.Item("LinkSubTa b").Value)%> : </Strong><%=(ObjPageLinksLSMainInbox.Fields.Item("Li nkText").Value)%> </a></li>
    <%
    end if
    RepeatNoticeBoard__index=RepeatNoticeBoard__index+ 1
    RepeatNoticeBoard__numRows=RepeatNoticeBoard__numR ows-1
    ObjPageLinksLSMainInbox.MoveNext()
        Wend
        %>
    </ul>


    </div>
    </div>
    </div>
    <div id="BottomRound_1"></div>

</div>
</div>

<div id='footer'>
      <p><strong>Copyright &copy; 2006 Lotus Educare (P.)Limited. All Rights Reserved.</strong></p>
</div>
<% else
    Response.redirect("../../../../Default.asp")
        end if
%>
</div>
</body>

</html>
<%
ObjPageLinksLSMainInbox.Close()
Set ObjPageLinksLSMainInbox = Nothing
%>
<%
if OptID = "Results" then
ObjMyResults.Close()
Set ObjMyResults = Nothing
end if
%>
Reply With Quote