"Get a Plumbing Quote :: Commercial Plumbing", "keywords" => "", "description" => "", ); $path_f_id=array(); $path_f_id[]="0"; $page_id=0; $page_url="contactus"; require "header.php"; echo "

Get a Quote

"; /*$result=mysql_query("drop table cu_contacts") or die ("Problems in query. ".mysql_error());*/ /*$result=mysql_query("create table cu_contacts (`id` int(11) not null auto_increment, `cu_name` varchar(100), `cu_phone` int(15), `cu_email` varchar(100), `cu_state` varchar(30), `cu_city` varchar(30), `cu_street` int(30), `cu_zipcode` int(5), `cu_bttc` int(1), `cu_content` text, `viewed` bool default false, `viewed_by` varchar(20), `at` int(10) not null, `status` bool default true, `type` varchar(10), `pageurl` varchar(255) default '', primary key (`id`))") or die ("Problems in query. ".mysql_error());*/ /*$result=mysql_query("alter table `cu_contacts` add column `http_referer` varchar(250) not null default ''") or die ("Problems in query. ".mysql_error()); $result=mysql_query("alter table `cu_contacts` add column `http_referer_2` varchar(250) not null default ''") or die ("Problems in query. ".mysql_error()); $result=mysql_query("alter table `cu_contacts` add column `user_agent` varchar(250) not null default ''") or die ("Problems in query. ".mysql_error());*/ $error=array(); if (isset($_POST['ems_fname'])) { $lead=array(); if (strlen(trim($_POST['ems_fname']))>0) $lead['fname']=trim($_POST['ems_fname']); else $error[]="First Name field is empty."; if (strlen(trim($_POST['ems_lname']))>0) $lead['lname']=trim($_POST['ems_lname']); else $error[]="Last Name field is empty."; if ((is_numeric($_POST['ems_phone_1']) || is_numeric(trim($_POST['ems_phone_1']))) && (is_numeric($_POST['ems_phone_2']) || is_numeric(trim($_POST['ems_phone_2']))) && (is_numeric($_POST['ems_phone_3']) || is_numeric(trim($_POST['ems_phone_3'])))) { $lead['phone_1']=trim($_POST['ems_phone_1']); $lead['phone_2']=trim($_POST['ems_phone_2']); $lead['phone_3']=trim($_POST['ems_phone_3']); } else $error[]="Phone field must be a valid phone number, and contain only numbers."; if (isset($_POST['ems_email']) && $_POST['ems_email']!="") $lead['email']=$_POST['ems_email']; else $lead['email']=""; if (strlen($_POST['ems_state'])>0) $lead['state']=$_POST['ems_state']; else $error[]="State field is empty."; if (strlen($_POST['ems_city'])>0) $lead['city']=trim($_POST['ems_city']); else $error[]="City field is empty."; if (strlen($_POST['ems_street'])>0) $lead['street']=trim($_POST['ems_street']); else $error[]="Street field is empty."; if (strlen($_POST['ems_zip'])==5 && is_numeric($_POST['ems_zip'])) $lead['zip']=$_POST['ems_zip']; else $error[]="Zip code field must be a valid zip code, and contain 5 numbers."; $lead['info']=trim($_POST['ems_info']); $at=time(); } if (isset($_POST['ems_fname']) && count($error)==0) { $lead['referer']=$_SERVER['HTTP_REFERER']; $lead['referer_2']=$_POST['referer']; $lead['user_agent']=$_SERVER['HTTP_USER_AGENT']; if (get_magic_quotes_gpc()) { foreach ($lead as $k=>$v) { $lead[$k]=stripslashes($lead[$k]); } } foreach ($lead as $k=>$v) { $lead[$k]=mysql_real_escape_string($lead[$k]); } $result=mysql_query("insert into `cu_contacts` (`cu_name`, `cu_phone`, `cu_email`, `cu_state`, `cu_city`, `cu_street`, `cu_zipcode`, `cu_content`, `at`, `http_referer`, `http_referer_2`, `user_agent`) values ('".$lead['fname']." ".$lead['lname']."', '".$lead['phone_1'].$lead['phone_2'].$lead['phone_3']."', '".$lead['email']."', '".$lead['state']."', '".$lead['city']."', '".$lead['street']."', '".$lead['zip']."', '".$lead['info']."', $at, '".$lead['referer']."', '".$lead['referer_2']."', '".$lead['user_agent']."')"); echo "

Thank you for writing to us at commercial-plumbing.com. We value each and every email from our users. Our company's representative will contact you shortly.
Click here to go back to our homepage.

"; require_once "piwik_goal.php"; } else { if (isset($_REQUEST['sendto']) && is_numeric($_REQUEST['sendto'])) { $result=mysql_query("select `emis_id` from `advertisers` where `id`=".$_REQUEST['sendto']." limit 1"); if (mysql_num_rows($result)>0) { $rs=mysql_fetch_assoc($result); $emis_id="emis_id=".$rs['emis_id'].";"; } else $emis_id=""; } else $emis_id=""; echo " "; } require "footer.php"; ?>