$is_ideasbank = 1;
$title="i2mOnline :: Ideas Bank";
$menu_right = "../templates/right_ideasbank2.php";
$section_img="../images/photos/92297_1081.jpg";
include("../templates/top.php");
mysql_connect($host, $bdduser,$bddpasswd) or die("error connecting to the server");
mysql_select_db($db) or die("error connecting to the database");
?>
SIGNUP AS AN IDEAS EXPERT!
if(isset($_POST['Submit']))
{
$account_type = $_POST['account_type'];
$email = strtolower($_POST['email']);
$confirmemail = strtolower($_POST['confirmemail']);
$title = $_POST['title'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$birthdate = $_POST['birthdate'];
$password = $_POST['password'];
$confirmpassword = $_POST['confirmpassword'];
$organisation = $_POST['organisation'];
$role = $_POST['role'];
$address = $_POST['address'];
$city = $_POST['city'];
$postcode = $_POST['postcode'];
$country = $_POST['country'];
$telephonenumber = $_POST['telephonenumber'];
$fax = $_POST['fax'];
$mobilenumber = $_POST['mobilenumber'];
$website = $_POST['website'];
$qualifications = $_POST['qualifications'];
$examples_help_provided = $_POST['examples_help_provided'];
$how_find_out_about_us = $_POST['how_find_out_about_us'];
$short_profile = $_POST['short_profile'];
$you_are_an = $_POST['you_are_an'];
$agree_terms = $_POST['agree_terms'];
$email = addslashes($email);
$confirmemail = addslashes($confirmemail);
$title = addslashes($title);
$firstname = addslashes($firstname);
$lastname = addslashes($lastname);
$birthdate = addslashes($birthdate);
$password = addslashes($password);
$confirmpassword = addslashes($confirmpassword);
$organisation = addslashes($organisation);
$examples_help_provided = addslashes($examples_help_provided);
$role = addslashes($role);
$address = addslashes($address);
$city = addslashes($city);
$postcode = addslashes($postcode);
$country = addslashes($country);
$telephonenumber = addslashes($telephonenumber);
$fax = addslashes($fax);
$mobilenumber = addslashes($mobilenumber);
$website = addslashes($website);
$qualifications = addslashes($qualifications);
$how_find_out_about_us = addslashes($how_find_out_about_us);
$short_profile = addslashes($short_profile);
$you_are_an = addslashes($you_are_an);
$agree_terms = addslashes($agree_terms);
// ok enough parameters
if($email == $confirmemail)
{
if($password == $confirmpassword)
{
$query = "SELECT id FROM px_registered_members2 WHERE email='$email'";
$result = mysql_query($query);
if(mysql_num_rows($result) > 0)
{
$error = 1;
?>
This email has already been registered.
}
else
{
$datetime = date("Y-m-d H:i:s");
$IP = $_SERVER['REMOTE_ADDR'];
$md5password = md5($password);
list($day, $month, $year) = explode("/", $birthdate);
$birthdate2 = "$year-$month-$day";
$query = "INSERT INTO px_registered_members2 ( `id` , `title` , `firstname` , `lastname` , `birthdate` , `email` , `password` , `organisation` , `role` , `address` , `city` , `postcode` , `country` , `telephonenumber` , `fax` ,`mobilenumber` , `website` , `qualifications` ,`examples_help_provided`, `how_find_out_about_us_id` ,`short_profile` , `you_are_an_id` , `agree_terms` , `datetime` , `IP` , `activated`)
VALUES('', '$title', '$firstname','$lastname', '$birthdate2','$email', '$md5password', '$organisation', '$role', '$address','$city','$postcode','$country','$telephonenumber','$fax','$mobilenumber','$website','$qualifications','$examples_help_provided','$how_find_out_about_us','$short_profile','$you_are_an','$agree_terms', '$datetime', '$IP', '0')";
// $url = "http://nico.ath.cx/i2m4/ideasbank/activate_member.php?email=".stripslashes($email)."&hash=".$md5password.base64_encode($datetime);
$url = "http://www.i2monline.com/ideasbank/activate_expert.php?email=".stripslashes($email)."&hash=".$md5password.base64_encode($datetime);
// print "url : $url";
$result = mysql_query($query);
if($result)
{
$submitted = 1;
$subject = "Welcome to i2m Online";
$message = "Dear ".$firstname.",\n\nThank you for your application to register with the i2mOnline Ideas Bank.
Your application is currently being reviewed and you will receive an email confirming your approval.
If you have any requests regarding the Ideas Bank, please don't hesitate to contact us on ideasbank@i2monline.com.
Best regards,
The i2mOnline Team";
$headers = "From: i2mOnline@i2mOnline.com\n" .
'X-Mailer: PHP/' . phpversion() . "\n" .
"MIME-Version: 1.0\n";
// "Content-Type: text/html; charset=utf-8\n" .
// "Content-Transfer-Encoding: 8bit\n\n";
// Send
$to = stripslashes($email);
$response = mail($to, $subject, $message, $headers);
?>
Thank you for signing up to the i2mOnline Ideas Bank. Your application will
be processed and an email will be sent to you.
If you do not receive the email, please email us at ideasbank@i2monline.com
$to = "valerie@inventya.com,david@inventya.com,aldo@inventya.com,nicolas.huet@b2binteractive.co.uk";
$message = "Advisor information:
Firstname: $firstname
Lastname: $lastname
Email: $email
Organisation: $organisation
Role: $role
Address: $address
City: $city
Postcode: $postcode
Country: $country
Telephone: $telephonenumber
Fax: $fax
Mobile: $mobilenumber
Website: $website
Qualification: $qualifications
Short profile: $short_profile
More info on http://www.i2monline.com/admin
";
$response = mail($to, "IdeasBank: new advisor", $message, $headers);
}
else
{
$error = 3;
}
}
}
else
{
$error = 1;
?>
The password and the confirmation password must be identical.
}
}
else
{
$error = 1;
?>
The email and the confirmation email must be identical.
}
}
if($submitted < 1 && $error < 2)
{
$email = stripslashes($email);
$confirmemail = stripslashes($confirmemail);
$title = stripslashes($title);
$firstname = stripslashes($firstname);
$lastname = stripslashes($lastname);
$birthdate = stripslashes($birthdate);
$password = stripslashes($password);
$confirmpassword = stripslashes($confirmpassword);
$organisation = stripslashes($organisation);
$examples_help_provided = stripslashes($examples_help_provided);
$role = stripslashes($role);
$address = stripslashes($address);
$city = stripslashes($city);
$postcode = stripslashes($postcode);
$country = stripslashes($country);
$telephonenumber = stripslashes($telephonenumber);
$fax = stripslashes($fax);
$mobilenumber = stripslashes($mobilenumber);
$website = stripslashes($website);
$qualifications = stripslashes($qualifications);
$how_find_out_about_us = stripslashes($how_find_out_about_us);
$short_profile = stripslashes($short_profile);
$you_are_an = stripslashes($you_are_an);
$agree_terms = stripslashes($agree_terms);
//If you would like to register as a i2m user, please click here.
?>
Thank you for signing up to the i2mOnline Ideas Bank. Please take a few minutes
to provide the information requested.
The fields marked by * are mandatory.
}
mysql_close();
?>
include("../templates/bottom.php"); ?>