Execute("$usernames_sql") or DIE($BCES->ErrorMsg()); $usernames_totalrows=$usernames->RecordCount(); } $parameters=$BCES->Execute("SELECT * FROM TableParameters") or DIE($BCES->ErrorMsg()); //Retrieve drop down menus from Database $salutations_sql="SELECT SalutationType, SalutationKey FROM TableListSalutations"; $salutations=$BCES->Execute("$salutations_sql") or DIE($BCES->ErrorMsg()); $contacttype_sql="SELECT ContactTypeDesc, ContactTypeKey FROM TableListContactTypes ORDER BY ContactTypeDesc ASC"; $contacttype=$BCES->Execute("$contacttype_sql") or DIE($BCES->ErrorMsg()); $source_sql="SELECT SourceDesc, SourceKey FROM TableListSourceTable ORDER BY SourceDesc ASC"; $source=$BCES->Execute("$source_sql") or DIE($BCES->ErrorMsg()); $orgtypes_sql="SELECT OrgTypeDesc, OrgTypeKey FROM TableListOrgTypes"; $orgtypes=$BCES->Execute("$orgtypes_sql") or DIE($BCES->ErrorMsg()); $fieldtypekey_sql="SELECT FieldTypeDesc, FieldTypeKey FROM TableListContactFields"; $fieldtypekey=$BCES->Execute("$fieldtypekey_sql") or DIE($BCES->ErrorMsg()); $schools="SELECT SchoolDesc, SchoolKey FROM TableListSchools ORDER BY SortOrder, SchoolDesc ASC"; $schools=$BCES->Execute("$schools") or DIE($BCES->ErrorMsg()); if($redirectsuccess && eventkey && $checkid) $redirectsuccess = "../$redirectsuccess?eventkey=$eventkey&checkid=$checkid"; // check if sternlogin exists if ($sternlogin) { $isnyucontact = "Y"; } if ( ($usernames_totalrows<=0) && ($webpassword==$webpasswordconf && $webusername && $webpassword && $email && $contacttypekey && eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](g|l|m|pa|t|u|v)?$", $email, $check) && $firstname && $lastname && $salutationkey && $schoolkey) && (!$corpreg || ($organizationname && $title && $address1 && $city && $state && $zip)) ) { if (!$mailinglist) $mailinglist = "Y"; //generate checkid mt_srand ((double) microtime() * 1000000); $checkid = md5(mt_rand() . mt_rand() . mt_rand()); //insert required fields $insertcontact_sql = "INSERT INTO TableContact (ContactTypeKey, SalutationKey, FirstName, MiddleName, LastName, SuffixName, Email, MailingList, SourceKey, WebUsername, WebPassword, CheckID, IsNYUContact, SchoolKey) VALUES ('$contacttypekey', '$salutationkey', '$firstname', '$middlename', '$lastname', '$suffixname', '$email', '$mailinglist', '$sourcekey', '$webusername', '$webpassword', '$checkid', '$isnyucontact', '$schoolkey')"; $insertcontact = $BCES->Execute($insertcontact_sql) or DIE($BCES->ErrorMsg()); // Begin get ContactKey of new profile $contactkey_sql="SELECT ContactKey FROM TableContact WHERE WebUsername = '$webusername'"; $contactkey=$BCES->Execute("$contactkey_sql") or DIE($BCES->ErrorMsg()); $newcontactkey=$contactkey->Fields("ContactKey"); $updatecontactowner_sql = "UPDATE TableContact SET OwnerContactKey='$newcontactkey' WHERE ContactKey='$newcontactkey'"; $updatecontactowner = $BCES->Execute($updatecontactowner_sql) or DIE($BCES->ErrorMsg()); mt_srand ((double) microtime() * 1000000); $checkid = md5(mt_rand() . mt_rand() . mt_rand()); //create new unfiled personal group $newpergroup_sql = "INSERT INTO TableContactPerGroups SET CheckID='$checkid', ContactOwnerKey='$newcontactkey', GroupDesc='Unfiled'"; $newpergroup = $BCES->Execute($newpergroup_sql) or DIE($BCES->ErrorMsg()); mt_srand ((double) microtime() * 1000000); $checkid = md5(mt_rand() . mt_rand() . mt_rand()); //create new unfiled personal group $newshargroup_sql = "INSERT INTO TableContactGroups SET CheckID='$checkid', ContactOwnerKey='$newcontactkey', GroupDesc='Unfiled'"; $newshargroup = $BCES->Execute($newshargroup_sql) or DIE($BCES->ErrorMsg()); // Begin add organization information & update primary organization if not null if ($organizationname || $title || $address1 || $address2 || $city || $state || $zip || $country || $field1 || $field2) { if ($contactorgkey==""){ $contactorgkey=1; } $insertcontactorg_sql = "INSERT INTO TableContactOrganizationTable (OrgTypeKey, OrganizationName, ContactKey, Title , Address1, Address2, City, State, ZIP, Country, Field1TypeKey, Field1, Field2TypeKey, Field2) VALUES ('$contactorgkey', '$organizationname', '$newcontactkey', '$title', '$address1', '$address2', '$city', '$state', '$zip', '$country', '$field1typekey', '$field1', '$field2typekey', '$field2')"; $insertcontact = $BCES->Execute($insertcontactorg_sql) or DIE($BCES->ErrorMsg()); // Begin get new ContactOrganizationKey of new organization $contactorgkey_sql="SELECT ContactOrganizationKey FROM TableContactOrganizationTable WHERE ContactKey = '$newcontactkey'"; $contactorgkey=$BCES->Execute("$contactorgkey_sql") or DIE($BCES->ErrorMsg()); $newcontactorgkey=$contactorgkey->Fields("ContactOrganizationKey"); // Set primary organization to new organization $updateprimaryorg_sql = "UPDATE TableContact SET PrimaryContactOrganizationKey='$newcontactorgkey' WHERE ContactKey='$newcontactkey'"; $updateprimaryorg = $BCES->Execute($updateprimaryorg_sql) or DIE($BCES->ErrorMsg()); } newmail( $email, "NYU Stern EI Area Event Registration System (ERS) Profile", "Thank you for registering at the NYU Stern EI Area Event Registration System!\n\nYour username is: " . $webusername . "\nYour password is: " . $webpassword . "\n\nTo view future events or to manage your profile and contacts, visit our web site at: \nhttp://www.stern.nyu.edu/ei" . "\n\n--------------------------------------" . "\nEntrepreneurship and Innovation" . "\nStern School of Business" . "\nHenry Kaufman Management Center" . "\n44 West Fourth Street, New York, NY 10012" . "\nPhone: (212) 998-0070 Fax: (212) 995-4211", "From: \"" . $parameters->Fields(RegConfFrom) . "\" <" . $parameters->Fields(RegConfEmail) . ">" ); //Do not display any confirmation if redirect success is set and just redirect if($redirectsuccess){ require($_SERVER[DOCUMENT_ROOT]."/includes/functions/login.php"); login($webusername,$webpassword,$PHPSESSID,$redirectsuccess,$redirectsuccess); exit(); } $profilecreated=1; } else { if ($submit){ $error=1; } } if ($eventkey) { $event="SELECT * FROM TableEvent WHERE EventKey = '$eventkey'"; $event=$BCES->Execute("$event") or DIE($BCES->ErrorMsg()); if ($event->Fields(SimpleReg) == "Y") $simplereg = "Y"; if ($event->Fields(CorpReg) == "Y") $corpreg = "Y"; } ?>

