'. 'request db = '. $_REQUEST['db']. ' category_db = '. $category_db. ' for_sale_db = '. $for_sale_db. ' manuf_db = ' . $manufacturer_db. ' test = '. $test_db; */ #include("cgi-bin/form_data_initialize.php"); ?> '; $i = 0; echo 'var type=[];'; foreach($category_array as $key => $value) { echo 'type['. $i. '] = '. '["'. $key. '",'. '"'. $value. '"];'; $i++; } echo ''; return; } function create_boat_array($boat_array) { echo ''; return; } function create_truck_array($truck_array) { echo ''; return; } function create_rod_array($rod_array) { echo ''; return; } function create_trolling_array($trolling_array) { echo ''; return; } function create_outboard_array($outboard_array) { echo ''; return; } function build_db_record($status,$emver,$item,$manuf,$fsdesc,$price,$photo1_name,$photo2_name,$subdate,$email,$fname,$lname,$addr1, $addr2,$city,$st,$zip,$hpcode,$hpprefix,$hphone,$ccode,$cprefix,$cphone,$wcode,$wprefix,$wphone,$wpext) { global $recid,$for_sale_db; $h_phone = $hpcode. $hpprefix. $hphone; $c_phone = $ccode. $cprefix. $cphone; $w_phone = $wcode. $wprefix. $wphone; $price = str_replace(',', '', $price); #include('cgi-bin/pcbmdbinfo.inc.php'); mysql_select_db('panamaci_pcbm') or die('Could not select database'); // Performing SQL query $query = "INSERT INTO $for_sale_db (status,emver,item,manuf,item_desc,price,photo1,photo2,subdate,email,fname,lname," . "addr1,addr2,city,st,zip,hph,cph,wph,wpext)" . " VALUES ('$status','$emver','$item','$manuf','$fsdesc','$price','$photo1_name','$photo2_name','$subdate'," . "'$email','$fname','$lname','$addr1','$addr2','$city','$st','$zip','$h_phone','$c_phone','$w_phone','$wpext')"; mysql_query($query) or die($for_sale_db. ' Insert failed: ' . mysql_error()); $recid = $recid + mysql_insert_id($link); #echo 'recid = '. $recid. '
'; // Closing connection mysql_close($link); return; } # build_db_record end function show_form($item="",$manuf="",$price="",$fsdesc="",$email="",$fname="",$lname="",$addr1="",$addr2="",$city="",$st="",$zip="", $hpcode="",$hpprefix="",$hphone="",$ccode="",$cprefix="",$cphone="",$wcode="",$wprefix="",$wphone="",$wpext="", $photo1_name="",$photo2_name="") { global $errormsg,$goodmsg,$submiterrormsg,$category_array,$boat_array,$truck_array,$rod_array,$trolling_array,$outboard_array, $state_array,$category_db,$for_sale_db,$manufacturer_db,$test_db; $i = 1; ?>
  For Sale Entry Form  
  Enter your items with pictures for sale. After they have been reviewed and determined adequate for the website, they will be added to the Website's "For Sale" page. This will normally be within 24 to 48 hours after you have entered your items. I try to stay current with manufacturers, but if your's is missing please let me know by email: jim.rains@panamacitybassmasters.com
When your item sells please let me know so we can tell the world that your item is no longer available.
 
     
Item For Sale? Manufacturer   Price(999.99)    
  * * = required field
           
Description and other information you want the world to know
* '. $errormsg. ''; elseif ($goodmsg): echo ''. $goodmsg. ''; elseif ($submiterrormsg): echo ''. $submiterrormsg. ''; endif; ?>
(500 characters max.) 500 remaining  
   
Email: * Email will be Verified
First name: * Last name: *
Address1:   Address2:  
City: *  State: *     Zip: *
Home phone: () - Cell phone: () - Work phone: () -x
Upload photo1 (.gif or .jpg only) Upload photo2 (.gif or .jpg only)
 
1): $errormsg .= "\"Item For Sale\" - Boats only". '
'; endif; if ($price): if (preg_match("/^([0-9.,-]+)$/", $price)): if (strlen($price) > 4): # next else: $errormsg .= "Price minimum 4 numbers ex: 9.99". '
'; endif; else: $errormsg .= "Price must be numeric". '
'; endif; else: $errormsg .= "Price is required". '
'; endif; if ($fsdesc): if (strlen($fsdesc) > 2): # next else: $errormsg .= "Description minimum 2 characters". '
'; endif; else: $errormsg .= "Description is required". '
'; endif; if ($email): if (preg_match( "/^ [\d\w\/+!=#|$?%{^&}*`'~-] # Wow that's ugly looking [\d\w\/\.+!=#|$?%{^&}*`'~-]*@ # So's that one [A-Z0-9] [A-Z0-9.-]{0,61} [A-Z0-9]\. # Letters or numbers, then a dot [A-Z]{2,6}$/ix", $email)): # next else: $errormsg .= "Email appears invalid". '
'; endif; else: $errormsg .= "Email is required". '
'; endif; if ($fname): if (strlen($fname) > 2): # next else: $errormsg .= "First name minimum 2 characters". '
'; endif; else: $errormsg .= "First name is required". '
'; endif; if ($lname): if (strlen($lname) > 2):# next else: $errormsg .= "Last name minimum 2 characters". '
'; endif; else: $errormsg .= "Last name is required". '
'; endif; if ($addr1): if (strlen($addr1) > 5): # next else: $errormsg .= "Address1 minimum 5 characters". '
'; endif; endif; if ($addr2): if (strlen($addr2) > 5): # next else: $errormsg .= "Address2 minimum 5 characters". '
'; endif; endif; if ($city): if (strlen($city) > 3): # next else: $errormsg .= "City minimum 3 characters". '
'; endif; else: $errormsg .= "City is required". '
'; endif; if ($zip): if (strlen($zip) == 5): # next else: $errormsg .= "Zip must be 5 characters". '
'; endif; else: $errormsg .= "Zip is required". '
'; endif; $pattern = "/(\([2-9]\d{2}\)\s?|[2-9]\d{2}-|[2-9]\d{2})" . "[1-9]\d{2}" . "-?\d{4}/"; if ($hpcode || $hpprefix || $hphone): $homephone = $hpcode. $hpprefix. $hphone; if (preg_match($pattern, $homephone)): # next else: $errormsg .= "Home phone invalid". '
'; endif; endif; $pattern = "/(\([2-9]\d{2}\)\s?|[2-9]\d{2}-|[2-9]\d{2})" . "[1-9]\d{2}" . "-?\d{4}/"; if ($ccode || $cprefix || $cphone): $cellphone = $ccode. $cprefix. $cphone; if (preg_match($pattern, $cellphone)): # next else: $errormsg .= "Cell phone invalid". '
'; endif; endif; $pattern = "/(\([2-9]\d{2}\)\s?|[2-9]\d{2}-|[2-9]\d{2})" . "[1-9]\d{2}" . "-?\d{4}/"; if ($wcode || $wprefix || $wphone): $workphone = $wcode. $wprefix. $wphone; if (preg_match($pattern, $workphone)): # next else: $errormsg .= "Work phone invalid". '
'; endif; endif; /* if ($wpext): if ($wcode && $wprefix && $wphone): if (preg_match("/^[0-9 ]+$/", $wpext)): # next else: $errormsg .= "Wphone ext invalid". '
'; endif; else: $errormsg .= "Ext. requires Wphone". '
'; endif; endif; */ if ($errormsg): show_form($item,$manuf,$price,$fsdesc,$email,$fname,$lname,$addr1,$addr2,$city,$st,$zip, $hpcode,$hpprefix,$hphone,$ccode,$cprefix,$cphone,$wcode,$wprefix,$wphone,$wpext, $photo1_name,$photo2_name); elseif (!$errormsg): $goodmsg .= "Please verify input and". '
'; $goodmsg .= "Submit at least one picture". '
'; show_form($item,$manuf,$price,$fsdesc,$email,$fname,$lname,$addr1,$addr2,$city,$st,$zip, $hpcode,$hpprefix,$hphone,$ccode,$cprefix,$cphone,$wcode,$wprefix,$wphone,$wpext, $photo1_name,$photo2_name); endif; elseif ($submit_hit): #1 state_array(); $errormsg = ""; $goodmsg = ""; $submitserrormsg = ""; if ($photo1): $photo1_name = $_FILES['photo1']['name']; # echo 'files photo1 name = '. $_FILES['photo1']['name']; $photo1_type = $_FILES['photo1']['type']; $photo1_size = $_FILES['photo1']['size']; $photo1_tmp_name = $_FILES['photo1']['tmp_name']; $photo1_error = $_FILES['photo1']['error']; endif; if ($photo1_name): if (($photo1_type == "image/gif") || ($photo1_type == "image/jpeg") || ($photo1_type == "image/pjpeg")): if ($photo1_size < $photo_size): if ($photo1_error > 0): $submiterrormsg .= "Error: " . $photo_error. '
'; $submiterrormsg .= "Re-select Photo1". '
'; else: # next endif; else: $submiterrormsg .= "Photo1 file size 512k max". '
'; $submiterrormsg .= "Re-select Photo1". '
'; endif; else: echo '$photo1 = '. $photo1_name; $submiterrormsg .= "Photo1 invalid image type". '
'; $submiterrormsg .= "Re-select Photo1". '
'; endif; else: $submiterrormsg .= "At least one photo required". '
'; $submiterrormsg .= "Re-select Photo1". '
'; endif; $photo2_name = $_FILES['photo2']['name']; $photo2_type = $_FILES['photo2']['type']; $photo2_size = $_FILES['photo2']['size']; $photo2_tmp_name = $_FILES['photo2']['tmp_name']; $photo2_error = $_FILES['photo2']['error']; if ($photo2_name): if (($photo2_type == "image/gif") || ($photo2_type == "image/jpeg") || ($photo2_type == "image/pjpeg")): if ($photo2_size < $photo_size): if ($photo2_error > 0): $submiterrormsg .= "Error: " . $photo2_error. '
'; $submiterrormsg .= "Re-select Photo2". '
'; else: # next endif; else: $submiterrormsg .= "Photo2 file size 512k max". '
'; $submiterrormsg .= "Re-select Photo2". '
'; endif; else: $submiterrormsg .= "Photo2 invalid image type". '
'; $submiterrormsg .= "Re-select Photo2". '
'; endif; endif; if ($submiterrormsg): show_form($item,$manuf,$price,$fsdesc,$email,$fname,$lname,$addr1,$addr2,$city,$st,$zip, $hpcode,$hpprefix,$hphone,$ccode,$cprefix,$cphone,$wcode,$wprefix,$wphone,$wpext, $photo1_name,$photo2_name); else: #2 $recid = 0; build_db_record($status,$emver,$item,$manuf,$fsdesc,$price,$photo1_name,$photo2_name,$subdate,$email,$fname,$lname,$addr1, $addr2,$city,$st,$zip,$hpcode,$hpprefix,$hphone,$ccode,$cprefix,$cphone,$wcode,$wprefix,$wphone,$wpext); if ($photo1_name): if (file_exists("forsale_images/". $recid. '_'. $photo1_name)): $to = "webmaster@panamacitybassmasters.com"; $subject = "PCBM - photo1_name ". $recid. $photo1_name. " already exists. "; $message = ("recid = ". $recid. "\n" ."item = ". $item. "\n" ."manuf = ". $manuf. "\n" ."price = ". $price. "\n" ."fsdesc = ". $fsdesc. "\n" ."email = ". $email. "\n" ."fname = ". $fname. "\n" ."lname = ". $lname. "\n" ."addr1 = ". $addr1. "\n" ."addr2 = ". $addr2. "\n" ."city = ". $city. "\n" ."st = ". $st. "\n" ."zip = ". $zip. "\n" ."hphone = ". $hpcode. ".". $hpprefix. ".". $hphone. "\n" ."cphone = ". $ccode. ".". $cprefix. ".". $cphone. "\n" ."wphone = ". $wcode. ".". $wprefix. ".". $wphone. " x ". $wpext. "\n" ."photo1_name = ". $photo1_name. "\n" ."photo2_name = ". $photo2_name. "\n" ); mail($to, $subject, $message); else: # echo $photo1_tmp_name. ' - tmp_name'. '
'; if (move_uploaded_file($_FILES['photo1']['tmp_name'], 'forsale_images/'. $recid. '_'. $photo1_name)): # echo $recid. $photo1_name. " Added to forsale_images". '
'; else: echo "Photo1 move upload failed error - ". $photo1_error. '
'; endif; endif; endif; if ($photo2_name): if (file_exists("forsale_images/". $recid. '_'. $photo2_name)): $to = "webmaster@panamacitybassmasters.com"; $subject = "PCBM - photo2_name ". $recid. $photo2_name. " already exists. "; $message = ("recid = ". $recid. "\n" ."item = ". $item. "\n" ."manuf = ". $manuf. "\n" ."price = ". $price. "\n" ."fsdesc = ". $fsdesc. "\n" ."email = ". $email. "\n" ."fname = ". $fname. "\n" ."lname = ". $lname. "\n" ."addr1 = ". $addr1. "\n" ."addr2 = ". $addr2. "\n" ."city = ". $city. "\n" ."st = ". $st. "\n" ."zip = ". $zip. "\n" ."hphone = ". $hpcode. ".". $hpprefix. ".". $hphone. "\n" ."cphone = ". $ccode. ".". $cprefix. ".". $cphone. "\n" ."wphone = ". $wcode. ".". $wprefix. ".". $wphone. " x ". $wpext. "\n" ."photo1_name = ". $photo1_name. "\n" ."photo2_name = ". $photo2_name. "\n" ); mail($to, $subject, $message); else: if (move_uploaded_file($_FILES['photo2']['tmp_name'], 'forsale_images/'. $recid. '_'. $photo2_name)): # echo $recid. $photo2_name. " Added to forsale_images". '
'; else: echo "Photo2 move upload failed error - ". $_FILES['photo2']['error']; endif; endif; endif; if ($photo1_name && $submit_hit): require_once('cgi-bin/String_Encrypt.php'); require_once('cgi-bin/class.phpmailer.php'); $mail = new PHPMailer(); $mail->IsMail(); // set mailer to use PHPMAIL $mail->From = "jim.rains@panamacitybassmasters.com"; $mail->FromName = "PanamaCityBassmasters.com"; $mail->AddAddress("$email", "$fname. ' '. $lname"); $mail->AddReplyTo("jim.rains@panamacitybassmasters.com", "Information"); $mail->WordWrap = 55; // set word wrap to 55 characters $mail->IsHTML(true); // set email format to HTML $subject = "Email verification and submitted info to PanamaCityBassmasters.com \"For Sale\" webpage "; $data = $recid. '&f=woiuerui&d=34568'; #echo "data = ". $data. "
"; $answ = Encrypt($data,$key); /* $ans = PackCrypt($data,"",""); $answ = $ans['output']; print_r($ans); echo '
'; */ $message = '
' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'

