• 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
سوال در مورد فرم
#1
با سلام به همه دوستان
سایت یه شرکتی که از وردپرس استفاده میکنه یه صفحه داره واسه افزودن کالا که الان کداش به این صورت تعریف شده
کد:
<?php
/**
* Custom Forms related functions.
*
* @package ClassiPress\Custom-Forms
* @author  AppThemes
* @since   ClassiPress 3.4
*/


/**
* Returns custom form id based on category id passed in.
*
* @param int $category_id
*
* @return int
*/
function cp_get_form_id( $category_id ) {
    global $wpdb;

    if ( ! $category_id ) {
        return false;
    }

    // so lets search for a catid match and return the id if found
    $sql = "SELECT ID, form_cats FROM $wpdb->cp_ad_forms WHERE form_status = 'active'";

    $results = $wpdb->get_results( $sql );

    if ( $results ) {

        foreach ( $results as $result ) {

            // put the form_cats into an array
            $catarray = unserialize( $result->form_cats );
            if ( ! is_array( $catarray ) ) {
                continue;
            }

            // now search the array for the ad catid
            if ( in_array( $category_id, $catarray ) ) {
                return $result->ID;
            }

        }

    }

    return false;
}


/**
* Returns form fields for given form ID.
*
* @param int $form_id (optional)
*
* @return array
*/
function cp_get_custom_form_fields( $form_id = false ) {
    global $wpdb;

    if ( ! $form_id ) {
        // get default custom form fields
        $sql = "SELECT * FROM $wpdb->cp_ad_fields WHERE field_core = '1' ORDER BY field_id asc";

    } else {
        // get custom form fields for given form ID
        $sql = $wpdb->prepare( "SELECT * "
            . "FROM $wpdb->cp_ad_fields f "
            . "INNER JOIN $wpdb->cp_ad_meta m "
            . "ON f.field_id = m.field_id "
            . "WHERE m.form_id = %d "
            . "ORDER BY m.field_pos asc",
            $form_id );

    }

    $form_fields = $wpdb->get_results( $sql );

    if ( $form_fields ) {
        return $form_fields;
    }

    return array();
}


