| \n";
$user_message = "Please fill in all the fields that are not marked \"(Optional)\"";
if ( $mode != "confirm" )
{
if ( $cat == "" )
{
display_link_message( $page_width ) ;
}
if ( $sub_cat == "" )
{
display_link_message( $page_width );
}
}
if ( $mode == "confirm" )
{
// trim the input variables
$link_type = $_POST['link_type'];
$link_title = $_POST['link_title'];
$website_url = $_POST['website_url'];
$return_url = $_POST['return_url'];
$description = trim ( $_POST['description'] );
$user_email = $_POST['user_email'];
$form_check = check_form ( $link_type, $link_title, $website_url, $return_url, $description, $user_email );
if ( $form_check[error] == false )
{
// Add this record to the mnl_links table
$date_added = date( "j F Y" );
$timestamp = time();
$query = "INSERT INTO mnl_links (
category,
sub_category,
title,
url,
description,
email,
return_url,
date_added,
rec_timestamp,
status )
VALUES (
'$cat',
'$sub_cat',
'$link_title',
'$website_url',
'$description',
'$user_email',
'$return_url',
'$date_added',
'$timestamp',
'$link_type')";
$db->query ( $query );
$link_id = $db->insert_id;
if ( $CONFIG_VAR['send_webmaster_email'] == "yes" )
{
// send an email to us about the new listing
$mail_subject = "New link submitted for " . $CONFIG_VAR['website_name'];
$mail_body = "Link Record Number: " . $link_id . "\n\n";
$mail_body .= "Link Type: " . $link_type . "\n\n";
$mail_body .= "Category: " . $cat . "\n\n";
$mail_body .= "Sub category: " . $sub_cat . "\n\n";
$mail_body .= "Link URL: " . $website_url . "\n\n";
$mail_body .= "Return URL: " . $return_url . "\n\n";
$mail_body .= "Email Address: " . $user_email . "\n\n";
$mail_header = "From: " . $CONFIG_VAR['webmaster_email'] . "\r\n";
mail ( $CONFIG_VAR['webmaster_email'], $mail_subject, $mail_body , $mail_header );
}
// display the thank you
$message = "Your link has been submitted and we will approve it as soon as possible.";
if ( $user_email != "" )
{
$message .= " We will contact you at the email address that you've just supplied (" . $user_email . ") once your category has been approved."; } if ( $link_type == "partner" ) { $message .= " Please note that we periodically check reciprocal links and automatically revert sites that fail to display a link back to us at the URL you've just specified (" . $return_url . ") to Regular listing status."; } show_message ( "Thank You", $message ); die; } else { $user_message = "SLIGHT PROBLEM: " . $form_check[error_msg]; } } // This creates the breadcrumbs echo "
| \n";
echo "\n\n";
// This creates the right hand menu column
require ( "templates/mnl_right_hand_column.php" );
// This ends the main body table
echo "