#!/usr/bin/perl

#<ENC>73</ENC>

package fmtmplman;

########################################################################
# COPYRIGHT NOTICE:
#
# Copyright 2008 FocalMedia.Net All Rights Reserved.
#
# Selling the code for this program without prior written consent 
# from FocalMedia.Net is expressly forbidden. You may not 
# redistribute this program in any shape or form.
# 
# This program is distributed "as is" and without warranty of any
# kind, either express or implied. In no event shall the liability 
# of FocalMedia.Net for any damages, losses and/or causes of action 
# exceed the total amount paid by the user for this software.
#
########################################################################

#### EDIT HERE -- FOR WINDOWS/IIS BASED INSTALLATIONS ONLY #######

$config_cgi = "../config.cgi"; ## <-- CHANGE THIS LINE TO THE FULL SERVER PATH TO config.cgi

# THE PATH ON A WINDOWS INSTALLATION WILL LOOK SOMETHING LIKE THIS:
# $config_cgi = "c:/inetpub/webpub/cgi-bin/pseek/config.cgi";

#### DO NOT CHANGE ANYTHING BELOW THIS LINE #################

#use FindBin;
#use lib $FindBin::Bin;
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use acs;

require Exporter;
use vars qw/@ISA @EXPORT @EXPORT_OK $copyright $prgname/;

@ISA = qw(Exporter);

@EXPORT = 	qw(dir_templates
					search_results
					add_url_tmpls
					add_url_tmpls2
					ratings_templates
					comments
					whatsnew
					tophits
					broke_templ
					mail_remove
					favorites
					template_functions
					get_tmpl_details
	    			);

@EXPORT_OK = 	qw($favorites_ret
						$mail_remove_ret
						$broke_templ_ret
						$tophits_ret
						$whatsnew_ret
						$whatsnew_ret
						$comments_ret
						$ratings_templates_ret
						$add_url_tmpls2_ret
						$add_url_tmpls_ret
						$search_results_ret
						$dir_templates_ret);

&get_setup;
$q = CGI->new;

##################################################################################################################

sub contactus
{

($mlist1, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("contact_form");
($mlist2, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("contact_thank");


$contact_tmpl = qq[

<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong>
    
<a href="$admin_url/admin6.cgi?fct=edit_template&template=contact_form" 
onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=contact_form',screen.width-200,screen.height-200);return false;" title="$mlist1">Contact Us Form</a></strong></td>

    <td class="normaltext">contact_form.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=100" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong>
    
<a href="$admin_url/admin6.cgi?fct=edit_template&template=contact_thank" title="$mlist2" 
onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=contact_thank',screen.width-200,screen.height-200);return false;">Contact Thank You</a></strong></td>

    <td class="normaltext">contact_thank.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=101" target="_blank">Preview</a></td>
  </tr>
</table>

];

return ($contact_tmpl);

}





sub get_tmpl_details
{

my ($the_tmpl) = @_;

if ($the_tmpl eq "defdir")
{

$t_title = "Directory Template";

$dir_details_r = "This template is used when displaying link listings in directories/categories.";

$vars_available_r = "
<p><strong>%%custom_pagetitle%%<br>
</strong>This variable word will be replaced by a custom title for the category. This
title can be specified/added when adding or editing any category from the 
Directory Manager. If no title has been defined for a category then you can
configure what will be displayed by clicking the 'Settings Tab' >> Global Engne 
</p>

<p><strong>%%pagetitle%%<br>
</strong>This variable word will be replaced by the location of the current category.
It can also be used anywhere in the template to indicate the current directory.</p>
<p><b>%%pagedescription%%</b><br>
This description is obtained from the meta description supplied when the category 
was added.
<br>
<p><strong>&lt;!-- Hide %%metadescription%% // End Hide --&gt;<br>
</strong>This will be replaced by a meta tag (description) for search engines. <em>(Place
this variable somewhere between the HEAD tags of the page.)</em></p>
<p><strong>&lt;!-- Hide %%metakeywords%% // End Hide --&gt;<br>
</strong>This will be replaced by a meta tag (keywords) for search engines. <em>(Place
this variable somewhere between the HEAD tags of the page.)</em></p>

<p><strong>!!add_url_link!!<br>
</strong>The link to the add url script/page will be replaced by this variable.</p>

<p><strong>!!add_premium_url_link!!<br>
</strong>The link to the premium add url script/page will be replaced by this variable.</p>
<p><strong>%%location%%<br>
</strong>The current location in the category/directory will be replaced by this variable.</p>
<p><strong>%%subdirectories%%<br>
</strong>The subdirectories of the current category/directory will be replaced by this
variable.</p>
<p><strong>%%searchresults%%<br>
</strong>The search results (link listings) will be replaced by this variable.</p>
<p><strong>%%prevnext%%<br>
</strong>If there is multiple pages of link listings the previous and next links will be
replaced by this variable.</p>
<p><strong>%%pages%%<br>
</strong>The number of pages, (if any) of link listings for the current directory.
Replaced by links to the pages.</p>
<p><strong>%%current_cat%%<br>
</strong>The current category.</p>
<p><strong>%%lnknr%%<br>
</strong>Replaced by the number of links in the current category.</p>
<p><strong>%%pgs%%<br>
</strong>Replaced by the number of pages (containing links) of the current category.</p>
<p><strong>!!tseeksearch!!<br>
</strong>This is the location of the search script which is to be used in a form for a
search box.</p>
<p><strong>%%related%%<br>
</strong>Replaced by links to related categories of the current category.</p>

<b>%%updated%%</b><br>
Replaced by the date on which pages was generated/built. Do not use this variable if 
you are running a dynamic directory because it will display the current date when
end users browse your directory.<br>

<p><strong>%%bannerslotX%%<br>
</strong>This is to be used for banners in conjunction with the banner manager. <strong>X
can be 1, 2, 3, 4, or 5. </strong>You may define up to 5 banner slots in this template or
custom template. See the online documentation for full instructions.</p>
";

}
elsif (($the_tmpl eq "tmplsearch") or ($q->param('template') eq "tmplsearch_prem"))
{
$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to be available.<br>"
		}
	}

		if ($the_tmpl eq "tmplsearch")
			{
			$t_title = "Directory Links Style";
			$dir_details_r = "This template reflects the HTML code used when displaying link listings in
									directories/categories. This template is used in combination with the main category/directory template.";
			}
			else
			{
			$t_title = "Directory Premium Links Style";
			$dir_details_r = "This template reflects the HTML code used when displaying premium link listings in
							directories/categories. This template is used in combination with the main category/directory template. If this
							template is left blank, then the premium links will inherit the style of 'tmplsearch.html' (Default directory links style)";
			}

		if ($q->param('includes') == 1)
			{
			$cat_det = "<strong>!!category!!</strong><br>
			Replaced by the category of the link.<br>
			<br>";
			}



$vars_available_r = "<strong>!!title_with_link!!<br>
</strong>Replaced by the title of the link and the title is hyperlinked.<br>
<br>
<strong>!!title_without_link!!</strong><br>
Replaced by the title of the link but it is not hyperlinked.<br><br>
<strong>!!nr!!</strong><br>
Replaced by the number of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!url!!</strong><br>
Replaced by the url of the link.<br>
<br>
<strong>!!domain!!</strong><br>
Replaced by the domain name of the link.<br>
<br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br>
<br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br>
<br>$cat_det
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br>
<br><strong>!!rate_link_url!!</strong><br>
Replaced by the URL to the page where it can be rated.<br>
<br>
<strong>!!rating_image!!</strong><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!rno!!<br>
</strong>Replaced by the number of comments/reviews for this link.<br>
<br>
<strong>!!review_link_url!!</strong><br>
Replaced by the 'URL to the comment/review script' where users can add a review/comment for this
link.<br>
<br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br>
<br>
<strong>!!gethtml!!</strong><br>
Replaced by the URL to a page where the owner can get the HTML code to place on his web
site, so that visitors can rate his link.<br>
<br>
<strong>!!modify_link!!</strong><br>
Replaced by the URL to a page where the owner can modify the link.<br>
<br>
<strong>!!name!!</strong><br>
Replaced by the name of the link owner.<br>
<br>
<strong>!!email!!</strong><br>
Replaced by the email address of the link owner. (Not recommended for display)<br>
<br>

<b>!!new!!</b><br>
Replaced by a 'New' graphic if the link is considered as being new. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>
<b>!!pop!!</b><br>
Replaced by a 'Pop' (Popular) graphic if the link is considered as being popular. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>

<strong>!!report_dead_link!!</strong><br>
Replaced by the URL to a page where users can report the link as a broken link.<br><br>
<b>!!more_info_url!!</b><br>
This will be replaced by the link/URL to a page that contains more information about the link. 
If this variable is present in this template, an extra page will be generated with more
information about the link. You can, for example, have extra fields/keys which display the extra
information if end users click on the 'More Info' link. To customize the extra link information
template, edit the 'Link Info' template.
<br><br>
<strong>!!hidden_url!!</strong><br>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.<br><BR>

<strong>!!link_image!!</strong><br>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings<BR><br>

<strong>!!link_file!!</strong><br>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file. <BR><BR>

$sql_extra_keys";

}
elsif ($the_tmpl eq "subdirs")
{

$t_title = "Sub Directories / Category Style";

$dir_details_r = "This template is used to display directories/categories. This template is used in combination with the main category/directory template."; 

$vars_available_r = "<strong>
<p>%%subdirs1%%<br>
</strong>The subdirectories of the current category are replaced by this variable.</p>
<p><strong>%%subdirs2%%<br>
</strong>The subdirectories of the current category are replaced by this variable.<strong></p>
<p>%%subdirs3%%<br>
</strong>The subdirectories of the current category are replaced by this variable.<strong></p>

<p>If you only use the <strong>%%subdirs1%%</strong> variable in this template, you will
only have one row of directories or categories displayed. If you use <strong>%%subdirs1%%</strong>
and <strong>%%subdirs2%%</strong> you will have two rows of directories/categories
displayed. You may have up to 3 rows of directories and categories displayed.</p>
";

}
elsif ($the_tmpl eq "directories1")
{

$t_title = "Editing: Sub Directories / Category Style";

$dir_details_r = "This template is used to display directories/categories. This template is used in combination with the main category/directory template.";

$vars_available_r = "<b>%%substyle%%<br></b>
This variable is replaced by the link to the subdirectory/category. You can
assign font HTML tags to it, or make it bigger or smaller.<br><br>

<b>%%sub_description%%<br></b>
This variable is replaced by the description of the subcategory. 
The description is derived from the meta description.
The meta description can be added by editing the category name from the control panel. The option of adding a description is also
available when adding a category.<br><br>

<b>!!new!!</b><br>
This variable is replaced by a new graphic if new links was recently added to a category. You can set options for this in the<br>
<b>PowerSeek Control Panel >> Settings >> Global Engine Settings</b><br>

Look for the settings section that reads: 'New & Popular Indication Settings'
";


}
elsif ($the_tmpl eq "related1")
{

$t_title = "Related Category Template 1";

$dir_details_r = "This template is used to display related directories/categories to the existing directory/category. This template is used in combination with the main category/directory template.";

$vars_available_r = "<strong>%%related_categories%%<br></strong>
This variable is replaced by the list of related directories/categories in the main directory/category template.";
	
}
elsif ($the_tmpl eq "related2")
{

$t_title = "Related Category Template 2";

$dir_details_r = "This template is used to display related directories/categories to the existing directory/category. This template is used in combination with the main category/directory template.";

$vars_available_r = "<strong>%%related_categories%%<br></strong>
This variable defines the style (font/size, etc..) of related directories/categories in the first related category/directory template.";
	
}
elsif ($the_tmpl eq "linkinfo")
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to be available.<br>"
		}
	}

$t_title = "Link Info Template";

$dir_details_r = "This template is used to display a page for each link (optional). You can, for example, have an extra
page with extra field/key information for each link. You link to this extra page from the
Link Style Template (tmplsearch.html) by using the variable !!more_info_url!! from it. 
If you don't link from the 'Link Style Template' with the !!more_info_url!!, then the extra pages are not generated/available.
This is also valid for custom templates.
";

$vars_available_r = "<strong>!!title_with_link!!<br>
</strong>Replaced by the title of the link and the title is hyperlinked.<br>
<br>
<strong>!!title_without_link!!</strong><br>
Replaced by the title of the link, but it is not hyperlinked.<br>
<br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!url!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!domain!!</strong><br>
Replaced by the domain name of the link.<br>
<br>

<b>&lt;!-- Hide !!metadescription!! // End Hide --&gt;</b><BR>
This will be replaced by a meta tag (description) for search engines. (Place this variable somewhere between the HEAD tags of the page.)
<BR><BR>

<b>&lt;!-- Hide !!metakeywords!! // End Hide --&gt;</b><BR>
This will be replaced by a meta tag (keywords) for search engines. (Place this variable somewhere between the HEAD tags of the page.)
<br><br>