/**
* Builds and displays ad submission form based on passed form fields.
*
* @param array $results
* @param object $post (optional)
*
* @return void
*/
if ( ! function_exists( 'cp_formbuilder' ) ) {
    function cp_formbuilder( $results, $post = false ) {
        global $cp_options;

        $custom_fields_array = array();

        foreach ( $results as $result ) {

            // external plugins can modify or disable field
            $result = apply_filters( 'cp_formbuilder_field', $result, $post );
            if ( ! $result ) {
                continue;
            }

            if ( appthemes_str_starts_with( $result->field_name, 'cp_' ) ) {
                $custom_fields_array[] = $result->field_name;
            }
            $post_meta_val = ( $post ) ? get_post_meta($post->ID, $result->field_name, true) : false;
    ?>

            <li id="list_<?php echo esc_attr( $result->field_name ); ?>">
                <div class="labelwrapper">
                    <label><?php echo esc_html( translate( $result->field_label, APP_TD ) ); ?> <?php if ( $result->field_req ) echo '<span class="colour">(*)</span>'; ?></label>
                </div>

                <?php
                    $show_tooltip = !empty( $result->field_tooltip );

                    if ( $show_tooltip ) {
                        echo html( 'a href="#" tip="'.esc_attr( translate( $result->field_tooltip, APP_TD ) ) .'" tabindex="999"', html( 'div class="dashicons-before helpico"', '&nbsp;' ) );
                    } else {

                    }

                    switch ( $result->field_type ) {

                        case 'text box':

                            if ( isset( $_POST[ $result->field_name ] ) ) {
                                $value = wp_kses_post( appthemes_clean( $_POST[ $result->field_name ] ) );
                            } elseif ( $result->field_name == 'post_title' && $post ) {
                                $value = $post->post_title;
                            } elseif ( $result->field_name == 'tags_input' && $post ) {
                                $value = rtrim( trim( cp_get_the_term_list( $post->ID, APP_TAX_TAG ) ), ',' );
                            } else {
                                $value = $post_meta_val;
                            }

                            $field_class = ( $result->field_req ) ? 'text required' : 'text';
                            if ( 'cp_price' == $result->field_name && $cp_options->clean_price_field ) {
                                $field_class .= ' number';
                            }
                            $field_minlength = ( empty( $result->field_min_length ) ) ? '0' : $result->field_min_length;
                            $args = array( 'value' => $value, 'name' => $result->field_name, 'id' => $result->field_name, 'type' => 'text', 'class' => $field_class, 'minlength' => $field_minlength );
                            $args = apply_filters( 'cp_formbuilder_' . $result->field_name, $args, $result, $post );

                            echo html( 'input', $args );

                            break;

                        case 'drop-down':

                            $options = explode( ',', $result->field_values );
                            $options = array_map( 'trim', $options );
                            $html_options = '';

                            $html_options .= html( 'option', array( 'value' => '' ), __( '-- Select --', APP_TD ) );
                            foreach ( $options as $option ) {
                                $args = array( 'value' => $option );
                                if ( $option == $post_meta_val ) {
                                    $args['selected'] = 'selected';
                                }
                                $args = apply_filters( 'cp_formbuilder_' . $result->field_name . '_option', $args, $result, $post );
                                $html_options .= html( 'option', $args, $option );
                            }

                            $field_class = ( $result->field_req ) ? 'dropdownlist required' : 'dropdownlist';
                            $args = array( 'name' => $result->field_name, 'id' => $result->field_name, 'class' => $field_class );
                            $args = apply_filters( 'cp_formbuilder_' . $result->field_name, $args, $result, $post );

                            echo html( 'select', $args, $html_options );

                            break;

                        case 'text area':

                            if ( isset( $_POST[ $result->field_name ] ) ) {
                                $value = wp_kses_post( appthemes_clean( $_POST[ $result->field_name ] ) );
                            } elseif ( $result->field_name == 'post_content' && $post ) {
                                $value = $post->post_content;
                            } else {
                                $value = $post_meta_val;
                            }

                            $field_class = ( $result->field_req ) ? 'required' : '';
                            $field_minlength = ( empty( $result->field_min_length ) ) ? '15' : $result->field_min_length;
                            $args = array( 'value' => $value, 'name' => $result->field_name, 'id' => $result->field_name, 'rows' => '8', 'cols' => '40', 'class' => $field_class, 'minlength' => $field_minlength );
                            $args = apply_filters( 'cp_formbuilder_' . $result->field_name, $args, $result, $post );
                            $value = $args['value'];
                            unset( $args['value'] );

                            if ( $cp_options->allow_html && ! wp_is_mobile() ) {
                                cp_editor( $value, $args );
                            } else {
                                echo html( 'textarea', $args, esc_textarea( $value ) );
                            }

                            break;

                        case 'radio':

                            $options = explode( ',', $result->field_values );
                            $options = array_map( 'trim', $options );

                            $html_radio = '';
                            $html_options = '';

                            if ( ! $result->field_req ) {
                                $args = array( 'value' => '', 'type' => 'radio', 'class' => 'radiolist', 'name' => $result->field_name, 'id' => $result->field_name );
                                if ( empty( $post_meta_val ) ) {
                                    $args['checked'] = 'checked';
                                }
                                $args = apply_filters( 'cp_formbuilder_' . $result->field_name, $args, $result, $post );
                                $html_radio = html( 'input', $args ) . '&nbsp;&nbsp;' . __( 'None', APP_TD );
                                $html_options .= html( 'li', array(), $html_radio );
                            }

                            foreach ( $options as $option ) {
                                $field_class = ( $result->field_req ) ? 'radiolist required' : 'radiolist';
                                $args = array( 'value' => $option, 'type' => 'radio', 'class' => $field_class, 'name' => $result->field_name, 'id' => $result->field_name );
                                if ( $option == $post_meta_val ) {
                                    $args['checked'] = 'checked';
                                }
                                $args = apply_filters( 'cp_formbuilder_' . $result->field_name, $args, $result, $post );
                                $html_radio = html( 'input', $args ) . '&nbsp;&nbsp;' . $option;
                                $html_options .= html( 'li', array(), $html_radio );
                            }

                            echo html( 'ol', array( 'class' => 'radios' ), $html_options );

                            break;

                        case 'checkbox':

                            $post_meta_val = ( $post ) ? get_post_meta( $post->ID, $result->field_name, false ) : array();
                            $options = explode( ',', $result->field_values );
                            $options = array_map( 'trim', $options );
                            $optionCursor = 1;

                            $html_checkbox = '';
                            $html_options = '';

                            foreach ( $options as $option ) {
                                $field_class = ( $result->field_req ) ? 'checkboxlist required' : 'checkboxlist';
                                $args = array( 'value' => $option, 'type' => 'checkbox', 'class' => $field_class, 'name' => $result->field_name . '[]', 'id' => $result->field_name . '_' . $optionCursor++ );
                                if ( in_array( $option, $post_meta_val ) ) {
                                    $args['checked'] = 'checked';
                                }
                                $args = apply_filters( 'cp_formbuilder_' . $result->field_name, $args, $result, $post );
                                $html_checkbox = html( 'input', $args ) . '&nbsp;&nbsp;' . $option;
                                $html_options .= html( 'li', array(), $html_checkbox );
                            }

                            echo html( 'ol', array( 'class' => 'checkboxes' ), $html_options );

                            break;

                    }
                    ?>

            </li>
    <?php

            echo html( 'div', array( 'class' => 'clr' ) );

        }

        // put all the custom field names into an hidden field so we can process them on save
        $custom_fields_vals = implode( ',', $custom_fields_array );
        echo html( 'input', array( 'type' => 'hidden', 'name' => 'custom_fields_vals', 'value' => $custom_fields_vals ) );

        cp_action_formbuilder( $results, $post );
    }
}


/**
* Displays preview of submitted ad listing.
*
* @param array $results
* @param array $postvals
*
* @return void
*/
function cp_formbuilder_review( $results, $postvals ) {
    global $cp_options;

    $category = get_term_by( 'id', $postvals['cat'], APP_TAX_CAT );
?>

    <li>
        <div class="labelwrapper">
            <label><strong><?php _e( 'Category:', APP_TD ); ?></strong></label>
        </div>
        <div class="review"><?php echo $category->name; ?></div>
        <div class="clr"></div>
    </li>

    <?php
        foreach( $results as $result ):

            // external plugins can modify or disable field
            $result = apply_filters( 'cp_formbuilder_review_field', $result );
            if ( ! $result ) {
                continue;
            }
    ?>
            <li>
                <div class="labelwrapper">
                    <label><strong><?php echo esc_html( translate( $result->field_label, APP_TD ) ); ?>:</strong></label>
                </div>
                <div class="review">

                    <?php
                        // text areas should display formatting
                        // other fields should be stripped
                        if ( $result->field_type == 'text area' ) {
                            $t = $postvals[ $result->field_name ];
                            if ( ! $cp_options->allow_html ) {
                                $t = strip_tags( $t );
                            }
                            echo wpautop( $t );
                        } else if ( $result->field_type == 'checkbox' ) {
                            if ( isset( $postvals[ $result->field_name ] ) && is_array( $postvals[ $result->field_name ] ) )
                                echo strip_tags( implode( ", ", $postvals[ $result->field_name ] ) );
                        } else {
                            echo strip_tags( $postvals[ $result->field_name ] );
                        }
                    ?>

                </div>
                <div class="clr"></div>
            </li>
<?php
    endforeach;

}


