$step = 2; } elseif ($steps == "listing-add-form-three") { $step = 3; } elseif ($steps == "listing-add-form-four") { $step = 4; } elseif ($steps == "listing-add-form-five") { $step = 5; } $already_step = get_post_meta($pid, 'imic_plugin_ads_steps', true); if ($already_step < $step) { //update_post_meta($pid,'imic_plugin_ads_steps',$step); } $i = 1; ////////// check input method and browser ////////////// $files = array(); if (Browser::isHTML5() && FRONT_MEDIA_ALLOW::check_file_input_method() == 0) { $files = isset($_FILES['images']) ? $_FILES['images'] : ''; } else { $list_photo = $_REQUEST['listing_photos']; foreach ($list_photo as $photo) { if (!in_array($photo, $attached_images)) { if ($i == 1) { update_post_meta($pid, '_thumbnail_id', $photo); } add_post_meta($pid, 'imic_plugin_vehicle_images', $photo, false); } $i++; } } ///////////////////////// if (!empty($files)) {
<?php /* Template Name: Add Listing */ get_header(); global $imic_options; $paypal_site = ''; $opt_plans = $imic_options['opt_plans']; $listing_status_set = $imic_options['opt_listing_status']; $file_upload = isset($imic_options['filetype_required']) ? $imic_options['filetype_required'] : '0'; $select_plan = __('Please select payment plan', 'framework'); $successfully_saved = __('Successfully Saved.', 'framework'); $upload_images = __('Please upload images.', 'framework'); $finish_tabs = __('Please complete previous tabs.', 'framework'); wp_localize_script('imic_add_listing', 'values', array('ajaxurl' => admin_url('admin-ajax.php'), 'tmpurl' => get_template_directory_uri(), 'plans' => $opt_plans, 'isDefault' => FRONT_MEDIA_ALLOW::check_file_input_method(), 'fileupload' => $file_upload)); //Get Page Banner Type if (is_home()) { $id = get_option('page_for_posts'); } else { $id = get_the_ID(); } $page_header = get_post_meta($id, 'imic_pages_Choose_slider_display', true); if ($page_header == 3) { get_template_part('pages', 'flex'); } elseif ($page_header == 4) { get_template_part('pages', 'nivo'); } elseif ($page_header == 5) { get_template_part('pages', 'revolution'); } elseif ($page_header == 1 || $page_header == 2) { get_template_part('pages', 'banner');