If the correct category or sub category doesn't exist, then please select \"Suggest a Category\" (or sub category) and fill in the form. We will then add your category or sub category to the directory.

You may add links in as many categories as you wish.

" ); die; } function check_form ( $link_type, $title, $website_url, $return_url, $description, $user_email ) { $result = check_field ( $title, "Link Title", 1, 100 ); if ( $result[error] == true ) { return array('error' => true, 'error_msg' => $result[error_msg] ); } if ( $website_url == "http://" ) { return array('error' => true, 'error_msg' => "Please supply a URL for your website" ); } $result = check_field ( $website_url, "Your website URL", 1, 100 ); if ( $result[error] == true ) { return array('error' => true, 'error_msg' => $result[error_msg] ); } if ( $link_type == "partner" ) { if ( $return_url == "http://" ) { return array('error' => true, 'error_msg' => "Please supply a URL for your reciprocal link" ); } $result = check_field ( $website_url, "The URL of your reciprocal link", 1, 100 ); if ( $result[error] == true ) { return array('error' => true, 'error_msg' => $result[error_msg] ); } } $result = check_field ( $description, "Your Description", 1, 250 ); if ( $result[error] == true ) { return array('error' => true, 'error_msg' => $result[error_msg] ); } if ( $user_email != "" ) { $result = validate_email ( $user_email ); if ( $result == false ) { return array('error' => true, 'error_msg' => "Your email address must be valid" ); } } return array('error' => false, 'error_msg' => "" ); } $cat = $_GET['cat']; $sub_cat = $_GET['sub_cat']; $mode = $_GET['mode']; $category_name = str_replace ( "_", " ", $cat ); $sub_category_name = ucwords ( str_replace ( "_", " ", $sub_cat ) ); $title = $CONFIG_VAR['website_name'] . " :: Submit a link"; $keyword = ""; $decription = ""; //This creates the page header require ( "templates/mnl_page_header.php" ); // This creates the start of the main body table echo "\n\n"; echo "\n"; echo "\n"; //This creates the left hand column require ( "templates/mnl_left_hand_column.php" ); // This creates the middle table echo "\n\n"; 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 "\n"; echo "
\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"; echo "\n"; echo "\n"; echo "
Home >> Submit a Link
\n"; // This PHP include creates the introductory text to your links submittal form require ( "templates/mnl_submit_link_text.php" ); echo "
\n"; echo "\n"; //User message echo "\n"; echo "\n"; echo "\n"; //Show the category and sub category names again echo "\n"; echo "\n"; echo "\n"; echo "\n"; //Type of link $partner_checked = ""; $regular_checked = " checked"; if ( $link_type == "partner" ) { $partner_checked = " checked"; $regular_checked = ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; //Title field echo "\n"; echo "\n"; echo "\n"; echo "\n"; //website url field if ( $website_url == "" ) { $website_url = "http://"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; //Description field echo "\n"; echo "\n"; echo "\n"; //return url field if ( $return_url == "" ) { $return_url = "http://"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; //Email field field echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "
$user_message
You are submitting a link for:" . $category_name . " >> " . $sub_category_name . "
Type of Link:Regular "; echo "  Link Partner "; echo "
Link Title:
The URL of your website:
Description of your site:\n"; echo "\n"; echo "
The URL of your reciprocal link (Optional):
Your Email Address (Optional):
"; echo "
"; //This creates the search form search_form ( "index" ); //This creates the main menu along the bottom of the main column navigation( "index", $category, $sub_category ); echo "
\n"; //This creates the page footer require ( "templates/mnl_page_footer.php" ); ?>