<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br>
<br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br>
<br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br>
<br>
<strong>!!rno!!<br>
</strong>Replaced by the number of reviews/comments for this link.<br>
<br>
<strong>!!review_link_url!!</strong><br>
Replaced by the URL to the comment/review script where users can add a review/comment for this
link.<br>
<br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br>
<br>
<strong>!!gethtml!!</strong><br>
Replaced by the URL to a page where the owner can get the HTML code to place on his web
site so that visitors can rate his link.<br>
<br>
<strong>!!modify_link!!</strong><br>
Replaced by the URL to a page where the owner can modify the link.<br>
<br>
<strong>!!name!!</strong><br>
Replaced by the name of the link owner.<br>
<br>
<strong>!!email!!</strong><br>
Replaced by the email address of the link owner. (Not recommended for display)<br>
<br>
<strong>!!report_dead_link!!</strong><br>
Replaced by the URL to a page where users can report the link as a broken link.<br>
<br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br>
<br>
<strong>!!category_link!!</strong><br>
Replaced by the URL to the category of the link.<br>
<br>
<strong>!!category_full!!</strong><br>
Replaced by the full category path of the link.<br>
<b>!!new!!</b><br>
Replaced by a 'New' graphic if the link is considered to be new. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>

<b>!!pop!!</b><br>
Replaced by a 'Pop' (Popular) graphic if the link is considered as being popular. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>

<strong>!!hidden_url!!</strong><br>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.<br><br>

<strong>%%reviews%%</strong><br>
If you would addisionally like to list reviews/comments in the 'Link Info' pages, you may use this variable
to list the comments. The comments style is taken from the <b>reviewlinks.html</b> template.

<strong>%%bannerslotX%%<br>
</strong>This is to be used for banners in conjunction with the banner manager. X can be
1, 2, 3, 4, or 5. You may define up to 5 banner slots in this template or a custom template.
See the online documentation for full instructions.<br>

<BR><strong>!!link_image!!</strong><br>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings<BR><BR>

<strong>!!link_file!!</strong><br>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file. <BR><BR>



$sql_extra_keys
";

}
elsif ($the_tmpl eq "linkinfop")
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to be available.<br>"
		}
	}

$t_title = "Link Info Premium Template";

$dir_details_r = "This template is used to display an individual page for premium links. You can, for example, have an extra
page with extra field/key information for each premium link that will look different than the normal link 
info pages. You link to this extra page from the Link Style Template (tmplsearch.html) by using the variable 
!!more_info_url!! from it. If you don't link from the 'Link Style Template' with the !!more_info_url!!, 
then the extra pages are not generated/available for links that contain extra link or premium link information 
pages. This is also valid for custom templates.
";

$vars_available_r = "<strong>!!title_with_link!!<br>
</strong>Replaced by the title of the link and the title is hyperlinked.<br>
<br>
<strong>!!title_without_link!!</strong><br>
Replaced by the title of the link, but it is not hyperlinked.<br>
<br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!url!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!domain!!</strong><br>
Replaced by the domain name of the link.<br>
<br>


<b>&lt;!-- Hide !!metadescription!! // End Hide --&gt;</b><BR>
This will be replaced by a meta tag (description) for search engines. (Place this variable somewhere between the HEAD tags of the page.)
<BR><BR>

<b>&lt;!-- Hide !!metakeywords!! // End Hide --&gt;</b><BR>
This will be replaced by a meta tag (keywords) for search engines. (Place this variable somewhere between the HEAD tags of the page.)
<br><br>

<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br>
<br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br>
<br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br>
<br>
<strong>!!rno!!<br>
</strong>Replaced by the number of reviews/comments for this link.<br>
<br>
<strong>!!review_link_url!!</strong><br>
Replaced by the URL to the review script where users can add a review/comment for this
link.<br>
<br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br>
<br>
<strong>!!gethtml!!</strong><br>
Replaced by the URL to a page where the owner can get the HTML code to place on his web
site so that visitors can rate his link.<br>
<br>
<strong>!!modify_link!!</strong><br>
Replaced by the URL to a page where the owner can modify the link.<br>
<br>
<strong>!!name!!</strong><br>
Replaced by the name of the link owner.<br>
<br>
<strong>!!email!!</strong><br>
Replaced by the email address of the link owner. (Not recommended for display)<br>
<br>
<strong>!!report_dead_link!!</strong><br>
Replaced by the URL to a page where users can report the link as a broken link.<br>
<br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br>
<br>
<strong>!!category_link!!</strong><br>
Replaced by the URL to the category of the link.<br>
<br>
<b>!!new!!</b><br>
Replaced by a 'New' graphic if the link is considered to be new. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>

<b>!!pop!!</b><br>
Replaced by a 'Pop' (Popular) graphic if the link is considered as being popular. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>

<strong>!!hidden_url!!</strong><br>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.<br><br>

<strong>%%reviews%%</strong><br>
If you would addisionally like to list reviews/comments in the 'Link Info' pages, you may use this variable
to list the comments. The comments style is taken from the <b>reviewlinks.html</b> template.

<strong>%%bannerslotX%%<br>
</strong>This is to be used for banners in conjunction with the banner manager. X can be
1, 2, 3, 4, or 5. You may define up to 5 banner slots in this template or a custom template.
See the online documentation for full instructions.<br>

<BR><strong>!!link_image!!</strong><br>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings<BR><BR>

<strong>!!link_file!!</strong><br>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file. <BR><BR>


$sql_extra_keys
";


}
elsif ($the_tmpl eq "searchres")
{

$t_title = "Main Search Page";

$dir_details_r =  "This template is used to display search results.";

$vars_available_r = qq[<strong>
<p>%%searchresults%%<br>
</strong>The item search results template html are replaced with this variable.<strong></p>
<p>%%prevnext%%<br>
</strong>If there is multiple pages of listings the previous and next links will be 
replaced by this variable.</p>
<strong>
<p>%%pages%%<br>
</strong>The number of pages, if any, of listings for the current directory.</p>
<strong>
<p>%%link_matches%%<br>
</strong>Number of links matched.</p>
<strong>
<p>%%keywords%%<br>
</strong>Keywords that has been used to search with.</p>
];


}
elsif ($the_tmpl eq "searchadv")
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($searched eq "Yes")
		{
		#$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		$sql_extra_keys = $sql_extra_keys . qq[&lt;input type=&quot;checkbox&quot; name=&quot;$keyname&quot; value=&quot;$keyname&quot;checked&gt;$description&lt;/font&gt;<BR><BR>];
		}
	}

$t_title = "Advanced Search Page";

$dir_details_r =  qq[This template is used to display an advanced search form where there are search options available to refine searches. 
You can link to this page from any PowerSeek template or web page by using the following link:<BR>
<a href="$script_url/searchadv.cgi" target="_blank"><b>$script_url/searchadv.cgi</b></a><BR>];

$vars_available_r = qq[<p><strong>!!advanced_search!!<br>
</strong>Replaced by the path to the script that takes care of advanced searching. Used in-conjunction with the search form.<br><br>

<b>Extra Fields/Keys</b><BR>
You have extra fields/keys available in the database. You can let visitors search through these fields by adding the following
inside the search form for searchable each field/key:

<BR><BR>
$sql_extra_keys
];


}
elsif (($the_tmpl eq "lsearchres_loc") or ($the_tmpl eq "lsearchres_loc_prem"))
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to become available.<br>"
		}
	}

if ($q->param('fct') ne "tinfo")
{

	if ($the_tmpl eq "lsearchres_loc")
		{
		$t_title = "Links Style";
		$dir_details_r = "This template is used when displaying matched links after a search.";
		}
		else
		{
		$t_title = "Premium Links Style";
		$dir_details_r = "This template is used when displaying premium link listings in search results.";
		}
}
else
{
	$t_title = "Links Style";
	#$dir_details_r = "Links Style";
}

$vars_available_r = "<p><strong>!!title_with_link!!<br>
</strong>Replaced by the title of the link and the title is hyperlinked.<br><br>
<strong>!!title_without_link!!</strong><br>
 Replaced by the title of the link, but it is not hyperlinked.<br><br>
<strong>!!nr!!</strong><br>
Replaced by the number of the link.<br>
<br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!url!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!domain!!</strong><br>
Replaced by the domain name of the link.<br>
<br>
<strong>!!relevance!!</strong><br>
Replaced by the matched relevance of the link (according to the search terms provided)<br><br>
<strong>!!rgraphic!!<br>
</strong>Replaced by a graphic representing the matched relevance of the link.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date when the link was added.<br>
<br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br>
<br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br>
<br>
<strong>!!rate_link_url!!</strong><br>
Replaced by the URL to the page where it can be rated.<br><br>
<strong>!!rating_image!!</strong><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!rno!!<br>
</strong>Replaced by the number of reviews/comments for this link.<br>
<br>
<strong>!!review_link_url!!</strong><br>
Replaced by the URL to the review script where users can add a review/comment for this
link.<br>
<br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br>
<br>
<strong>!!gethtml!!</strong><br>
Replaced by the URL to a page where the owner can get the HTML code to place on his web
site so that visitors can rate his link.<br>
<br>
<strong>!!modify_link!!</strong><br>
Replaced by the URL to a page where the owner can modify the link.<br>
<br>
<strong>!!name!!</strong><br>
Replaced by the name of the link owner.<br>
<br>
<strong>!!email!!</strong><br>
Replaced by the email address of the link owner. (Not recommended for display)<br>
<br>
<strong>!!report_dead_link!!</strong><br>
Replaced by the URL to a page where users can report the link as a broken link.<br>
<br>
<b>!!new!!</b><br>
Replaced by a 'New' graphic if the link is considered as being new. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>

<b>!!pop!!</b><br>
Replaced by a 'Pop' (Popular) graphic if the link is considered as being popular. Settings regarding this is available
in Settings (button) >> Global Settings in the control panel.<br><br>
<b>!!more_info_url!!</b><br>
This will be replaced by a link/URL to a page that contains more information about the
link. If this variable is present in this template, an extra page will be generated
with more information about the link. You can for example have extra fields/keys which
displays the extra information if end users click on the 'More Info' link. To customize
the extra link information template, edit the 'Link Info' template.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the matched link.<br><br>

<strong>!!hidden_url!!</strong><br>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.<br><br>

<strong>!!link_image!!</strong><br>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings<BR><BR>

<strong>!!link_file!!</strong><br>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file. <BR><BR>



$sql_extra_keys
";

}
elsif ($the_tmpl eq "nomatch")
{

$t_title = "No Match";

$dir_details_r = "This template is used when a search revealed no matches. In order to use this
template, you have to enable the use of it. To enable the use of this template, click the
'Settings' button above. Then click on 'Global Settings'. Look for a setting that reads
'What to use when a search revealed no matches:' - Set it to 'Use and display the template
called 'nomatch.html'";

$vars_available_r = "<strong>%%keywords%%<br>
</strong>Replaced by the keywords that has been searched for.";
}
elsif ($the_tmpl eq "flood")
{

$t_title = "Flood Control Template";

$dir_details_r = "The Flood control settings can be found inside the Control Panel >> Settings Tab >> Global Engine Settings >> Search Settings<BR><BR>

The HTML code listed here will be displayed to a visitor pressing the search button more than once in a 1 second interval. When the
HTML code of this template is displayed it will wait for 2 seconds before attempting the search the visitor is trying to do. 
Flood control is used so that visitors cannot flood the search script by continuously pressing the search button to bog down the
server.
";

$vars_available_r = "<strong>!!web_url!!<br>
</strong>Replaced by the URL path to the 'html' directory.";

}
elsif ($the_tmpl eq "add_url_med")
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#FF8000\"><b>$keyname</b></font><br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#8080C0\"><b>$keyname</b></font><br>"
		}
	}

	if ($sql_extra_keys ne "")
	{

		$extra_field_text = qq[
		<br><br>
		<hr size="1" color="#E4E4E4">
		<Br><b>You have defined extra/fields keys. Please read below:</b><br>
		In order to enable users to add/submit data to these extra fields/keys when submitting a new submission, you have to provide a field box with the name of your field/key. <br><br>
		<b>For example:</b>
		Let's say you created a key/field called 'price' - In order for users to add a price value when submitting a new link, they will need a field box to fill in the price. The name of this field box needs to be the name of the field/key you defined/created. For example you will need to add something, like the following HTML code, to your submit form: (The text in orange is HTML code)
		Enter a Price: <font color="#FF8000"> &lt;input type=&quot;text&quot; name=&quot;price&quot; size=&quot;20&quot;&gt; </font>

		<br><Br><b>The following fields/keys have been found to be present in your directory/search engine:</b><br>
		$sql_extra_keys
		];

	}

$t_title = "Medium-Sized Search Engine Add URL Template";

$dir_details_r = "This template (when displayed to end users) comes with a drop down menu containing all the categories/directories 
where end users can select where they would like to submit their URL. This template is intended for medium-sized
search engines with less than 5000 categories/directories. 
You can choose what 'add url' forms to use (medium or large-sized engines), in Settings >> Global Engine Settings";