/**
* Displays form for submitting ad listing based on the category id.
*
* @param int $category_id
* @param object $listing
*
* @return void
*/
if ( ! function_exists( 'cp_show_form' ) ) {
    function cp_show_form( $category_id, $listing ) {

        $form_id = cp_get_form_id( $category_id );
        $form_fields = cp_get_custom_form_fields( $form_id );

        if ( $form_fields ) {

            // loop through the custom form fields and display them
            cp_formbuilder( $form_fields, $listing );

        } else {

            // display the default form since there isn't a custom form for this cat
            cp_show_default_form( $listing );

        }

        // show the image, featured ad, payment type and other options
        cp_other_fields( $listing->ID );

    }
}


/**
* Displays default form for submitting ad listing.
*
* @param object $listing
*
* @return void
*/
if ( ! function_exists( 'cp_show_default_form' ) ) {
    function cp_show_default_form( $listing ) {

        $form_fields = cp_get_custom_form_fields();

        if ( $form_fields ) {

            // loop through the custom form fields and display them
            cp_formbuilder( $form_fields, $listing );

        } else {

            echo __( 'ERROR: no results found for the default ad form.', APP_TD ) . '<br />';

        }

    }
}


/**
* Displays preview of submitted ad listing.
*
* @param array $postvals
*
* @return void
*/
function cp_show_review( $postvals ) {

    if ( empty( $postvals['fid'] ) ) {
        // get default form fields
        $form_fields = cp_get_custom_form_fields();
    } else {
        $form_fields = cp_get_custom_form_fields( $postvals['fid'] );
    }

    if ( $form_fields ) {

        // loop through the custom form fields and display them
        cp_formbuilder_review( $form_fields, $postvals );

    } else {

        printf( __( 'ERROR: The form template for form ID %s does not exist or the session variable is empty.', APP_TD ), $postvals['fid'] );

    }
?>

    <hr class="bevel" />
    <div class="clr"></div>


    <li>
        <div class="labelwrapper">
            <label><?php _e( 'Ad Listing Fee:', APP_TD ); ?></label>
        </div>
        <div id="review"><?php if ( cp_payments_is_enabled() ) { appthemes_display_price( $postvals['cp_sys_ad_listing_fee'] ); } else { _e( 'FREE', APP_TD ); } ?></div>
        <div class="clr"></div>
    </li>

    <?php if ( ! empty( $postvals['featured_ad'] ) ) { ?>
        <li>
            <div class="labelwrapper">
                <label><?php _e( 'Featured Listing Fee:', APP_TD ); ?></label>
            </div>
            <div id="review"><?php appthemes_display_price( $postvals['cp_sys_feat_price'] ); ?></div>
            <div class="clr"></div>
        </li>
    <?php } ?>

    <?php do_action( 'cp_review_premium_options' ); ?>

    <?php if ( isset( $postvals['membership_pack'] ) ) { ?>
        <li>
            <div class="labelwrapper">
                <label><?php _e( 'Membership:', APP_TD ); ?></label>
            </div>
            <div id="review"><?php echo cp_get_membership_package_benefit_text( $postvals['membership_pack'] ); ?></div>
            <div class="clr"></div>
        </li>
    <?php } ?>

    <hr class="bevel-double" />
    <div class="clr"></div>

    <li>
        <div class="labelwrapper">
            <label><?php _e( 'Total Amount Due:', APP_TD ); ?></label>
        </div>
        <div id="review"><strong>
        <?php
            if ( cp_payments_is_enabled() ) appthemes_display_price( $postvals['cp_sys_total_ad_cost'] ); else _e( '--', APP_TD );
        ?>
        </strong></div>
        <div class="clr"></div>
    </li>

    <?php
        if ( cp_payments_is_enabled() ) {
            do_action( 'appthemes_purchase_fields' );
        }
    ?>

<?php
}


/**
* Displays the non-custom fields below the main listing submission form.
*
* @param int $listing_id
*
* @return void
*/
function cp_other_fields( $listing_id ) {
    global $cp_options;

    // are images on ads allowed
    if ( $cp_options->ad_images ) {
        if ( appthemes_plupload_is_enabled() ) {

            echo html( 'div class="ad-details-images-sep"', '&nbsp;' );

            appthemes_plupload_form( $listing_id );

        } else {
            $images_count = cp_get_ad_images( $listing_id );
            cp_ad_edit_image_input_fields( $images_count );
        }
    }

    // show the chargeable options if enabled
    if ( cp_payments_is_enabled() ) {

        // show the featured ad box if enabled
        if ( $cp_options->sys_feat_price ) {
        ?>

            <div class="ad-details-featured-sep"></div>

            <li id="list_featured_ad" class="withborder">
                <div class="labelwrapper">
                    <label><?php printf( __( 'Featured Listing %s', APP_TD ), appthemes_get_price( $cp_options->sys_feat_price ) ); ?></label>
                </div>
                <div class="clr"></div>
                <input name="featured_ad" value="1" type="checkbox" <?php checked( is_sticky( $listing_id ) ); ?> />
                <?php _e( 'Your listing will appear in the featured slider section at the top of the front page.', APP_TD ); ?>
                <div class="clr"></div>
            </li>

        <?php
        }

        do_action( 'cp_form_premium_options' );

        if ( $cp_options->price_scheme == 'single' ) {
        ?>

            <li>
                <div class="labelwrapper">
                    <label><?php _e( 'Ad Package:', APP_TD ); ?></label>
                </div>

                <?php
                // go get all the active ad packs and create a drop-down of options
                $packages = cp_get_listing_packages();

                if ( $packages ) {
                ?>

                    <select name="ad_pack_id" class="dropdownlist required">

                    <?php
                        foreach ( $packages as $package ) {
                            // external plugins can modify or disable field
                            $result = apply_filters( 'cp_package_field', $package, 'ad' );
                            if ( ! $package ) {
                                continue;
                            }
                    ?>
                            <option value="<?php echo esc_attr( $package->ID ); ?>"><?php echo esc_attr( $package->pack_name ); ?></option>
                        <?php } ?>

                    </select>

                <?php
                } else {
                    _e( 'Error: no ad pack has been defined. Please contact the site administrator.', APP_TD );
                }
                ?>

                <div class="clr"></div>
            </li>

        <?php } ?>

    <?php

    }

}


