session_start();
session_register("submitted_session");
?>
function send_email($to_address,$to_name,$from_address,$from_name,$reply_to,$subject,$body)
{
extract($GLOBALS);
// $Mail is of type "Persits.MailSender"
$Mail->Host="198.87.31.23";
$Mail->From=$from_address;
$Mail->FromName=$from_name;
$Mail->AddAddress$to_address $to_name;
$Mail->AddReplyTo$reply_to;
$Mail->Subject=$subject;
$Mail->Body=$body;
$Mail->Send;
if ($err!=0)
{
print "
Error Occurred Trying to send mail
";
}
$Mail=null;
return $function_ret;
}
?>
header("Location: "."/webseminars?community.id=".${"community.id"});
$lead_from=${"community.id"};
if (($lead_from=="adultswim"))
{
$lead_from_title="Lithium Logo - Adult Swim";
}
else
if (($lead_from=="attws"))
{
$lead_from_title="Lithium Logo - AT&T Wireless";
}
else
if (($lead_from=="attwsddp"))
{
$lead_from_title="Lithium Logo - AT&T Wireless Data Developers Program";
}
else
if (($lead_from=="firingsquad"))
{
$lead_from_title="Lithium Logo - FiringSquad";
}
else
if (($lead_from=="gamespot"))
{
$lead_from_title="Lithium Logo - CNET GameSpot";
}
else
if (($lead_from=="gi"))
{
$lead_from_title="Lithium Logo - Game Informer";
}
else
if (($lead_from=="ids"))
{
$lead_from_title="Lithium Logo - Intel IDS";
}
else
if (($lead_from=="nintendo"))
{
$lead_from_title="Lithium Logo - Nintendo";
}
else
if (($lead_from=="playstation"))
{
$lead_from_title="Lithium Logo - Sony PlayStation";
}
else
if (($lead_from=="roxio"))
{
$lead_from_title="Lithium Logo - Roxio";
}
else
if (($lead_from=="sforce"))
{
$lead_from_title="Lithium Logo - SalesForce";
}
else
if (($lead_from=="swg"))
{
$lead_from_title="Lithium Logo - SOE Star Wars Galaxies";
}
else
if (($lead_from=="univision"))
{
$lead_from_title="Lithium Logo - Univision";
}
else
if (($lead_from=="zd"))
{
$lead_from_title="Lithium Logo - Ziff Davis - 1up";
}
else
if (($lead_from=="zonelabs"))
{
$lead_from_title="Lithium Logo - Zone Labs";
}
else
{
$lead_from_title="Lithium Logo - ".$lead_from;
}
$form_error=false;
if ($_POST["submitted"]=="true")
{
if ($_POST["first_name"]=="")
{
$form_error=true;
$form_error_text="First Name is a required field.
";
}
if ($_POST["last_name"]=="")
{
$form_error=true;
$form_error_text=$form_error_text."Last Name is a required field.
";
}
if ($_POST["title"]=="")
{
$form_error=true;
$form_error_text=$form_error_text."
Title is a required field.
";
}
if ($_POST["company"]=="")
{
$form_error=true;
$form_error_text=$form_error_text."Company is a required field.
";
}
if ($_POST["country"]=="")
{
$form_error=true;
$form_error_text=$form_error_text."Country is a required field.
";
}
if ($_POST["phone"]=="")
{
$form_error=true;
$form_error_text=$form_error_text."Phone Number is a required field.
";
}
if ($_POST["email"]=="")
{
$form_error=true;
$form_error_text=$form_error_text."E-mail is a required field.
";
}
else
{
$email_text=$_POST["email"];
$goby=0;
if (strlen($email_text)<=5)
{
$goby=1;
}
if ((strpos(1,$email_text,"@",1) ? strpos(1,$email_text,"@",1)+1 : 0)<2)
{
$goby=1;
}
else
{
if ((strpos(1,$email_text,".",1) ? strpos(1,$email_text,".",1)+1 : 0)<4)
{
$goby=1;
}
}
if ($goby!=0)
{
$form_error=true;
$form_error_text=$form_error_text."E-mail is not in the correct format.
";
}
}
$_SESSION['submitted']="";
if (!$form_error && $_SESSION['submitted']=="")
{
$full_name=$_POST["first_name"]." ".$_POST["last_name"];
$title="WEBLEAD: ".$_POST["company"]." - ".$full_name;
$email_body=
"First Name: ".$_POST["first_name"]."\r\n".
"Last Name: ".$_POST["last_name"]."\r\n".
"Company Name: ".$_POST["company"]."\r\n".
"Country: ".$_POST["country"]."\r\n".
"Title: ".$_POST["title"]."\r\n".
"Phone Number: ".$_POST["phone"]."\r\n".
"E-Mail: ".$_POST["email"]."\r\n".
"Subscribe To Newsletter: ".$_POST["subscribe"]."\r\n".
"Comments: ".$_POST["comment"]."\r\n".
"Lead From Group: ".$lead_from_title;
// "Address: " & Request.Form("address") & vbCRLF &_
// "City: " & Request.Form("city") & vbCRLF &_
// "State/Province: " & Request.Form("state") & vbCRLF &_
// "Zip/Postal Code: " & Request.Form("zip") & vbCRLF &_
$send_email"sales@lithium.com"$_POST["email"] $full_name $title $email_body;
// Set db_connection = Server.CreateObject("ADODB.Connection")
// db_connection.Open "Data Source=Lithium_sales;User ID=sales;Password=gj0ynal1"
// Set rs = Server.CreateObject("ADODB.RecordSet")
// rs.ActiveConnection = db_connection
// rs.Open "insert into Contacts (first_name, last_name, company, country, title, phone, email, type) values (" & _
// "'" & Request.Form("first_name") & "'," & _
// "'" & Request.Form("last_name") & "'," & _
// "'" & Request.Form("company") & "'," & _
// "'" & Request.Form("country") & "'," & _
// "'" & Request.Form("title") & "'," & _
// "'" & Request.Form("phone") & "'," & _
// "'" & Request.Form("email") & "','" & _
// lead_from_title & "')"
// rs.Open "insert into Contacts (first_name, last_name, country, company, title, phone, email, address1, address2, city, state, zip, country, type) values (" & _
// "'" & Request.Form("first_name") & "'," & _
// "'" & Request.Form("last_name") & "'," & _
// "'" & Request.Form("title") & "'," & _
// "'" & Request.Form("company") & "'," & _
// "'" & Request.Form("phone") & "'," & _
// "'" & Request.Form("email") & "'," & _
// "'" & Request.Form("address") & "'," & _
// "''," & _
// "'" & Request.Form("city") & "'," & _
// "'" & Request.Form("state") & "'," & _
// "'" & Request.Form("zip") & "'," & _
// "'" & Request.Form("country") & "'," & _
// "'Q1 Advertising - CNET Online')"
// Set rs = Nothing
// Set db_connection = Nothing
$_SESSION['submitted']="true";
}
}
?>
Lithium: Customer Support Communites
Copyright
© 1997-2004 Lithium Technologies, Inc.
All rights reserved. Disclaimer
Contest
Rules
function Select_Country($selected)
{
extract($GLOBALS);
print "";
return $function_ret;
}
?>