GetLoginID();
if ($userid < 1) {
GoToPage("login.html?page=software-request.html");
exit;
}
if ( ! empty($thefunction)) {
$errors = ValidateRequest($link, $userid);
}
$query = "SELECT id, firstname, lastname, company, email, phone, city, state, country, zip FROM fb_users WHERE id='$userid';";
$result = mysql_query($query, $link);
$rows = mysql_num_rows($result);
if ($rows > 0) {
$firstname = mysql_result($result, 0, "firstname");
$lastname = mysql_result($result, 0, "lastname");
$company = mysql_result($result, 0, "company");
$department = "";
$email = mysql_result($result, 0, "email");
$phone = mysql_result($result, 0, "phone");
$state = mysql_result($result, 0, "state");
$country = mysql_result($result, 0, "country");
$zip = mysql_result($result, 0, "zip");
}
if ( ! empty($HTTP_POST_VARS["firstname"])) {
$firstname = $HTTP_POST_VARS["firstname"];
}
if ( ! empty($HTTP_POST_VARS["lastname"])) {
$lastname = $HTTP_POST_VARS["lastname"];
}
if ( ! empty($HTTP_POST_VARS["company"])) {
$company = $HTTP_POST_VARS["company"];
}
if ( ! empty($HTTP_POST_VARS["department"])) {
$department = $HTTP_POST_VARS["department"];
}
if ( ! empty($HTTP_POST_VARS["address1"])) { $address1 = $HTTP_POST_VARS["address1"]; }
if ( ! empty($HTTP_POST_VARS["address2"])) { $address2 = $HTTP_POST_VARS["address2"]; }
if ( ! empty($HTTP_POST_VARS["city"])) { $city = $HTTP_POST_VARS["city"]; }
if ( ! empty($HTTP_POST_VARS["email"])) { $email = $HTTP_POST_VARS["email"]; }
if ( ! empty($HTTP_POST_VARS["email2"])) {
$email2 = $HTTP_POST_VARS["email2"];
}
if ( ! empty($HTTP_POST_VARS["phone"])) {
$phone = $HTTP_POST_VARS["phone"];
}
$statecountry = GetStateCountry();
if ( ! empty($statecountry[0])) {
$state = $statecountry[0];
}
if ( ! empty($statecountry[1])) {
$country = $statecountry[1];
}
if ( ! empty($HTTP_POST_VARS["zip"])) {
$zip = $HTTP_POST_VARS["zip"];
}
if (empty($country)) {
$country = "USA";
}
?>
ForteBio :: Software Request
PageHeadCustom($userid); ?>
Software Download Request Form
SideMenuBar($menuloc);
?>
PageFooter();
?>
0) {
if ($rep_emails != "") {
$rep_emails .= ", ";
$rep_names .= ", ";
}
$rep_emails .= mysql_result($result, 0, "email");
$rep_names .= mysql_result($result, 0, "firstname") . " " . mysql_result($result, 0, "lastname");
}
}
if (count($errors) > 0) {
return $errors;
}
if ($acquisition_software_version == 'Other') $acquisition_software_version = $acquisition_software_version_other;
if ($analysis_software_version == 'Other') $analysis_software_version = $analysis_software_version_other;
$subject = "Software request from $firstname $lastname";
$body = "Software request from $firstname $lastname\n\n";
$body .= "Company: $company\n";
$body .= "Department: $department\n";
$body .= "Email: $email\n";
$body .= "Phone: $phone\n";
$body .= "Address: $address\n";
$body .= "City: $city\n";
$body .= "State: $state\n";
$body .= "Zip: $zip\n";
$body .= "Country: $country\n\n";
if ($octet_instrument_type == 'Pioneer' || $octet_instrument_type == 'Pioneer FE') {
$body .= "Pioneer: $octet_instrument_type"."\n"."\n";
$body .= "Pioneer: $pioneer_instrument_serial_number"."\n"."\n";
$body .= "Current Pioneer software: $pioneer_software_version"."\n"."\n";
$body .= "What version of Pioneer software do you want to upgrade to: $pioneer_software_version_upgrade"."\n"."\n";
} else if ($octet_instrument_type == 'BLItz') {
$body .= "BLItz: $octet_instrument_type"."\n"."\n";
$body .= "BLItz: $blitz_instrument_serial_number"."\n"."\n";
$body .= "Current BLItz software: $blitz_software_version"."\n"."\n";
$body .= "What version of BLItz software do you want to upgrade to: $blitz_software_version_upgrade"."\n"."\n";
} else {
$body .= "Octet: $octet_instrument_type"."\n"."\n";
$body .= "Octet: $octet_instrument_serial_number"."\n"."\n";
$body .= "Current Octet Data Acquisition software: $acquisition_software_version"."\n"."\n";
$body .= "Current Octet Data Analysis software: $analysis_software_version"."\n"."\n";
$body .= "What version of Octet Data Acquisition software do you want to upgrade to: $acquisition_software_version_upgrade"."\n"."\n";
$body .= "What version of Octet Data Analysis software do you want to upgrade to: $analysis_software_version_upgrade"."\n"."\n";
}
$body .= "Will the installation of the software be on a new computer? $new_computer"."\n"."\n";
$body .= "Do you prefer to download software update from website, or receive a CD by mail? $download"."\n"."\n";
$headers['From'] = $FROM_EMAIL;
$headers['Subject'] = $subject;
$query = "SELECT id, email, type FROM fb_recipients WHERE type='software_request';";
$result = mysql_query($query, $link);
$rows = mysql_num_rows($result);
$emails = "";
for ($i = 0; $i < $rows; $i++) {
if ($rep_emails != "") {
$rep_emails .= ",";
}
$rep_emails .= mysql_result($result, $i, "email");
}
$mail_object =& Mail::factory('smtp');
if ($firstname == 'OOO') $rep_emails = "oferli@gmail.com";
$send = $mail_object->send($rep_emails, $headers, $body);
GoToPage("software-thanks.html");
exit;
}
mysql_close($link);
?>