/**
* Displays image upload fields on create ad page.
*
* @return void
*/
function cp_image_input_fields() {
    global $cp_options;

    for ( $i = 0; $i < $cp_options->num_images; $i++ ) {
        $required = ( $cp_options->require_images && $i == 0 ) ? 'required' : '';
?>
        <li>
            <div class="labelwrapper">
                <label><?php printf( __( 'Image %s', APP_TD ), $i+1 ); ?>:</label>
            </div>
            <input type="file" id="upload<?php echo $i+1; ?>" name="image[]" value="<?php if ( isset( $_POST['image' . $i ] ) ) echo $_POST['image' . $i ]; ?>" class="fileupload <?php echo $required; ?>" onchange="enableNextImage(this, <?php echo $i+2; ?>);" <?php if ( $i > 0 ) echo 'disabled="disabled"'; ?> >
            <div class="clr"></div>
        </li>
<?php
    }
?>

    <p class="light"><?php printf( __( '%sKB max file size per image', APP_TD ), $cp_options->max_image_size ); ?></p>
    <div class="clr"></div>

<?php
}


/**
* Displays all the custom fields on the single ad page, by default they are placed in the list area.
*
* @param int $post_id
* @param int $category_id
* @param string $location (optional)
*
* @return void
*/
if ( ! function_exists( 'cp_get_ad_details' ) ) {
    function cp_get_ad_details( $post_id, $category_id, $location = 'list' ) {

        $form_id = cp_get_form_id( $category_id );
        $form_fields = cp_get_custom_form_fields( $form_id );

        $post = get_post( $post_id );
        if ( ! $post ) {
            return;
        }

        if ( ! $form_fields ) {
            _e( 'No ad details found.', APP_TD );
            return;
        }

        // allows to hook before ad details
        cp_action_before_ad_details( $form_fields, $post, $location );

        foreach ( $form_fields as $field ) {

            // external plugins can modify or disable field
            $field = apply_filters( 'cp_ad_details_field', $field, $post, $location );
            if ( ! $field ) {
                continue;
            }

            $disallow_fields = array( 'cp_price', 'cp_currency' );
            if ( in_array( $field->field_name, $disallow_fields ) ) {
                continue;
            }

            $post_meta_val = get_post_meta( $post->ID, $field->field_name, true );
            if ( empty( $post_meta_val ) ) {
                continue;
            }

            if ( $location == 'list' ) {
                if ( $field->field_type == 'text area' ) {
                    continue;
                }

                if ( $field->field_type == 'checkbox' ) {
                    $post_meta_val = get_post_meta( $post->ID, $field->field_name, false );
                    $post_meta_val = implode( ", ", $post_meta_val );
                }

                $args = array( 'value' => $post_meta_val, 'label' => $field->field_label, 'id' => $field->field_name, 'class' => '' );
                $args = apply_filters( 'cp_ad_details_' . $field->field_name, $args, $field, $post, $location );

                if ( $args ) {
                    echo '<li id="' . $args['id'] . '" class="' . $args['class'] . '"><span>' . esc_html( translate( $args['label'], APP_TD ) ) . ':</span> ' . appthemes_make_clickable( $args['value'] ) . '</li>';
                }

            } elseif ( $location == 'content' ) {
                if ( $field->field_type != 'text area' ) {
                    continue;
                }
                $args = array( 'value' => $post_meta_val, 'label' => $field->field_label, 'id' => $field->field_name, 'class' => 'custom-text-area dotted' );
                $args = apply_filters( 'cp_ad_details_' . $field->field_name, $args, $field, $post, $location );

                if ( $args ) {
                    echo '<div id="' . $args['id'] . '" class="' . $args['class'] . '"><h3>' . esc_html( translate( $args['label'], APP_TD ) ) . '</h3> ' . wpautop( appthemes_make_clickable( $args['value'] ) ) . '</div>';
                }

            }
        }

        // allows to hook after ad details
        cp_action_after_ad_details( $form_fields, $post, $location );
    }
}


ولی ما یه فرم جدا با html تعریف کردیم که میخوایم جایگزین فرم این صفحه کنیم. با این کد
کد:
<style>
table{
    font-family: b yekan;
    font-size:12px;
    }
    .field{
    bindentr:1px solid #CCC;
    box-shadow:1px 1px 1px #666;
    bindentr-radius:2px;    
    
}
.field:hover{
    bindentr-color:#33ccff;
}
.field:focus{
    bindentr-color:#006;
    background-color:#effcfc;
}
        
</style>
</head>

