 |
// Form processing starts here
function process_new_app($form)
{
global $db;
// Format mail headers
$mailto = $GLOBALS[MAILTO_ADDR];
$mailsubject = "XeroxHawaii.com: Short-Term Rentals Quote";
$mailheaders = "Content-Type: text/html; charset=us-ascii\nContent-Transfer-Encoding: 7bit\nFrom: XeroxHawaii.com \n";
$mailbody = "The following user has submitted a request for a rental quote:".
"| Customer: | ".
"$form[name], $form[title] ".
"$form[company] ".reformat_textarea($form[address])." ".
"$form[phone] (phone) ";
if ($form[fax] != "")
$mailbody .= "$form[fax] (fax) ";
$mailbody .= "$form[email]
| ".
"| Event: | $form[event] | ".
"| Equipment Needed: | ".reformat_textarea($form[items_needed])." | ".
"| Date/Location: | ".reformat_textarea($form[date_needed])." | ".
"| Address: | $form[address] | ";
mail($mailto, $mailsubject, $mailbody, $mailheaders);
}
$success = false;
if ($submit)
{
$result = "NULL";
$errortext = "";
// cast post-vars into an array
while (list($name, $value) = each($HTTP_POST_VARS))
$form[$name] = $value;
// Are the required fields filled in?
if (($form[name] == "") || ($form[company] == "") || ($form[address] == ""))
$errortext .= "Please enter your name, company name, and address. ";
if (!validate_email($form[email]))
$errortext .= "Please enter a valid email address ";
if (!($form[phone] = validate_phone_number($form[phone])) )
$errortext .= "Please enter your phone number. ";
if ($form[items_needed] == "")
$errortext .= "Please briefly list the equipment you may be needing ";
if ($errortext == "") //no errors, so process data and continue
{
//Send to function for processing
$success = true;
process_new_app($form);
}
else
{
$errortext .= " Errors have been reported. Please check your application
and re-submit. ";
$success = false;
}
} //if submit
if ($success)
{
// send some user feedback
?>
Thank you for your request. One of our equipment renal specialists
will contact you shortly. Please continue browsing our site using
the links above.
}
else if (!($success)) //if not a successful submit, show the input form
{
?>
|
|
|
print($errortext); ?>
Short-Term Office Equipment Rental
Xerox Business Center offers a wide selection of computers, printers, peripherals, business services and of course copiers and fax machines.
Whether you need a single printer or equipment for a large convention, we take a very hands-on approach to each and every one of our installations. Our Technology Specialist assigned to your rental will explain how to use the equipment before leaving your location. And if you need to setup an Internet Café or a Local Area Network, we can handle that for you as well. All of our computers come with either a modem or network card and we have the equipment and expertise to get you connected.
Let us handle all of your office equipment rental needs so that you dont have to worry about them. Whether its a cellular phone, a Nextel radio or just about anything, were ready to assist you. We even offer computers and laptops with foreign language operating systems and software applications.
If youre looking for reliability and performance then youll want to contact the Xerox Business Center nearest you. We support all islands throughout the State of Hawaii. So the next time you are preparing for an event in Hawaii, give us a call or email us at xeroxhawaii@hawaii.rr.com and we will help you plan Your Office Away From Home!
|
|
|
|
|
} // end if !success
?>
 |
 |
|