Submit a free classified ad

Name
E-mail
Confirm E-mail
Land line Phone #
Customer Type
Ad Category
Ad content
Expected price per unit in USD

3,
‘post_category’ => array($_REQUEST[‘newad_type’]),
‘post_content’ => $_REQUEST[‘newad_content’],
‘post_status’ => ‘draft’,
‘post_title’ => $_REQUEST[‘newad_content’]
);

$post_id=wp_insert_post( $my_post );

//Set things to EST, in case we’re not already there.
date_default_timezone_set(‘EST5EDT’);
if ($_REQUEST[‘newad_cust_type’] == ‘Reseller’){
$isreseller = ‘c’;
}
$auto_code = date(‘mdy’).$isreseller.date(‘Hi’);

if( !is_wp_error($post_id) && $post_id > 0 ) {
add_post_meta($post_id, ‘Contact_Email’, $_REQUEST[‘newad_contactemail’]);
add_post_meta($post_id, ‘Contact_Name’, $_REQUEST[‘newad_contactname’]);
add_post_meta($post_id, ‘Contact_Phone’, $_REQUEST[‘newad_contactphone’]);
add_post_meta($post_id, ‘Expected_PPU’, $_REQUEST[‘newad_ppu’]);
add_post_meta($post_id, ‘Contact_Customer_Type’, $_REQUEST[‘newad_cust_type’]);
add_post_meta($post_id, ‘ID_Code’, $auto_code);
//e-mail a few people

$cat_data = get_term_by( ‘id’, $_REQUEST[‘newad_type’], ‘category’,’ARRAY_A’);

$body= <<

Thank you!

Thank you very much for submitting your ad. We appreciate your business! Our staff will follow up via e-mail shortly.

there\’s been an error!’;
}

}
?>