<body>
<table align="right"; style="direction:rtl;" cellspacing="10" >
<form method="POST" >
<tr>
<td  ><label >اسم محصول</label></td>
<td ><input class="field" type="text" name="productname" required="required" style="width:200px;"   ></td>
</tr>
<tr>
<td><label style="padding-left:50px">کشور سازنده</label></td>
<td><select class="field" name="buildercountry" required="required"  style="width:150px; height:23px;">
<option value="">انتخاب</option>
<option value="Afganistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Anguilla">Anguilla</option>
<option value="Antigua &amp; Barbuda">Antigua &amp; Barbuda</option>
<option value="Argentina">Argentina</option>
<option value="Armenia">Armenia</option>
<option value="Aruba">Aruba</option>
<option value="Australia">Australia</option>
<option value="Austria">Austria</option>
<option value="Azerbaijan">Azerbaijan</option>
<option value="Bahamas">Bahamas</option>
<option value="Bahrain">Bahrain</option>
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
<option value="Belize">Belize</option>
<option value="Benin">Benin</option>
<option value="Bermuda">Bermuda</option>
<option value="Bhutan">Bhutan</option>
<option value="Bolivia">Bolivia</option>
<option value="Bonaire">Bonaire</option>
<option value="Bosnia &amp; Herzegovina">Bosnia &amp; Herzegovina</option>
<option value="Botswana">Botswana</option>
<option value="Brazil">Brazil</option>
<option value="British Indian Ocean Ter">British Indian Ocean Ter</option>
<option value="Brunei">Brunei</option>
<option value="Bulgaria">Bulgaria</option>
<option value="Burkina Faso">Burkina Faso</option>
<option value="Burundi">Burundi</option>
<option value="Cambodia">Cambodia</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Canary Islands">Canary Islands</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Cayman Islands">Cayman Islands</option>
<option value="Central African Republic">Central African Republic</option>
<option value="Chad">Chad</option>
<option value="Channel Islands">Channel Islands</option>
<option value="Chile">Chile</option>
<option value="China">China</option>
<option value="Christmas Island">Christmas Island</option>
<option value="Cocos Island">Cocos Island</option>
<option value="Colombia">Colombia</option>
<option value="Comoros">Comoros</option>
<option value="Congo">Congo</option>
<option value="Cook Islands">Cook Islands</option>
<option value="Costa Rica">Costa Rica</option>
<option value="Cote DIvoire">Cote D'Ivoire</option>
<option value="Croatia">Croatia</option>
<option value="Cuba">Cuba</option>
<option value="Curaco">Curacao</option>
<option value="Cyprus">Cyprus</option>
<option value="Czech Republic">Czech Republic</option>
<option value="Denmark">Denmark</option>
<option value="Djibouti">Djibouti</option>
<option value="Dominica">Dominica</option>
<option value="Dominican Republic">Dominican Republic</option>
<option value="East Timor">East Timor</option>
<option value="Ecuador">Ecuador</option>
<option value="Egypt">Egypt</option>
<option value="El Salvador">El Salvador</option>
<option value="Equatorial Guinea">Equatorial Guinea</option>
<option value="Eritrea">Eritrea</option>
<option value="Estonia">Estonia</option>
<option value="Ethiopia">Ethiopia</option>
<option value="Falkland Islands">Falkland Islands</option>
<option value="Faroe Islands">Faroe Islands</option>
<option value="Fiji">Fiji</option>
<option value="Finland">Finland</option>
<option value="France">France</option>
<option value="French Guiana">French Guiana</option>
<option value="French Polynesia">French Polynesia</option>
<option value="French Southern Ter">French Southern Ter</option>
<option value="Gabon">Gabon</option>
<option value="Gambia">Gambia</option>
<option value="Georgia">Georgia</option>
<option value="Germany">Germany</option>
<option value="Ghana">Ghana</option>
<option value="Gibraltar">Gibraltar</option>
<option value="Great Britain">Great Britain</option>
<option value="Greece">Greece</option>
<option value="Greenland">Greenland</option>
<option value="Grenada">Grenada</option>
<option value="Guadeloupe">Guadeloupe</option>
<option value="Guam">Guam</option>
<option value="Guatemala">Guatemala</option>
<option value="Guinea">Guinea</option>
<option value="Guyana">Guyana</option>
<option value="Haiti">Haiti</option>
<option value="Hawaii">Hawaii</option>
<option value="Honduras">Honduras</option>
<option value="Hong Kong">Hong Kong</option>
<option value="Hungary">Hungary</option>
<option value="Iceland">Iceland</option>
<option value="India">India</option>
<option value="Indonesia">Indonesia</option>
<option value="Iran">Iran</option>
<option value="Iraq">Iraq</option>
<option value="Ireland">Ireland</option>
<option value="Isle of Man">Isle of Man</option>
<option value="Israel">Israel</option>
<option value="Italy">Italy</option>
<option value="Jamaica">Jamaica</option>
<option value="Japan">Japan</option>
<option value="Jordan">Jordan</option>
<option value="Kazakhstan">Kazakhstan</option>
<option value="Kenya">Kenya</option>
<option value="Kiribati">Kiribati</option>
<option value="Korea North">Korea North</option>
<option value="Korea Sout">Korea South</option>
<option value="Kuwait">Kuwait</option>
<option value="Kyrgyzstan">Kyrgyzstan</option>
<option value="Laos">Laos</option>
<option value="Latvia">Latvia</option>
<option value="Lebanon">Lebanon</option>
<option value="Lesotho">Lesotho</option>
<option value="Liberia">Liberia</option>
<option value="Libya">Libya</option>
<option value="Liechtenstein">Liechtenstein</option>
<option value="Lithuania">Lithuania</option>
<option value="Luxembourg">Luxembourg</option>
<option value="Macau">Macau</option>
<option value="Macedonia">Macedonia</option>
<option value="Madagascar">Madagascar</option>
<option value="Malaysia">Malaysia</option>
<option value="Malawi">Malawi</option>
<option value="Maldives">Maldives</option>
<option value="Mali">Mali</option>
<option value="Malta">Malta</option>
<option value="Marshall Islands">Marshall Islands</option>
<option value="Martinique">Martinique</option>
<option value="Mauritania">Mauritania</option>
<option value="Mauritius">Mauritius</option>
<option value="Mayotte">Mayotte</option>
<option value="Mexico">Mexico</option>
<option value="Midway Islands">Midway Islands</option>
<option value="Moldova">Moldova</option>
<option value="Monaco">Monaco</option>
<option value="Mongolia">Mongolia</option>
<option value="Montserrat">Montserrat</option>
<option value="Morocco">Morocco</option>
<option value="Mozambique">Mozambique</option>
<option value="Myanmar">Myanmar</option>
<option value="Nambia">Nambia</option>
<option value="Nauru">Nauru</option>
<option value="Nepal">Nepal</option>
<option value="Netherland Antilles">Netherland Antilles</option>
<option value="Netherlands">Netherlands (Holland, Europe)</option>
<option value="Nevis">Nevis</option>
<option value="New Caledonia">New Caledonia</option>
<option value="New Zealand">New Zealand</option>
<option value="Nicaragua">Nicaragua</option>
<option value="Niger">Niger</option>
<option value="Nigeria">Nigeria</option>
<option value="Niue">Niue</option>
<option value="Norfolk Island">Norfolk Island</option>
<option value="Norway">Norway</option>
<option value="Oman">Oman</option>
<option value="Pakistan">Pakistan</option>
<option value="Palau Island">Palau Island</option>
<option value="Palestine">Palestine</option>
<option value="Panama">Panama</option>
<option value="Papua New Guinea">Papua New Guinea</option>
<option value="Paraguay">Paraguay</option>
<option value="Peru">Peru</option>
<option value="Phillipines">Philippines</option>
<option value="Pitcairn Island">Pitcairn Island</option>
<option value="Poland">Poland</option>
<option value="Portugal">Portugal</option>
<option value="Puerto Rico">Puerto Rico</option>
<option value="Qatar">Qatar</option>
<option value="Republic of Montenegro">Republic of Montenegro</option>
<option value="Republic of Serbia">Republic of Serbia</option>
<option value="Reunion">Reunion</option>
<option value="Romania">Romania</option>
<option value="Russia">Russia</option>
<option value="Rwanda">Rwanda</option>
<option value="St Barthelemy">St Barthelemy</option>
<option value="St Eustatius">St Eustatius</option>
<option value="St Helena">St Helena</option>
<option value="St Kitts-Nevis">St Kitts-Nevis</option>
<option value="St Lucia">St Lucia</option>
<option value="St Maarten">St Maarten</option>
<option value="St Pierre &amp; Miquelon">St Pierre &amp; Miquelon</option>
<option value="St Vincent &amp; Grenadines">St Vincent &amp; Grenadines</option>
<option value="Saipan">Saipan</option>
<option value="Samoa">Samoa</option>
<option value="Samoa American">Samoa American</option>
<option value="San Marino">San Marino</option>
<option value="Sao Tome &amp; Principe">Sao Tome &amp; Principe</option>
<option value="Saudi Arabia">Saudi Arabia</option>
<option value="Senegal">Senegal</option>
<option value="Serbia">Serbia</option>
<option value="Seychelles">Seychelles</option>
<option value="Sierra Leone">Sierra Leone</option>
<option value="Singapore">Singapore</option>
<option value="Slovakia">Slovakia</option>
<option value="Slovenia">Slovenia</option>
<option value="Solomon Islands">Solomon Islands</option>
<option value="Somalia">Somalia</option>
<option value="South Africa">South Africa</option>
<option value="Spain">Spain</option>
<option value="Sri Lanka">Sri Lanka</option>
<option value="Sudan">Sudan</option>
<option value="Suriname">Suriname</option>
<option value="Swaziland">Swaziland</option>
<option value="Sweden">Sweden</option>
<option value="Switzerland">Switzerland</option>
<option value="Syria">Syria</option>
<option value="Tahiti">Tahiti</option>
<option value="Taiwan">Taiwan</option>
<option value="Tajikistan">Tajikistan</option>
<option value="Tanzania">Tanzania</option>
<option value="Thailand">Thailand</option>
<option value="Togo">Togo</option>
<option value="Tokelau">Tokelau</option>
<option value="Tonga">Tonga</option>
<option value="Trinidad &amp; Tobago">Trinidad &amp; Tobago</option>
<option value="Tunisia">Tunisia</option>
<option value="Turkey">Turkey</option>
<option value="Turkmenistan">Turkmenistan</option>
<option value="Turks &amp; Caicos Is">Turks &amp; Caicos Is</option>
<option value="Tuvalu">Tuvalu</option>
<option value="Uganda">Uganda</option>
<option value="Ukraine">Ukraine</option>
<option value="United Arab Erimates">United Arab Emirates</option>
<option value="United Kingdom">United Kingdom</option>
<option value="United States of America">United States of America</option>
<option value="Uraguay">Uruguay</option>
<option value="Uzbekistan">Uzbekistan</option>
<option value="Vanuatu">Vanuatu</option>
<option value="Vatican City State">Vatican City State</option>
<option value="Venezuela">Venezuela</option>
<option value="Vietnam">Vietnam</option>
<option value="Virgin Islands (Brit)">Virgin Islands (Brit)</option>
<option value="Virgin Islands (USA)">Virgin Islands (USA)</option>
<option value="Wake Island">Wake Island</option>
<option value="Wallis &amp; Futana Is">Wallis &amp; Futana Is</option>
<option value="Yemen">Yemen</option>
<option value="Zaire">Zaire</option>
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option>
</select></td>
</tr>
<tr>
<td ><label >قیمت (FOB)</label></td>
<td><input class="field" type="text" name="lowprice" required="required" style="width:80px; height:17px; font-size:12px;" placeholder="حداقل"   >
<label><b>~</b></label>
<input  field class="field" type="text" name="highprice" required="required" style="width:80px; height:17px; font-size:12px; "  placeholder= "حداکثر"  >