$vars_available_r = "<b>%%category_dropdown%%</b><br>
This is replaced by a category drop down box where end users can select the category wherein they would like to make a new submission.<br><br>
<b>%%submissionbox%%</b><br>
This is replaced by a description fill-in-box where end users supply descriptions for their new submission.<br><br>
<b>!!addurlcgi!!</b><br>
Replaced by the path to the 'Add URL' script which handles the new submission.
$extra_field_text";
}
elsif ($the_tmpl eq "add_url")
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#FF8000\"><b>$keyname</b></font><br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#8080C0\"><b>$keyname</b></font><br>"
		}
	}

		if ($sql_extra_keys ne "")#mark
		{
		$extra_field_text = qq[
		<br><br>
		<hr size="1" color="#E4E4E4">
		<Br><b>You have defined extra/fields keys. Please read below:</b><br>
		In order to enable users to add/submit data to these extra fields/keys when submitting a new submission, you have to provide a field box with the name of your field/key. <br><br>
		<b>For example:</b>
		Let's say you created a key/field called 'price' - In order for users to add a price value when submitting a new link, they will need a field box to fill in the price. The name of this field box needs to be the name of the field/key you defined/created. For example you will need to add something, like the following HTML code, to your submit form: (The text in orange is HTML code)
		Enter a Price: <font color="#FF8000"> &lt;input type=&quot;text&quot; name=&quot;price&quot; size=&quot;20&quot;&gt; </font>

		<br><Br><b>The following fields/keys have been found to be present in your directory/search engine:</b><br>
		$sql_extra_keys

		];
		}

$t_title = "Large-Sized Search Engine Add URL Template";

$dir_details_r = "This template (when displayed to end users) is intended to be used when you have more than 5000 categories/directories.
It doesn't come with a category dropdown menu where categories can be choosed when doing a new submission. The reason
for this is because having 10 000 categories in the drop down menu would make the add url form load very slowly.
You can choose what add url forms to use (medium or large-sized engines), in Settings >> Global Engine Settings";

$vars_available_r = "<b>%%submissionbox%%</b><br>
This is replaced by a description fill-in-box where end users supply descriptions for their new submission.<br><br>
<b>!!addurlcgi!!</b><br>
Replaced by the path to the 'Add URL' script which handles the new submission.<br><Br>
<b>!!catid!!</b><br>
This is a hidden form variable that is replaced by a category ID so that the add url script which handles the submission
knows to what category the script needs to submit the new submission.
$extra_field_text
";
}
elsif ($the_tmpl eq "add_url_medp")
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#FF8000\"><b>$keyname</b></font><br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#8080C0\"><b>$keyname</b></font><br>"
		}
	}

	if ($sql_extra_keys ne "")
	{
	$extra_field_text = qq[
	<br><br>
	<hr size="1" color="#E4E4E4">
	<Br><b>You have defined extra/fields keys. Please read below:</b><br>
	In order to enable users to add/submit data to these extra fields/keys when submitting a new submission, you have to provide a field box with the name of your field/key. <br><br>
	<b>For example:</b>
	Let's say you created a key/field called 'price' - In order for users to add a price value when submitting a new link, they will need a field box to fill in the price. The name of this field box needs to be the name of the field/key you defined/created. For example you will need to add something, like the following HTML code, to your submit form: (The text in orange is HTML code)
	Enter a Price: <font color="#FF8000"> &lt;input type=&quot;text&quot; name=&quot;price&quot; size=&quot;20&quot;&gt; </font>

	<br><Br><b>The following fields/keys have been found to be present in your directory/search engine:</b><br>
	$sql_extra_keys
	];
	}

$t_title = "Medium-Sized Search Engine Premium Add URL Template";
	
$dir_details_r = "This template (when displayed to end users) is intended to be used when you have less than 5000 categories/directories.
It is also intended to be a premium add url form where users submit premium URLs.
";

$vars_available_r = "
<b>%%category_dropdown%%</b><br>
This is replaced by a category drop down box where end users can select the category where they would like to make a new submission.<br><br>
<b>%%submissionbox%%</b><br>
This is replaced by a description fill-in-box where end users supply descriptions for their new submission.<br><br>
<b>!!addurlcgi!!</b><br>
Replaced by the path to the 'Add URL' script which handles the new submission.<br><Br>
<b>!!p!!</b><br>
Replaced by a value of 1 to indicate to the 'ADD URL' script that a premium 'new submission' is about to take place.
$extra_field_text
";
}
elsif ($the_tmpl eq "add_urlp")
{


$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#FF8000\"><b>$keyname</b></font><br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#8080C0\"><b>$keyname</b></font><br>"
		}
	}

if ($sql_extra_keys ne "")
{
$extra_field_text = qq[
<br><br>
<hr size="1" color="#E4E4E4">
<Br><b>You have defined extra/fields keys. Please read below:</b><br>
In order to enable users to add/submit data to these extra fields/keys when submitting a new submission, you have to provide a field box with the name of your field/key. <br><br>
<b>For example:</b>
Let's say you created a key/field called 'price' - In order for users to add a price value when submitting a new link, they will need a field box to fill in the price. The name of this field box needs to be the name of the field/key you defined/created. For example you will need to add something, like the following HTML code, to your submit form: (The text in orange is HTML code)
Enter a Price: <font color="#FF8000"> &lt;input type=&quot;text&quot; name=&quot;price&quot; size=&quot;20&quot;&gt; </font>

<br><Br><b>The following fields/keys have been found to be present in your directory/search engine:</b><br>
$sql_extra_keys
];

}

$t_title = "Large-Sized Search Engine Premium Add URL Template";
	
$dir_details_r = "This template (when displayed to end users) is intended to be used when you have more than 5000 categories/directories.
It is also intended to be a premium add url form where users submit premium URLs.
";

$vars_available_r = "<b>%%submissionbox%%</b><br>
This is replaced by a description fill-in-box where end users supply descriptions for their new submission.<br><br>
<b>!!addurlcgi!!</b><br>
Replaced by the path to the 'Add URL' script which handles the new submission.<br><Br>
<b>!!p!!</b><br>
Replaced by a value of 1 to indicate to the 'ADD URL' script that a premium 'new submission' is about to take place.<br><Br>
<b>!!catid!!</b><br>
This is a hidden form variable that is replaced by a category ID so that the add url script which handles the submission
knows to what category the script needs to submit the new submission.
$extra_field_text
";
}
elsif ($the_tmpl eq "add_url_instructions")
{

$t_title = "Add URL Instructions";
	
$dir_details_r = "This will only be used when you are making use of the large-sized search engine 'add url' templates. 
When using the large-sized search engine add url templates, end users need to click the 'add url' link
in a specific category/directory to add their URL/link. When they are not in a category and click the
'add url' link, then this template will be displayed - giving them instructions on how to add their
URL.
";

$vars_available_r = "No variables available for use in this template.";
}
elsif ($the_tmpl eq "add_url_problem")
{
$t_title = "Add URL Problem";

$dir_details_r = "This template is displayed to end users when they do a new submission but there was a problem. A problem
will usually occur when a user left out to include his/her email address, etc...";

$vars_available_r = "<b>%%problem%%</b><br>
This is replaced by text, explaining why a new submission could not be made.";
}
elsif ($the_tmpl eq "add_url_success")
{
$t_title = "Add URL Success";

$dir_details_r = "This template is displayed to end users when a new submission has been successful.";

$vars_available_r = "No variables available for use in this template.";
}
elsif ($the_tmpl eq "modify_link")
{

$t_title = "Modify Link Login";

$dir_details_r = "This template is displayed to end users when they click the 'Modify Link' available with
each link listing. This template prompts them for the password to modify their link.";

$vars_available_r = "<b>!!title_with_link!!</b><br>
Replaced by the hyperlinked title of the link/URL to be modified.<Br><br>
<b>!!rating_image!!</b><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!url!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br><br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br><br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br><br>
<b>!!cid!!</b><br>
This is part of a hidden form variable, replaced by a category ID for use by the modify script.<br><br>
<b>!!id!!</b><br>
This is part of a hidden form variable, replaced by a link ID for use by the modify script.<br><br>
<b>!!modify_cgi!!</b><br>
Replaced by the path to the modify script.<br><br>
";
}
elsif ($the_tmpl eq "modify_link_problem")
{
$t_title = "Modify Problem";

$dir_details_r = "This template is displayed when there was a problem modifying a link.";

$vars_available_r = "<b>%%problem%%</b><br>
This is replaced by text, explaining why a link could not be modified.";
}
elsif ($the_tmpl eq "modify_link_success")
{
$t_title = "Modify Success";
$dir_details_r = "This template is displayed when a link was successfully modified.";
$vars_available_r = "No variables available for use in this template.";
}
elsif ($the_tmpl eq "modify_link_edit")
{


$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#FF8000\"><b>$keyname</b></font><br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#8080C0\"><b>$keyname</b></font><br>"
		}
	}

if ($sql_extra_keys ne "")
{
$extra_field_text = qq[
<br><br>
<hr size="1" color="#E4E4E4">
<Br><b>You have defined extra/fields keys. Please read below:</b><br>
In order to enable users to modify data in these extra fields/keys, you have to provide a field box with the name of your field/key and a value inside it. <br><br>
<b>For example:</b>
Let's say you created a key/field called 'price' - In order for users to modify the price value of their link, they will need a field box where they can modify the price. The name of this field box needs to be the name of the field/key you defined/created. For example you will have to add something like the following HTML code to your modify form: (The text in orange is HTML code)
Price: <font color="#FF8000"> &lt;input type=&quot;text&quot; name=&quot;price&quot;
size=&quot;20&quot; value=&quot;%%price%%&quot;&gt; </font>
<br><Br><b>The following fields/keys have been found to be present in your directory/search engine:</b><br>
$sql_extra_keys
];

}

$t_title = "Modify Link Editing";

$dir_details_r = "This is where users submit changes to standard links.";

$vars_available_r = "<b>%%title%%</b><br>
Replaced by the title of the link.<br><br>
<b>%%keywords%%</b><br>
Replaced by the keywords of the link.<br><br>
<b>%%url%%</b><br>
Replaced by the URL of the link.<br><br>
<b>%%name%%</b><br>
Replaced by the name of the link owner.<br><br>
<b>%%email%%</b><br>
Replaced by the email address of the link owner.<br><br>
<b>%%password%%</b><br>
Replaced by the modify password of the link.<br><br>
<b>%%notesbox%%</b><br>
Replaced by a fill-in-box where link owners can write notes about the changes to the link.<br><br>
<b>!!cid!!</b><br>
This is part of a hidden form variable, replaced by a category ID for use by the modify script.<br><br>
<b>!!id!!</b><br>
This is part of a hidden form variable, replaced by a link ID for use by the modify script.<br><br>
<b>!!modify_cgi!!</b><br>
Replaced by the path to the modify script.<br><br>
<b>!!password!!</b><br>
This is a hidden form variable used by the modify script.
$extra_field_text
";
}
elsif ($the_tmpl eq "modify_link_editp")
{


$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#FF8000\"><b>$keyname</b></font><br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<font color=\"#8080C0\"><b>$keyname</b></font><br>"
		}
	}

if ($sql_extra_keys ne "")
{
$extra_field_text = qq[
<br><br>
<hr size="1" color="#E4E4E4">
<Br><b>You have defined extra/fields keys. Please read below:</b><br>
In order to enable users to modify data in these extra fields/keys, you have to provide a field box with the name of your field/key and a value inside it. <br><br>
<b>For example:</b>
Let's say you created a key/field called 'price' - In order for users to modify the price value of their link, they will need a field box where they can modify the price. The name of this field box needs to be the name of the field/key you defined/created. For example you will have to add something like the following HTML code to your modify form: (The text in orange is HTML code)
Price: <font color="#FF8000"> &lt;input type=&quot;text&quot; name=&quot;price&quot;
size=&quot;20&quot; value=&quot;%%price%%&quot;&gt; </font>
<br><Br><b>The following fields/keys have been found to be present in your directory/search engine:</b><br>
$sql_extra_keys
];

}

$t_title = "Modify Link Editing";

$dir_details_r = "This is where users submit changes to premium links.";

$vars_available_r = "<b>%%title%%</b><br>
Replaced by the title of the link.<br><br>
<b>%%keywords%%</b><br>
Replaced by the keywords of the link.<br><br>
<b>%%url%%</b><br>
Replaced by the URL of the link.<br><br>
<b>%%name%%</b><br>
Replaced by the name of the link owner.<br><br>
<b>%%email%%</b><br>
Replaced by the email address of the link owner.<br><br>
<b>%%password%%</b><br>
Replaced by the modify password of the link.<br><br>
<b>%%notesbox%%</b><br>
Replaced by a fill-in-box where link owners can write notes about the changes to the link.<br><br>
<b>!!cid!!</b><br>
This is part of a hidden form variable, replaced by a category ID for use by the modify script.<br><br>
<b>!!id!!</b><br>
This is part of a hidden form variable, replaced by a link ID for use by the modify script.<br><br>
<b>!!modify_cgi!!</b><br>
Replaced by the path to the modify script.<br><br>
<b>!!password!!</b><br>
This is a hidden form variable used by the modify script.
$extra_field_text
";
}