Panama City Bassmasters

The following information was submitted to'. '
' . 'PanamaCityBassmasters.com for inclusion in its "For Sale" webpage.'. '
'. '
' . 'Please verify the following information for any corrections and if required please email them to jim.rains@panamacitybassmasters.com

' . 'After your email address is validated, your item for sale will be reviewed and added to'. '
' . 'PanamaCityBassmasters.com "For Sale" webpage within 24 to 48 hours.'. '
'. '
' . 'You must click the "Email Address Validation" link below to validate your email'. '
' . 'address before your item will be reviewed or added to the website
.'. '
'. '
' . 'Email Address Validation' . '
  
Item for sale ='. $category_array[$item]. '
Manufacturer ='. $manuf_array[$manuf]. '
Price ='. '$'. number_format($price, 2). '
Description ='. $fsdesc = stripslashes($fsdesc). '
Email ='. $email. '
First name ='. $fname. '
Last name ='. $lname. '
Address 1 ='. $addr1. '
Address 2 ='. $addr2. '
City ='. $city. '
St ='. $st. '
Zip ='. $zip. '
Home phone ='. $hpcode. ".". $hpprefix. ".". $hphone. '
Cell phone ='. $ccode. ".". $cprefix. ".". $cphone. '
Work phone ='. $wcode. ".". $wprefix. ".". $wphone. " x ". $wpext. '
Photo1_name ='. $photo1_name. '
Photo2_name ='. $photo2_name. '
  
  
  
' .'
' ; $mail->Subject = $subject; $mail->Body = $message; $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; if(!$mail->Send()) { echo "Message could not be sent.". '
'; echo "Mailer Error: " . $mail->ErrorInfo; exit; } // Respond to user "Message has been sent"; echo '
'. '
'. '
'. "
" . ''. "You must respond to the email validation sent to your email address". '
' . "before your item will be reviewed or added.". '
'. '
'. '
' . "After email validation, your item will be reviewed for addition to the". '
' . "Panama City Bassmasters \"For Sale\" page within 24 to 48 hours.". '
'. '
' . ''. "Please email us when your item has sold.". ''. '
' . 'jim.rains@panamacitybassmasters.com'. '
'. '
' . "Thank You". '
' . "PanamaCityBassmasters.com" . "
"; endif; endif; #2 endif; #1 ?>
Hit Counter
Visitors since October 28, 2007
[pcbm_copy_right.htm]