forked from Thunix/www
Adding contact form stuff
This commit is contained in:
34
includes/contact.php
Normal file
34
includes/contact.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
include "../config.php";
|
||||
|
||||
$name = $_GET['contact_name'];
|
||||
$email = $_GET['email_address'];
|
||||
$subject = $_GET['type'];
|
||||
$body = $_GET['message'];
|
||||
|
||||
$tv = $_GET['tv'];
|
||||
|
||||
$destination_addr = "ubergeek@thunix.net";
|
||||
$subject = "Contact Form";
|
||||
$mailbody = "The following submission via the contact form was recieved:
|
||||
|
||||
Real Name: $name
|
||||
Email Address: $email
|
||||
Type: $interest
|
||||
Message: $message";
|
||||
|
||||
if ( $tv != "tildeverse" ) {
|
||||
print "Spam attempt";
|
||||
header("Location: $site_root/success1");
|
||||
die();
|
||||
}
|
||||
|
||||
shell_exec("echo $mailbody | /usr/bin/mail -s 'New User Registration' $destination_addr ");
|
||||
|
||||
// In the future, here, we *should* be able to build a process that
|
||||
// somehow auto-verifies the user, and instead of email, it'll kick off the new user process here
|
||||
|
||||
header("Location: $site_root/success2");
|
||||
die()
|
||||
|
||||
?>
|
||||
35
includes/signup.php
Normal file
35
includes/signup.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
include "../config.php";
|
||||
|
||||
$name = $_GET['contact_name'];
|
||||
$email = $_GET['email_address'];
|
||||
$username = $_GET['username'];
|
||||
$interests = $_GET['interest'];
|
||||
$pubkey = $_GET['pubkey'];
|
||||
$tv = $_GET['tv'];
|
||||
|
||||
$destination_addr = "ubergeek@thunix.net";
|
||||
$subject = "New User Registration";
|
||||
$mailbody ="A new user has tried to register.
|
||||
Username: $username
|
||||
Real Name: $name
|
||||
Email Address: $email
|
||||
Interest: $interest
|
||||
Pubkey: $pubkey";
|
||||
|
||||
if ( $tv != "tildeverse" ) {
|
||||
print "Spam attempt";
|
||||
header("Location: $site_root/success1");
|
||||
die();
|
||||
}
|
||||
|
||||
shell_exec("echo $mailbody | /usr/bin/mail -s 'New User Registration' $destination_addr ");
|
||||
|
||||
// In the future, here, we *should* be able to build a process that
|
||||
// somehow auto-verifies the user, and instead of email, it'll kick off the new user process here
|
||||
|
||||
header("Location: $site_root/success2");
|
||||
|
||||
die();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user