elsif ($the_tmpl eq "modify_instructions")
{

$t_title = "Modify Instructions";

$dir_details_r = "This template will be displayed to users when the modify link is clicked but is not linked to a link listing.";

$vars_available_r = "No variables available for use in this template.";
}
elsif ($the_tmpl eq "retrievepass")
{

$t_title = "Password Retrieval";

$dir_details_r = "This template is used to enable end users to retrieve modification passwords for links.";

$vars_available_r = "<b>!!email_script!!</b><br>
This is replaced by the path to the email script that emails modification passwords to end users.
";

}
elsif ($the_tmpl eq "retrievepass_ok")
{
$t_title = "Password Email Success";

$dir_details_r = "Displayed to end users when a modification password was successfully sent.";

$vars_available_r = "No variables available for use in this template.";

}
elsif ($the_tmpl eq "retrievepass_prb")
{
$t_title = "Password Email Problem";

$dir_details_r = "Displayed to end users when a modification password could not be sent.";

$vars_available_r = "No variables available for use in this template.";

}
elsif ($the_tmpl eq "rate_it")
{
$t_title = "Rate It";

$dir_details_r = "Used to enable end users to rate links.";

$vars_available_r = "
<b>!!title_with_link!!</b><br>
Replaced by the hyperlinked title of the link/URL to be modified.<Br><br>
<b>!!rating_image!!</b><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!url!!</strong><br>
Replaced by the URL of the link.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br><br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br><br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br><br>
<b>!!ct!!</b><br>
This is part of a hidden form variable, used by the rating script.<br><br>
<b>!!id!!</b><br>
This is part of a hidden form variable, used by the rating script.<br><br>
<b>!!rate_it!!</b><br>
Replaced by the path to the rating script.<br><br>

<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.
";
}
elsif ($the_tmpl eq "rate_it_success")
{

$t_title = "Rate It Success";

$dir_details_r = "Displayed when an end user successfully rated a link.";

$vars_available_r = "
<b>!!title_with_link!!</b><br>
Replaced by the hyperlinked title of the link/URL to be modified.<Br><br>
<b>!!rating_image!!</b><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!url!!</strong><br>
Replaced by the URL of the link.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br><br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br><br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br><br>

<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.

";
}
elsif ($the_tmpl eq "rate_it_fail")
{

$t_title = "Rate It Failure";

$dir_details_r = "Displayed when a rating for a link could not be recorded.";

$vars_available_r = "
<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!url!!</b><br>
Replaced by the URL of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.
";


}
elsif ($the_tmpl eq "gethtml")
{

$t_title = "Get Rating HTML Code";

$dir_details_r = "This template is used to enable link owners to retrieve HTML code which they can place
inside their web pages so that their visitors can rate their link on your 
search engine.";

$vars_available_r = "
<b>%%textlink%%</b><br>
Replaced by a link to the rating page of the link (where users can rate this link).<br><br>
<b>%%textlink_code%%</b><br>
Replaced by a box containg HTML code that the link owner can place on his web site.<br><br>
<b>%%remoteform_code%%</b><br>
Replaced by a box containg HTML code that the link owner can place on his web site.<br><br>
<b>!!title_with_link!!</b><br>
Replaced by the hyperlinked title of the link/URL to be modified.<Br><br>
<b>!!rating_image!!</b><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!url!!</strong><br>
Replaced by the URL of the link.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br><br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br><br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br><br>


<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.

";
}
elsif ($the_tmpl eq "review_it")
{

$t_title = "Review/Comment Display Template";

$dir_details_r = "This template is used to enable end users to view and post reviews/comments about links.";

$vars_available_r = "<b>!!title_with_link!!</b><br>
Replaced by the hyperlinked title of the link/URL.<Br><br>
<b>!!rating_image!!</b><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!url!!</strong><br>
Replaced by the URL of the link.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br><br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br><br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br><br>
<b>%%review_listings%%</b><br>
This is replaced by the reviews/comments for links.<br><br>
<b>%%description_box%%</b><br>
Replaced by a fill-in-box where end users enter reviews/comments.<br><br>
<b>!!review_it!!</b><br>
Replaced by the path to the review script that handles the posting of reviews/comments.<br><br>
<b>!!ct!!</b><br>
This is part of a hidden form variable, used by the review/comment script.<br><br>
<b>!!id!!</b><br>
This is part of a hidden form variable, used by the review/comment script.<br><br>

<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.


";

}
elsif ($the_tmpl eq "reviewlinks")
{

$t_title = "Review/Comment Listing Style";

$dir_details_r = "This template is used to display comments/reviews.";

$vars_available_r = "
<b>%%reviewer%%</b><br>
Replaced by the name of the end user who posted the review/comment.<br><br>
<b>%%review%%</b><br>
Replaced by the review/comment for a link.<br><br>
<b>%%reviewer_email%%</b><br>
Replaced by the email address of the end user's review/comment.<br><br>
<b>%%date%%</b><br>
The date when the review was added.
";
}
elsif ($the_tmpl eq "reviewadded")
{

$t_title = "Review Added";

$dir_details_r = "This template displayed when an end user successfully added a review/comment.";

$vars_available_r = "<b>!!title_with_link!!</b><br>
Replaced by the hyperlinked title of the link/URL.<Br><br>
<b>!!rating_image!!</b><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br><br>
<strong>!!url!!</strong><br>
Replaced by the URL of the link.<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br><br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br><br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br><br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br><br>

<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.

";
}
elsif ($the_tmpl eq "reviewproblem")
{

$t_title = "Review Problem";

$dir_details_r = "This template displayed if there was a problem when trying to add a review/comment.";

$vars_available_r = "
<b>%%problem%%</b><br>
Replaced by text describing the problem on why the review/comment could not be added.
<BR><BR>
<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.
<BR><BR>
<b>!!url!!</b><br>
Replaced by the URL of the link.

";

}
elsif ($the_tmpl eq "whatsnew_main")
{

$t_title = "Main What's New Template";

$dir_details_r = "This template is used when displaying the latest additions to the directory.";

$vars_available_r = "<b>%%whats_new_listings%%</b><br>
Replaced by the latest link additions to the directory.<br><br>
<b>%%prevnext%%</b><br>
If there is multiple pages of link listings, the previous and next links will be replaced by this variable.<br><br>
<b>%%pages%%</b><br>
The number of pages, (if any) of link listings for the current directory. Replaced by links to the pages.<br><br>
<b>%%lnknr%%</b><br>
Replaced by the number of links in the current category.<br><br>
<b>%%pgs%%</b><br>
Replaced by the number of pages (containing links) of the current category.
";
}
elsif (($the_tmpl eq "whatsnew_lists") or ($the_tmpl eq "whatsnew_lists_prem"))
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to be available.<br>"
		}
	}

	if ($the_tmpl eq "whatsnew_lists")
	{
	$t_title = "What's New Listing Style";

	$dir_details_r = "This template reflects the HTML code used when displaying new link listings.";
	}
	else
	{
	$t_title = "What's New Listing Style";

	$dir_details_r = "This template reflects the HTML code used when displaying new premium link listings.";
	}

$vars_available_r = "<strong>!!title_with_link!!<br>
</strong>Replaced by the title of the link and the title is hyperlinked.<br>
<br>
<strong>!!title_without_link!!</strong><br>
Replaced by the title of the link, but it is not hyperlinked.<br><br>
<strong>!!nr!!</strong><br>
Replaced by the number of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!url!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br>
<br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br>
<br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br>
<br><strong>!!rate_link_url!!</strong><br>
Replaced by the URL to the page where it can be rated.<br>
<br>
<strong>!!rating_image!!</strong><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!rno!!<br>
</strong>Replaced by the number of reviews/comments for this link.<br>
<br>
<strong>!!review_link_url!!</strong><br>
Replaced by the URL to the review script where users can add a review/comment for this
link.<br>
<br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br>
<br>
<strong>!!gethtml!!</strong><br>
Replaced by the URL to a page where the owner can get the HTML code to place on his web
site so that visitors can rate his link.<br>
<br>
<strong>!!modify_link!!</strong><br>
Replaced by the URL to a page where the owner can modify the link.<br>
<br>
<strong>!!name!!</strong><br>
Replaced by the name of the link owner.<br>
<br>
<strong>!!email!!</strong><br>
Replaced by the email address of the link owner. (Not recommended for display)<br>
<br>
<strong>!!report_dead_link!!</strong><br>
Replaced by the URL to a page where users can report the link as a broken link.<br><br>
<b>!!more_info_url!!</b><br>
This will be replaced by a link/URL to a page that contains more information about the link. 
If this variable is present in this template, an extra page will be generated with more
information about the link. You can, for example, have extra fields/keys which displays the extra
information if end users click on the 'More Info' link. To customize the extra link information
template, edit the 'Link Info' template.
<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!hidden_url!!</strong><br>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.<br><br>

<strong>!!link_image!!</strong><br>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings<BR><BR>

<strong>!!link_file!!</strong><br>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file. <BR><BR>


$sql_extra_keys
";



}
elsif ($the_tmpl eq "tophits_main")
{

$t_title = "Main Top Hits Template";

$dir_details_r = "This template is used when displaying the most clicked links in the directory.";

$vars_available_r = "<b>%%tophits_listings%%</b><br>
Replaced by 'most clicked' links in the directory.<br><br>
<b>%%prevnext%%</b><br>
If there is multiple pages of link listings, the previous and next links will be replaced by this variable.<br><br>
<b>%%pages%%</b><br>
The number of pages, (if any) of link listings for the current directory. Replaced by links to the pages.<br><br>
<b>%%lnknr%%</b><br>
Replaced by the number of links in the current category.<br><br>
<b>%%pgs%%</b><br>
Replaced by the number of pages (containing links) of the current category.
";

}
elsif (($the_tmpl eq "tophits_listings") or ($the_tmpl eq "tophits_listings_prem"))
{

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to be available.<br>"
		}
	}

	if ($the_tmpl eq "tophits_listings")
	{
	$t_title = "Top Hits Listing Style";
	$dir_details_r = "This template reflects the HTML code used when displaying the links that was most clicked.";
	}
	else
	{
	$t_title = "Top Hits Listing Style";
	$dir_details_r = "This template reflects the HTML code used when displaying premium links that was most clicked.";
	}

$vars_available_r = "<strong>!!title_with_link!!<br>
</strong>Replaced by the title of the link and the title is hyperlinked.<br>
<br>
<strong>!!title_without_link!!</strong><br>
Replaced by the title of the link, but it is not hyperlinked.<br><br>
<strong>!!nr!!</strong><br>
Replaced by the number of the link.<br><br>
<strong>!!description!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!url!!</strong><br>
Replaced by the description of the link.<br>
<br>
<strong>!!date!!<br>
</strong>Replaced by the date of when the link was added.<br>
<br>
<strong>!!votes!!</strong><br>
Replaced by the number of votes received for this link.<br>
<br>
<strong>!!rating!!<br>
</strong>Replaced by the rating of the link.<br>
<br><strong>!!rate_link_url!!</strong><br>
Replaced by the URL to the page where it can be rated.<br>
<br>
<strong>!!rating_image!!</strong><br>
Replaced by an image representing the rating of the link.<br><br>
<strong>!!rno!!<br>
</strong>Replaced by the number of reviews/comments for this link.<br>
<br>
<strong>!!review_link_url!!</strong><br>
Replaced by the URL to the review script where users can add a review/comment for this
link.<br>
<br>
<strong>!!hits!!</strong><br>
Replaced by the number of hits [mouse-clicks] the link has received.<br>
<br>
<strong>!!gethtml!!</strong><br>
Replaced by the URL to a page where the owner can get the HTML code to place on his web
site so that visitors can rate his link.<br>
<br>
<strong>!!modify_link!!</strong><br>
Replaced by the URL to a page where the owner can modify the link.<br>
<br>
<strong>!!name!!</strong><br>
Replaced by the name of the link owner.<br>
<br>
<strong>!!email!!</strong><br>
Replaced by the email address of the link owner. (Not recommended for display)<br>
<br>
<strong>!!report_dead_link!!</strong><br>
Replaced by the URL to a page where users can report the link as a broken link.<br><br>
<b>!!more_info_url!!</b><br>
This will be replaced by a link/URL to a page that contains more information about the link. 
If this variable is present in this template, an extra page will be generated with more
information about the link. You can, for example, have extra fields/keys which displays the extra
information if end users click on the 'More Info' link. To customize the extra link information
template, edit the 'Link Info' template.
<br><br>
<strong>!!category!!</strong><br>
Replaced by the category of the link.<br><br>
<strong>!!hidden_url!!</strong><br>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.<br><br>
<strong>!!link_image!!</strong><br>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings<BR><BR>

<strong>!!link_file!!</strong><br>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file. <BR><BR>

