Question

Adding Another Line in a <h2>

Asked by: coreybryant

I have the code below that I am trying to work out - an example of the processed code: http://www.merchantaccountresources.com/links/1.asp - My Merchant Account Blog [sponsor]

Currently it is two columns on that row.  

Is there a way to possibly get sponsor on the right side of that cell or how can I add a third colum so that I have more control over sponsor?

Thanks!

strRsp = strRsp & ("<center><table border=""0"" width=""96%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td bgcolor=""#ffffff"" width=""70%"" style=""padding:4px; border-bottom:1px #111111 solid""><b>" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h2 style=""color:#cc0000; display:inline"">"
		else
		strRsp =  strRsp & "<h2 style=""color:#000000; display:inline"">"		
	end if
 
	strRsp = strRsp & (Rec("linkName") & "</h2>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<font style=""font-size:8pt"">"		
	strRsp = strRsp & ("&nbsp;<sup>[<font color=""#cc0000"">sponsor</font>]</sup></font>")
	end if

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-03 at 15:59:11ID24706367
Topics

Active Server Pages (ASP)

,

Web Languages/Standards

Participating Experts
1
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. merchant account
    what is a good merchant account for a small to midsize online business. I figure the revenue to be 50,000-200,000 per year but can grow. I've been looking at paypal but it seems that users has to be redirected to paypal for payment and thier Web services API doesn't support c...
  2. table colums
    how can I make a table that is to be filled with data pulled from a database where the colums are created automatically? What I mean is that if there are 5 results that there will be three colums in the first row and two in the second, etc... I know this can be done but I ca...
  3. Create colums and put the comments to the cells besides th…
    Hi, Create colums and put the comments to the cells besides them. I hyave a excel that has lots of colums and lots of commets for different cells. Any way to create a colum next to the cells and put the data in the comments to the newly created colum cells. Exclude the name ...
  4. Insert data from colums comparing cell data.
    Hi, Insert data from colums comparing cell data. Attached is an excel that has to check colum A cell data with Colum D cell data in another sheet and then if match found insert the colum B & C data to the comments. more detailed explanation in the excel... Hope someone...
  5. Excel macro when run gets the Colum "DF" cell data into t…
    Hi, Excel macro when run gets the Colum "DF" cell data into the same rows Colum "S". When run checks for colum "DF" cell if cell has data then create a comment in colum "S" and place data of "DF" like this "User has &qu...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: carrzkissPosted on 2009-09-03 at 16:31:32ID: 25255934

Can you please provide the rest of the code for the 2 columns?
This is just the 1 column.

 

by: carrzkissPosted on 2009-09-03 at 16:36:54ID: 25255963

This is what I have come up with so far.
I stripped out the really unnecessary code in order to view the table correctly.

Carrzkiss


<table border="0" width="96%" cellspacing="0" cellpadding="0">
<tr><td bgcolor="#ffffff" width="70%" style="padding:4px; border-bottom:1px #111111 solid">
<%if Rec("hotLink") = 1 then%>
<h2 style="color:#cc0000; display:inline">
<%else%>
<h2 style="color:#000000; display:inline">		
<%end if%>
<%=Rec("linkName")%></h2>
<div align="right">
  <%if Rec("hotLink") = 1 then %>	
  &nbsp;<sup>[<span style="color:#cc0000; font-size:8pt;">sponsor</span>]</sup>
  <%end if%>
</div></td></tr></table>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:

Select allOpen in new window

 

by: coreybryantPosted on 2009-09-03 at 16:44:24ID: 25255995

I think all of it is below.  Thanks!

	strRsp = strRsp & "<form name=""dirSort""  method=""GET"" >"
	strRsp = strRsp & "<center><table id=""func_dir130"" border=""0"" cellspacing=""0"" cellpadding=""0"" style=""width:96%; background-color:#c3d9e6"">"
	strRsp = strRsp & "<tr><td style=""font: 11px verdana, arial, helvetica, sans-serif; color:#ffffff; width:100%; text-align:right; background-color:#c3d9e6"">"&VbCrLf	
 
	strRsp = strRsp & "There are "& Rec.RecordCount & " results displaying in " & Rec.PageCount & " pages. "
 	strRsp = strRsp & " Sort Order: <input type=""hidden"" name=""catID"" value="& catID &">"
	strRsp = strRsp & "<select name=""goto""  size=""1"" OnChange=formsubmit(document.dirSort);  style=""font:11px verdana, arial, helvetica, sans-serif;"">"
	strRsp = strRsp & "<option value=""goto"" selected>Sort By</option>"
	strRsp = strRsp & "<option value=""siteName"" >Site Name</option>"
	strRsp = strRsp & "<option value=""rating"">Rating</option>"
	strRsp = strRsp & "<option value=""totalHits"" >Hits</option>"
	strRsp = strRsp & "<option value=""submitDate"" >Date</option>"
	strRsp = strRsp & "</select>&nbsp;</font></td></tr></table></center></form>"
 
	Do Until Rec.AbsolutePage <> curpage OR Rec.Eof			
	strRsp = strRsp & ("<center><table id=""func_dir130"" border=""0"" width=""96%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""padding:4px; border-bottom:1px #111111 solid; background-color:#c3d9e6; width:70%"">" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h3>"
		else
		strRsp =  strRsp & "<h3>"		
	end if
 
	strRsp = strRsp & ("<a href="""& appUrl &"/links/"& Rec("linkID") & ".asp"">")
	strRsp = strRsp & (Rec("linkName") & "</a></h3>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<font style=""font-size:8pt"">"		
	strRsp = strRsp & ("&nbsp;<sup>[<font color=""#cc0000"">sponsor</font>]</sup></font>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
 
	strRsp = strRsp & ("</td><td style=""padding:4px; border-bottom:1px #111111 solid; width:30%; text-align:right;background-color:#c3d9e6"">")
	strRsp = strRsp & (" <b>&nbsp;" & vbNewLine )
			if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if
	strRsp = strRsp &  ("<a href=""javascript:openWindowRating('"& appUrl &"/rate.asp?linkID=" & Rec("linkID")& "')"">")
	strRsp = strRsp &  ("<img src="""& appUrl & "/images/star_"& rating & ".gif"" border=""0""></a>" & vbnewline)
 
	strRsp = strRsp & ("</td>" & vbnewline )
	strRsp = strRsp & ("</tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir130"" border=""0"" width=""96%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:12px; padding:2px; width:55%; background-color:#c3d9e6""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Hits Today: " & Rec("todayHits") & "&nbsp;|&nbsp;" & vbnewline)
	strRsp = strRsp & ("Overall Hits : " & Rec("totalHits") & "</td>" & vbnewline)
 
	strRsp = strRsp & ("<td style=""font-size:12px; padding:2px; width:25%; background-color:#c3d9e6""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Updated: " & formatDateTime(Rec("submitDate"), 2) & "</td>" & vbnewline)
 
	ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)
 
	strRsp = strRsp & ("<td style=""font-size:12px; padding:2px; width:20%; text-align:right; background-color:#c3d9e6""> &nbsp;Avg. Hit :" & FormatNumber(avg, 1) & vbNewLine )
	strRsp = strRsp & ("</tr></table>" & vbnewline)
 
	strRsp = strRsp & ("<table id=""func_dir130"" border=""0"" width=""96%"" cellspacing=""1"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:13px; line-height:19px; padding-bottom:8px; background-color:#c3d9e6; border-top:solid 1px #000000; text-align:left"">" & vbNewLine )
	strRsp = strRsp & (Rec("linkDesc") & "</td></tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir130"" border=""0"" width=""96%"" cellspacing=""1"" cellpadding=""0"" >" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:11px; padding:4px; border-bottom:1px solid #333333; text-align:right""> " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/redir.asp?catID="& Rec("catID") & "&linkID="& Rec("linkID") & """>Visit Listing</a> | " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/links/" & Rec("linkID")& ".asp#review"">Reviews</a>" & vbNewLine )
	strRsp = strRsp & ( " &nbsp; </td></tr>" & vbnewline )
	strRsp = strRsp & ( "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table></center><br/><br/>" & vbnewline )
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:

Select allOpen in new window

 

by: carrzkissPosted on 2009-09-03 at 17:39:34ID: 25256184

If all you want to do is simply move over the [Sponsor]
Then you can wrap it in a <div> tag and align it to the Right.


              <img border="0" src="<%=appUrl%>/images/new.gif">
            <%if Rec("submitDate") > date - 5 then      %>
            <%end if%>
          <div align="right">
          <%if Rec("hotLink") = 1 then %>
            <font style="font-size:8pt">            
          &nbsp;<sup>[<font color="#cc0000">sponsor</font>]</sup></font>
            <%end if%>
            </div>

 

by: coreybryantPosted on 2009-09-04 at 05:51:37ID: 25258987

Unfortunately, I don't understand ASP too well so that code means very little to me since my posted code had a lot of strRsp in it and I am not certain how to integrate your code with mine.

So instead trying to understand your code, I decided to see if I could just add some padding since I was not sure where the <div> you provided would go and where the strRsp would go.

	strRsp = strRsp & ("<center><table id=""func_dir265"" style=""background-color:#c3d9e6; width:96%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""padding:4px; border-bottom:1px #111111 solid; width:70%; text-align:left"">" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h2 style=""color:#cc0000; display:inline; padding-right:30px"">"
		else
		strRsp =  strRsp & "<h2 style=""color:#000000; display:inline; padding-right:30px"">"
	end if
 
	strRsp = strRsp & (Rec("linkName") & "</h2>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<p style=""font-size:8pt; text-align:right; display:inline;padding-left:60px"">"		
	strRsp = strRsp & ("&nbsp;<sup>[<span style=""color:#cc0000"">sponsor</span>]</sup></p>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:

Select allOpen in new window

 

by: carrzkissPosted on 2009-09-04 at 08:46:37ID: 25260734

try it without all that crap in it.
I HATE not being able to visual see what I am doing.
So.
Make another file and copy and paste the code below into it.
Save it and run it and see if it will do what you want it to do.

(You will have to add in your connections and everything to make it work.)
If you use DW (Dreamweaver) or similuar program, you will not be able to visual see the table form layout with the provided code below.

(If you get some errors running this code, and you have a LIVE site up with it, you can send me over the link and I will have a look at it for you. You can send over the link via my email, just browse my profile for it)
Carrzkiss

	<form name="dirSort"  method="GET" >
	<center><table id="func_dir130" border="0" cellspacing="0" cellpadding="0" style="width:96%; background-color:#c3d9e6">
	<tr><td style="font: 11px verdana, arial, helvetica, sans-serif; color:#ffffff; width:100%; text-align:right; background-color:#c3d9e6">
 
	There are <%Rec.RecordCount%> results displaying in <%Rec.PageCount%> pages.
 	 Sort Order: <input type="hidden" name="catID" value="<%=catID%>">
	<select name="goto"  size="1" OnChange="formsubmit(document.dirSort);"  style="font:11px verdana, arial, helvetica, sans-serif;">
	<option value="goto" selected>Sort By</option>
	<option value="siteName" >Site Name</option>
	<option value="rating">Rating</option>
	<option value="totalHits" >Hits</option>
	<option value="submitDate" >Date</option>
	</select>&nbsp;</font></td></tr></table></center></form>
 
	<%Do Until Rec.AbsolutePage <> curpage OR Rec.Eof%>			
	<center><table id="func_dir130" border="0" width="96%" cellspacing="0" cellpadding="0">	
	<tr><td style="padding:4px; border-bottom:1px #111111 solid; background-color:#c3d9e6; width:70%">
	<%if Rec("hotLink") = 1 then %>
		<h3>
		<%else%>
		<h3>		
	<%end if%>
 
	<a href="<%=appUrl%>/links/<%=Rec("linkID")%>.asp">
	<%=Rec("linkName")%></a></h3>
	
 
	    
	        <img border="0" src="<%=appUrl%>/images/new.gif">
	      <%if Rec("submitDate") > date - 5 then	%>
	      <%end if%>
          <div align="right">
          <%if Rec("hotLink") = 1 then %>
	      <font style="font-size:8pt">		
          &nbsp;<sup>[<font color="#cc0000">sponsor</font>]</sup></font>
	      <%end if%>
     </div></td><td style="padding:4px; border-bottom:1px #111111 solid; width:30%; text-align:right;background-color:#c3d9e6">
	 <b>&nbsp;
			<%if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if%>
	<a href="javascript:openWindowRating('<%=appUrl%>/rate.asp?linkID=<%=Rec("linkID")%>')">
	<img src="<%=appUrl%>/images/star_<%=rating%>.gif" border="0"></a>
 
	</td>
	</tr></table>
 
	<table id="func_dir130" border="0" width="96%" cellspacing="0" cellpadding="0">	
	<tr><td style="font-size:12px; padding:2px; width:55%; background-color:#c3d9e6"> &nbsp;
	Hits Today: <%=Rec("todayHits")%>&nbsp;|&nbsp;
	Overall Hits : <%=Rec("totalHits")%></td>
 
	<td style="font-size:12px; padding:2px; width:25%; background-color:#c3d9e6"> &nbsp;
	Updated: <%formatDateTime(Rec("submitDate"), 2)%></td>
 
	<%ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)%>
 
	<td style="font-size:12px; padding:2px; width:20%; text-align:right; background-color:#c3d9e6"> &nbsp;Avg. Hit :<% FormatNumber(avg, 1)%></td>
	</tr></table>
 
	<table id="func_dir130" border="0" width="96%" cellspacing="1" cellpadding="0">
	<tr><td style="font-size:13px; line-height:19px; padding-bottom:8px; background-color:#c3d9e6; border-top:solid 1px #000000; text-align:left">
	<%=Rec("linkDesc")%></td></tr></table>
 
	<table id="func_dir130" border="0" width="96%" cellspacing="1" cellpadding="0" >	
	<tr><td style="font-size:11px; padding:4px; border-bottom:1px solid #333333; text-align:right"> 
	<a href="<%=appUrl%>/redir.asp?catID=<%=Rec("catID")%>&amp;linkID=<%=Rec("linkID")%>">Visit Listing</a> | 
	<a href="<%=appUrl%>/links/<%=Rec("linkID")%>.asp#review">Reviews</a>
	 &nbsp; </td></tr>
	</td></tr>
	</table></center><br/><br/>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:

Select allOpen in new window

 

by: coreybryantPosted on 2009-09-04 at 15:14:01ID: 25263800

What I did - it doesn't seem to be working on Internet Explorer 8 unfortunately, so I am guessing that I do need three columns - but adding that middle column is where I have a problem.

Below is the code for the page.

Line 144 is where the <table> is created for the "link name".  Line 155 / 156 is what I need to be in another / separate cell.

I also created an HTML page / images as well.

The page showing the error: http://www.merchantaccountresources.com/directory/1-Blogs.asp

If you notice in IE8 and Firefox, My Merchant Account Blog is left aligned (which I want).  In IE8, Merchant Account Blog seems to be centered and a bit bigger (font size) and no rating seems to be centered. (which I don't want).

If you use Firefox and have that "Outline Element" add-on, I tried to id some <table> and <td> to help see exactly which <table> and <td> is having problems.  I can easily create / insert a <td> with HTML, but with the ASP, I just do not know what to add, etc.  

Lines 268-272 confuses me as well - I thought that the "hot" (or "sponsored") links would be red - but that only seems to happen on http://www.merchantaccountresources.com/links/1.asp

If you need more of the code, etc - please let me know.  I am hoping that I provided everything.   Thanks!

<%
 
	function buildNavi(naviID) 
	dim catIDList(30)
	dim catNameList(30)
	dim catNameDirList(30)
	dim i 
	Dim pID
	Dim cats
	Dim navi
	Dim e
	Dim strLine
	i = 0
 
	Set con = Server.CreateObject ("ADODB.Connection")
	con.Open strCon
	do until naviID = 0
	SQL = "SELECT catID, catName, parentID FROM gportal_Categories where catID = "&pID
	Set rs = Server.Createobject("ADODB.Recordset")
	rs.Open "SELECT catID, catName, parentID,dirnavi  FROM gportal_Categories WHERE catID = " & naviID, con, 3, 3, 1
	catIDList(i) = rs("catID")
	catNameList(i) = rs("catName")
	catNameDirList(i) = rs("dirnavi")
	naviID = rs("parentID")
	i = i + 1
	loop	
	'rs.Close
	con.Close
	Set rs = nothing
	Set con = nothing
	cats = ubound(catIDList)
	navi = catNameList(0)
	for e = i - 1  to 1 step - 1
	strLine = strLine &  "<a href=""/directory/"& catNameDirList(e) & """>" & catNameList(e) & "</a> / " & vbCrlf
	next 
	buildNavi = strLine & navi
	end function
	
	
	
	Function subCat(cID, page)
	Dim objRec, i, DisplayNum, oCon, Rec, ipage, rating, showpages, z, strRsp
	strRsp = " " 
	if page = 0 or page = "" then
	Set objCon = Server.CreateObject ("ADODB.Connection")
	objCon.open strCon
	objCon.execute("Update gportal_Categories set hits = hits + 1 where catID = "& cID &";")
	strSQL ="Select catID, catName, parentID, cCats, cLinks, lastLink, dirnavi from gportal_Categories where parentID = "& cID & " order by catName asc"
	set objRec = objCon.execute(strSQL)
	i = 0
	strRsp = strRsp &  "<table id=""func_dir51"" style=""border:0px; border-collapse:collapse; width:96%"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf	
	Do	While NOT objRec.EOF
	if  i = 0 Then
		strRsp = strRsp &  "<tr>"&VbCrLf
	end if
		strRsp = strRsp &  "<td style=""font-size:12px; width:50%; vertial-align:top; height:20px"">"&VbCrLf
		strRsp = strRsp &  "<b><a href="""& appUrl &"/directory/"& objRec("dirnavi") &""">"&VbCrLf
		strRsp = strRsp &  objRec("catName")&"</a></b>"&VbCrLf
		strRsp = strRsp &  "&nbsp;<font size=""1""> ("& objRec("cCats") & ") ("& objRec("cLinks") & ")</font>"
		if objRec("lastLink") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
		strRsp = strRsp &  " <br>"&VbCrLf&VbCrLf
		end if		
		strRsp = strRsp &  "</td>"
	if  i = 0 Then
		i = i + 1
		else
		strRsp = strRsp &  "</tr>"&VbCrLf&VbCrLf&VbCrLf
		i = i - 1
	end if
	objRec.MoveNext
	Loop
	strRsp = strRsp & "</table><br/>"
	
	objRec.Close
	objCon.Close
	Set objRec = nothing
	Set objCon = nothing
 
	end if
 
	subCat = strRsp
 
	end function
 
 
 
	function dirListing(catID, curpage)
	
	If curpage = "" Then
		curpage = 1
		else
		curpage = int(curpage)
	End If
	if curpage = 0 then curpage = 1
	catID = int(catID)
	Set oCon = Server.CreateObject ("ADODB.Connection")
	Set Rec = Server.CreateObject ("ADODB.Recordset")
	oCon.Open strCon
	Rec.CursorLocation = adUseClient		
	
	SQL = "SELECT * FROM gportal_Links WHERE catID = " & catID
	SQL = SQL & " and active = 0 "
	
	If request.querystring("goto") = "rating" then
	SQL = SQL & " order by rating desc"
	elseIf request.querystring("goto") = "siteName" then
	SQL = SQL & " order by linkName ASC"
	elseIf request.querystring("goto") = "totalHits" then
	SQL = SQL & " order by totalHits desc"
	elseIf request.querystring("goto") = "submitDate" then
	SQL = SQL & " order by submitDate desc"
	else
	SQL = SQL & " order by hotLink desc"
	end if	
	Rec.Open SQL, oCon, adOpenStatic, adLockReadOnly, adCmdText
 
	if Rec.EOF OR Rec.BOF Then
	strRsp = strRsp & "<br /><br />"
	if catID > 0 then
	strRsp = strRsp & "<p style=""text-align:center;font-variant:small-caps;"">No listing found</p>"
	end if
	else	
	Rec.PageSize = 10
    Rec.AbsolutePage = curpage
	next10 = getNext10(curpage)
	prev10 = getPrev10(curpage)	
	
	strRsp = strRsp & "<form name=""dirSort""  method=""GET"" >"
	strRsp = strRsp & "<table id=""func_dir130"" cellspacing=""0"" cellpadding=""0"" style=""width:100%; background-color:#abcadc; border:0px"">"
	strRsp = strRsp & "<tr><td id=""td-func_dir131"" style=""font: 11px verdana, arial, helvetica, sans-serif; color:#000000; width:100%; text-align:right; background-color:#c3d9e6"">"&VbCrLf	
 
	strRsp = strRsp & "There are "& Rec.RecordCount & " results displaying in " & Rec.PageCount & " pages. "
 	strRsp = strRsp & " Sort Order: <input type=""hidden"" name=""catID"" value="& catID &">"
	strRsp = strRsp & "<select name=""goto""  size=""1"" OnChange=formsubmit(document.dirSort);  style=""font:11px verdana, arial, helvetica, sans-serif; background-color:#c3d9e6"">"
	strRsp = strRsp & "<option value=""goto"" selected>Sort By</option>"
	strRsp = strRsp & "<option value=""siteName"" >Site Name</option>"
	strRsp = strRsp & "<option value=""rating"">Rating</option>"
	strRsp = strRsp & "<option value=""totalHits"" >Hits</option>"
	strRsp = strRsp & "<option value=""submitDate"" >Date</option>"
	strRsp = strRsp & "</select>&nbsp;</font></td></tr></table></form>"
 
	Do Until Rec.AbsolutePage <> curpage OR Rec.Eof			
	strRsp = strRsp & ("<table id=""func_dir144"" style=""border:0px; border-collapse:collapse; width:100%; text-align:left"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir145"" style=""padding:4px; background-color:#abcadc; width:70%; text-align:left"">" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h3 style=""color:#000000; display:inline; padding-right:30px; text-align:left"">"
		else
		strRsp =  strRsp & "<h3 style=""color:#000000; display:inline; padding-right:30px; text-align:left"">"		
	end if
 
	strRsp = strRsp & ("<a href="""& appUrl &"/links/"& Rec("linkID") & ".asp"">")
	strRsp = strRsp & (Rec("linkName") & "</a></h3>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<p style=""font-size:.9em; text-align:right; display:inline;padding-left:60px"">"		
	strRsp = strRsp & ("[<span style=""color:#cc0000"">sponsor</span>]</p>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
 
	strRsp = strRsp & ("</td><td id=""td-func_dir163"" style=""padding:4px; width:30%; text-align:left;background-color:#abcadc"">")
	strRsp = strRsp & (" <b>&nbsp;" & vbNewLine )
			if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if
	strRsp = strRsp &  ("<a href=""javascript:openWindowRating('"& appUrl &"/rate.asp?linkID=" & Rec("linkID")& "')"">")
	strRsp = strRsp &  ("<img src="""& appUrl & "/images/star_"& rating & ".gif"" border=""0""></a>" & vbnewline)
 
	strRsp = strRsp & ("</td>" & vbnewline )
	strRsp = strRsp & ("</tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir176"" style=""border:0px; border-collapse:collapse; width:100%; text-align:left"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:12px; padding:2px; width:55%; background-color:#abcadc; text-align:left""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Hits Today: " & Rec("todayHits") & "&nbsp;|&nbsp;" & vbnewline)
	strRsp = strRsp & ("Overall Hits : " & Rec("totalHits") & "</td>" & vbnewline)
 
	strRsp = strRsp & ("<td id=""td-func_dir181"" style=""font-size:12px; padding:2px; width:25%; background-color:#abcadc; text-align:left""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Updated: " & formatDateTime(Rec("submitDate"), 2) & "</td>" & vbnewline)
 
	ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)
 
	strRsp = strRsp & ("<td id=""td-func_dir189"" style=""font-size:12px; padding:2px; width:20%; text-align:right; background-color:#abcadc""> &nbsp;Avg. Hit :" & FormatNumber(avg, 1) & vbNewLine )
	strRsp = strRsp & ("</tr></table>" & vbnewline)
 
	strRsp = strRsp & ("<table id=""func_dir192"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir193"" style=""font-size:13px; line-height:19px; padding-bottom:8px; background-color:#abcadc; border-top:dashed 1px #000000; text-align:left"">" & vbNewLine )
	strRsp = strRsp & (Rec("linkDesc") & "</td></tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir196"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"" >" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir197"" style=""font-size:11px; padding-right:10px; text-align:right; background-color:#abcadc; border:0px; padding-bottom:5px""> " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/redir.asp?catID="& Rec("catID") & "&linkID="& Rec("linkID") & """>Visit Listing</a> | " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/links/" & Rec("linkID")& ".asp#review"">Reviews</a>" & vbNewLine )
	strRsp = strRsp & ( " &nbsp; </td></tr>" & vbnewline )
	strRsp = strRsp & ( "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table>" & vbnewline )
	strRsp = strRsp & ("<p style=""border-bottom: double #000000"" " & vbnewline )
 
	Rec.MoveNext
	Loop
	RSPrevPage = curpage -1
	RSNextPage = curpage + 1
	If Next10 > Rec.PageCount Then
	Next10 = Rec.PageCount
	End If
			strPager = strPager & "<div class=""pages"">"
			If prev10 = 1 AND next10 - 1 < 10 Then
			start = 1
			Else
			start = Next10 - 10
			If right(start, 1) > 0 Then
			start = replace(start, right(start, 1), "0")
			start = start + 10
			End If
			End If
			pageName = "?goto="& request.querystring("goto") & "&page="
			If Rec.PageCount > 1 Then
			If next10 > 10 Then
			strPager = strPager &   "<a class=""nextprev"" href=""" & pageName & Prev10 & """>&lt;&lt;  Previous 10 </a> "
			End If
			If NOT RSPrevPage = 0 then
			strPager = strPager &   "<a href=""" & pageName & RSPrevPage & """>&lt;</a> "
			End If
			For P = start to Next10
			
			If NOT P = curpage then
			strPager = strPager &   "<a href=""" & pageName & P & """>" & P & "</a> "
			Else
			strPager = strPager &   "<span class=""current"">" & P & " </span>"
			End If
			Next
			If NOT RSNextPage > Rec.PageCount Then
			strPager = strPager &   "<a href=""" & pageName & RSNextPage & """>&gt;</a> "
			End If
			
			If NOT Next10 = Rec.PageCount Then
			strPager = strPager &   " <a class=""nextprev"" href=""" & pageName & Next10 & """>Next 10 &gt;&gt;</a>"
			End If
			strPager = strPager & "</div>"
			End If
 
			end if 
	
	Rec.Close
	oCon.Close
	set Rec = nothing
	set oCon = nothing
 
	dirListing = strRsp & strPager
	end function
 
	Function displayInfo(linkID)
 
	Set oCon = Server.CreateObject ("ADODB.Connection")
	oCon.Open strCon
	SQL = "SELECT * FROM gportal_Links WHERE linkID = " & linkID
	set Rec = oCon.execute(SQL)
	if NOT Rec.eof then
 
	strRsp = strRsp & ("<table id=""func_dir265"" style=""background-color:#c3d9e6; width:100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""padding:4px; border-bottom:1px #111111 solid; width:70%; text-align:left"">" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h3 style=""color:#cc0000; display:inline; padding-right:30px"">"
		else
		strRsp =  strRsp & "<h3 style=""color:#000000; display:inline; padding-right:30px"">"
	end if
 
	strRsp = strRsp & (Rec("linkName") & "</h3>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<p style=""font-size:8pt; text-align:right; display:inline;padding-left:60px"">"		
	strRsp = strRsp & ("[<span style=""color:#cc0000"">sponsor</span>]</p>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
 
	strRsp = strRsp & ("</td><td style=""padding:4px; border-bottom:1px #111111 solid; text-align:right; width:30%; background-color:#c3d9e6"">")
	strRsp = strRsp & (" <b>&nbsp;" & vbNewLine )
			if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if
	strRsp = strRsp &  ("<a href=""javascript:openWindowRating('"&  appUrl &"/rate.asp?linkID=" & Rec("linkID")& "')"">")
	strRsp = strRsp &  ("<img src="""&  appUrl & "/images/star_"& rating & ".gif"" border=""0""></a>" & vbnewline)
 
	strRsp = strRsp & ("</td>" & vbnewline )
	strRsp = strRsp & ("</tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir296"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:12px; padding:2px; width:55%; text-align:left; background-color:#c3d9e6""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Hits Today: " & Rec("todayHits") & "&nbsp;|&nbsp;" & vbnewline)
	strRsp = strRsp & ("Overall Hits : " & Rec("totalHits") & "</td>" & vbnewline)
 
	strRsp = strRsp & ("<td style=""font-size:12px; padding:2px; background-color:#c3d9e6; width:25%""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Updated: " & formatDateTime(Rec("submitDate"), 2) & "</td>" & vbnewline)
 
	ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)
 
	strRsp = strRsp & ("<td style=""font-size:12px; padding:2px; width:20%; text-align:right;background-color:#c3d9e6""> &nbsp;Avg. Hit :" & FormatNumber(avg, 1) & vbNewLine )
	strRsp = strRsp & ("</tr></table>" & vbnewline)
 
	strRsp = strRsp & ("<table id=""func_dir312"" style=""background-color:#c3d9e6; width:100%; border:0px"" cellspacing=""1"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:13px; line-height:19px; padding-bottom:8px;text-align:left"">" & vbNewLine )
	strRsp = strRsp & (Rec("linkDesc") & "</td></tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir316"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"" >" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:11px; padding:4px; border-bottom:1px solid #333333; text-align:right""> " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/redir.asp?catID="& Rec("catID") & "&linkID="& Rec("linkID") & """>Visit Listing</a> " & vbNewLine )
	
	strRsp = strRsp & ( " &nbsp; </td></tr>" & vbnewline )
	strRsp = strRsp & ( "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table>" & vbnewline )
 
 
	strRsp = strRsp & ("<p style=""text-align:center""><a href=""#review"">Write Your Own Review</a></p>" & vbNewLine )
	strRsp = strRsp & ("<h3 id=""func_dir326"" style=""text-align:center;"" <span style=""color:#cc0000"">" &  request.QueryString("msg") & "</span></h3>" & vbNewLine )
	Rec.close
	set Rec = nothing
	set Rec = oCon.execute("select * from gportal_Reviews where linkID = "& linkID &" AND approve =0 order by reviewID desc;")
	if not Rec.eof then
	strRsp = strRsp & ("<table id=""func_dir331"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""padding:4px; font-size:11px; color:#bd1111; width:100%; background-color:#D6e5ee; text-align:left"">" & vbNewLine )	
	strRsp = strRsp & ("<b>Reviews:</b></td></tr></table>" & vbnewline )
 
	do while not Rec.eof
	strRsp = strRsp & ("<table id=""func_dir335"" style=""border:0px; width:100%; border-collapse:collapse; background-color:#333333"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir338"" style=""padding:2px; font-size:13px; width:60%; background-color:#d6e5ee"">" & vbNewLine )	
	strRsp = strRsp & ("<b>" & Rec("subject") & "</b></td>")
	strRsp = strRsp & ("<td style=""padding:2px; background-color:#D6E5EE; width:40%; text-align:right""> &nbsp;" & vbNewLine )	
	strRsp = strRsp & ("<img src=""images/star_"& Rec("rating") & ".gif"" border=""0""></td></tr>" & vbnewline)
 
	strRsp = strRsp & ("<tr><td style=""background-color:#D6E5EE; width:60%""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("<i>Written by " & Rec("name") & "</td><td style=""background-color:#fbf5d4; width:40%""> <i>" & weekDayName(weekDay(Rec("postDate")), 0) &", " )
	strRsp = strRsp & (MonthName(month(Rec("postDate")), 0) & "  " & Day(Rec("postDate")) & ", " & Year(Rec("postDate")))
 
	strRsp = strRsp & ( "</i></td></tr>" & vbnewline )
 
	strRsp = strRsp & ("<tr><td colspan=""2"" style=""padding:2px; border-bottom:1px #111111 solid; background-color:#ffffff"">" & vbNewLine )
	strRsp = strRsp & (Rec("review") & "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table><br>"  & vbnewline )
	Rec.MoveNext
	loop
	end if
	end if
	displayInfo = strRsp 
	End function
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:

Select allOpen in new window

 

by: carrzkissPosted on 2009-09-04 at 16:31:11ID: 25264158

why are you using the
strRsp
For?
you do not have to use it, if you are properly using your IF Statements.
This makes is a crazy nerve wrecking task to get what you want done.

Did you even try what I send over?

 

by: coreybryantPosted on 2009-09-05 at 07:16:31ID: 25266358

I did try the code above - copied it all and replaced what I thought was what you needed me to replace (below)

That generated:
 
Microsoft VBScript compilation error '800a0400'
Expected statement
C:\CLIENTS\C10489\MERCHANTACCOUNTRESOURCES.COM\PUBLIC_HTML\DIRECTORY\../includes/func_dir.asp, line 129 <% ^

Screen Shot | HTML Page

The reason I am using the strRsp - they came with the code I got.  

<%
 
	function buildNavi(naviID) 
	dim catIDList(30)
	dim catNameList(30)
	dim catNameDirList(30)
	dim i 
	Dim pID
	Dim cats
	Dim navi
	Dim e
	Dim strLine
	i = 0
 
	Set con = Server.CreateObject ("ADODB.Connection")
	con.Open strCon
	do until naviID = 0
	SQL = "SELECT catID, catName, parentID FROM gportal_Categories where catID = "&pID
	Set rs = Server.Createobject("ADODB.Recordset")
	rs.Open "SELECT catID, catName, parentID,dirnavi  FROM gportal_Categories WHERE catID = " & naviID, con, 3, 3, 1
	catIDList(i) = rs("catID")
	catNameList(i) = rs("catName")
	catNameDirList(i) = rs("dirnavi")
	naviID = rs("parentID")
	i = i + 1
	loop	
	'rs.Close
	con.Close
	Set rs = nothing
	Set con = nothing
	cats = ubound(catIDList)
	navi = catNameList(0)
	for e = i - 1  to 1 step - 1
	strLine = strLine &  "<a href=""/directory/"& catNameDirList(e) & """>" & catNameList(e) & "</a> / " & vbCrlf
	next 
	buildNavi = strLine & navi
	end function
	
	
	
	Function subCat(cID, page)
	Dim objRec, i, DisplayNum, oCon, Rec, ipage, rating, showpages, z, strRsp
	strRsp = " " 
	if page = 0 or page = "" then
	Set objCon = Server.CreateObject ("ADODB.Connection")
	objCon.open strCon
	objCon.execute("Update gportal_Categories set hits = hits + 1 where catID = "& cID &";")
	strSQL ="Select catID, catName, parentID, cCats, cLinks, lastLink, dirnavi from gportal_Categories where parentID = "& cID & " order by catName asc"
	set objRec = objCon.execute(strSQL)
	i = 0
	strRsp = strRsp &  "<table id=""func_dir51"" style=""border:0px; border-collapse:collapse; width:96%"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf	
	Do	While NOT objRec.EOF
	if  i = 0 Then
		strRsp = strRsp &  "<tr>"&VbCrLf
	end if
		strRsp = strRsp &  "<td style=""font-size:12px; width:50%; vertial-align:top; height:20px"">"&VbCrLf
		strRsp = strRsp &  "<b><a href="""& appUrl &"/directory/"& objRec("dirnavi") &""">"&VbCrLf
		strRsp = strRsp &  objRec("catName")&"</a></b>"&VbCrLf
		strRsp = strRsp &  "&nbsp;<font size=""1""> ("& objRec("cCats") & ") ("& objRec("cLinks") & ")</font>"
		if objRec("lastLink") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
		strRsp = strRsp &  " <br>"&VbCrLf&VbCrLf
		end if		
		strRsp = strRsp &  "</td>"
	if  i = 0 Then
		i = i + 1
		else
		strRsp = strRsp &  "</tr>"&VbCrLf&VbCrLf&VbCrLf
		i = i - 1
	end if
	objRec.MoveNext
	Loop
	strRsp = strRsp & "</table><br/>"
	
	objRec.Close
	objCon.Close
	Set objRec = nothing
	Set objCon = nothing
 
	end if
 
	subCat = strRsp
 
	end function
 
 
 
	function dirListing(catID, curpage)
	
	If curpage = "" Then
		curpage = 1
		else
		curpage = int(curpage)
	End If
	if curpage = 0 then curpage = 1
	catID = int(catID)
	Set oCon = Server.CreateObject ("ADODB.Connection")
	Set Rec = Server.CreateObject ("ADODB.Recordset")
	oCon.Open strCon
	Rec.CursorLocation = adUseClient		
	
	SQL = "SELECT * FROM gportal_Links WHERE catID = " & catID
	SQL = SQL & " and active = 0 "
	
	If request.querystring("goto") = "rating" then
	SQL = SQL & " order by rating desc"
	elseIf request.querystring("goto") = "siteName" then
	SQL = SQL & " order by linkName ASC"
	elseIf request.querystring("goto") = "totalHits" then
	SQL = SQL & " order by totalHits desc"
	elseIf request.querystring("goto") = "submitDate" then
	SQL = SQL & " order by submitDate desc"
	else
	SQL = SQL & " order by hotLink desc"
	end if	
	Rec.Open SQL, oCon, adOpenStatic, adLockReadOnly, adCmdText
 
	if Rec.EOF OR Rec.BOF Then
	strRsp = strRsp & "<br /><br />"
	if catID > 0 then
	strRsp = strRsp & "<p style=""text-align:center;font-variant:small-caps;"">No listing found</p>"
	end if
	else	
	Rec.PageSize = 10
    Rec.AbsolutePage = curpage
	next10 = getNext10(curpage)
	prev10 = getPrev10(curpage)	
	
<%
 
	function buildNavi(naviID) 
	dim catIDList(30)
	dim catNameList(30)
	dim catNameDirList(30)
	dim i 
	Dim pID
	Dim cats
	Dim navi
	Dim e
	Dim strLine
	i = 0
 
	Set con = Server.CreateObject ("ADODB.Connection")
	con.Open strCon
	do until naviID = 0
	SQL = "SELECT catID, catName, parentID FROM gportal_Categories where catID = "&pID
	Set rs = Server.Createobject("ADODB.Recordset")
	rs.Open "SELECT catID, catName, parentID,dirnavi  FROM gportal_Categories WHERE catID = " & naviID, con, 3, 3, 1
	catIDList(i) = rs("catID")
	catNameList(i) = rs("catName")
	catNameDirList(i) = rs("dirnavi")
	naviID = rs("parentID")
	i = i + 1
	loop	
	'rs.Close
	con.Close
	Set rs = nothing
	Set con = nothing
	cats = ubound(catIDList)
	navi = catNameList(0)
	for e = i - 1  to 1 step - 1
	strLine = strLine &  "<a href=""/directory/"& catNameDirList(e) & """>" & catNameList(e) & "</a> / " & vbCrlf
	next 
	buildNavi = strLine & navi
	end function
	
	
	
	Function subCat(cID, page)
	Dim objRec, i, DisplayNum, oCon, Rec, ipage, rating, showpages, z, strRsp
	strRsp = " " 
	if page = 0 or page = "" then
	Set objCon = Server.CreateObject ("ADODB.Connection")
	objCon.open strCon
	objCon.execute("Update gportal_Categories set hits = hits + 1 where catID = "& cID &";")
	strSQL ="Select catID, catName, parentID, cCats, cLinks, lastLink, dirnavi from gportal_Categories where parentID = "& cID & " order by catName asc"
	set objRec = objCon.execute(strSQL)
	i = 0
	strRsp = strRsp &  "<table id=""func_dir51"" style=""border:0px; border-collapse:collapse; width:96%"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf	
	Do	While NOT objRec.EOF
	if  i = 0 Then
		strRsp = strRsp &  "<tr>"&VbCrLf
	end if
		strRsp = strRsp &  "<td style=""font-size:12px; width:50%; vertial-align:top; height:20px"">"&VbCrLf
		strRsp = strRsp &  "<b><a href="""& appUrl &"/directory/"& objRec("dirnavi") &""">"&VbCrLf
		strRsp = strRsp &  objRec("catName")&"</a></b>"&VbCrLf
		strRsp = strRsp &  "&nbsp;<font size=""1""> ("& objRec("cCats") & ") ("& objRec("cLinks") & ")</font>"
		if objRec("lastLink") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
		strRsp = strRsp &  " <br>"&VbCrLf&VbCrLf
		end if		
		strRsp = strRsp &  "</td>"
	if  i = 0 Then
		i = i + 1
		else
		strRsp = strRsp &  "</tr>"&VbCrLf&VbCrLf&VbCrLf
		i = i - 1
	end if
	objRec.MoveNext
	Loop
	strRsp = strRsp & "</table><br/>"
	
	objRec.Close
	objCon.Close
	Set objRec = nothing
	Set objCon = nothing
 
	end if
 
	subCat = strRsp
 
	end function
 
 
 
	function dirListing(catID, curpage)
	
	If curpage = "" Then
		curpage = 1
		else
		curpage = int(curpage)
	End If
	if curpage = 0 then curpage = 1
	catID = int(catID)
	Set oCon = Server.CreateObject ("ADODB.Connection")
	Set Rec = Server.CreateObject ("ADODB.Recordset")
	oCon.Open strCon
	Rec.CursorLocation = adUseClient		
	
	SQL = "SELECT * FROM gportal_Links WHERE catID = " & catID
	SQL = SQL & " and active = 0 "
	
	If request.querystring("goto") = "rating" then
	SQL = SQL & " order by rating desc"
	elseIf request.querystring("goto") = "siteName" then
	SQL = SQL & " order by linkName ASC"
	elseIf request.querystring("goto") = "totalHits" then
	SQL = SQL & " order by totalHits desc"
	elseIf request.querystring("goto") = "submitDate" then
	SQL = SQL & " order by submitDate desc"
	else
	SQL = SQL & " order by hotLink desc"
	end if	
	Rec.Open SQL, oCon, adOpenStatic, adLockReadOnly, adCmdText
 
	if Rec.EOF OR Rec.BOF Then
	strRsp = strRsp & "<br /><br />"
	if catID > 0 then
	strRsp = strRsp & "<p style=""text-align:center;font-variant:small-caps;"">No listing found</p>"
	end if
	else	
	Rec.PageSize = 10
    Rec.AbsolutePage = curpage
	next10 = getNext10(curpage)
	prev10 = getPrev10(curpage)	
	
	strRsp = strRsp & "<form name=""dirSort""  method=""GET"" >"
	strRsp = strRsp & "<table id=""func_dir130"" cellspacing=""0"" cellpadding=""0"" style=""width:100%; background-color:#abcadc; border:0px"">"
	strRsp = strRsp & "<tr><td id=""td-func_dir131"" style=""font: 11px verdana, arial, helvetica, sans-serif; color:#000000; width:100%; text-align:right; background-color:#c3d9e6"">"&VbCrLf	
 
	strRsp = strRsp & "There are "& Rec.RecordCount & " results displaying in " & Rec.PageCount & " pages. "
 	strRsp = strRsp & " Sort Order: <input type=""hidden"" name=""catID"" value="& catID &">"
	strRsp = strRsp & "<select name=""goto""  size=""1"" OnChange=formsubmit(document.dirSort);  style=""font:11px verdana, arial, helvetica, sans-serif; background-color:#c3d9e6"">"
	strRsp = strRsp & "<option value=""goto"" selected>Sort By</option>"
	strRsp = strRsp & "<option value=""siteName"" >Site Name</option>"
	strRsp = strRsp & "<option value=""rating"">Rating</option>"
	strRsp = strRsp & "<option value=""totalHits"" >Hits</option>"
	strRsp = strRsp & "<option value=""submitDate"" >Date</option>"
	strRsp = strRsp & "</select>&nbsp;</font></td></tr></table></form>"
 
	Do Until Rec.AbsolutePage <> curpage OR Rec.Eof			
	strRsp = strRsp & ("<table id=""func_dir144"" style=""border:0px; border-collapse:collapse; width:100%; text-align:left"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir145"" style=""padding:4px; background-color:#abcadc; width:70%; text-align:left"">" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h3 style=""color:#000000; display:inline; padding-right:30px; text-align:left"">"
		else
		strRsp =  strRsp & "<h3 style=""color:#000000; display:inline; padding-right:30px; text-align:left"">"		
	end if
 
	strRsp = strRsp & ("<a href="""& appUrl &"/links/"& Rec("linkID") & ".asp"">")
	strRsp = strRsp & (Rec("linkName") & "</a></h3>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<p style=""font-size:.9em; text-align:right; display:inline;padding-left:60px"">"		
	strRsp = strRsp & ("[<span style=""color:#cc0000"">sponsor</span>]</p>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
 
	strRsp = strRsp & ("</td><td id=""td-func_dir163"" style=""padding:4px; width:30%; text-align:left;background-color:#abcadc"">")
	strRsp = strRsp & (" <b>&nbsp;" & vbNewLine )
			if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if
	strRsp = strRsp &  ("<a href=""javascript:openWindowRating('"& appUrl &"/rate.asp?linkID=" & Rec("linkID")& "')"">")
	strRsp = strRsp &  ("<img src="""& appUrl & "/images/star_"& rating & ".gif"" border=""0""></a>" & vbnewline)
 
	strRsp = strRsp & ("</td>" & vbnewline )
	strRsp = strRsp & ("</tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir176"" style=""border:0px; border-collapse:collapse; width:100%; text-align:left"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:12px; padding:2px; width:55%; background-color:#abcadc; text-align:left""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Hits Today: " & Rec("todayHits") & "&nbsp;|&nbsp;" & vbnewline)
	strRsp = strRsp & ("Overall Hits : " & Rec("totalHits") & "</td>" & vbnewline)
 
	strRsp = strRsp & ("<td id=""td-func_dir181"" style=""font-size:12px; padding:2px; width:25%; background-color:#abcadc; text-align:left""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Updated: " & formatDateTime(Rec("submitDate"), 2) & "</td>" & vbnewline)
 
	ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)
 
	strRsp = strRsp & ("<td id=""td-func_dir189"" style=""font-size:12px; padding:2px; width:20%; text-align:right; background-color:#abcadc""> &nbsp;Avg. Hit :" & FormatNumber(avg, 1) & vbNewLine )
	strRsp = strRsp & ("</tr></table>" & vbnewline)
 
	strRsp = strRsp & ("<table id=""func_dir192"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir193"" style=""font-size:13px; line-height:19px; padding-bottom:8px; background-color:#abcadc; border-top:dashed 1px #000000; text-align:left"">" & vbNewLine )
	strRsp = strRsp & (Rec("linkDesc") & "</td></tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir196"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"" >" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir197"" style=""font-size:11px; padding-right:10px; text-align:right; background-color:#abcadc; border:0px; padding-bottom:5px""> " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/redir.asp?catID="& Rec("catID") & "&linkID="& Rec("linkID") & """>Visit Listing</a> | " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/links/" & Rec("linkID")& ".asp#review"">Reviews</a>" & vbNewLine )
	strRsp = strRsp & ( " &nbsp; </td></tr>" & vbnewline )
	strRsp = strRsp & ( "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table>" & vbnewline )
	strRsp = strRsp & ("<p style=""border-bottom: double #000000"" " & vbnewline )
 
	Rec.MoveNext
	Loop
	RSPrevPage = curpage -1
	RSNextPage = curpage + 1
	If Next10 > Rec.PageCount Then
	Next10 = Rec.PageCount
	End If
			strPager = strPager & "<div class=""pages"">"
			If prev10 = 1 AND next10 - 1 < 10 Then
			start = 1
			Else
			start = Next10 - 10
			If right(start, 1) > 0 Then
			start = replace(start, right(start, 1), "0")
			start = start + 10
			End If
			End If
			pageName = "?goto="& request.querystring("goto") & "&page="
			If Rec.PageCount > 1 Then
			If next10 > 10 Then
			strPager = strPager &   "<a class=""nextprev"" href=""" & pageName & Prev10 & """>&lt;&lt;  Previous 10 </a> "
			End If
			If NOT RSPrevPage = 0 then
			strPager = strPager &   "<a href=""" & pageName & RSPrevPage & """>&lt;</a> "
			End If
			For P = start to Next10
			
			If NOT P = curpage then
			strPager = strPager &   "<a href=""" & pageName & P & """>" & P & "</a> "
			Else
			strPager = strPager &   "<span class=""current"">" & P & " </span>"
			End If
			Next
			If NOT RSNextPage > Rec.PageCount Then
			strPager = strPager &   "<a href=""" & pageName & RSNextPage & """>&gt;</a> "
			End If
			
			If NOT Next10 = Rec.PageCount Then
			strPager = strPager &   " <a class=""nextprev"" href=""" & pageName & Next10 & """>Next 10 &gt;&gt;</a>"
			End If
			strPager = strPager & "</div>"
			End If
 
			end if 
	
	Rec.Close
	oCon.Close
	set Rec = nothing
	set oCon = nothing
 
	dirListing = strRsp & strPager
	end function
 
	Function displayInfo(linkID)
 
	Set oCon = Server.CreateObject ("ADODB.Connection")
	oCon.Open strCon
	SQL = "SELECT * FROM gportal_Links WHERE linkID = " & linkID
	set Rec = oCon.execute(SQL)
	if NOT Rec.eof then
 
	strRsp = strRsp & ("<table id=""func_dir265"" style=""background-color:#c3d9e6; width:100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""padding:4px; border-bottom:1px #111111 solid; width:70%; text-align:left"">" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h3 style=""color:#cc0000; display:inline; padding-right:30px"">"
		else
		strRsp =  strRsp & "<h3 style=""color:#000000; display:inline; padding-right:30px"">"
	end if
 
	strRsp = strRsp & (Rec("linkName") & "</h3>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<p style=""font-size:8pt; text-align:right; display:inline;padding-left:60px"">"		
	strRsp = strRsp & ("[<span style=""color:#cc0000"">sponsor</span>]</p>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
 
	strRsp = strRsp & ("</td><td style=""padding:4px; border-bottom:1px #111111 solid; text-align:right; width:30%; background-color:#c3d9e6"">")
	strRsp = strRsp & (" <b>&nbsp;" & vbNewLine )
			if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if
	strRsp = strRsp &  ("<a href=""javascript:openWindowRating('"&  appUrl &"/rate.asp?linkID=" & Rec("linkID")& "')"">")
	strRsp = strRsp &  ("<img src="""&  appUrl & "/images/star_"& rating & ".gif"" border=""0""></a>" & vbnewline)
 
	strRsp = strRsp & ("</td>" & vbnewline )
	strRsp = strRsp & ("</tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir296"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:12px; padding:2px; width:55%; text-align:left; background-color:#c3d9e6""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Hits Today: " & Rec("todayHits") & "&nbsp;|&nbsp;" & vbnewline)
	strRsp = strRsp & ("Overall Hits : " & Rec("totalHits") & "</td>" & vbnewline)
 
	strRsp = strRsp & ("<td style=""font-size:12px; padding:2px; background-color:#c3d9e6; width:25%""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Updated: " & formatDateTime(Rec("submitDate"), 2) & "</td>" & vbnewline)
 
	ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)
 
	strRsp = strRsp & ("<td style=""font-size:12px; padding:2px; width:20%; text-align:right;background-color:#c3d9e6""> &nbsp;Avg. Hit :" & FormatNumber(avg, 1) & vbNewLine )
	strRsp = strRsp & ("</tr></table>" & vbnewline)
 
	strRsp = strRsp & ("<table id=""func_dir312"" style=""background-color:#c3d9e6; width:100%; border:0px"" cellspacing=""1"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:13px; line-height:19px; padding-bottom:8px;text-align:left"">" & vbNewLine )
	strRsp = strRsp & (Rec("linkDesc") & "</td></tr></table>" & vbnewline )
 
	strRsp = strRsp & ("<table id=""func_dir316"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"" >" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:11px; padding:4px; border-bottom:1px solid #333333; text-align:right""> " & vbNewLine )
	strRsp = strRsp & ("<a href="""& appUrl & "/redir.asp?catID="& Rec("catID") & "&linkID="& Rec("linkID") & """>Visit Listing</a> " & vbNewLine )
	
	strRsp = strRsp & ( " &nbsp; </td></tr>" & vbnewline )
	strRsp = strRsp & ( "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table>" & vbnewline )
 
 
	strRsp = strRsp & ("<p style=""text-align:center""><a href=""#review"">Write Your Own Review</a></p>" & vbNewLine )
	strRsp = strRsp & ("<h3 id=""func_dir326"" style=""text-align:center;"" <span style=""color:#cc0000"">" &  request.QueryString("msg") & "</span></h3>" & vbNewLine )
	Rec.close
	set Rec = nothing
	set Rec = oCon.execute("select * from gportal_Reviews where linkID = "& linkID &" AND approve =0 order by reviewID desc;")
	if not Rec.eof then
	strRsp = strRsp & ("<table id=""func_dir331"" style=""border:0px; border-collapse:collapse; width:100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""padding:4px; font-size:11px; color:#bd1111; width:100%; background-color:#D6e5ee; text-align:left"">" & vbNewLine )	
	strRsp = strRsp & ("<b>Reviews:</b></td></tr></table>" & vbnewline )
 
	do while not Rec.eof
	strRsp = strRsp & ("<table id=""func_dir335"" style=""border:0px; width:100%; border-collapse:collapse; background-color:#333333"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td id=""td-func_dir338"" style=""padding:2px; font-size:13px; width:60%; background-color:#d6e5ee"">" & vbNewLine )	
	strRsp = strRsp & ("<b>" & Rec("subject") & "</b></td>")
	strRsp = strRsp & ("<td style=""padding:2px; background-color:#D6E5EE; width:40%; text-align:right""> &nbsp;" & vbNewLine )	
	strRsp = strRsp & ("<img src=""images/star_"& Rec("rating") & ".gif"" border=""0""></td></tr>" & vbnewline)
 
	strRsp = strRsp & ("<tr><td style=""background-color:#D6E5EE; width:60%""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("<i>Written by " & Rec("name") & "</td><td style=""background-color:#fbf5d4; width:40%""> <i>" & weekDayName(weekDay(Rec("postDate")), 0) &", " )
	strRsp = strRsp & (MonthName(month(Rec("postDate")), 0) & "  " & Day(Rec("postDate")) & ", " & Year(Rec("postDate")))
 
	strRsp = strRsp & ( "</i></td></tr>" & vbnewline )
 
	strRsp = strRsp & ("<tr><td colspan=""2"" style=""padding:2px; border-bottom:1px #111111 solid; background-color:#ffffff"">" & vbNewLine )
	strRsp = strRsp & (Rec("review") & "</td></tr>" & vbnewline )
	strRsp = strRsp & ("</table><br>"  & vbnewline )
	Rec.MoveNext
	loop
	end if
	end if
	displayInfo = strRsp 
	End function
%>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:

Select allOpen in new window

 

by: coreybryantPosted on 2009-09-05 at 07:18:06ID: 25266367

Also here is the first row (two colums) that I need to have a third column in.  And there is code that has three columns - but I can't just copy that because of some of those if statements which I don't understand that well.

Two columns
	strRsp = strRsp & ("<table id=""func_functions50"" style=""border-collapse:collapse; width:100%; border:0px"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""text-align:left; padding-left:4px; background-color:#abcadc; width:70%""><b>" & vbNewLine )
	if Rec("hotLink") = 1 then 
		strRsp =  strRsp & "<h3>"
		else
		strRsp =  strRsp & "<h3>"		
	end if
 
	strRsp = strRsp & ("<a href="""& appUrl &"/links/"& Rec("linkID") & ".asp"">")
	strRsp = strRsp & (Rec("linkName") & "</a></font></b>" & vbnewline )
	if Rec("hotLink") = 1 then 
	strRsp =  strRsp & "<span style=""font-size:8pt"">"		
	strRsp = strRsp & ("&nbsp;<sup>[<span color=""#cc0000"">sponsor</span>]</sup></span>")
	end if
 
	if Rec("submitDate") > date - 5 then	
		strRsp = strRsp &  "&nbsp;&nbsp;<img border=""0"" src="""& appUrl &"/images/new.gif"">"
	end if
 
	strRsp = strRsp & ("</td><td id=""td-func_functions69"" style=""padding:4px; background-color:#abcadc; text-align:right; width:30%"">")
	strRsp = strRsp & (" <b>&nbsp;" & vbNewLine )
			if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if
	strRsp = strRsp &  ("<a href=""javascript:openWindowRating('"& appUrl &"/rate.asp?linkID=" & Rec("linkID")& "')"">")
	strRsp = strRsp &  ("<img src="""& appUrl & "/images/star_"& rating & ".gif"" border=""0""></a>" & vbnewline)
 
	strRsp = strRsp & ("</td>" & vbnewline )
	strRsp = strRsp & ("</tr></table>" & vbnewline )
 
 
 
Three columns (which I need)
 
	strRsp = strRsp & ("<table id=""func_functions82"" style=""border-collapse:collapse; border:0px; width:100%; text-align:left"" cellspacing=""0"" cellpadding=""0"">" & VbCrLf)	
	strRsp = strRsp & ("<tr><td style=""font-size:12px; padding:2px;background-color:#abcadc; width:55%; text-align:left""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Hits Today: " & Rec("todayHits") & "&nbsp;|&nbsp;" & vbnewline)
	strRsp = strRsp & ("Overall Hits : " & Rec("totalHits") & "</td>" & vbnewline)
 
	strRsp = strRsp & ("<td id=""td-func_functions87"" style=""font-size:12px; padding:2px;background-color:#abcadc; width:25%""> &nbsp;" & vbNewLine )
	strRsp = strRsp & ("Updated: " & formatDateTime(Rec("submitDate"), 2) & "</td>" & vbnewline)
 
	ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)
 
	strRsp = strRsp & ("<td id=""td-func_functions87"" style=""font-size:12px; padding:2px; background-color:#abcadc; width:20%; text-align:right""> &nbsp;Avg. Hit :" & FormatNumber(avg, 1) & vbNewLine )
	strRsp = strRsp & ("</tr></table>" & vbnewline)
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:

Select allOpen in new window

 

by: carrzkissPosted on 2009-09-05 at 11:51:43ID: 25267306

line 129
Remove the Bracket

----------
On the 2nd one.
You really have a lot to learn.
I have been done this road myself so has everyone else that does programming.

I demostrated it in the code that I supplied for you.
You act like you are scared to dive in and do is correctly.
I do not know were you got this code from, but it works better the way  that I demostrated.

------
I do not know what to tell you.
Add in the extra column that you want so badly into your code.
I do not like this code it is annoying, you cannot visually see the page layout,
It is crap coding and should never be taught, people need to learn how to program it properly.
Also do it as visual, it makes for better payout and better eye-candy for your viewers.

-------
You are not using my suggestions, you are not even taking it into consideration.
You keep on throwing this code up here, without doing what I tell you to.

How do you expect me to help you, if you are not going to do it like I state?

 

by: coreybryantPosted on 2009-09-05 at 13:31:35ID: 25267626

Sorry, I entered the code you gave me, I thought and it generated that error.  I have not really been myself since my minor cardiac event and TIA.  I have some good days and some bad days.  So for now, I am forced to work with pre-made scripts and add what I can.  And work with the good people at Experts Exchange to help me with what I have.

But I think I have figured it out - so far all the pages seem to be working and displaying properly.

I thought that since the column is only needed when it is a "sponsored" link, then adding the extra <td> would be needed, otherwise the <td> and the information in that cell would be used.

Original code:
	strRsp =  strRsp & "<p style=""font-size:8pt; text-align:right; display:inline;padding-left:60px"">"		
	strRsp = strRsp & ("[<span style=""color:#cc0000"">sponsor</span>]</p>")
 
 
Changed to:
	strRsp =  strRsp & "<td style=""font-size:8pt; text-align:left; background-color:#c3d9e6"">"		
	strRsp = strRsp & ("[<span style=""color:#cc0000"">sponsor</span>]</td>")
                                              
1:
2:
3:
4:
5:
6:
7:
8:

Select allOpen in new window

 

by: carrzkissPosted on 2009-09-05 at 20:02:38ID: 25268619

when you do something like that, then you would do something like this.

(Assuming the the records in the database is    Sponsors )

<%if rs("Sponsor") ="None" then%>
No Sponsor
<%else%>
Sponsor information goes here
<%end if%>

This would look at the record and if the Field of Sponsor was to contact "None"
Then it would display the text: No Sponsor (or) &nbsp;
&nbsp;  = a blank space in time.
Else
Display the Sponsors information to the page.

This is the best way to do something like that.


----------
What are you use to do your sites with? Are you using Notepad, DW or another type of program?
As you have absolutely 0 "No" visualization in design of your site.
It is all a crap-shot in getting it to function the way that you want it to look.


----Just Humor me, and check on running this code for me please?
I just spent the last 45 minutes removing all the rubish from it, to show you how it is done.
I have attached a screenshot of the way it looks inside DWCS3, after removing all the un-needed Tags
This is called Visual Programming.
Being able to see what you are doing.

See, I design my sites in DW, but I do all my coding by hand.
It is must more simplified and easier to work with and troubleshot.
DW to my is one of the best programs to come out for designing websites.
AS LONG as you know how to remove mess that is not needed and NEVER I repeat NEVER
Let DW do your ASP Programming for you.
It is called; Crap Coding.

----------
Please try out the code below for me.
And see what it does for you.
If it does not work for you, then make me up a demo of your database.
And the page that sends it's results to this page, and I will be more then happy to help you get it going properly and in a good solid way.

Let me know.
Carrzkiss

<%
 
	function buildNavi(naviID) 
	dim catIDList(30)
	dim catNameList(30)
	dim catNameDirList(30)
	dim i 
	Dim pID
	Dim cats
	Dim navi
	Dim e
	Dim strLine
	i = 0
 
	Set con = Server.CreateObject ("ADODB.Connection")
	con.Open strCon
	do until naviID = 0
	SQL = "SELECT catID, catName, parentID FROM gportal_Categories where catID = "&pID
	Set rs = Server.Createobject("ADODB.Recordset")
	rs.Open "SELECT catID, catName, parentID,dirnavi  FROM gportal_Categories WHERE catID = " & naviID, con, 3, 3, 1
	catIDList(i) = rs("catID")
	catNameList(i) = rs("catName")
	catNameDirList(i) = rs("dirnavi")
	naviID = rs("parentID")
	i = i + 1
	loop	
	'rs.Close
	con.Close
	Set rs = nothing
	Set con = nothing
	cats = ubound(catIDList)
	navi = catNameList(0)
	for e = i - 1  to 1 step - 1
	strLine = strLine &  "<a href=""/directory/"& catNameDirList(e) & """>" & catNameList(e) & "</a> / " & vbCrlf
	next 
	buildNavi = strLine & navi
	end function
	
	
	
	Function subCat(cID, page)
	Dim objRec, i, DisplayNum, oCon, Rec, ipage, rating, showpages, z, strRsp
	strRsp = " " 
	if page = 0 or page = "" then
	Set objCon = Server.CreateObject ("ADODB.Connection")
	objCon.open strCon
	objCon.execute("Update gportal_Categories set hits = hits + 1 where catID = "& cID &";")
	strSQL ="Select catID, catName, parentID, cCats, cLinks, lastLink, dirnavi from gportal_Categories where parentID = "& cID & " order by catName asc"
	set objRec = objCon.execute(strSQL)
	i = 0%>
<table id="func_dir51" style="border:0px; border-collapse:collapse; width:96%" cellspacing="0" cellpadding="0">
	<%Do	While NOT objRec.EOF
	if  i = 0 Then
		%><tr><%
	end if%>
		<td style="font-size:12px; width:50%; vertial-align:top; height:20px">
		<b><a href="<%=appUrl%>/directory/<%=objRec("dirnavi")%>">
		<%=objRec("catName")%></a></b>
		&quot;&nbsp;<font size="1"> (<%=objRec("cCats")%>) (<%=objRec("cLinks")%>)</font>
		<%if objRec("lastLink") > date - 5 then	%>
		&nbsp;&nbsp;<img alt=""  border="0" src="<%=appUrl%>/images/new.gif" />
		<br />
		<%end if%>	
	  </td>
	<%if  i = 0 Then
		i = i + 1
		else
		%></tr>
		<%i = i - 1
	end if
	objRec.MoveNext
	Loop%>
</table><br/>
	<%
	objRec.Close
	objCon.Close
	Set objRec = nothing
	Set objCon = nothing
 
	end if
 
	subCat = strRsp
 
	end function
 
 
 
	function dirListing(catID, curpage)
	
	If curpage = "" Then
		curpage = 1
		else
		curpage = int(curpage)
	End If
	if curpage = 0 then curpage = 1
	catID = int(catID)
	Set oCon = Server.CreateObject ("ADODB.Connection")
	Set Rec = Server.CreateObject ("ADODB.Recordset")
	oCon.Open strCon
	Rec.CursorLocation = adUseClient		
	
	SQL = "SELECT * FROM gportal_Links WHERE catID = " & catID
	SQL = SQL & " and active = 0 "
	
	If request.querystring("goto") = "rating" then
	SQL = SQL & " order by rating desc"
	elseIf request.querystring("goto") = "siteName" then
	SQL = SQL & " order by linkName ASC"
	elseIf request.querystring("goto") = "totalHits" then
	SQL = SQL & " order by totalHits desc"
	elseIf request.querystring("goto") = "submitDate" then
	SQL = SQL & " order by submitDate desc"
	else
	SQL = SQL & " order by hotLink desc"
	end if	
	Rec.Open SQL, oCon, adOpenStatic, adLockReadOnly, adCmdText
 
	if Rec.EOF OR Rec.BOF Then
	%><br /><br /><%
	if catID > 0 then
	%><p style="text-align:center;font-variant:small-caps;">No listing found</p>
	<%end if
	else	
	Rec.PageSize = 10
    Rec.AbsolutePage = curpage
	next10 = getNext10(curpage)
	prev10 = getPrev10(curpage)	
 
	function buildNavi(naviID) 
	dim catIDList(30)
	dim catNameList(30)
	dim catNameDirList(30)
	dim i 
	Dim pID
	Dim cats
	Dim navi
	Dim e
	Dim strLine
	i = 0
 
	Set con = Server.CreateObject ("ADODB.Connection")
	con.Open strCon
	do until naviID = 0
	SQL = "SELECT catID, catName, parentID FROM gportal_Categories where catID = "&pID
	Set rs = Server.Createobject("ADODB.Recordset")
	rs.Open "SELECT catID, catName, parentID,dirnavi  FROM gportal_Categories WHERE catID = " & naviID, con, 3, 3, 1
	catIDList(i) = rs("catID")
	catNameList(i) = rs("catName")
	catNameDirList(i) = rs("dirnavi")
	naviID = rs("parentID")
	i = i + 1
	loop	
	'rs.Close
	con.Close
	Set rs = nothing
	Set con = nothing
	cats = ubound(catIDList)
	navi = catNameList(0)
	for e = i - 1  to 1 step - 1%>
	<a href="/directory/<%=catNameDirList(e)%>">
<%catNameList(e)%></a> /
	<%next 
	buildNavi = strLine & navi
	end function
	
	
	
	Function subCat(cID, page)
	Dim objRec, i, DisplayNum, oCon, Rec, ipage, rating, showpages, z, strRsp
	strRsp = " " 
	if page = 0 or page = "" then
	Set objCon = Server.CreateObject ("ADODB.Connection")
	objCon.open strCon
	objCon.execute("Update gportal_Categories set hits = hits + 1 where catID = "& cID &";")
	strSQL ="Select catID, catName, parentID, cCats, cLinks, lastLink, dirnavi from gportal_Categories where parentID = "& cID & " order by catName asc"
	set objRec = objCon.execute(strSQL)
	i = 0%>
<table id="func_dir51" style="border:0px; border-collapse:collapse; width:96%" cellspacing="0" cellpadding="0">
	<%Do While NOT objRec.EOF
	if  i = 0 Then
		%><tr><%
	end if%>
    <td style=""font-size:12px;="font-size:12px;" width:50%;="width:50%;" vertial-align:top;="vertial-align:top;" height:20px="height:20px""">
		<b><a href="<%=appUrl%>/directory/<%=objRec("dirnavi")%>">
		<%=objRec("catName")%></a></b>
		&nbsp;<font size="1"> (<%=objRec("cCats")%>) (<%=objRec("cLinks")%>)</font>
		<%if objRec("lastLink") > date - 5 then	%>
		&nbsp;&nbsp;<img alt=""  border="0" src="<%=appUrl%>/images/new.gif" />
		<br />
		<%end if%>		
	  </td>
		<%if  i = 0 Then
		i = i + 1
		else%>
        </tr>
		<%i = i - 1
	end if
	objRec.MoveNext
	Loop%>
</table><br/>
	<%
	objRec.Close
	objCon.Close
	Set objRec = nothing
	Set objCon = nothing
 
	end if
 
	subCat = strRsp
 
	end function
 
 
 
	function dirListing(catID, curpage)
	
	If curpage = "" Then
		curpage = 1
		else
		curpage = int(curpage)
	End If
	if curpage = 0 then curpage = 1
	catID = int(catID)
	Set oCon = Server.CreateObject ("ADODB.Connection")
	Set Rec = Server.CreateObject ("ADODB.Recordset")
	oCon.Open strCon
	Rec.CursorLocation = adUseClient		
	
	SQL = "SELECT * FROM gportal_Links WHERE catID = " & catID
	SQL = SQL & " and active = 0 "
	
	If request.querystring("goto") = "rating" then
	SQL = SQL & " order by rating desc"
	elseIf request.querystring("goto") = "siteName" then
	SQL = SQL & " order by linkName ASC"
	elseIf request.querystring("goto") = "totalHits" then
	SQL = SQL & " order by totalHits desc"
	elseIf request.querystring("goto") = "submitDate" then
	SQL = SQL & " order by submitDate desc"
	else
	SQL = SQL & " order by hotLink desc"
	end if	
	Rec.Open SQL, oCon, adOpenStatic, adLockReadOnly, adCmdText
 
	if Rec.EOF OR Rec.BOF Then%>
	<br /><br />
	<%if catID > 0 then%>
<p style=""text-align:center;font-variant:small-caps;="text-align:center;font-variant:small-caps;""">No listing found</p>
	<%end if
	else	
	Rec.PageSize = 10
    Rec.AbsolutePage = curpage
	next10 = getNext10(curpage)
	prev10 = getPrev10(curpage)	
	
	%><form  method="get" name="dirSort" id="dirSort" >
	<table id="func_dir130" cellspacing="0" cellpadding="0" style="width:100%; background-color:#abcadc; border:0px">
	<tr><td id="td-func_dir131" style="font: 11px verdana, arial, helvetica, sans-serif; color:#000000; width:100%; text-align:right; background-color:#c3d9e6">
 
	There are <%=Rec.RecordCount%> results displaying in <%=Rec.PageCount%> pages. 
 	Sort Order: 
	<input type="hidden" name="catID" value="<%=catID%>" />
	<select name="goto"  size="1" onchange="formsubmit(document.dirSort);"  style="font:11px verdana, arial, helvetica, sans-serif; background-color:#c3d9e6">
	<option value="goto" selected="selected">Sort By</option>
	<option value="siteName" >Site Name</option>
	<option value="rating">Rating</option>
	<option value="totalHits" >Hits</option>
	<option value="submitDate" >Date</option>
	</select>&nbsp;</font></td></tr></table></form>
 
	<%Do Until Rec.AbsolutePage <> curpage OR Rec.Eof	%>		
<table id="func_dir144" style="border:0px; border-collapse:collapse; width:100%; text-align:left" cellspacing="0" cellpadding="0">
	<tr><td id="td-func_dir145" style="padding:4px; background-color:#abcadc; width:200px; text-align:left">
	<%if Rec("hotLink") = 1 then %>
		<h3 style="color:#000000; display:inline; padding-right:30px; text-align:left">
		<%else%>
	  <h3 style="color:#000000; display:inline; padding-right:30px; text-align:left">		
	<%end if%>
 
	<a href="<%=appUrl%>/links/<%=Rec("linkID")%>.asp">
	<%=Rec("linkName")%></a></h3>
	<td style="background-color:#abcadc; width:300px;"><%if Rec("hotLink") = 1 then %>
	<p style="font-size:.9em; text-align:right; display:inline;padding-left:60px">
	[<span style="color:#cc0000">sponsor</span>]</p></td>
	<%end if
 
	if Rec("submitDate") > date - 5 then%>
	&nbsp;&nbsp;<img alt=""  border="0" src="<%=appUrl%>/images/new.gif" />
	<%end if%>
 
	</td>
	<td id="td-func_dir163" style="padding:4px; width:30%; text-align:left;background-color:#abcadc">
	<b>&nbsp;
			<%if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if%>
	<a href="javascript:openWindowRating('<%=appUrl%>/rate.asp?linkID=<%=Rec("linkID")%>')">
	<img alt=""  src="<%=appUrl%>/images/star_<%=rating%>.gif" border="0" /></a>
	</td>
	</tr></table>
 
	<table id="func_dir176" style="border:0px; border-collapse:collapse; width:100%; text-align:left" cellspacing="0" cellpadding="0">
	<tr><td style="font-size:12px; padding:2px; width:55%; background-color:#abcadc; text-align:left">
	(Hits Today: <%=Rec("todayHits")%>&nbsp;|&nbsp;
	(Overall Hits : <%=Rec("totalHits")%></td>
 
	<td id="td-func_dir181" style="font-size:12px; padding:2px; width:25%; background-color:#abcadc; text-align:left"> &nbsp;&quot;
	(Updated: <%=formatDateTime(Rec("submitDate"), 2)%></td>
 
	<%ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)%>
 
	<td id="td-func_dir189" style="font-size:12px; padding:2px; width:20%; text-align:right; background-color:#abcadc"> &nbsp;Avg. Hit :<%=FormatNumber(avg, 1)%> )	</td>
	</tr></table>
 
	<table id="func_dir192" style="border:0px; border-collapse:collapse; width:100%" cellspacing="0" cellpadding="0">	
	<tr><td id="td-func_dir193" style="font-size:13px; line-height:19px; padding-bottom:8px; background-color:#abcadc; border-top:dashed 1px #000000; text-align:left">
<%=(Rec("linkDesc")%></td></tr></table>
 
	<table id="func_dir196" style="border:0px; border-collapse:collapse; width:100%" cellspacing="0" cellpadding="0" >	
	<tr><td id="td-func_dir197" style="font-size:11px; padding-right:10px; text-align:right; background-color:#abcadc; border:0px; padding-bottom:5px">
	<a href="<%=appUrl%>/redir.asp?catID=<%=Rec("catID")%>&linkID=<%=Rec("linkID")%>">Visit Listing</a> |
	<a href="<%=appUrl%>/links/<%=Rec("linkID")%>.asp#review"">Reviews</a>
	&nbsp; </td>
	</tr>
	<tr>
	  <td></td>
	  <td></td></td></tr>
	<tr>
	  <td>&nbsp;</td></tr>
	<tr>
	  <td></td></td></tr>
	<tr>
	  <td></tr></td></tr>
</table>
<p style="border-bottom: double #000000">
 <%
	Rec.MoveNext
	Loop
	RSPrevPage = curpage -1
	RSNextPage = curpage + 1
	If Next10 > Rec.PageCount Then
	Next10 = Rec.PageCount
	End If%>
  </p>
	<div class="pages">
			<%If prev10 = 1 AND next10 - 1 < 10 Then
			start = 1
			Else
			start = Next10 - 10
			If right(start, 1) > 0 Then
			start = replace(start, right(start, 1), "0")
			start = start + 10
			End If
			End If
			pageName = "?goto="& request.querystring("goto") & "&page="
			If Rec.PageCount > 1 Then
			If next10 > 10 Then
			strPager = strPager &   "<a class=""nextprev"" href=""" & pageName & Prev10 & """>&lt;&lt;  Previous 10 </a> "
			End If
			If NOT RSPrevPage = 0 then
			strPager = strPager &   "<a href=""" & pageName & RSPrevPage & """>&lt;</a> "
			End If
			For P = start to Next10
			
			If NOT P = curpage then
			strPager = strPager &   "<a href=""" & pageName & P & """>" & P & "</a> "
			Else
			strPager = strPager &   "<span class=""current"">" & P & " </span>"
			End If
			Next
			If NOT RSNextPage > Rec.PageCount Then
			strPager = strPager &   "<a href=""" & pageName & RSNextPage & """>&gt;</a> "
			End If
			
			If NOT Next10 = Rec.PageCount Then
			strPager = strPager &   " <a class=""nextprev"" href=""" & pageName & Next10 & """>Next 10 &gt;&gt;</a>"
			End If
			strPager = strPager & "</div>"
			End If
 
			end if 
	
	Rec.Close
	oCon.Close
	set Rec = nothing
	set oCon = nothing
 
	dirListing = strRsp & strPager
	end function
 
	Function displayInfo(linkID)
 
	Set oCon = Server.CreateObject ("ADODB.Connection")
	oCon.Open strCon
	SQL = "SELECT * FROM gportal_Links WHERE linkID = " & linkID
	set Rec = oCon.execute(SQL)
	if NOT Rec.eof then%>
 
<table id="func_dir265" style="background-color:#c3d9e6; width:100%" border="0" cellspacing="0" cellpadding="0">	
	<tr><td style="padding:4px; border-bottom:1px #111111 solid; width:200px; text-align:left">
	<%if Rec("hotLink") = 1 then %>
		<h3 style="color:#cc0000; display:inline; padding-right:30px">
		<%else%>
	  <h3 style="color:#000000; display:inline; padding-right:30px">
	<%end if%>
 
	<%=(Rec("linkName")%></h3>
<td style="background-color:#abcadc; width:300px;">	<%if Rec("hotLink") = 1 then %>
	<p style="font-size:8pt; text-align:right; display:inline;padding-left:60px">		
	[<span style="color:#cc0000="color:#cc0000">sponsor</span>]</p></td>
	<%end if%>
 
	<%if Rec("submitDate") > date - 5 then	%>
	&nbsp;&nbsp;<img alt=""  border="0" src="<%=appUrl%>/images/new.gif" />
	<%end if%>
 
	</td><td style="padding:4px; border-bottom:1px #111111 solid; text-align:right; width:30%; background-color:#c3d9e6">
	<b>&nbsp;
			<%if Rec("cVotes") = 0 then
				rating = 0 
			else
				rating = cint(Rec("Rating") / Rec("cVotes")) 
			end if%>
	<a href="javascript:openWindowRating('<%=appUrl%>/rate.asp?linkID=<%=Rec("linkID")%>')">
	<img alt=""  src="<%=appUrl%>/images/star_<%=rating%>.gif" border="0" /></a>
 
	</td>
	</tr></table>
 
	<table id="func_dir296" style="border:0px; border-collapse:collapse; width:100%" cellspacing="0" cellpadding="0">
	<tr><td style="font-size:12px; padding:2px; width:55%; text-align:left; background-color:#c3d9e6">
	Hits Today: <%=Rec("todayHits")%>&nbsp;|&nbsp;
	(&quot;Overall Hits : <%=Rec("totalHits")%></td>
 
	<td style="font-size:12px; padding:2px; background-color:#c3d9e6; width:25%"> &nbsp;
	(&quot;Updated: <%=formatDateTime(Rec("submitDate"), 2)%></td>
 
	<%ft = dateDiff("d", Rec("submitDate"), Date())
	if ft < 1 then ft = 1
	
	avg = (Rec("totalHits") / ft)%>
 
	<td style="font-size:12px; padding:2px; width:20%; text-align:right;background-color:#c3d9e6"> &nbsp;Avg. Hit :<%= FormatNumber(avg, 1)%>	</td>
	</tr></table>
 
	<table id="func_dir312" style="background-color:#c3d9e6; width:100%; border:0px" cellspacing="1" cellpadding="0">
	<tr><td style="font-size:13px; line-height:19px; padding-bottom:8px;text-align:left">
<%=(Rec("linkDesc")%></td></tr></table>
 
	<table id="func_dir316" style="border:0px; border-collapse:collapse; width:100%" cellspacing="0" cellpadding="0" >
	<tr><td style=""font-size:11px;="font-size:11px;" padding:4px;="padding:4px;" border-bottom:1px="border-bottom:1px" solid="solid" #333333; text-align:right="text-align:right""">
	<a href="<%=appUrl%>/redir.asp?catID=<%=Rec("catID")%>&linkID=<%=Rec("linkID")%>">Visit Listing</a>
	
	&nbsp; </td>
	</tr>
	<tr>
	  <td></td>
	  <td></td></td></tr>
	<tr>
	  <td>&nbsp;</td></tr>
	<tr>
	  <td></td></td></tr>
	<tr>
	  <td></tr></td></tr>
</table>
 
 
	<p style="text-align:center"><a href="#review">Write Your Own Review</a></p>
	<h3 id="func_dir326" style="text-align:center;"> <span style="color:#cc0000"><%=request.QueryString("msg")%></span></h3>
<%	Rec.close
	set Rec = nothing
	set Rec = oCon.execute("select * from gportal_Reviews where linkID = "& linkID &" AND approve =0 order by reviewID desc;")
	if not Rec.eof then%>
<table id="func_dir331" style="border:0px; border-collapse:collapse; width:100%" cellspacing="0" cellpadding="0" align="center">
	<tr><td style="padding:4px; font-size:11px; color:#bd1111; width:100%; background-color:#D6e5ee; text-align:left">	
<b>Reviews:</b></td></tr></table>
 
	<%do while not Rec.eof%>
<table id="func_dir335" style="border:0px; width:100%; border-collapse:collapse; background-color:#333333" cellspacing="0" cellpadding="0">
	<tr><td id="td-func_dir338" style="padding:2px; font-size:13px; width:60%; background-color:#d6e5ee;">	
	<b><%=Rec("subject")%></b></td>
	<td style="padding:2px; background-color:#D6E5EE; width:40%; text-align:right"> &nbsp;
	<img alt=""  src="<%=appUrl%>/images/star_<%=Rec("rating")%>.gif" border="0" /></td>
	</tr>
 
	<tr><td style="background-color:#d6e5ee; width:60%;"> &nbsp;
	<i>Written by <%=Rec("name")%></td><td style="background-color:#fbf5d4; width:40%"> <i> <%=weekDayName(weekDay(Rec("postDate")), 0)%>, 
	<%=(MonthName(month(Rec("postDate")), 0) & "  " & Day(Rec("postDate")) & ", " & Year(Rec("postDate")))%>
 
	</i></td></tr>
 
	<tr><td colspan="2" style="padding:2px; border-bottom:1px #111111 solid; background-color:#ffffff">
	<%=Rec("review")%></td></tr>
</table><br />
	<%Rec.MoveNext
	loop
	end if
	end if
	displayInfo = strRsp 
	End function
%>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:

Select allOpen in new window

  • Q-24706367.jpg
    • 190 KB

    Q_24706367 Coded properly, Using the provided IF Statements, and Table set to 3 columns.

    Q_24706367 Coded properly, Using the provided IF Statements, and Table set to 3 columns.
 

by: coreybryantPosted on 2009-09-09 at 15:52:05ID: 25296267

I appreciate what you have done to help me.  Maybe one I finally am able to get the layout complete (as I like it) I can return to this post and see what I can change / update.

 

by: carrzkissPosted on 2009-09-09 at 18:58:53ID: 25296943

Will be here to help if I am available and able.

Have a good one.
Carrzkiss

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...