%@ page import="org.apache.torque.SubCategory,
java.util.Vector,
java.util.List,
java.util.HashMap,
com.trieste.Configuration,
com.trieste.objects.enumerations.SubCategoryType,
com.trieste.process.FormErrorProcess,
org.apache.torque.PageAnchor,
org.apache.torque.Page,
org.apache.torque.ReciprocalScheme,
com.trieste.process.LinkRequestProcess" %>
<%
String siteid = Configuration.getSiteId();
String header1 = "/sites/" + siteid + "/includes/templates/subcat_header1.html";
String header2 = "/sites/" + siteid + "/includes/templates/subcat_header2.html";
String footer1 = "/sites/" + siteid + "/includes/templates/subcat_footer1.html";
String verifyreciprocal = (request.getParameter("verifyreciprocal") != null) ? request.getParameter("verifyreciprocal") : "1";
%>
<%
Vector errorVector = (Vector) session.getAttribute("errorvector");
HashMap errorMap = FormErrorProcess.getErrorMapFromErrorVector(errorVector);
String errormsg = null;
String divappend = null;
session.removeAttribute("errorvector");
String siteName = Configuration.getSiteName();
String siteHost = Configuration.getHost();
String firstname = (String) session.getAttribute("firstname");
String lastname = (String) session.getAttribute("lastname");
String email = (String) session.getAttribute("email");
String url = (String) session.getAttribute("url");
String title = (String) session.getAttribute("title");
String desc = (String) session.getAttribute("description");
String reciprocal = (String) session.getAttribute("reciprocal");
int catid = Integer.parseInt(request.getParameter("id"));
SubCategory cat = SubCategory.getById(catid);
SubCategory parent = SubCategory.getById(cat.getParentcategoryid());
String catname = cat.getName();
if (firstname == null) {
firstname = "";
}
if (lastname == null) {
lastname = "";
}
if (email == null) {
email = "";
}
if (url == null) {
url = "http://";
}
if (title == null) {
title = "";
}
if (desc == null) {
desc = "";
}
if (reciprocal == null) {
reciprocal = "http://";
}
// locate the core parent
String coreAbbr = cat.getCoreParentAbbr();
List cores = SubCategory.getRootCategories(SubCategoryType.get(cat.getSubCategoryTypeId()));
SubCategory core = null;
if (cat.getParentcategoryid() == -1) {
core = cat;
coreAbbr = core.getAbbreviation();
} else {
for (int i = 0; i < cores.size(); i++) {
core = (SubCategory) cores.get(i);
// found a match
if (coreAbbr.equals(core.getAbbreviation())) {
break;
}
}
}
// locate the next page anchor to use
Page catpage = Page.getBySubCategoryId(catid);
int paid = PageAnchor.getNextPageAnchorIdforPage(catpage.getId(), ReciprocalScheme.getLinkRequestScheme().getId());
PageAnchor pa = null;
if (paid == -1) {
System.err.println("WARNING: No page anchors exist for cat " + catid + " : " + cat.getActualFilepath());
pa = new PageAnchor();
pa.setAnchor(siteName);
} else {
pa = PageAnchor.getById(paid);
}
// USE CORE CATEGORY FOR RECIPROCAL
// String recipName = core.getName();
// String recipDesc = core.getDescription();
// String recipTitle = core.getTitle();
// String recipURL = "http://www.sightquest.com/" + coreAbbr + "/";
// USE THIS CATEGORY FOR RECIPROCAL
String htmlcode = LinkRequestProcess.getHTMLForLinkRequest(pa, cat);
// show choices?
boolean choose = (request.getParameter("choose") != null) ? true : false;
if (choose) {
%>
Submit Site to : <%= catname %>
Free Submission Form - Submit your site to <%= cat.getName() %>
| Submit Your Site to: <%= catname %><% if (parent != null) { %> (<%= parent.getName() %> > <%= catname %>) <% } %> |
| There are two ways you can submit a site to <%= siteName %>. If you choose Paid Directory Inclusion we guarantee that your site will be considered by our editors within 3 business days. |
|
|
Paid Directory Inclusion
Submit your website for $24.95
 |
- Have your site reviewed within 3 business days
- Direct link to your site from SightQuest.com
- Targeted category placement
- Your site gets listed higher in our search results
|
|
|
OR |
|
|
Link Exchange
Submit your website for Free
 |
- Due to the volume of suggestions, we cannot guarantee a timely consideration of your site
- Reciprocal link must remain on your site
|
|
|
|
|
<%
} else {
%>
Free Submission Form - Submit your site to <%= cat.getName() %>
<%
}
%>