$sql_extra_keys
";
}
elsif ($the_tmpl eq "locked")
{

$t_title = "Locked Category/Directory Template";

$dir_details_r = "This template will be displayed to end users when they try to add an URL into a category that is locked. You can lock
categories from the 'Dir Manager' so that new submissions cannot be done in certain categories/directories.";

$vars_available_r = "No variables available for use in this template.";

}
elsif ($the_tmpl eq "locked")
{
$t_title = "Locked Category/Directory Template";

$dir_details_r = "This template will be displayed to end users when they try to add an URL into a category that is locked. You can lock
categories from the 'Dir Manager' so that new submissions cannot be done in certain categories/directories.";

$vars_available_r = "No variables available for use in this template.";
}
elsif ($the_tmpl eq "brokenlink")
{

$t_title = "Broken Link Page";

$dir_details_r = "This template will be displayed to end users when they want to report a broken link.";

$vars_available_r = "<b>!!id!!</b><br>
This is part of a hidden form variable, replaced by a link ID for use by the broken link script.<br><br>

<b>!!broken_link_script!!</b><br>
This is the location/path of the broken link script which handles the reporting of broken links.</p>

<b>!!cid!!</b><br>
This is part of a hidden form variable, replaced by a category ID for use by the broken link script.<br><br>

<b>!!title_with_link!!</b><br>
This is part of a hidden form variable, replaced by a category ID for use by the broken link script.<br><br>

<b>!!problem!!</b><br>
Replaced with text explaining a problem if there was a problem in submitting a problem with a link.

<BR><BR>
<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.
<BR><BR>
<b>!!url!!</b><br>
Replaced by the URL of the link.
";

}
elsif ($the_tmpl eq "brokenlink_success")
{

$t_title = "Successfully Reported Broken Link Page";

$dir_details_r = "This page/template is displayed to end users when they successfully reported a broken link.";

$vars_available_r = "<b>!!category_with_link!!</b><br>
Replaced by the categories with links to these categories where the link resides.
<BR><BR>
<b>!!title_without_link!!</b><br>
Replaced by the title of the link.
<BR><BR>
<b>!!more_info_url!!</b><br>
Replaced by a link to the 'more info' page of the link.
<BR><BR>
<b>!!url!!</b><br>
Replaced by the URL of the link.
";
}
elsif ($the_tmpl eq "mlist1")
{
$t_title = "Mailing List Removal Template";

$dir_details_r = "This page/template is displayed to end users when they are about to remove themselves from the mailing list.";

$vars_available_r = "<b>!!removalscript!!</b><br>
This variable is replaced by the path to the mailing list removal script.
";
}
elsif ($the_tmpl eq "mlist2")
{

$t_title = "Mailing List Removal Problem";

$dir_details_r = "This page/template is displayed to end users when there was a problem removing their email address from the mailing list.";

$vars_available_r = "No variables available for use in this template.";

}
elsif ($the_tmpl eq "mlist3")
{

$t_title = "Mailing List Removal Success";

$dir_details_r = "This page/template is displayed to end users when their email addresses was successfully removed from the mailing list.";

$vars_available_r = "No variables available for use in this template.";
}
elsif ($the_tmpl eq "kanoodle_searchres")
{

$t_title = "Kanoodle.com Links Style";

$dir_details_r = "This template is used when displaying matched links after a Kanoodle PPC search.";

$vars_available_r = "<b>!!kan_title_with_clickurl!! </b><br>
This variable will show the heading as well as the link to click to kanoodle.com.<br><br>

<b>!!kan_description!! </b><br>
Description of the result as provided by Kanoodle.<br><br>

<b>!!kan_url!! </b><br>
URL to the website. Not to kanoodle but the actual bidders website. <br><br>

<b>!!kan_bidprice!! </b><br>
It shows in US cents the price the bidder will pay for a click through.<br><br>

<b>!!kan_clickurl!! </b><br>
The actual \"&lt;a href&gt;\" link the user will have to click on to register the click through.<br><br>

<b>!!kan_title!! </b><br>
The title of the Website. <br><br>";
}
elsif ($the_tmpl eq "searchfeed_searchres")
{
$t_title = "Searchfeed.com Links Style";

$dir_details_r = "This template is used when displaying matched links after a Searchfeed PPC search.";

$vars_available_r = "<b>!!searchfeed_title_with_clickurl!! </b><br>
This variable will show the heading as well as the link to click to Searchfeed.com.<br><br>

<b>!!searchfeed_description!! </b><br>
Description of the result as provided by Searchfeed.<br><br>

<b>!!searchfeed_url!! </b><br>
URL to the website. Not to Searchfeed but the actual bidders Website. <br><br>

<b>!!searchfeed_bidprice!! </b><br>
It shows in US cents the price the bidder will pay for a click through.<br><br>

<b>!!searchfeed_clickurl!! </b><br>
The actual \"&lt;a href&gt;\" link the user will have to click on to register the click through.<br><br>

<b>!!searchfeed_title!! </b><br>
The title of the Website. <br><br>";
}
elsif ($the_tmpl eq "searchresdir")
{
$t_title = "Main Directory Search Page";

$dir_details_r = "This template is used to display category/directory search results.";

$vars_available_r = "<b>%%keywords%%</b><br>
Replaced by the keywords that was search for.<br><br>

<b>%%link_matches%% </b><br>
Indicates the number of matches foun<BR><BR>

<b>%%prevnext%%</b><br>
Replaced by next/previous page navigation links.<BR><BR>

<b>%%searchresults%%</b><br>
Replaced by search results.<BR><BR>
";

}

elsif ($the_tmpl eq "lsearchres_locdir")
{
$t_title = "Directory Links Style";

$dir_details_r = "Defines the style of directories/categories that matched in a search.";

$vars_available_r = "<b>!!nr!!</b><br>
Replaced by a number to indicate the link number in the match list.<br><br>

<b>!!category!!</b><br>
Replaced by the category name that matched.<BR><BR>

<b>!!description!!</b><br>
Replaced by a category description.

";

}
elsif ($the_tmpl eq "fav_main")
{
$t_title = "Main Favourites Template";

$dir_details_r = "This template acts like a frame around favorite links that has been flagged by visitors as their favourites.";

$vars_available_r = "<b>!!favorites!!</b><br>
Replaced by favorite link listings that visitors has flagged as their favorites.
";

}
elsif (($the_tmpl eq "fav_standard") or ($the_tmpl eq "fav_premium"))
{

if ($the_tmpl eq "fav_standard")
	{
	$t_title = "Favorites Link Style";
	$dir_details_r = "This template reflects the HTML code used when displaying a visitor's favorite links.";
	}
	else
	{
	$t_title = "Favorites Link Style Premium";
	$dir_details_r = "This template reflects the HTML code used when displaying a visitor's favorite premium links.";
	}

$keydata = acs::get_file_contents("$data_dir/keys.dat");
@akeys = split (/\n/, $keydata);
$knr = @akeys;

foreach $k_item (@akeys)
	{
	($keyname, $visible, $size, $searched, $description, $na, $imgk) = split (/\t/, $k_item);
	$real_kname = $keyname . "_cust";
	
	if ($imgk eq "Yes")
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#FF8000\"><b>!!$keyname!!</b></font> <br>This is an image field/key that has been created. Add <b>!!$keyname!!</b> to this template for the image to display. This field/key needs a URL to an image - for example: http://www.yourdomain.com/some_image.gif<br>"
		}
		else
		{
		$sql_extra_keys = $sql_extra_keys . "<br><font color=\"#8080C0\"><b>!!$keyname!!</b></font> <br>This is an extra field/key that has been created. Add <b>!!$keyname!!</b> to this template for it's values to be available.<br>"
		}
	}

$vars_available_r = "
<b>!!title_with_link!!</b><BR>
Replaced by the title of the link and the title is hyperlinked.
<BR><BR>
<b>!!title_without_link!!</b><BR>
Replaced by the title of the link, but it is not hyperlinked.
<BR><BR>
<b>!!nr!!</b><BR>
Replaced by the number of the link.
<BR><BR>
<b>!!description!!</b><BR>
Replaced by the description of the link.
<BR><BR>
<b>!!url!!</b><BR>
Replaced by the description of the link.
<BR><BR>
<b>!!date!!</b><BR>
Replaced by the date of when the link was added.
<BR><BR>
<b>!!votes!!</b><BR>
Replaced by the number of votes received for this link.
<BR><BR>
<b>!!rating!!</b><BR>
Replaced by the rating of the link.
<BR><BR>
<b>!!rate_link_url!!</b><BR>
Replaced by the URL to the page where it can be rated.
<BR><BR>
<b>!!rating_image!!</b><BR>
Replaced by an image representing the rating of the link.
<BR><BR>
<b>!!rno!!</b><BR>
Replaced by the number of reviews/comments for this link.
<BR><BR>
<b>!!review_link_url!!</b><BR>
Replaced by the URL to the review script where users can add a review/comment for this link.
<BR><BR>
<b>!!hits!!</b><BR>
Replaced by the number of hits [mouse-clicks] the link has received.
<BR><BR>
<b>!!gethtml!!</b><BR>
Replaced by the URL to a page where the owner can get the HTML code to place on his web site so that visitors can rate his link.
<BR><BR>
<b>!!modify_link!!</b><BR>
Replaced by the URL to a page where the owner can modify the link.
<BR><BR>
<b>!!name!!</b><BR>
Replaced by the name of the link owner.
<BR><BR>
<b>!!email!!</b><BR>
Replaced by the email address of the link owner. (Not recommended for display)
<BR><BR>
<b>!!report_dead_link!!</b><BR>
Replaced by the URL to a page where users can report the link as a broken link.
<BR><BR>
<b>!!more_info_url!!</b><BR>
This will be replaced by a link/URL to a page that contains more information about the link. If this variable is present in this template, an extra page will be generated with more information about the link. You can, for example, have extra fields/keys which displays the extra information if end users click on the 'More Info' link. To customize the extra link information template, edit the 'Link Info' template.
<BR><BR>
<b>!!category!!</b><BR>
Replaced by the category of the link.
<BR><BR>
<b>!!hidden_url!!</b><BR>
This will be replaced by a link to a PowerSeek script that redirects to the URL of the link when clicked.
<BR><BR>
<b>!!link_image!!</b><BR>
This will be replaced by an uploaded image that was uploaded for the link. You can set the width and height to be fixed by going to the Control Panel >> Settings >> Global Engine Settings >> Directory/Category Listing Settings
<BR><BR>
<b>!!link_file!!</b><BR>
If something other than an image (like a .pdf or .avi file) was uploaded then this variable can be used and it will be replaced by the full URL path to the file.
<BR><BR>
$sql_extra_keys
";

}
elsif ($the_tmpl eq "fav_none")
{

	$t_title = "No Favorites Added Yet";
	$dir_details_r = "This template is displayed with the 'Main Favorites' (fav_main.html) when no favorites has been added yet.";

}
elsif ($the_tmpl eq "contact_form")
{

	$t_title = "Contact Us Form";
	$dir_details_r = "This template is displayed to a user when he/she clicked the contact us link.";

}
elsif ($the_tmpl eq "contact_thank")
{

	$t_title = "Contact Us Thank You";
	$dir_details_r = "This template is displayed when a user successfully completed the contact form.";

}
elsif ($the_tmpl eq "reg_success_paypal")
{

	$t_title = "Success Page PayPal Purchase";
	$dir_details_r = "This template is displayed when a user successfully submitted and paid for a link via PayPal.";

}





return($dir_details_r, $vars_available_r, $t_title);
}