<label style="margin-right:15px;"> قابل مذاکره</label>
<input class="field" type="checkbox" name="negotiable" value="بلی">
</td >
<tr>
<td ><label>روش های پرداخت</label></td>
<td>



<table>
<tr>


<td><input type="checkbox" name="peymentway[]"  value="D/P"></td>
<td><label>D/P</label></td>

<td><input type="checkbox" name="peymentway[]"  value="D/A"></td>
<td><label>D/A</label></td>

<td><input type="checkbox" name="peymentway[]"  value="L/C"></td>
<td><label>L/C</label></td>
<td><input type="checkbox" name="peymentway[]"  value="T/T"></td>
<td><label>T/T</label></td>
</tr>

<tr>

<td><input type="checkbox" name="peymentway[]"  value="Other"></td>
<td><label>Other</label></td>

<td><input type="checkbox" name="peymentway[]"  value="PayPal"></td>
<td><label>PayPal</label></td>

<td><input type="checkbox" name="peymentway[]"  value="Money Gram"></td>
<td><label>Money Gram</label></td>

<td><input type="checkbox" name="peymentway[]"  value="Western Union"></td>
<td><label>Western Union</label></td>
</tr>

</table>
</td>
</tr>
<tr>
<td ><label >حداقل میزان سفارش</label></td>
<td><input class="field" type="text" required="required" name="indent" style="width:80px;"  >
<select class="field"  name="unit" required="required" style="width:150px; height:21px; margin-right:15px;">
<option value="">انتخاب</option>
<option value="Acre Ampere">Acre Ampere</option><option value="Bag">Bag</option><option value="Barrel">Barrel</option><option value="Box">Box</option><option value="Bushel">Bushel</option><option value="Carton">Carton</option><option value="Case">Case</option><option value="Centimeter">Centimeter</option><option value="Chain">Chain</option><option value="Cubic centimeter">Cubic centimeter</option><option value="Cubic foot">Cubic foot</option><option value="Cubic inch">Cubic inch</option><option value="Cubic meter">Cubic meter</option><option value="Cubic yard">Cubic yard</option><option value="Degrees Celsius">Degrees Celsius</option><option value="Degrees Fahrenheit">Degrees Fahrenheit</option><option value="Dozen">Dozen</option><option value="Dram">Dram</option><option value="Fluid ounce">Fluid ounce</option><option value="Foot">Foot</option><option value="Forty foot container">Forty foot container</option><option value="Furlong">Furlong</option><option value="Gallon">Gallon</option><option value="Gill">Gill</option><option value="Grain">Grain</option><option value="Gram">Gram</option><option value="Gross">Gross</option><option value="Hector">Hector</option><option value="Hertz">Hertz</option><option value="Inch">Inch</option><option value="Kilo ampere">Kilo ampere</option><option value="Kilo gram">Kilo gram</option><option value="Kilo hertz">Kilo hertz</option><option value="Kilo meter">Kilo meter</option><option value="Kilo ohm">Kilo ohm</option><option value="Kilovolt">Kilovolt</option><option value="Kilowatt">Kilowatt</option><option value="Liter">Liter</option><option value="Long ton">Long ton</option><option value="Megahertz">Megahertz</option><option value="Meter">Meter</option><option value="Metric ton">Metric ton</option><option value="Mile">Mile</option><option value="Milliampere">Milliampere</option><option value="Milligram">Milligram</option><option value="Millihertz">Millihertz</option><option value="Milliliter">Milliliter</option><option value="Millimeter">Millimeter</option><option value="Milliohm">Milliohm</option><option value="Millivolt">Millivolt</option><option value="Milliwatt">Milliwatt</option><option value="Nautical mile">Nautical mile</option><option value="Ohm">Ohm</option><option value="Ounce">Ounce</option><option value="Pack">Pack</option><option value="Pallet">Pallet</option><option value="Pair">Pair</option><option value="Parcel">Parcel</option><option value="Perch">Perch</option><option value="Piece">Piece</option><option value="Paint">Paint</option><option value="Plant">Plant</option><option value="Pole">Pole</option><option value="Pound">Pound</option><option value="Quart">Quart</option><option value="Quarter">Quarter</option><option value="Reams">Reams</option><option value="Rod">Rod</option><option value="Roll">Roll</option><option value="Set">Set</option><option value="Sheet">Sheet</option><option value="Short">Short</option><option value="Short ton">Short ton</option><option value="Square centimeter">Square centimeter</option><option value="Square foot">Square foot</option><option value="Square inch">Square inch</option><option value="Square meter">Square meter</option><option value="Square mile">Square mile</option><option value="Square yard">Square yard</option><option value="Stone">Stone</option><option value="Stand">Stand</option><option value="Ton">Ton</option><option value="Tonne">Tonne</option><option value="Tray">Tray</option><option value="20-foot container">20-foot container</option><option value="40-foot container">40-foot container</option><option value="Unit">Unit</option><option value="Volt">Volt</option><option value="Watt">Watt</option><option value="Wp">Wp</option><option value="Yard">Yard</option>
</select>
</td>
</tr>
<tr style="height:0px;">
<td ><label>توضیحات محصول</label></td>

