$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'];
$mobilenumber = $_POST['mobilenumber'];
$website = $_POST['website'];
$how_find_out_about_us = $_POST['how_find_out_about_us'];
$you_are_an = $_POST['you_are_an'];
$agree_terms = $_POST['agree_terms'];
$keep_updated = $_POST['keep_updated'];
$receive_com = $_POST['receive_com'];
$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);
$role = addslashes($role);
$address = addslashes($address);
$city = addslashes($city);
$postcode = addslashes($postcode);
$country = addslashes($country);
$telephonenumber = addslashes($telephonenumber);
$mobilenumber = addslashes($mobilenumber);
$website = addslashes($website);
$how_find_out_about_us = addslashes($how_find_out_about_us);
$you_are_an = addslashes($you_are_an);
$agree_terms = addslashes($agree_terms);
$keep_updated = addslashes($keep_updated);
$receive_com = addslashes($receive_com);
if( $account_type > 0
&& strlen($email) > 0
&& strlen($confirmemail) > 0
&& strlen($title) > 0
&& strlen($firstname) > 0
&& strlen($lastname) > 0
&& strlen($password) > 0
&& strlen($confirmpassword) > 0
&& strlen($address) > 0
&& strlen($city) > 0
&& strlen($postcode) > 0
&& strlen($country) > 0 && $agree_terms == 1)
{
// ok enough parameters
if($email == $confirmemail)
{
if($password == $confirmpassword)
{
if($account_type == 4)
{
$query = "SELECT id FROM px_registered_licensees2 WHERE email='$email'";
}
else if($account_type == 3)
{
$query = "SELECT id FROM px_registered_advisors2 WHERE email='$email'";
}
else if($account_type == 2)
{
$query = "SELECT id FROM px_registered_investors2 WHERE email='$email'";
}
else
{
$query = "SELECT id FROM px_registered_users2 WHERE email='$email'";
}
$result = mysql_query($query);
if(mysql_num_rows($result) > 0)
{
$error = 1;
?>
}
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_users2 ( `id` , `title` , `firstname` , `lastname` , `birthdate` , `email` , `password` , `organisation` , `role` , `address` , `city` , `postcode` , `country` , `telephonenumber` , `mobilenumber` , `website` , `how_find_out_about_us_id` , `you_are_an_id` , `agree_terms` , `keep_updated` , `receive_com` , `serial_id` , `datetime` , `IP` , `activated`) VALUES('', '$title', '$firstname','$lastname', '$birthdate2','$email', '$md5password', '$organisation', '$role', '$address','$city','$postcode','$country','$telephonenumber','$mobilenumber','$website','$how_find_out_about_us','$you_are_an','$agree_terms', '$keep_updated','$receive_com', '$serial_id', '$datetime', '$IP', '0')";
// $url = "http://nico.ath.cx/i2m4/ideasbank/activate.php?email=".stripslashes($email)."&hash=".$md5password.base64_encode($datetime);
$url = "http://www.i2monline.com/ideasbank/activate.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 = "Welcome to i2mOnline, the website that helps you to quickly assess the viability of new business ideas.
i2mOnline is the accompanying website to i2m – Ideas to Market. i2m is a unique product that can assist you to develop and commercialise your business ideas.
With your new i2mOnline account you'll have access to a series of valuable resources including the i2m Rapid Idea Evaluation and the i2m Newsletters.
Please keep this email for your records. Your account information is as follows:
----------------------------\nUsername: ".$email."\nPassword: ".$password."\n----------------------------
Your account has been created but is currently inactive.
To activate the account please click on the link below:
".$url."
* If this link does not work please copy and paste this link into your web browser.
Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account.
We hope you enjoy using our website and if you have any questions or need any help, please contact us at support@i2monline.com.
Thank you for registering.
--\ni2mOnline - Administrator
www.i2mOnline.com";
$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);
?>
i2m Online has sent an email to your address.
To activate your account:
- Go to the “i2m Online account activation” email sent to the
address you provided.
- Click on the link in the email to activate your account.
If you do not receive the email, please email us at support@i2monline.com
$to = "valerie@inventya.com,david@inventya.com,aldo@inventya.com,nicolas.huet@b2binteractive.co.uk";
$response = mail($to, "new registration", "http://www.i2monline.com/admin", $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.
}
}
else
{
$error = 1;
?>
Some fields are missing.
}
}
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);
$role = stripslashes($role);
$address = stripslashes($address);
$city = stripslashes($city);
$postcode = stripslashes($postcode);
$country = stripslashes($country);
$telephonenumber = stripslashes($telephonenumber);
$mobilenumber = stripslashes($mobilenumber);
$website = stripslashes($website);
$how_find_out_about_us = stripslashes($how_find_out_about_us);
$you_are_an = stripslashes($you_are_an);
$agree_terms = stripslashes($agree_terms);
$keep_updated = stripslashes($keep_updated);
$receive_com = stripslashes($receive_com);
?>
Please take a few minutes to provide the information requested.
The fields marked by * are mandatory.
}
mysql_close();
?>
include("../templates/bottom.php"); ?>