sub favorites
{

($fav_main, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("fav_main");
($fav_standard, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("fav_standard");
($fav_premium, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("fav_premium");
($fav_none, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("fav_none");


$favorites_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click to
    Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_main" title="$fav_main" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_main',screen.width-200,screen.height-200);return false;"><strong>Main Favorites</strong></a></td>
    <td class="normaltext">fav_main.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=93" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_standard"  title="$fav_standard" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_standard',screen.width-200,screen.height-200);return false;">Favorites Link Style</a></td>
    <td class="normaltext">fav_standard.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=94" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_premium"  title="$fav_premium" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_premium',screen.width-200,screen.height-200);return false;">Favorites Premium Link Style</a></td>
    <td class="normaltext">fav_premium.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=95" target="_blank">Preview</a></td>
  </tr>
  <tr>
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_none"  title="$fav_none" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=fav_none',screen.width-200,screen.height-200);return false;">No Favorites Added Yet</a></strong></td>
    <td class="normaltext">fav_none.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=96" target="_blank">Preview</a></td>
  </tr>
</table>

];

return ($favorites_ret);

}




sub mail_remove
{

($mlist1, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("mlist1");
($mlist2, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("mlist2");
($mlist3, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("mlist3");


$mail_remove_ret = qq[


<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=mlist1" title="$mlist1" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=mlist1',screen.width-200,screen.height-200);return false;">Mailing List Removal   Template</a></strong></td>
    <td class="normaltext">mlist1.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=34" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=mlist2" title="$mlist2" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=mlist2',screen.width-200,screen.height-200);return false;">Mailing   List Removal Problem</a></strong></td>
    <td class="normaltext">mlist2.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=35" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=mlist3" title="$mlist3" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=mlist3',screen.width-200,screen.height-200);return false;">Mailing   List Removal Success</a></strong></td>
    <td class="normaltext">mlist3.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=36" target="_blank">Preview</a></td>
  </tr>
</table>

];

return ($mail_remove_ret);

}





sub broke_templ
{

($brokenlink, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("brokenlink");
($brokenlink_success, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("brokenlink_success");


$broke_templ_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=brokenlink" title="$brokenlink" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=brokenlink',screen.width-200,screen.height-200);return false;">Broken   Link Page</a></strong></td>
    <td class="normaltext">brokenlink.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=32" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=brokenlink_success" title="$brokenlink_success" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=brokenlink_success',screen.width-200,screen.height-200);return false;">Successfully   Reported Broken Link Page</a></strong></td>
    <td class="normaltext">brokenlink_success.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=33" target="_blank">Preview</a></td>
  </tr>
</table>
];

return ($broke_templ_ret);

}




sub tophits
{

($tophits_main, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("tophits_main");
($tophits_listings, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("tophits_listings");
($tophits_listings_prem, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("tophits_listings_prem");


$tophits_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=tophits_main" title="$tophits_main" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=tophits_main',screen.width-200,screen.height-200);return false;">Main   Top Hits Page</a></strong></td>
    <td class="normaltext">tophits_main.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=29" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&template=tophits_listings" title="$tophits_listings" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=tophits_listings',screen.width-200,screen.height-200);return false;">Top   Hits Listings Style</a></td>
    <td class="normaltext">tophits_listings.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=30" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&template=tophits_listings_prem" title="$tophits_listings_prem" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=tophits_listings_prem',screen.width-200,screen.height-200);return false;">Top   Hits Listings Premium Style</a></td>
    <td class="normaltext">tophits_listings_prem.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=31" target="_blank">Preview</a></td>
  </tr>
</table>
];

return ($tophits_ret);

}





sub whatsnew
{

($whatsnew_main, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("whatsnew_main");
($whatsnew_lists, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("whatsnew_lists");
($whatsnew_lists_prem, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("whatsnew_lists_prem");

$whatsnew_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=whatsnew_main" title="$whatsnew_main" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=whatsnew_main',screen.width-200,screen.height-200);return false;">Main   What's New Page</a></strong></td>
    <td class="normaltext">whatsnew_main.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=26" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&template=whatsnew_lists" title="$whatsnew_lists" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=whatsnew_lists',screen.width-200,screen.height-200);return false;">What's   New Listings Style</a></td>
    <td class="normaltext">whatsnew_lists.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=27" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"><a href="$admin_url/admin6.cgi?fct=edit_template&template=whatsnew_lists_prem" title="$whatsnew_lists_prem" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=whatsnew_lists_prem',screen.width-200,screen.height-200);return false;">What's   New Listings Premium Style</a></td>
    <td class="normaltext">whatsnew_lists_prem.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=28" target="_blank">Preview</a></td>
  </tr>
</table>
];

return ($whatsnew_ret);

}







sub comments
{

($review_it, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("review_it");
($reviewlinks, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("reviewlinks");
($reviewadded, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("reviewadded");
($reviewproblem, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("reviewproblem");


$comments_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=review_it" title="$review_it" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=review_it',screen.width-200,screen.height-200);return false;">Main   Comment/Review Page</a></strong></td>
    <td class="normaltext">review_it.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=22" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=reviewlinks" title="$reviewlinks" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=reviewlinks',screen.width-200,screen.height-200);return false;">Comment/Review   Listings Style</a></strong></td>
    <td class="normaltext">reviewlinks.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=23" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=reviewadded" title="$reviewadded" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=reviewadded',screen.width-200,screen.height-200);return false;">Comment/Review   Added</a></strong></td>
    <td class="normaltext">reviewadded.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=24" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=reviewproblem" title="$reviewproblem" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=reviewproblem',screen.width-200,screen.height-200);return false;">Comment/Review   Problem</a></strong></td>
    <td class="normaltext">reviewproblem.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=25" target="_blank">Preview</a></td>
  </tr>
</table>

];

return ($comments_ret);

}






sub ratings_templates
{

($rate_it, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("rate_it");
($rate_it_success, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("rate_it_success");
($rate_it_fail, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("rate_it_fail");
($gethtml, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("gethtml");



$ratings_templates_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click      to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=rate_it" title="$rate_it" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=rate_it',screen.width-200,screen.height-200);return false;">Main   Rating Page</a></strong></td>
    <td class="normaltext">rate_it.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=18" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=rate_it_success" title="$rate_it_success" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=rate_it_success',screen.width-200,screen.height-200);return false;">Successfully   Rated</a></strong></td>
    <td class="normaltext">rate_it_success.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=19" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=rate_it_fail" title="$rate_it_fail" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=rate_it_fail',screen.width-200,screen.height-200);return false;">Failed   Rating</a></strong></td>
    <td class="normaltext">rate_it_fail.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=20" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=gethtml" title="$gethtml" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=gethtml',screen.width-200,screen.height-200);return false;">Get   HTML Code</a></strong></td>
    <td class="normaltext">gethtml.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=21" target="_blank">Preview</a></td>
  </tr>
</table>

];

return ($ratings_templates_ret);


}



sub add_url_tmpls2
{

$gsettings = new_gsettings acs; 

if ($gsettings->{add_url_form} eq "medium")
	{
	$medium_sized = "<b>(In Use)</b>";
	$large_sized = "<b>(Not In Use)</b>";
	$add_urlinst = "<b>(Not In Use)</b>";
	}
	else
	{
	$large_sized = "<b>(In Use)</b>";
	$medium_sized = "<b>(Not In Use)</b>";
	$add_urlinst = "<b>(In Use)</b>";
	}


($add_url_med, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_url_med");
($add_url, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_url");
($add_url_medp, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_url_medp");
($add_urlp, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_urlp");

($add_url_instructions, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_url_instructions");
($locked, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("locked");
($add_url_problem, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_url_problem");
($add_url_success, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("add_url_success");

($modify_link, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("modify_link");
($modify_link_problem, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("modify_link_problem");
($modify_link_success, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("modify_link_success");
($modify_link_edit, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("modify_link_edit");
($modify_link_editp, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("modify_link_editp");
($modify_instructions, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("modify_instructions");
($retrievepass, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("retrievepass");
($retrievepass_ok, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("retrievepass_ok");
($retrievepass_prb, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("retrievepass_prb");


#### PayPal

$paypalsettings = acs::get_file_contents("$data_dir/paypalset.dat");
@paypalset = split (/\n/,$paypalsettings);

if ($paypalset[0] eq "Y")
	{
		$paypal_templates = qq[
			<tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
			<td height="25" class="normaltext"  colspan="2" ><img src="$web_url/lar4.gif" width="10" height="11"> <strong>
			<a href="$admin_url/admin6.cgi?fct=edit_template&template=reg_success_paypal" 
			title="This template is displayed to a user when he/she successfully submitted and purchased a link with PayPal." onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=reg_success_paypal',screen.width-200,screen.height-200);return false;">Success Page PayPal Purchase</a></strong></td>
			<td class="normaltext">reg_success_paypal.html</td>
			<td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=102" target="_blank">Preview</a></td>
			</tr>
		];
	}



$add_url_tmpls2_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>

<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" colspan="2" class="normaltext"><strong> Add URL Templates:</strong> (Click to Edit)</td>
    <td width="35%" class="normaltext"><strong>File
      Name: </strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview:</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_url_med" title="$add_url_med" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_url_med',screen.width-200,screen.height-200);return false;">Add   URL Template 1</a></strong>(Medium-Sized Search Engines) <strong>$medium_sized</strong></td>
    <td width="35%" class="normaltext">add_url_med.html</td>
    <td width="10%" class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=37" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_url" title="$add_url" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_url',screen.width-200,screen.height-200);return false;">Add   URL Template 2</a></strong> (Large-Sized Search Engines) <strong>$large_sized</strong></td>
    <td class="normaltext">add_url.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=38" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_url_medp" title="$add_url_medp" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_url_medp',screen.width-200,screen.height-200);return false;">Paid    Add URL Template 1 </a></strong>(Medium-Sized Search Engines) <strong>$medium_sized</strong></td>
    <td class="normaltext">add_url_medp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=40" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_urlp" title="$add_urlp" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_urlp',screen.width-200,screen.height-200);return false;">Paid    Add URL Template 2 </a></strong>(Large-Sized Search Engines)<strong> $large_sized</strong></td>
    <td class="normaltext">add_urlp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=39" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_url_instructions" title="$add_url_instructions" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_url_instructions',screen.width-200,screen.height-200);return false;">Add   URL Instructions</a></strong><strong> $add_urlinst</strong></td>
    <td class="normaltext">add_url_instructions.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=41" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=locked" title="$locked"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=locked',screen.width-200,screen.height-200);return false;">Locked   Category/Directory</a></strong></td>
    <td class="normaltext">locked.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=42" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_url_problem" title="$add_url_problem"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_url_problem',screen.width-200,screen.height-200);return false;">Problem   Page</a></strong></td>
    <td class="normaltext">add_url_problem.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=43" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=add_url_success" title="$add_url_success" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=add_url_success',screen.width-200,screen.height-200);return false;">Success   Page</a></strong></td>
    <td class="normaltext">add_url_success.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=44" target="_blank">Preview</a></td>
  </tr>
$paypal_templates  
  <tr>
    <td height="25" colspan="2" class="normaltext"><img src="$web_url/lar4.gif" width="10" height="11"> <strong><a href="$admin_url/admin23.cgi" title="When a Premium Link is submitted the user will be forwarded <br>to the URL specified here. You can specify a URL here to your order <br>processor's order form to collect payment from users for premium link submissions." onClick="popup('$admin_url/admin23.cgi',750,650);return false;">Premium Add URL Order Form Settings	</a></strong></td>
    <td class="normaltext">&nbsp;</td>
    <td class="normaltext" align="center">&nbsp;</td>
  </tr>
</table>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>Modify Templates: </strong>(Click to Edit)</td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are used when users go through the process of modifying  links.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td width="55%" height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=modify_link"  title="$modify_link"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=modify_link',screen.width-200,screen.height-200);return false;">Main   Modify Link Page</a></strong></td>
    <td width="35%" class="normaltext">modify_link.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=46" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=modify_link_problem"  title="$modify_link_problem" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=modify_link_problem',screen.width-200,screen.height-200);return false;">Modify   Link Problem</a></strong></td>
    <td class="normaltext">modify_link_problem.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=47" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=modify_link_success"  title="$modify_link_success"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=modify_link_success',screen.width-200,screen.height-200);return false;">Modify   Link Success</a></strong></td>
    <td class="normaltext">modify_link_success.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=48" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=modify_link_edit"  title="$modify_link_edit"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=modify_link_edit',screen.width-200,screen.height-200);return false;">Modify/Edit   Link Standard</a></strong></td>
    <td class="normaltext">modify_link_edit.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=49" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=modify_link_editp"  title="$modify_link_editp" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=modify_link_editp',screen.width-200,screen.height-200);return false;">Modify/Edit   Link Premium</a></strong></td>
    <td class="normaltext">modify_link_editp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=50" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=modify_instructions" title="$modify_instructions" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=modify_instructions',screen.width-200,screen.height-200);return false;">Modify/Edit   Instructions</a></strong></td>
    <td class="normaltext">modify_instructions.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=51" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=retrievepass" title="$retrievepass" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=retrievepass',screen.width-200,screen.height-200);return false;">Retrieve   Password</a></strong></td>
    <td class="normaltext">retrievepass.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=52" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=retrievepass_ok" title="$retrievepass_ok"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=retrievepass_ok',screen.width-200,screen.height-200);return false;">Retrieve   Password Success</a></strong></td>
    <td class="normaltext">retrievepass_ok.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=53" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=retrievepass_prb"  title="$retrievepass_prb"   onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=retrievepass_prb',screen.width-200,screen.height-200);return false;">Retrieve   Password Problem</a></strong></td>
    <td class="normaltext">retrievepass_prb.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=54" target="_blank">Preview</a></td>
  </tr>
</table>
];

return ($add_url_tmpls2_ret);

}





sub add_url_tmpls
{


$gsettings = new_gsettings acs; 

if ($gsettings->{add_url_form} eq "medium")
	{
	$medium_sized = "<b>(In Use)</b>";
	$large_sized = "<b>(Not In Use)</b>";
	$add_urlinst = "<b>(Not In Use)</b>";
	
	$addtmp = acs::get_file_contents("$data_dir/rgs_add_url_med.html");
	if ($addtmp !~ /!!error_text!!/) { $add_url_prb_display = "true"; }
	$addtmp = acs::get_file_contents("$data_dir/rgs_add_url_medp.html");
	if ($addtmp !~ /!!error_text!!/) { $add_url_prb_display = "true"; }

	}
	else
	{
	$large_sized = "<b>(In Use)</b>";
	$medium_sized = "<b>(Not In Use)</b>";
	$add_urlinst = "<b>(In Use)</b>";

	$addtmp = acs::get_file_contents("$data_dir/rgs_add_url.html");
	if ($addtmp !~ /!!error_text!!/) { $add_url_prb_display = "true"; }
	$addtmp = acs::get_file_contents("$data_dir/rgs_add_urlp.html");
	if ($addtmp !~ /!!error_text!!/) { $add_url_prb_display = "true"; }
	}



$modstt1 = acs::get_file_contents("$data_dir/rgs_modify_link_edit.html");
if ($modstt1 !~ /!!error_text!!/) { $modprdisplay = "true"; }

$modstt2 = acs::get_file_contents("$data_dir/rgs_modify_link_editp.html");
if ($modstt2 !~ /!!error_text!!/) { $modprdisplay = "true"; }



if ($gsettings->{new_account_validation} eq "Yes")
	{
	$ratit_text = "Users are required to register an account to be able to rate listings";
	}
	else
	{
	$ratit_text = "Users are not required to register an account to be able to rate listings";
	}

if ($gsettings->{comments_reg_system} eq "Yes")
	{
	$comm_text = "Users are required to register an account to be able to post comments to listings";
	}
	else
	{
	$comm_text = "Users are not required to register an account to be able to post comments to listings";
	}

if ($add_url_prb_display eq "true")
	{
		$add_urlprbp = qq[
		  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
			 <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_problem"   title="This template is displayed when a user tries to submit a listing but there was a problem adding the listing."  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_problem',screen.width-200,screen.height-200);return false;">Problem   Page</a></strong></td>
			 <td class="normaltext">rgs_add_url_problem.html</td>
			 <td class="normaltext" align="center"><a
			 href="$admin_url/admin68.cgi?id=78" target="_blank">Preview</a></td>
		  </tr>
		];
	}
	


if ($modprdisplay eq "true")
	{
	$modprb1 = qq[
	  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
		 <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_problem" title="This template is displayed when there was a problem while trying to modify a link. " onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_problem',screen.width-200,screen.height-200);return false;">Modify   Link Problem</a></strong></td>
		 <td class="normaltext">rgs_modify_link_problem.html</td>
		 <td class="normaltext" align="center"><a
		 href="$admin_url/admin68.cgi?id=88" target="_blank">Preview</a></td>
	  </tr>
	];
	}
	



$pdset = acs::get_file_contents("$data_dir/paypalset.dat");
@ppsettings = split (/\n/, $pdset);
$usepaypal = $ppsettings[0];

$inusecnt = 0;
$expirytsettings = acs::get_file_contents("$data_dir/pexpiryopt.dat");
@expsettings = split (/\n/, $expirytsettings);
foreach $item (@expsettings)
{
	($usdprice, $premium_expire_days, $premium_orderform_url, $standard_orderform_url) = split (/::/, $item);
	if ($premium_expire_days > 0) { $inusecnt++;	}
}
if ($inusecnt < 2) { $upgrade_option_in_use = "(Not in Use)"; }



if ($usepaypal eq "Y")
	{
		$paypal_success = qq[
		  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
		    <td height="25" class="normaltext"><img src="$web_url/lar4.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_regsuccess_paypal" 
		    title="This template is displayed to a visitor after he/she successfully purchased a premium link with PayPal."  
		    onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_regsuccess_paypal',screen.width-200,screen.height-200);return false;">
		    Success Page PayPal Purchase
		    </a></strong></td>
		    <td class="normaltext">rgs_regsuccess_paypal.html</td>
		    <td class="normaltext" align="center"><a
		    href="$admin_url/admin68.cgi?id=97" target="_blank">Preview</a></td>
  			</tr>

		  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
		    <td height="25" class="normaltext"><img src="$web_url/lar4.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_upgrade" 
		    title="This template is displayed to a visitor when he/she chooses to upgrade a standard listing to a premium listing."  
		    onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_upgrade',screen.width-200,screen.height-200);return false;">
		    Upgrade Page Standard to Premium 
		    </a> $upgrade_option_in_use</strong></td>
		    <td class="normaltext">rgs_upgrade.html</td>
		    <td class="normaltext" align="center"><a
		    href="$admin_url/admin68.cgi?id=98" target="_blank">Preview</a></td>
  			</tr>
  			
		  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
		    <td height="25" class="normaltext"><img src="$web_url/lar4.gif" width="10" height="11" border="0"> <strong>
		    <a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_upgrade_paypal_success" 
		    title="This template is displayed to a visitor when he/she has upgraded a standard listing to a premium listing by paying with PayPal."  
		    onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_upgrade_paypal_success',screen.width-200,screen.height-200);return false;">
		    Upgrade Page PayPal Purchase Success
		    </a></strong></td>
		    <td class="normaltext">rgs_upgrade_paypal_success.html</td>
		    <td class="normaltext" align="center"><a
		    href="$admin_url/admin68.cgi?id=99" target="_blank">Preview</a></td>
  			</tr>  			
		  ];
		  
	}
	else
	{
		$paypal_success = qq[
				  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
				    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_upgrade" 
				    title="This template is displayed to a visitor when he/she chooses to upgrade a standard listing to a premium listing."  
				    onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_upgrade',screen.width-200,screen.height-200);return false;">
				    Upgrade Page Standard to Premium 
				    </a> $upgrade_option_in_use </strong></td>
				    <td class="normaltext">rgs_upgrade.html</td>
				    <td class="normaltext" align="center"><a
				    href="$admin_url/admin68.cgi?id=98" target="_blank">Preview</a></td>
  			</tr>
		];
	}



$add_url_tmpls_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>

<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>Account Creation &amp; Account Template Plug Ins:</strong><strong>File
      Name: </strong><strong>Preview:</strong></td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are used when users go through the process of creating an account and   viewing his/her links from the account area.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_msgregister" title="This template is displayed to a visitor that clicks the 'Add URL' or 'Premium Add URL' button but the visitor is not registered. This template tells the visitor that he/she should be registered in order to Add their link." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_msgregister',screen.width-200,screen.height-200);return false;"><strong>Add URL Registration Message</strong></a></td>
    <td width="35%" class="normaltext">rgs_msgregister.html</td>
    <td width="10%" class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=55" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_register" title="This template is used to collect details from visitors registering new accounts. " onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_register',screen.width-200,screen.height-200);return false;">New   User Registration</a></strong></td>
    <td class="normaltext">rgs_register.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=56" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_regsuccess" title="This template is displayed to a visitor after he/she successfully created an account."  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_regsuccess',screen.width-200,screen.height-200);return false;">Successfully   Registered</a></strong></td>
    <td class="normaltext">rgs_regsuccess.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=57" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_actsuccess" title="This template is displayed to a visitor after requesting that his/her re-activation email has been sent." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_actsuccess',screen.width-200,screen.height-200);return false;">Account   Activation Successfull</a></strong></td>
    <td class="normaltext">rgs_actsuccess.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=58" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_actfailed" title="This template is displayed when there is a problem with account activation. " onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_actfailed',screen.width-200,screen.height-200);return false;">Account   Activation Failed</a></strong></td>
    <td class="normaltext">rgs_actfailed.htm</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=59" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_resend" title="This template is displayed when a user chooses to have the account activation email resent to him/her."  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_resend',screen.width-200,screen.height-200);return false;">Resend   Account Activation Email</a></strong></td>
    <td class="normaltext">rgs_resend.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=60" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_sent" title="This template is displayed when a user chooses to have the account activation email resent to him/her." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_sent',screen.width-200,screen.height-200);return false;">Account   Activation Email Sent </a></strong></td>
    <td class="normaltext">rgs_sent.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=61" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_login" title="This template is displayed when a user chooses to login to his/her account."  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_login',screen.width-200,screen.height-200);return false;">User   Login</a></strong></td>
    <td class="normaltext">rgs_login.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=62" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_logout" title="This template is displayed when a user chooses to log out of his/her account." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_logout',screen.width-200,screen.height-200);return false;">User   Log Out</a></strong></td>
    <td class="normaltext">rgs_logout.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=63" target="_blank">Preview</a></td>
  </tr>
</table>
<BR>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>Password Retrieval Templates </strong></td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are used for the display's to retrieve user names and passwords.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_retrievepass" title="This template is displayed when a user chooses to have his/her user name and password sent to his/her email address." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_retrievepass',screen.width-200,screen.height-200);return false;">Retrieve   Password</a></strong></td>
    <td width="35%" class="normaltext">rgs_retrievepass.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=64" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_retrievepass_ok" title="This template is displayed when a user has successfully requested that his/her password be sent to them. "  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_retrievepass_ok',screen.width-200,screen.height-200);return false;">Retrieve   Password Success </a></strong></td>
    <td class="normaltext">rgs_retrievepass_ok.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=65" target="_blank">Preview</a></td>
  </tr>
</table>
<BR>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>Control Panel Templates </strong></td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are displayed after a user logs into his/her account.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_cpmain" title="This page is displayed when a user logs in. It also lists the links a user has added. A user can also modify his/her links from this page. " onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_cpmain',screen.width-200,screen.height-200);return false;">Main   Control Panel</a></strong></td>
    <td width="35%" class="normaltext">rgs_cpmain.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=66" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_acclinks" title="This template defines the style of links when displaying it inside the user account area." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_acclinks',screen.width-200,screen.height-200);return false;">Account   Links Style</a></td>
    <td class="normaltext">rgs_acclinks.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=67" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif" border="0"> <a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_acclinksp" title="This template defines the style of premium links when displaying it inside the user account area." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_acclinksp',screen.width-200,screen.height-200);return false;">Account   Premium Links Style</a></td>
    <td class="normaltext">rgs_acclinksp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=68" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_nolinks" title="If there are no links to display when a user logs in, then the contents of this template will be displayed. It will be replaced the !!user_links!! variable. If there are links then this template will not be displayed and the !!user_links!! will be replaced by the user's link listings." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_nolinks',screen.width-200,screen.height-200);return false;">No   Links Display</a></strong></td>
    <td class="normaltext">rgs_nolinks.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=69" target="_blank">Preview</a></td>
  </tr>
</table>
<BR>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>Account Editing Templates </strong></td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are used when a user wants to update his/her account details.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_editacc" title="This template is used when a user edits/changes his/her account information. " onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_editacc',screen.width-200,screen.height-200);return false;">Edit   Account Details</a></strong></td>
    <td width="35%" class="normaltext">rgs_editacc.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=70" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_saveacc"  title="This template is displayed when a user has successfully edited/changed his/her account details." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_saveacc',screen.width-200,screen.height-200);return false;">Succesfully   Saved Account Details</a></strong></td>
    <td class="normaltext">rgs_saveacc.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=71" target="_blank">Preview</a></td>
  </tr>
</table>
<BR>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>User Registration System Add URL Templates</strong></td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are used when users submit links for inclussion into the Index.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_med" title="This template (when displayed to end users) comes with a drop down menu containing all the categories/directories where end users can select where they would like to submit their URL. This template is intended for medium-sized search engines with less than 5000 categories/directories. You can choose what 'add url' forms to use (medium or large-sized engines), in - Settings Tab >> Global Engine Settings >> New Submission Settings" onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_med',screen.width-200,screen.height-200);return false;">Add   URL Template 1</a></strong>(Medium-Sized Search Engines) <strong>$medium_sized</strong></td>
    <td width="35%" class="normaltext">rgs_add_url_med.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=72" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url" title="This template (when displayed to end users) is intended to be used when you have more than 5000 categories/directories. It doesn't come with a category dropdown menu where categories can be choosed when doing a new submission. The reason for this is because having 10 000 categories in the drop down menu would make the add url form load very slowly. You can choose what add url forms to use (medium or large-sized engines), in the Settings Tab >> Global Engine Settings >> New Submission Settings" onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url',screen.width-200,screen.height-200);return false;">Add   URL Template 2</a></strong>(Large-Sized Search Engines)<strong> $large_sized</strong></td>
    <td class="normaltext">rgs_add_url.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=73" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_medp" title="This template (when displayed to end users) is intended to be used when you have less than 5000 categories/directories. This template is used when users add premium Urls." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_medp',screen.width-200,screen.height-200);return false;">Paid Add URL Template 1</a></strong>(Medium-Sized Search Engines)<strong> $medium_sized</strong></td>
    <td class="normaltext">rgs_add_url_medp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=74" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_urlp" title="This template (when displayed to end users) is intended to be used when you have more than 5000 categories/directories. It is also used to add premium Urls."  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_urlp',screen.width-200,screen.height-200);return false;">Paid Add URL Template 2 </a></strong> (Large-Sized Search Engines) <strong>$large_sized</strong></td>
    <td class="normaltext">rgs_add_urlp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=75" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_instructions"  title="This template is used to indicate that a user have to be inside a category to add a URL. This template is only used when the Add URL forms of Large-Sized Search Engines is used. (rgs_add_url.html and rgs_add_urlp.html)" onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_instructions',screen.width-200,screen.height-200);return false;">Add   URL Instructions </a>$add_urlinst</strong></td>
    <td class="normaltext">rgs_add_url_instructions.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=76" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_locked"  title="This template is displayed when a user tries to add a listing to a category that has been locked. Users cannot add listings to categories that has been locked. Categories can be locked by pressing the edit button next to a category when browsing the Dir Manager." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_locked',screen.width-200,screen.height-200);return false;">Locked   Category/Directory</a></strong></td>
    <td class="normaltext">rgs_locked.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=77" target="_blank">Preview</a></td>
  </tr>
$add_urlprbp
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_success" title="This template is displayed to a user who successfully added a URL or Premium URL."  onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_add_url_success',screen.width-200,screen.height-200);return false;">Success   Page</a></strong></td>
    <td class="normaltext">rgs_add_url_success.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=79" target="_blank">Preview</a></td>
  </tr>

$paypal_success
  
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar4.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin23.cgi" 
    title="Settings & Options regarding Premium Links." onClick="popup('$admin_url/admin23.cgi',950,650);return false;">Premium Add URL Order Settings</a></strong></td>
    <td class="normaltext">&nbsp;</td>
    <td class="normaltext" align="center">&nbsp;</td>
  </tr>
</table>
<BR>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>User Registration System Modify Templates</strong></td>
  </tr>
  <tr>
    <td height="25" colspan="3" class="normaltext">These templates are used when users go through the process of modifying submitted links.</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_edit" title="This template is used to display standard link details that is about to be modified by the link owner." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_edit',screen.width-200,screen.height-200);return false;">Modify/Edit   Link Standard</a></strong></td>
    <td width="35%" class="normaltext">rgs_modify_link_edit.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=86" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_editp" title="This template is used to display premium link details that is about to be modified by the link owner." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_editp',screen.width-200,screen.height-200);return false;">Modify/Edit   Link Premium</a></strong></td>
    <td class="normaltext">rgs_modify_link_editp.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=87" target="_blank">Preview</a></td>
  </tr>
$modprb1
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_success" title="Displayed to users when a link was successfully modified." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_link_success',screen.width-200,screen.height-200);return false;">Modify   Link Success</a></strong></td>
    <td class="normaltext">rgs_modify_link_success.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=89" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_instructions" title="In the event where a user is not logged in and attempts to modify a link the the following template will be displayed to him/her." onClick="popup('$admin_url/admin57.cgi?fct=edit_template&template=rgs_modify_instructions',screen.width-200,screen.height-200);return false;">Modify/Edit   Instructions</a></strong></td>
    <td class="normaltext">rgs_modify_instructions.html</td>
    <td class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=90" target="_blank">Preview</a></td>
  </tr>
</table>
<BR>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="25" colspan="3" class="normaltext"><strong>Rating &amp; Comments Registration Templates </strong></td>
  </tr>

  <tr>
    <td height="40" colspan="3" class="normaltext">You can enable or disable the requirement 
    of users being registered or not to rate listings or post comments to listings. <br>
    This setting can be set from the <strong>Control Panel &gt;&gt; Settings &gt;&gt; Global 
    Engine Settings &gt;&gt; 5. New Submission Settings</strong><p><strong>The setting 
    currently in use is as follows:</strong><ul>
      <li>$ratit_text</li>
      <li>$comm_text</li>
    </ul>
    </td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"
    border="0"> <a
    href="$admin_url/admin57.cgi?fct=edit_template&amp;template=rgs_rcomment"
    onClick="popup('$admin_url/admin57.cgi?fct=edit_template&amp;template=rgs_rcomment',screen.width-200,screen.height-200);return false;" title="This template will be displayed informing the user that he/she will need to register an account or be logged in to be able to post a comment. "><strong>Registration 
    Required to Post a Comment Page</strong></a></td>
    <td width="35%" class="normaltext">rgs_rcomment.html</td>
    <td width="10%" align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=91"
    target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"
    border="0"> <a
    href="$admin_url/admin57.cgi?fct=edit_template&amp;template=rgs_rrate"
    onClick="popup('$admin_url/admin57.cgi?fct=edit_template&amp;template=rgs_rrate',screen.width-200,screen.height-200);return false;" title="This template will be displayed informing the user that he/she will need to register an account or be logged in to be able rate a link. "><strong>Registration 
    Required to Rate a Link</strong></a></td>
    <td class="normaltext">rgs_rrate.html</td>
    <td class="normaltext" align="center"><a href="$admin_url/admin68.cgi?id=92"
    target="_blank">Preview</a></td>
  </tr>
</table>
];

return ($add_url_tmpls_ret);

}








sub search_results
{


($searchres, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("searchres");
($searchadv, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("searchadv");
($lsearchres_loc, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("lsearchres_loc");
($lsearchres_loc_prem, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("lsearchres_loc_prem");
($nomatch, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("nomatch");
($flood, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("flood");
($searchresdir, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("searchresdir");
($lsearchres_locdir, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("lsearchres_locdir");


($searchadv1, $tmp) = split (/You can/, $searchadv);

$search_results_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">

<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Search Restult Templates:</strong> (Click to Edit)</td>
    <td width="35%" class="normaltext"><strong>File
    Name: </strong></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview:</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <a
    href="$admin_url/admin6.cgi?fct=edit_template&amp;template=searchres"
    onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=searchres',screen.width-200,screen.height-200);return false;" title="$searchres"><strong>Main Search Page</strong></a></td>
    <td width="35%" class="normaltext">searchres.html</td>
    <td width="10%" class="normaltext" align="center"><a
    href="$admin_url/admin68.cgi?id=10" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=searchadv" title="$searchadv1" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=searchadv',screen.width-200,screen.height-200);return false;" >Advanced   Search Page</a></strong></td>
    <td width="35%" class="normaltext">searchadv.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=11" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext">  <img src="$web_url/lar6.gif"> <a href="$admin_url/admin6.cgi?fct=edit_template&template=lsearchres_loc"  title="$lsearchres_loc"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=lsearchres_loc',screen.width-200,screen.height-200);return false;">Links   Style</a></td>
    <td width="35%" class="normaltext">lsearchres_loc.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=12" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif"> <a href="$admin_url/admin6.cgi?fct=edit_template&template=lsearchres_loc_prem" title="$lsearchres_loc_prem" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=lsearchres_loc_prem',screen.width-200,screen.height-200);return false;">Premium   Links Style</a></td>
    <td width="35%" class="normaltext">lsearchres_loc_prem.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=13" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=nomatch"  title="$nomatch" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=nomatch',screen.width-200,screen.height-200);return false;">No   Match</a></strong></td>
    <td width="35%" class="normaltext">nomatch.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=14" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=flood" title="$flood"  onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=flood',screen.width-200,screen.height-200);return false;">Flood   Control Template</a></strong></td>
    <td width="35%" class="normaltext">flood.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=15" target="_blank">Preview</a></td>
  </tr>
</table>

<hr noshade size="1" width="100%" color="#E0E0E0">


<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="normaltext"><strong>Directory/Category Searches  Templates:</strong> (Click to Edit)</td>
    <td class="normaltext">&nbsp;</td>
    <td align="center" class="normaltext">&nbsp;</td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&template=searchresdir" title="$searchresdir" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=searchresdir',screen.width-200,screen.height-200);return false;">Main   Directory/Category Search Page</a></strong></td>
    <td width="35%" class="normaltext">searchresdir.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=16" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar6.gif"> <a href="$admin_url/admin6.cgi?fct=edit_template&template=lsearchres_locdir" title="$lsearchres_locdir" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&template=lsearchres_locdir',screen.width-200,screen.height-200);return false;">Category/Directory   Links Style</a></td>
    <td width="35%" class="normaltext">lsearchres_locdir.html</td>
    <td width="10%" align="center" class="normaltext"><a
    href="$admin_url/admin68.cgi?id=17" target="_blank">Preview</a></td>
  </tr>
</table>


];

return ($search_results_ret);

}



sub dir_templates
{


$nr=0;
opendir(DIR,"$data_dir");
	@files = readdir(DIR);
	@files = sort(@files);
	foreach $filename (@files)
		{
		if (substr($filename, length($filename) - 11, 11) eq "-1ctst\.html")
			{
			$nr++;
			}
		}


($maincat, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("defdir");
($lnkstyle1, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("tmplsearch");
($lnkstyle2, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("tmplsearch_prem");
($subc1, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("subdirs");
($subc2, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("directories1");
($related1, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("related1");
($related2, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("related2");
($linkinfo1, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("linkinfo");
($linkinfo2, $tmp2, $tmp2) = fmtmplman::get_tmpl_details("linkinfop");


$dir_templates_ret = qq[
<style type="text/css">
<!--
hr {
	border: 1;
	color: #E0E0E0;
	height: 1px;
	width: 100%;
	text-align: left;
}
-->
</style>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td height="25" class="normaltext"><strong>Template Name: </strong>(Click to Edit)</td>
    <td width="35%" class="normaltext"><strong>File Name</strong><a href="$admin_url/admin68.cgi?id=55" target="_blank"></a></td>
    <td width="10%" align="center" class="normaltext"><strong>Preview</strong></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"> <img src="$web_url/lar3.gif" width="10" height="11" border="0"> <a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=defdir" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=defdir',screen.width-200,screen.height-200);return false;" title="$maincat"><strong>Main Category/Directory</strong></a></td>
    <td class="normaltext">defdir.html</td> 
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=1" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><strong><img src="$web_url/lar6.gif" border="0"> </strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=tmplsearch" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=tmplsearch',screen.width-200,screen.height-200);return false;" title="$lnkstyle1">Links Style</a></td>
    <td class="normaltext">tmplsearch.html</td> 
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=2" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><strong><img src="$web_url/lar6.gif" border="0"> </strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=tmplsearch_prem" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=tmplsearch_prem',screen.width-200,screen.height-200);return false;" title="$lnkstyle1">Premium Links Style</a></td>
    <td class="normaltext">tmplsearch_prem.html</td> 
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=3" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><strong><img src="$web_url/lar6.gif" border="0"> </strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=subdirs" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=subdirs',screen.width-200,screen.height-200);return false;" title="$subc1">Sub Categories/Directories Style 1</a></td>
    <td class="normaltext">subdirs.html</td>
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=4" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><strong><img src="$web_url/lar6.gif" border="0"> </strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=directories1" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=directories1',screen.width-200,screen.height-200);return false;" title="$subc2">Sub Categories/Directories Style 2</a></td>
    <td class="normaltext">directories1.html</td>
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=5" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><strong><img src="$web_url/lar6.gif" border="0"> </strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=related1" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=related1',screen.width-200,screen.height-200);return false;" title="$related1">Related Categories/Directories Style 1</a></td>
    <td class="normaltext">related1.html</td>
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=6" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"> <strong><img src="$web_url/lar6.gif" border="0"> </strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=related2"
    onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=related2',screen.width-200,screen.height-200);return false;" title="$related2">Related Categories/Directories Style 2</a></td>
    <td class="normaltext">related2.html</td> 
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=7" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext">  <img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=linkinfo" title="$linkinfo1" onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=linkinfo',screen.width-200,screen.height-200);return false;">Link Info</a></strong></td>
    <td class="normaltext">linkinfo.html</td> 
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=8" target="_blank">Preview</a></td>
  </tr>
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar3.gif" width="10" height="11" border="0"> <strong><a href="$admin_url/admin6.cgi?fct=edit_template&amp;template=linkinfop"
    onClick="popup('$admin_url/admin6.cgi?fct=edit_template&amp;template=linkinfop',screen.width-200,screen.height-200);return false;" title="$linkinfo2">Link Info Premium</a></strong></td>
    <td class="normaltext">linkinfop.html</td> 
    <td align="center" class="normaltext"><a href="$admin_url/admin68.cgi?id=9" target="_blank">Preview</a></td>
  </tr>
</table>
<hr noshade size="1" width="100%" color="#E0E0E0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr onMouseOver="this.bgColor='#F7F7F7';" onMouseOut="this.bgColor='#FFFFFF';">
    <td height="25" class="normaltext"><img src="$web_url/lar4.gif" width="10" height="11"> <strong><a href="$admin_url/admin27.cgi" onClick="popup('$admin_url/admin27.cgi',950,650);return false;">Create or Edit Custom   Category/Directory Template Sets </a></strong>($nr)<br>
You can use different category/directory template sets in different categories. Once   you've created a custom template, it is selectable when you are in the 'Directory   Manager'. Each category in the 'Directory Manager' has a 'Template' option. Click on the   option (Example: 'Default') to choose templates for a specific category. The number in the   brackets displayed above indicates the number of sets already created.</td>
  </tr>
</table>

];

return ($dir_templates_ret);


}



sub pgbreak
{

my ($ptext) = @_;

my ($pret);
my @pgitems = split (/ /, $ptext);


$pcnt = 0;
foreach $item (@pgitems)
	{
	if ($pcnt == 10)
		{
		$pret = $pret . "<br>" . $item . " ";
		$pcnt = 0;
		}
		else 
		{
		$pret = $pret . $item . " ";
		$pcnt++;
		}
	
	}

return ($pret);

}
  



sub get_setup
{

if ((-e "config.cgi") and (length($config_cgi) < 15))
	{
	$cofile = "config.cgi"; $exists = 1;
	}
	elsif (-e "$config_cgi") 
	{
	$cofile = "$config_cgi"; $exists = 1;
	}
	else
	{
	print "Content-type: text/html\n\n"; 
	print "Could not find config.cgi"; exit;
	}

#$exists = (-e "config.cgi");

if ($exists > 0)
	{
	open (STP, $cofile);
		while (defined($line=<STP>))
			{
			if ($line =~ m/#/g)
				{
				$r = pos($line);
				$line = substr($line, 0, $r - 1);
				}
				
				$line =~ s/\n//g;
	
if ($line =~ /^DB_NAME/){$db_name = &get_setup_line2($line, DB_NAME);}
if ($line =~ /^DB_USERNAME/){$db_username = &get_setup_line2($line, DB_USERNAME);}
if ($line =~ /^DB_PASSWORD/){$db_password = &get_setup_line2($line, DB_PASSWORD);}
if ($line =~ /^MYSQL_HOSTNAME/){$mysql_hostname = &get_setup_line2($line, MYSQL_HOSTNAME);}
if ($line =~ /^MYSQL_PORT/){$mysql_port = &get_setup_line2($line, MYSQL_PORT);}

if ($line =~ /^SCRIPT_URL/){$script_url = &get_setup_line2($line, SCRIPT_URL);}
if ($line =~ /^ADMIN_URL/){$admin_url = &get_setup_line2($line, ADMIN_URL);}
if ($line =~ /^WEB_URL/){$web_url = &get_setup_line2($line, WEB_URL);}
if ($line =~ /^WEB_DIR/){$web_dir = &get_setup_line2($line, WEB_DIR);}
if ($line =~ /^DATA_DIR/){$data_dir = &get_setup_line2($line, DATA_DIR);}

if ($line =~ /^USERNAME/){$username = &get_setup_line2($line, USERNAME);}
if ($line =~ /^PASSWORD/){$password = &get_setup_line2($line, PASSWORD);}

if ($line =~ /^MAIL_METHOD/){$mail_method = &get_setup_line2($line, MAIL_METHOD);}
if ($line =~ /^SENDMAIL/){$sendmail = &get_setup_line2($line, SENDMAIL);}
if ($line =~ /^SMTP_SERVER/){$smtp_server = &get_setup_line2($line, SMTP_SERVER);}


			}
	close (STP);
	
	}
}


sub get_setup_line2
{
my ($setup_line, $setup_var) = @_;
$crit = "\"";
$setup_line =~ m/$crit/g;
$r1 = pos($setup_line);
$setup_line =~ m/$crit/g;
$r2 = pos($setup_line);
$setup_line = substr($setup_line, $r1, ($r2 - $r1 - 1));
$return_val = $setup_line;
return ($return_val);
}


1;