forked from abenzer/represent-map
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex
authored and
Alex
committed
Jun 7, 2012
1 parent
1b3b4f4
commit 1202ee5
Showing
46 changed files
with
22,527 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
include "header.php"; | ||
|
||
// This is used to submit new markers for review. | ||
// Markers won't appear on the map until they are approved. | ||
|
||
$owner_name = htmlspecialchars($_POST['owner_name']); | ||
$owner_email = htmlspecialchars($_POST['owner_email']); | ||
$title = htmlspecialchars($_POST['title']); | ||
$type = htmlspecialchars($_POST['type']); | ||
$address = htmlspecialchars($_POST['address']); | ||
$uri = htmlspecialchars($_POST['uri']); | ||
$description = htmlspecialchars($_POST['description']); | ||
|
||
// validate fields | ||
if(empty($title) || empty($type) || empty($address) || empty($uri) || empty($description) || empty($owner_name) || empty($owner_email)) { | ||
echo "All fields are required - please try again."; | ||
exit; | ||
|
||
} else { | ||
|
||
// insert into db, wait for approval | ||
$insert = mysql_query("INSERT INTO places (approved, title, type, address, uri, description, owner_name, owner_email) VALUES ('0', '$title', '$type', '$address', '$uri', '$description', '$owner_name', '$owner_email')") or die(mysql_error()); | ||
|
||
// geocode new submission | ||
$hide_geocode_output = true; | ||
include "geocode.php"; | ||
|
||
// if we got here, let the user now everything's OK | ||
echo "success"; | ||
exit; | ||
|
||
} | ||
|
||
|
||
?> |
Oops, something went wrong.