data['user_id'] != ANONYMOUS && $_POST["owner"]=="on") { $query = mysql_query("insert into site_to_user (siteID, userID, status) values (".mysql_insert_id().", ".$user->data['user_id'].", 1);"); } mail('neil@campingandcampsites.co.uk', 'New campsite submitted', 'A new campsite has been submitted', 'From: Camping & Campsites Admin system'); $content .= '

Entry added for moderation


The site has been added to our database. Once our moderators approve the entry it will show on our website.

Thank you very much for adding the new information!


'; } } else { $content .= show_form(); } $page = new page("main.tpl"); $page->assign("title", "Camping & Campsites - Submit a new campsite"); $page->assign("meta_description", "Submit a new campsite for inclusion on our website"); $page->sub_template("menu.tpl", "menu"); $page->assign("add_link", "menu_selected"); $page->assign("rel_path", './'); function show_form() { $counties = ''; return '

Add a campsite


If you know of a campsite that is not in our database please take the time to use this form to tell us as much as you can about it. For making changes to existing campsites in our database please contact us with the information. We are currently working on extra editing features to allow people to update existing entries which we hope to have working soon.

'.logged_owner('notify').'

Campsite details



Campsite name


Description


Address


County
'.$counties.'

Post code
'.form_guide("postcode", "A post code is required so that we can locate the campsite on our map").'
Website URL
'.form_guide("website", "Please enter the full website address, e.g. http://www.example.com").'
Telephone number


Alternative telephone number


Fax number


Email address


Opening times
'.form_guide("open", "The yearly opening times for the campsite, e.g. 'March to October'. ").'


Prices


Number of pitches


Club site:








Facilities


















'.logged_owner('input').'







'; } function logged_owner($item) { global $user; if($user->data['user_id'] == ANONYMOUS) { switch($item) { case "notify": return 'If you log in you can add new campsites to your account for future editing.'; break; case 'input': return ''; break; } } else { switch($item) { case "notify": return ''; break; case 'input': return '

Ownership




'; break; } } } $content .= '
'; $page->assign("content", $content); $breadcrumbs = array( array("name" => 'Add campsite', "link" => '') ); $page->add_breadcrumbs($breadcrumbs); $page->display(); ?>