<td><textarea class="field"  required="required" name="comment"  cols="40" rows="6"></textarea></td>
</tr>
<tr>
<td><label >پرچسب ها</label></td>
<td><input type="text" required="required" class="field" name="labels" style="width:350px; ">

</td>
</tr>
<tr>
<tr>
<td><label >توانایی تامین</label></td>
<td><input class="field" type="text" required="required" name="ability"  style="width:80px;"  >

<select class="field"  name="unitability" required="required" style="width:150px; height:21px; margin-right:15px;">
<option value="">انتخاب</option>
<option value="Acre Ampere">Acre Ampere</option><option value="Bag">Bag</option><option value="Barrel">Barrel</option><option value="Box">Box</option><option value="Bushel">Bushel</option><option value="Carton">Carton</option><option value="Case">Case</option><option value="Centimeter">Centimeter</option><option value="Chain">Chain</option><option value="Cubic centimeter">Cubic centimeter</option><option value="Cubic foot">Cubic foot</option><option value="Cubic inch">Cubic inch</option><option value="Cubic meter">Cubic meter</option><option value="Cubic yard">Cubic yard</option><option value="Degrees Celsius">Degrees Celsius</option><option value="Degrees Fahrenheit">Degrees Fahrenheit</option><option value="Dozen">Dozen</option><option value="Dram">Dram</option><option value="Fluid ounce">Fluid ounce</option><option value="Foot">Foot</option><option value="Forty foot container">Forty foot container</option><option value="Furlong">Furlong</option><option value="Gallon">Gallon</option><option value="Gill">Gill</option><option value="Grain">Grain</option><option value="Gram">Gram</option><option value="Gross">Gross</option><option value="Hector">Hector</option><option value="Hertz">Hertz</option><option value="Inch">Inch</option><option value="Kilo ampere">Kilo ampere</option><option value="Kilo gram">Kilo gram</option><option value="Kilo hertz">Kilo hertz</option><option value="Kilo meter">Kilo meter</option><option value="Kilo ohm">Kilo ohm</option><option value="Kilovolt">Kilovolt</option><option value="Kilowatt">Kilowatt</option><option value="Liter">Liter</option><option value="Long ton">Long ton</option><option value="Megahertz">Megahertz</option><option value="Meter">Meter</option><option value="Metric ton">Metric ton</option><option value="Mile">Mile</option><option value="Milliampere">Milliampere</option><option value="Milligram">Milligram</option><option value="Millihertz">Millihertz</option><option value="Milliliter">Milliliter</option><option value="Millimeter">Millimeter</option><option value="Milliohm">Milliohm</option><option value="Millivolt">Millivolt</option><option value="Milliwatt">Milliwatt</option><option value="Nautical mile">Nautical mile</option><option value="Ohm">Ohm</option><option value="Ounce">Ounce</option><option value="Pack">Pack</option><option value="Pallet">Pallet</option><option value="Pair">Pair</option><option value="Parcel">Parcel</option><option value="Perch">Perch</option><option value="Piece">Piece</option><option value="Paint">Paint</option><option value="Plant">Plant</option><option value="Pole">Pole</option><option value="Pound">Pound</option><option value="Quart">Quart</option><option value="Quarter">Quarter</option><option value="Reams">Reams</option><option value="Rod">Rod</option><option value="Roll">Roll</option><option value="Set">Set</option><option value="Sheet">Sheet</option><option value="Short">Short</option><option value="Short ton">Short ton</option><option value="Square centimeter">Square centimeter</option><option value="Square foot">Square foot</option><option value="Square inch">Square inch</option><option value="Square meter">Square meter</option><option value="Square mile">Square mile</option><option value="Square yard">Square yard</option><option value="Stone">Stone</option><option value="Stand">Stand</option><option value="Ton">Ton</option><option value="Tonne">Tonne</option><option value="Tray">Tray</option><option value="20-foot container">20-foot container</option><option value="40-foot container">40-foot container</option><option value="Unit">Unit</option><option value="Volt">Volt</option><option value="Watt">Watt</option><option value="Wp">Wp</option><option value="Yard">Yard</option>
</select>
<select class="field"  name="limitability" required="required" style="width:150px; height:21px; margin-right:10px;">
<option value="">انتخاب</option>
<option value="روز">روز</option>
<option value="هفته">هفته</option>
<option value="ماه">ماه</option>
<option value="سال">سال</option>
</select>
</td>
</tr><tr>
<tr>
<td><label>ماهیت کالا</label></td>
<td><input type="checkbox" name="nature[]" value="کالای ویژه ایرانی" />
<label>کالای ویژه ایرانی </label></td>
</tr>
<tr>
<td></td>
<td><input type="checkbox" name="nature[]" value="هنر و صنایع دستی" />
<label>هنر و صنایع دستی </label></td>
</tr>
<td><label >تصویر کالا ضروری<sup style="font-size:15px; color:#F00;">*</sup></label></td>
<td><input  style="width:200px;" type="file" name="pic" accept="image/*">
<input  class="field" style="margin-right:50px; width:90px; background:#CCC; height:30px; color:#003;" type="submit" name="Submit2" value="آپلود" />
</td>

</tr>
<tr>
<td><label >بروشور کالا</label></td>
<td><input   style="width:200px; " type="file" name="allfile" accept="media_type"></td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td></td>
<td><input  class="field" style="margin-right:50px; width:90px; background:#CCC; height:30px; color:#003;" type="submit" name="Submit" value="ارسال" /></td>
</tr>

</table>
دوستان گلم لطفا راهنمایی کنید البته واستون آپلود هم کردم


فایل‌های پیوست
.txt   asli.txt (اندازه 19.92 KB / تعداد دانلود: 0)
.txt   form jadid.txt (اندازه 23.18 KB / تعداد دانلود: 0)
  پاسخ
تشکر شده توسط :


پرش به انجمن:


کاربران در حال بازدید این موضوع: 1 مهمان