query("SELECT email FROM customer WHERE email = '".$_POST['email']."'"); if (DB::isError($email_check)) { $status=$email_check->getMessage(); } $email_checkk = $email_check->numRows(); if ($email_checkk != 0) { if ($_POST['infoupdate']==1) { $delete = $db_object->query("DELETE FROM CUSTOMER WHERE email = '".$_POST['email']."'"); } else { $status="You are already registered."; } } // check e-mail format if (!preg_match("/.*@.*..*/", $_POST['email']) | preg_match("/(<|>)/", $_POST['email'])) { $status="Invalid e-mail address."; } // no HTML tags in username, password $_POST['email'] = strip_tags($_POST['email']); $_POST['password'] = strip_tags($_POST['password']); $_POST['firstname'] = strip_tags($_POST['firstname']); $_POST['lastname'] = strip_tags($_POST['lastname']); $_POST['address1'] = strip_tags($_POST['address1']); $_POST['address2'] = strip_tags($_POST['address2']); $_POST['city'] = strip_tags($_POST['city']); $_POST['state'] = strip_tags($_POST['state']); $_POST['zipcode'] = strip_tags($_POST['zipcode']); /* the rest of the information is optional */ // now we can add them to the database, as long as a status (error) has not been posted. if ($status==" ") { $_POST['password'] = md5($_POST['password']); if (!get_magic_quotes_gpc()) { $_POST['password'] = addslashes($_POST['password']); $_POST['email'] = addslashes($_POST['email']); $_POST['firstname'] = addslashes($_POST['firstname']); $_POST['lastname'] = addslashes($_POST['lastname']); $_POST['address1'] = addslashes($_POST['address1']); $_POST['address2'] = addslashes($_POST['address2']); $_POST['city'] = addslashes($_POST['city']); $_POST['state'] = addslashes($_POST['state']); $_POST['zipcode'] = addslashes($_POST['zipcode']); } $regdate = date('m d, Y'); $insert = "INSERT INTO customer ( firstname, lastname, address1, address2, city, state, zipcode, password, regdate, email, status, last_login) VALUES ( '".$_POST['firstname']."', '".$_POST['lastname']."', '".$_POST['address1']."', '".$_POST['address2']."', '".$_POST['city']."', '".$_POST['state']."', '".$_POST['zipcode']."', '".$_POST['password']."', '$regdate', '".$_POST['email']."', 'pending', 'Never')"; $add_member = $db_object->query($insert); if (DB::isError($add_member)) { die($add_member->getMessage()); } // Now send an email to validate the account // First, get the record id number for this account $res = $db_object->query("SELECT customerid FROM customer WHERE email = '".$_POST['email']."'"); if (DB::isError($res)) { die($res->getMessage()); } $res->fetchInto($dbid); $dbid=$dbid['customerid']; $db_object->disconnect(); // Note: Header fields must be \n terminated $from = "Customer Service "; $to = $_POST['email'] ; $subject = "Welcome to GetHydroPower!"; $headers = array ('from' => $from, 'subject' => $subject, 'to' => $to); $body = file_get_contents("txt/register.txt"); $link = "http://www.gethydropower.com/validate.html?email=" . $_POST['email'] . "&dbid=" . $dbid ; $body = $body . $link; $host = "192.168.1.11"; $username = "info@gethydropower.com"; $password = "20best06"; //Override default php settings ini_set("sendmail", "192.168.1.11"); ini_set("sendmail_from", "info@GetHydroPower.com"); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password, 'debug' => false)); if (PEAR::isError($smtp)) { die($smtp->getMessage()); $smtp->_smtp->rset(); } $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { $status= $mail->getMessage(); } else { $status="Please check your email to continue the process."; } /* // Try more advanced email options, which apparently dont work right now. $to=$_POST['email'] . "\n"; $from="info@GetHydroPower.com\n"; $subject="Welcome to GetHydroPower!\n"; $message = new Mail_mime(); $text = file_get_contents("txt/register.txt"); $html = file_get_contents("txt/register.html"); $message->setTXTBody($text); $message->setHTMLBody($html); $body = $message->get(); $extraheaders = array("From"=>$from, "Subject"=>$subject, "debug"=>true); $headers = $message->headers($extraheaders); $mail = Mail::factory("smtp"); $mail->send($to, $body, $headers, ); if (PEAR::isError($mail)) { $status= $mail->getMessage(); } else { $status="Please check " . $to . $from . $subject . " to continue the registration process. " . ""; } */ } } ?> Gorilla Development LLC -

      Registration

Personal Information


First Name


Last Name


Address




City/State/Zip
   

Contact Information

Email (your login name)

Enter your valid email address

Password

5-15 characters. Alphanumeric characters only.

  

Update my information




Please enter your name and address as they are listed for your debit card, credit card, or bank account.



Please enter your full email address, for example, name@domain.com.

It is important that you provide a valid, working email address that you have access to as it must be verified before you can use your account.





Please use your email address as your customer ID. When choosing your password, be carefeul not to use easily hackable dictionary words or phrases. (example: instead of "the quick brown fox jumped over the lazy dog" try "tqbfjotld")


Copyright © 2006-2009 Gorilla Development LLC. All Rights Reserved