Your Profile Has Been Created

Your username is .
A confirmation email has been sent to .

You can now login to the EI Area web site...

Fields(Title) . ":"; ?> Create New Profile

There were errors in your new profile. Please correct the errors and resubmit the form.

* indicates required field

Login Information
  *Desired Username: ">
Please enter a username. 0) { ?>
This username is already taken. Please select another username.
  *Desired Password: ">
  *Re-enter Password: ">
   
Personal Information
  *E-mail Address ">
Please enter a valid email address.
  *Prefix GetMenu2(salutationkey,$salutationkey); ?>
Please select a prefix.
  *First Name >
Please enter your first name.
  Middle Name >
  *Last Name >
Please enter your last name.
  Suffix (Jr., Sr.) >
  *Which is your NYU school affliation? GetMenu2(schoolkey,$schoolkey); ?>
Please select your NYU school affliation.
  *Which category best describes you? GetMenu2(contacttypekey,$contacttypekey); ?>
Please select your contact type.
   
Contact Options
  How did you hear about this site? GetMenu2(sourcekey,$sourcekey); ?>
  *Do you want to be added our mailing list?

Please select an option.
   
Organization Information
  Organization Type GetMenu2(contactorgkey,$contactorgkey); ?>
  Leave the following fields blank if giving your Home address:
  bgcolor="#ECF5FF">Organization Name bgcolor="#ECF5FF"> >
Please enter an organization name.
  bgcolor="#ECF5FF">Title bgcolor="#ECF5FF"> >
Please enter a title.
  Address Line 1 ">
Please enter an address.
  Address Line 2 ">
  City ">
Please enter a city.
  State/Providence ">
Please enter a state.
  Zip/Postal Code ">
Please enter a zip.
  Country ">
  GetMenu2(field1typekey,$field1typekey); ?>
  MoveFirst(); echo $fieldtypekey->GetMenu2(field2typekey,$field2typekey); ?>
 
">