}
$breadcrumb->add(NAVBAR_TITLE_REVIEWS_WRITE, vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params));
$customer_info_query = vam_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
$customer_info = vam_db_fetch_array($customer_info_query);
require DIR_WS_INCLUDES . 'header.php';
if (!$product->isProduct()) {
    $vamTemplate->assign('error', ERROR_INVALID_PRODUCT);
} else {
    $name = $customer_info['customers_firstname'] . ' ' . $customer_info['customers_lastname'];
    if ($name == ' ') {
        $customer_info['customers_lastname'] = TEXT_GUEST;
    }
    $vamTemplate->assign('PRODUCTS_NAME', $product->data['products_name']);
    $vamTemplate->assign('AUTHOR', $customer_info['customers_firstname'] . ' ' . $customer_info['customers_lastname']);
    $vamTemplate->assign('INPUT_TEXT', vam_draw_textarea_field('review', 'soft', 60, 15, $_POST['review'], '', false));
    $input_rationg = '<td>' . vam_draw_radio_field('rating', '1') . '<br/><b>1</b></td><td>' . vam_draw_radio_field('rating', '2') . '<br/><b>2</b></td><td>' . vam_draw_radio_field('rating', '3') . '<br/><b>3</b></td><td>' . vam_draw_radio_field('rating', '4') . '<br/><b>4</b></td><td>' . vam_draw_radio_field('rating', '5') . '<br/><b>5</b></td>';
    $vamTemplate->assign('INPUT_RATING', $input_rationg);
    $vamTemplate->assign('FORM_ACTION', vam_draw_form('product_reviews_write', vam_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'action=process&' . vam_product_link($product->data['products_id'], $product->data['products_name'])), 'post', 'onsubmit="return checkForm();"'));
    $vamTemplate->assign('BUTTON_BACK', '<a class="button" href="javascript:history.back(1)">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
    $vamTemplate->assign('BUTTON_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE) . vam_draw_hidden_field('get_params', $get_params));
    $vamTemplate->assign('CAPTCHA_IMG', '<img src="' . vam_href_link(FILENAME_DISPLAY_CAPTCHA) . '" alt="captcha" name="captcha" />');
    $vamTemplate->assign('CAPTCHA_INPUT', vam_draw_input_field('captcha', '', 'size="6"', 'text', false));
    $vamTemplate->assign('FORM_END', '</form>');
}
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_reviews_write.html');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->caching = 0;
if (!defined(RM)) {
}
if ($process == false) {
    $vamTemplate->assign('ADDRESS_LABEL', vam_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'));
    if ($addresses_count > 1) {
        $address_content = '';
        $radio_buttons = 0;
        $addresses_query = vam_db_query("select address_book_id, entry_firstname as firstname, entry_secondname as secondname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $_SESSION['customer_id'] . "'");
        while ($addresses = vam_db_fetch_array($addresses_query)) {
            $format_id = vam_get_address_format_id($address['country_id']);
            $address_content .= '';
            if ($addresses['address_book_id'] == $_SESSION['billto']) {
                $address_content .= '' . "\n";
            } else {
                $address_content .= '' . "\n";
            }
            $address_content .= '<p><span class="bold">' . $addresses['firstname'] . ' ' . $addresses['secondname'] . ' ' . $addresses['lastname'] . '</span>&nbsp;' . vam_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $_SESSION['billto']) . '</p>
			                        <p>' . vam_address_format($format_id, $addresses, true, ' ', ', ') . '</p>';
            $radio_buttons++;
        }
        $address_content .= '';
        $vamTemplate->assign('BLOCK_ADDRESS', $address_content);
    }
}
if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
    require DIR_WS_MODULES . 'checkout_new_address.php';
}
$vamTemplate->assign('BUTTON_CONTINUE', vam_draw_hidden_field('action', 'submit') . vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
if ($process == true) {
    $vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
}
$vamTemplate->assign('FORM_END', '</form>');
Example #3
0
        ?>
          <tr>
            <td class="main"><?php 
        echo ENTRY_GENDER;
        ?>
</td>
            <td class="main"><?php 
        if ($error == true) {
            if ($entry_gender_error == true) {
                echo vam_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . vam_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . ENTRY_GENDER_ERROR;
            } else {
                echo $cInfo->customers_gender == 'm' ? MALE : FEMALE;
                echo vam_draw_hidden_field('customers_gender');
            }
        } else {
            echo vam_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . vam_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . '&nbsp;&nbsp;' . FEMALE;
        }
        ?>
</td>
          </tr>
<?php 
    }
    ?>
          <tr>
            <td class="main" bgcolor="#FFCC33"><?php 
    echo ENTRY_CID;
    ?>
</td>
            <td class="main" width="100%" bgcolor="#FFCC33"><?php 
    echo vam_draw_input_field('csID', $cInfo->customers_cid, 'maxlength="32"', false);
    ?>
          </tr>
          <tr>
            <td class="main"><?php 
echo ENTRY_MAIL;
?>
</td>
            <td class="main">
<?php 
if ($error == true) {
    if ($entry_mail_error == true) {
        echo vam_draw_radio_field('customers_mail', 'yes', true, $customers_send_mail) . '&nbsp;&nbsp;' . YES . '&nbsp;&nbsp;' . vam_draw_radio_field('customers_mail', 'no', false, $customers_send_mail) . '&nbsp;&nbsp;' . NO . '&nbsp;' . ENTRY_MAIL_ERROR;
    } else {
        echo vam_draw_radio_field('customers_mail', 'yes', true, $customers_send_mail) . '&nbsp;&nbsp;' . YES . '&nbsp;&nbsp;' . vam_draw_radio_field('customers_mail', 'no', false, $customers_send_mail) . '&nbsp;&nbsp;' . NO;
    }
} else {
    echo vam_draw_radio_field('customers_mail', 'yes', true, $customers_send_mail) . '&nbsp;&nbsp;' . YES . '&nbsp;&nbsp;' . vam_draw_radio_field('customers_mail', 'no', false, $customers_send_mail) . '&nbsp;&nbsp;' . NO;
}
?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
echo ENTRY_PAYMENT_UNALLOWED;
?>
</td>
            <td class="main"><?php 
echo vam_draw_input_field('payment_unallowed');
?>
</td>
          </tr>
           <tr>
Example #5
0
     break;
 case 'move_article':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_ARTICLE . '</b>');
     $contents = array('form' => vam_draw_form('articles', FILENAME_ARTICLES, 'action=move_article_confirm&tPath=' . $tPath) . vam_draw_hidden_field('articles_id', $aInfo->articles_id));
     $contents[] = array('text' => sprintf(TEXT_MOVE_ARTICLES_INTRO, $aInfo->articles_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_TOPICS . '<br><b>' . vam_output_generated_topic_path($aInfo->articles_id, 'article') . '</b>');
     $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $aInfo->articles_name) . '<br>' . vam_draw_pull_down_menu('move_to_topic_id', vam_get_topic_tree(), $current_topic_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . '<span class="button"><button type="submit" value="' . BUTTON_MOVE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/move.png', '', '12', '12') . '&nbsp;' . BUTTON_MOVE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'copy_to':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
     $contents = array('form' => vam_draw_form('copy_to', FILENAME_ARTICLES, 'action=copy_to_confirm&tPath=' . $tPath) . vam_draw_hidden_field('articles_id', $aInfo->articles_id));
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_TOPICS . '<br><b>' . vam_output_generated_topic_path($aInfo->articles_id, 'article') . '</b>');
     $contents[] = array('text' => '<br>' . TEXT_TOPICS . '<br>' . vam_draw_pull_down_menu('topics_id', vam_get_topic_tree(), $current_topic_id));
     $contents[] = array('text' => '<br>' . TEXT_HOW_TO_COPY . '<br>' . vam_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br>' . vam_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
     $contents[] = array('align' => 'center', 'text' => '<br>' . '<span class="button"><button type="submit" value="' . BUTTON_COPY . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/copy.png', '', '12', '12') . '&nbsp;' . BUTTON_COPY . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 default:
     if ($rows > 0) {
         if (isset($tInfo) && is_object($tInfo)) {
             // topic info box contents
             $heading[] = array('text' => '<b>' . $tInfo->topics_name . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $tInfo->topics_id . '&action=edit_topic') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $tInfo->topics_id . '&action=delete_topic') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $tInfo->topics_id . '&action=move_topic') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/move.png', '', '12', '12') . '&nbsp;' . BUTTON_MOVE . '</span></a>');
             $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . vam_date_short($tInfo->date_added));
             if (vam_not_null($tInfo->last_modified)) {
                 $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . vam_date_short($tInfo->last_modified));
             }
             $contents[] = array('text' => '<br>' . TEXT_SUBTOPICS . ' ' . $tInfo->childs_count . '<br>' . TEXT_ARTICLES . ' ' . $tInfo->articles_count);
         } elseif (isset($aInfo) && is_object($aInfo)) {
             // article info box contents
         }
         //close list table
         $contents[] = array('text' => '</table>');
         if (QUICKLINK_ACTIVATED == 'true') {
             $contents[] = array('text' => '<hr noshade>');
             $contents[] = array('text' => '<b>' . TEXT_MULTICOPY . '</b><br />' . TEXT_MULTICOPY_DESC);
             $cat_tree = vam_get_category_tree();
             $tree = '';
             for ($i = 0; $n = sizeof($cat_tree), $i < $n; $i++) {
                 $tree .= '<input type="checkbox" name="dest_cat_ids[]" value="' . $cat_tree[$i]['id'] . '"><font size="1">' . $cat_tree[$i]['text'] . '</font><br />';
             }
             $contents[] = array('text' => $tree . '<br /><hr noshade>');
             $contents[] = array('text' => '<b>' . TEXT_SINGLECOPY . '</b><br />' . TEXT_SINGLECOPY_DESC);
         }
         $contents[] = array('text' => '<br />' . TEXT_SINGLECOPY_CATEGORY . '<br />' . vam_draw_pull_down_menu('dest_category_id', vam_get_category_tree(), $current_category_id) . '<br /><hr noshade>');
         $contents[] = array('text' => '<strong>' . TEXT_HOW_TO_COPY . '</strong><br />' . vam_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . vam_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE . '<br /><hr noshade>');
         $contents[] = array('align' => 'center', 'text' => '<span class="button"><button type="submit" name="multi_copy_confirm" value="' . BUTTON_COPY . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/copy.png', '', '12', '12') . '&nbsp;' . BUTTON_COPY . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&cID=' . $cInfo->categories_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
         //close multi-action form
         $contents[] = array('text' => '</form>');
     }
     // multi_copy confirm ENDS
     break;
 default:
     if ($rows > 0) {
         if (is_object($cInfo)) {
             // category info box contents
             $heading[] = array('align' => 'center', 'text' => '<b>' . $cInfo->categories_name . '</b>');
             //Multi Element Actions
             $contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%;">' . TEXT_MARKED_ELEMENTS . '</div>');
             $contents[] = array('align' => 'center', 'text' => '<table border=0><tr><td align="center"><span class="button"><button type="submit" name="multi_delete" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span></td></tr><tr><td align="center"><span class="button"><button type="submit" name="multi_move" value="' . BUTTON_MOVE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/move.png', '', '12', '12') . '&nbsp;' . BUTTON_MOVE . '</button></span></td></tr><tr><td align="center"><span class="button"><button type="submit" name="multi_copy" value="' . BUTTON_COPY . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/copy.png', '', '12', '12') . '&nbsp;' . BUTTON_COPY . '</button></span></td></tr></table>');
             $contents[] = array('align' => 'center', 'text' => '<table border=0><tr><td align="center"><span class="button"><button type="submit" name="multi_status_on" value="' . BUTTON_STATUS_ON . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_STATUS_ON . '</button></span></td></tr><tr><td align="center"><span class="button"><button type="submit" name="multi_status_off" value="' . BUTTON_STATUS_OFF . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_STATUS_OFF . '</button></span></td></tr></table>');
Example #7
0
            $info_message = TEXT_EMAIL_DEL_ERROR;
        } else {
            $del_query = vam_db_query("delete from " . TABLE_NEWSLETTER_RECIPIENTS . " where  customers_email_address ='" . vam_db_input($_GET['email']) . "'");
            $info_message = TEXT_EMAIL_DEL;
        }
    }
}
$breadcrumb->add(NAVBAR_TITLE_NEWSLETTER, vam_href_link(FILENAME_NEWSLETTER, '', 'NONSSL'));
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('CAPTCHA_IMG', '<img src="' . vam_href_link(FILENAME_DISPLAY_CAPTCHA) . '" alt="captcha" name="captcha" />');
$vamTemplate->assign('CAPTCHA_INPUT', vam_draw_input_field('captcha', '', 'size="6"', 'text', false));
$vamTemplate->assign('text_newsletter', TEXT_NEWSLETTER);
$vamTemplate->assign('info_message', $info_message);
$vamTemplate->assign('FORM_ACTION', vam_draw_form('sign', vam_href_link(FILENAME_NEWSLETTER, 'action=process', 'NONSSL')));
$vamTemplate->assign('INPUT_EMAIL', vam_draw_input_field('email', vam_db_input($_POST['email'])));
$vamTemplate->assign('CHECK_INP', vam_draw_radio_field('check', 'inp'));
$vamTemplate->assign('CHECK_DEL', vam_draw_radio_field('check', 'del'));
$vamTemplate->assign('BUTTON_SEND', vam_image_submit('submit.png', IMAGE_BUTTON_LOGIN));
$vamTemplate->assign('FORM_END', '</form>');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/newsletter.html');
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
$template = file_exists('templates/' . CURRENT_TEMPLATE . '/' . FILENAME_NEWSLETTER . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_NEWSLETTER . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->display($template);
include 'includes/application_bottom.php';
   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
// include needed functions
$module = new vamTemplate();
$module->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
include_once DIR_FS_INC . 'vam_get_zone_name.inc.php';
include_once DIR_FS_INC . 'vam_get_country_list.inc.php';
if (!isset($process)) {
    $process = false;
}
if (ACCOUNT_GENDER == 'true') {
    $male = $entry['entry_gender'] == 'm' ? true : false;
    $female = $entry['entry_gender'] == 'f' ? true : false;
    $module->assign('gender', '1');
    $module->assign('INPUT_MALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => MALE . '&nbsp;'), 'm', $male, 'id="gender" checked="checked"'));
    $module->assign('INPUT_FEMALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => FEMALE . '&nbsp;', 'text' => vam_not_null(ENTRY_GENDER_TEXT) ? '<span class="Requirement">&nbsp;' . ENTRY_GENDER_TEXT . '</span>' : ''), 'f', $female, 'id="gender"'));
}
$module->assign('INPUT_FIRSTNAME', vam_draw_input_fieldNote(array('name' => 'firstname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : '')), $entry['entry_firstname'], 'id="firstname"'));
if (ACCOUNT_SECOND_NAME == 'true') {
    $module->assign('secondname', '1');
    $module->assign('INPUT_SECONDNAME', vam_draw_input_fieldNote(array('name' => 'secondname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_SECOND_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_SECOND_NAME_TEXT . '</span>' : '')), $entry['entry_secondname'], 'id="secondname"'));
}
$module->assign('INPUT_LASTNAME', vam_draw_input_fieldNote(array('name' => 'lastname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : '')), $entry['entry_lastname'], 'id="lastname"'));
if (ACCOUNT_COMPANY == 'true') {
    $module->assign('company', '1');
    $module->assign('INPUT_COMPANY', vam_draw_input_fieldNote(array('name' => 'company', 'text' => '&nbsp;' . (vam_not_null(ENTRY_COMPANY_TEXT) ? '<span class="Requirement">' . ENTRY_COMPANY_TEXT . '</span>' : '')), $entry['entry_company']));
}
if (ACCOUNT_STREET_ADDRESS == 'true') {
    $module->assign('street_address', '1');
    $module->assign('INPUT_STREET', vam_draw_input_fieldNote(array('name' => 'street_address', 'text' => '&nbsp;' . (vam_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="Requirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>' : '')), $entry['entry_street_address'], 'id="street_address"'));
}
?>
</td>
          </tr>
          <tr>
            <td valign="top" colspan="2" class="main"><?php 
echo TEXT_YANDEX_MARKET;
?>
</td>
          </tr>
          <tr>
            <td valign="top" class="main"><?php 
echo TEXT_PRODUCTS_TO_XML;
?>
</td>
            <td valign="top" class="main"><?php 
echo vam_draw_radio_field('products_to_xml', '1', $in_xml) . '&nbsp;' . TEXT_PRODUCT_AVAILABLE_TO_XML . '&nbsp;' . vam_draw_radio_field('products_to_xml', '0', $out_xml) . '&nbsp;' . TEXT_PRODUCT_NOT_AVAILABLE_TO_XML;
?>
</td>
          </tr>
          <tr>
            <td valign="top" class="main"><?php 
echo TEXT_YANDEX_MARKET_BID;
?>
</td>
            <td valign="top" class="main"><?php 
echo vam_draw_input_field('yml_bid', $pInfo->yml_bid, 'size="2"');
?>
</td>
          </tr>
          <tr>
            <td valign="top" class="main"><?php 
    $module->assign('ACCOUNT_GENDER', 'true');
    $male = $affiliate['affiliate_gender'] == 'm' ? true : false;
    $female = $affiliate['affiliate_gender'] == 'f' ? true : false;
    if ($is_read_only == true) {
        $gender_male = $affiliate['affiliate_gender'] == 'm' ? MALE : FEMALE;
    } elseif ($error == true) {
        if ($entry_gender_error == true) {
            $gender_male = vam_draw_radio_field(array('name' => 'a_gender', 'suffix' => MALE), 'm', $male);
            $gender_female = vam_draw_radio_field(array('name' => 'a_gender', 'suffix' => FEMALE, 'text' => ENTRY_GENDER_ERROR), 'f', $female);
        } else {
            $gender_male = $a_gender == 'm' ? MALE : FEMALE;
            $gender_female = vam_draw_hidden_field('a_gender');
        }
    } else {
        $gender_male = vam_draw_radio_field(array('name' => 'a_gender', 'suffix' => MALE), 'm', $male);
        $gender_female = vam_draw_radio_field(array('name' => 'a_gender', 'suffix' => FEMALE, 'text' => ENTRY_GENDER_TEXT), 'f', $female);
    }
    $module->assign('gender_male', $gender_male);
    $module->assign('gender_female', $gender_female);
}
if ($is_read_only == true) {
    $firstname_content = $affiliate['affiliate_firstname'];
} elseif ($error == true) {
    if ($entry_firstname_error == true) {
        $firstname_content = vam_draw_input_fieldNote(array('name' => 'a_firstname', 'text' => '&nbsp;' . ENTRY_FIRST_NAME_ERROR));
    } else {
        $firstname_content = $a_firstname . vam_draw_hidden_field('a_firstname');
    }
} else {
    $firstname_content = vam_draw_input_fieldNote(array('name' => 'a_firstname', 'text' => '&nbsp;' . ENTRY_FIRST_NAME_TEXT), $affiliate['affiliate_firstname']);
}
    echo CATEGORY_PERSONAL;
    ?>
</td>
      </tr>
      <tr>
        <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
<?php 
    if (ACCOUNT_GENDER == 'true') {
        ?>
          <tr>
            <td class="main"><?php 
        echo ENTRY_GENDER;
        ?>
</td>
            <td class="main"><?php 
        echo vam_draw_radio_field('affiliate_gender', 'm', false, $aInfo->affiliate_gender) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . vam_draw_radio_field('affiliate_gender', 'f', false, $aInfo->affiliate_gender) . '&nbsp;&nbsp;' . FEMALE;
        ?>
</td>
          </tr>
<?php 
    }
    ?>
          <tr>
            <td class="main"><?php 
    echo ENTRY_FIRST_NAME;
    ?>
</td>
            <td class="main"><?php 
    echo vam_draw_input_field('affiliate_firstname', $aInfo->affiliate_firstname, 'maxlength="32"', true);
    ?>
</td>
     $show_filter = 'True';
     $dont_show_filter = 'False';
     if ($sInfo->show_filter == 'False') {
         $show_filter = 'False';
         $dont_show_filter = 'True';
     }
     $contents[] = array('text' => '<br />' . TEXT_SHOW_FILTER . '<br />' . vam_draw_radio_field('show_filter', 'True', true, $dont_show_filter) . '&nbsp;' . TEXT_SHOW . '<br />' . vam_draw_radio_field('show_filter', 'False', false, $show_filter) . '&nbsp;' . TEXT_DONT_SHOW);
     $contents[] = array('text' => '<br />' . TEXT_FILTER_CLASS . '<br />' . vam_draw_pull_down_menu('filter_class', $filter_classes, $specification_data['filter_class']));
     $contents[] = array('text' => '<br />' . TEXT_FILTER_DISPLAY . '<br />' . vam_draw_pull_down_menu('filter_display', $filter_display_array, $specification_data['filter_display']));
     $filter_show_all = 'True';
     $filter_dont_show_all = 'False';
     if ($sInfo->filter_show_all == 'False') {
         $filter_show_all = 'False';
         $filter_dont_show_all = 'True';
     }
     $contents[] = array('text' => '<br />' . TEXT_FILTER_SHOW_ALL . '<br />' . vam_draw_radio_field('filter_show_all', 'True', true, $filter_dont_show_all) . '&nbsp;' . TEXT_SHOW . '<br />' . vam_draw_radio_field('filter_show_all', 'False', false, $filter_show_all) . '&nbsp;' . TEXT_DONT_SHOW);
     $contents[] = array('text' => '<br />' . TEXT_ENTER_VALUE . '<br />' . vam_draw_pull_down_menu('enter_values', $enter_filter_array, $specification_data['enter_values']));
     $contents[] = array('align' => 'center', 'text' => '<br />' . '<span class="button"><button type="submit" value="' . IMAGE_SAVE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . IMAGE_SAVE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_PRODUCTS_SPECIFICATIONS, 'spid=' . $specification_id . '&sgpath=' . $specs_group_path) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . IMAGE_CANCEL . '</span></a>');
     break;
 case 'delete_specification':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_SPECIFICATION . '</b>');
     $contents = array('form' => vam_draw_form('delete_specification', FILENAME_PRODUCTS_SPECIFICATIONS, 'action=delete_specification_confirm&spid=' . $sInfo->specifications_id . '&sgpath=' . $specs_group_path, 'post'));
     $contents[] = array('text' => TEXT_DELETE_SPECIFICATION_INTRO . vam_draw_hidden_field('specifications_id', $sInfo->specifications_id));
     $contents[] = array('text' => '<br /><b>' . $sInfo->specification_name . '</b>');
     // $count_products, $count_filters are populated in the first $action section
     if ($count_products > 0) {
         $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $count_products));
     }
     if ($count_filters > 0) {
         $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_FILTERS, $count_filters));
     }
        }
        vam_redirect(vam_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    }
}
$breadcrumb->add(NAVBAR_TITLE_CREATE_GUEST_ACCOUNT, vam_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
if ($messageStack->size('create_account') > 0) {
    $vamTemplate->assign('error', $messageStack->output('create_account'));
}
$vamTemplate->assign('FORM_ACTION', vam_draw_form('create_account', vam_href_link(FILENAME_CREATE_GUEST_ACCOUNT, '', 'SSL'), 'post') . vam_draw_hidden_field('action', 'process'));
/* 
	отключаем все поля кроме имя, адрес, телефон, емаил
*/
if (ACCOUNT_GENDER == 'true') {
    $vamTemplate->assign('gender', '0');
    $vamTemplate->assign('INPUT_MALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => MALE), 'm', '', 'id="gender" checked="checked"'));
    $vamTemplate->assign('INPUT_FEMALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => FEMALE, 'text' => vam_not_null(ENTRY_GENDER_TEXT) ? '<span class="Requirement">' . ENTRY_GENDER_TEXT . '</span>' : ''), 'f', '', 'id="gender"'));
} else {
    $vamTemplate->assign('gender', '0');
}
$vamTemplate->assign('INPUT_FIRSTNAME', vam_draw_input_fieldNote(array('name' => 'firstname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : '')), '', 'id="firstname"'));
if (ACCOUNT_SECOND_NAME == 'true') {
    $vamTemplate->assign('secondname', '0');
    $vamTemplate->assign('INPUT_SECONDNAME', vam_draw_input_fieldNote(array('name' => 'secondname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_SECOND_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_SECOND_NAME_TEXT . '</span>' : '')), '', 'id="secondname"'));
}
$vamTemplate->assign('INPUT_LASTNAME', vam_draw_input_fieldNote(array('name' => 'lastname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : '')), '', 'id="lastname"'));
if (ACCOUNT_DOB == 'true') {
    $vamTemplate->assign('birthdate', '0');
    $vamTemplate->assign('INPUT_DOB', vam_draw_input_fieldNote(array('name' => 'dob', 'text' => '&nbsp;' . (vam_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="Requirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : '')), '', 'id="dob"'));
} else {
    $vamTemplate->assign('birthdate', '0');
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$payment_modules = new payment();
$order_total_modules->process();
$module = new vamTemplate();
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
    $vamTemplate->assign('error', htmlspecialchars($error['error']));
}
$selection = $payment_modules->selection();
$radio_buttons = 0;
for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
    $selection[$i]['radio_buttons'] = $radio_buttons;
    if ($selection[$i]['id'] == $payment || $n == 1) {
        $selection[$i]['checked'] = 1;
    }
    if (sizeof($selection) > 1) {
        $selection[$i]['selection'] = vam_draw_radio_field('payment', $selection[$i]['id'], $selection[$i]['id'] == $selection[0]['id'], 'id="' . $selection[$i]['id'] . '"');
    } else {
        $selection[$i]['selection'] = vam_draw_hidden_field('payment', $selection[$i]['id']);
    }
    $selection[$i]['id'] = $selection[$i]['id'];
    if (isset($selection[$i]['error'])) {
    } else {
        $radio_buttons++;
    }
}
$module->assign('module_content', $selection);
if (ACTIVATE_GIFT_SYSTEM == 'true') {
    $vamTemplate->assign('module_gift', $order_total_modules->credit_selection());
}
$module->caching = 0;
$payment_block = $module->fetch(CURRENT_TEMPLATE . '/module/checkout_payment_block.html');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_FIELD . '</b>');
     $contents = array('form' => vam_draw_form('fields', FILENAME_EXTRA_FIELDS, 'page=' . $_GET['page'] . '&fID=' . $fInfo->fields_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_EDIT_INTRO);
     $field_inputs_string = '';
     $languages = vam_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $field_inputs_string .= '<br>' . $languages[$i]['name'] . ':&nbsp;' . vam_draw_input_field('fields_name[' . $languages[$i]['id'] . ']', vam_get_customers_extra_fields_name($fInfo->fields_id, $languages[$i]['id']));
     }
     $contents[] = array('text' => '<br>' . TEXT_FIELD_NAME . $field_inputs_string);
     $contents[] = array('text' => '<br>' . TEXT_FIELD_INPUT_TYPE . '<br>' . vam_draw_radio_field('fields_input_type', 0, $fInfo->fields_input_type == 0 ? true : false) . TEXT_INPUT_FIELD . '<br>' . vam_draw_radio_field('fields_input_type', 1, $fInfo->fields_input_type == 1 ? true : false) . TEXT_TEXTAREA_FIELD . '<br>' . vam_draw_radio_field('fields_input_type', 2, $fInfo->fields_input_type == 2 ? true : false) . TEXT_RADIO_FIELD . '<br>' . vam_draw_radio_field('fields_input_type', 3, $fInfo->fields_input_type == 3 ? true : false) . TEXT_CHECK_FIELD . '<br>' . vam_draw_radio_field('fields_input_type', 4, $fInfo->fields_input_type == 4 ? true : false) . TEXT_DOWN_FIELD);
     $contents[] = array('text' => '<br>' . TEXT_FIELD_INPUT_VALUE . '<br>' . vam_draw_textarea_field('fields_input_value', 'nowrap', 30, 8, $fInfo->fields_input_value));
     $contents[] = array('text' => '<br>' . TEXT_FIELD_REQUIRED_STATUS . '<br>' . vam_draw_radio_field('fields_required_status', 0, $fInfo->fields_required_status == 0 ? true : false) . 'false<br>' . vam_draw_radio_field('fields_required_status', 1, $fInfo->fields_required_status == 1 ? true : false) . 'true');
     $contents[] = array('text' => TEXT_FIELD_SIZE . '<br>' . vam_draw_input_field('fields_size', $fInfo->fields_size));
     $contents[] = array('text' => '<br>' . TEXT_FIELD_STATUS_EMAIL . '<br>' . vam_draw_radio_field('fields_required_email', 0, $fInfo->fields_required_email == 0 ? true : false) . 'false<br>' . vam_draw_radio_field('fields_required_email', 1, $fInfo->fields_required_email == 1 ? true : false) . 'true');
     $contents[] = array('align' => 'center', 'text' => '<br><span class="button"><button type="submit" value="' . BUTTON_SAVE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/save.png', '', '12', '12') . '&nbsp;' . BUTTON_SAVE . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_EXTRA_FIELDS, 'page=' . $_GET['page'] . '&fID=' . $fInfo->fields_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_FIELD . '</b>');
     $contents = array('form' => vam_draw_form('manufacturers', FILENAME_EXTRA_FIELDS, 'page=' . $_GET['page'] . '&fID=' . $fInfo->fields_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_DELETE_INTRO);
     $contents[] = array('text' => '<br><b>' . $fInfo->fields_name . '</b>');
     $contents[] = array('align' => 'center', 'text' => '<br><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_EXTRA_FIELDS, 'page=' . $_GET['page'] . '&fID=' . $fInfo->fields_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     break;
 default:
     if (isset($fInfo) && is_object($fInfo)) {
         $heading[] = array('text' => '<b>' . $fInfo->fields_name . '</b>');
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_EXTRA_FIELDS, 'page=' . $_GET['page'] . '&fID=' . $fInfo->fields_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_EXTRA_FIELDS, 'page=' . $_GET['page'] . '&fID=' . $fInfo->fields_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
         $contents[] = array('text' => '<br>' . TEXT_FIELD_NAME . $fInfo->fields_name);
         switch ($fInfo->fields_input_type) {
function vam_get_values_menu($display_type, $values_select_array, $specification_name, $specification_value)
{
    $box_text = '';
    switch ($display_type) {
        case 'pulldown':
            $box_text .= vam_draw_pull_down_menu($specification_name, $values_select_array, $specification_value);
            break;
        case 'radio':
            foreach ($values_select_array as $value) {
                $checked = $value['id'] == $specification_value ? true : false;
                $box_text .= vam_draw_radio_field($specification_name, $value['id'], $checked) . '&nbsp;' . $value['text'];
                $box_text .= '<br>' . "\n";
            }
            break;
        case 'multi':
            $box_text .= vam_draw_multi_pull_down_menu($specification_name . '[]', $values_select_array, $specification_value, 'multiple="' . $specification_name . 'f"');
            break;
        case 'checkbox':
            $checkbox_id = 0;
            foreach ($values_select_array as $value) {
                $checked = false;
                if (is_array($specification_value)) {
                    foreach ($specification_value as $spec) {
                        if ($spec['id'] == $value['id']) {
                            $checked = true;
                            break;
                        }
                    }
                } else {
                    $checked = $value['id'] == $specification_value[$checkbox_id] ? true : false;
                }
                // if (is_array ... else ...
                $box_text .= vam_draw_checkbox_field($specification_name . '[' . $checkbox_id . ']', $value['id'], $checked) . '&nbsp;' . $value['text'];
                $box_text .= '<br>' . "\n";
                $checkbox_id++;
            }
            // foreach ($values_select_array
            break;
        case 'image':
            $value = $specification_value != '0' ? $specification_value : '';
            foreach ($values_select_array as $value) {
                $checked = $value['id'] == $specification_value ? true : false;
                $box_text .= '<span class=image_box>';
                $box_text .= vam_draw_radio_field($specification_name, $value['id'], $checked);
                $box_text .= '&nbsp;&nbsp;' . vam_image(DIR_WS_CATALOG_IMAGES . $value['text'], $value['text'], SPECIFICATIONS_FILTER_IMAGE_WIDTH, SPECIFICATIONS_FILTER_IMAGE_HEIGHT, ' class="image_filter"');
                $box_text .= '</span>' . "\n";
            }
            break;
        case 'multiimage':
            foreach ($values_select_array as $value) {
                $checked = $value['id'] == $specification_value ? true : false;
                if ($value['id'] == '0') {
                    $value['id'] = SPECIFICATIONS_GET_ALL_IMAGE;
                    $value['text'] = SPECIFICATIONS_GET_ALL_IMAGE;
                }
                $box_text .= '<span class=image_box>';
                $box_text .= vam_draw_checkbox_field($specification_name, $value['id'], $checked);
                $box_text .= '&nbsp;&nbsp;' . vam_image(DIR_WS_CATALOG_IMAGES . $value['text'], $value['text'], SPECIFICATIONS_FILTER_IMAGE_WIDTH, SPECIFICATIONS_FILTER_IMAGE_HEIGHT, ' class="image_filter"');
                $box_text .= '</span>' . "\n";
            }
            break;
        default:
        case 'text':
            $value = $specification_value != 0 ? $specification_value : '';
            $box_text .= vam_draw_input_field($specification_name, $value);
            break;
    }
    // switch ($display_type
    return $box_text;
}
function vam_get_filter_string($display_type, $filters_select_array, $target, $filter_name, $filter_value)
{
    $filter_name = (string) $filter_name;
    if (is_array($filter_value)) {
    } else {
        $filter_value = (string) $filter_value;
    }
    $exclude_array = array($filter_name, 'page');
    $additional_variables = vam_get_hidden_get_variables($exclude_array);
    $box_text = '';
    switch ($display_type) {
        case 'pulldown':
            $box_text .= vam_draw_form('filter', $target, 'get');
            $box_text .= vam_draw_pull_down_menu($filter_name, $filters_select_array, $filter_value, 'onChange="this.form.submit();"');
            $box_text .= $additional_variables . vam_hide_session_id();
            $box_text .= '<noscript>' . vam_image_submit('submit.png', TEXT_FIND_PRODUCTS) . '</noscript>';
            $box_text .= '</form>';
            break;
        case 'radio':
            $box_text .= vam_draw_form('filter', $target, 'get');
            foreach ($filters_select_array as $filter) {
                $checked = $filter['id'] == $filter_value ? true : false;
                switch (true) {
                    case $filter['count'] != '' && $filter['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'none':
                        break;
                    case $filter['count'] != '' && $filter['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'grey':
                        /* $box_text .= '<input type="radio" name="0" value="0" disabled="disabled">';
                           $box_text .= '<span class="no_results">' . '&nbsp;';
                           $box_text .= vam_output_string ($filter['text'] );
                           $box_text .= '</span>';
                           if (SPECIFICATIONS_FILTER_SHOW_COUNT == 'True' && $filter['count'] != '') {
                             $box_text .= '<span class="filter_count"> (' . $filter['count'] . ')</span>';
                           }
                           $box_text .= '<br>' . "\n";
                           */
                        break;
                    default:
                        $box_text .= vam_draw_radio_field($filter_name, $filter['id'], $checked, 'onClick="this.form.submit();"') . '&nbsp;' . $filter['text'];
                        if (SPECIFICATIONS_FILTER_SHOW_COUNT == 'True' && $filter['count'] != '') {
                            $box_text .= '<span class="filter_count"> (' . $filter['count'] . ')</span>';
                        }
                        $box_text .= '<br>' . "\n";
                        break;
                }
                // switch (true)
            }
            $box_text .= $additional_variables . vam_hide_session_id();
            $box_text .= '<noscript>' . vam_image_submit('submit.png', TEXT_FIND_PRODUCTS) . '</noscript>';
            $box_text .= '</form>';
            break;
        case 'text':
            $value = $filter_value != 0 ? $filter_value : '';
            $box_text .= vam_draw_form('filter', $target, 'get');
            //$box_text .= vam_draw_input_field($filter_name, $value);
            $box_text .= vam_draw_input_price_slider($filter_name, $value);
            $box_text .= $additional_variables . vam_hide_session_id();
            //$box_text .= '<noscript>' . vam_image_submit('submit.png', TEXT_FIND_PRODUCTS) . '</noscript>';
            $box_text .= '</form>';
            break;
        case 'multi':
            $box_text .= vam_draw_form('filter', $target, 'get');
            $box_text .= vam_draw_multi_pull_down_menu($filter_name . '[]', $filters_select_array, $filter_value, 'multiple="' . $filter_name . 'f"');
            $box_text .= $additional_variables . vam_hide_session_id();
            $box_text .= vam_image_submit('submit.png', TEXT_FIND_PRODUCTS);
            $box_text .= '</form>';
            break;
        case 'checkbox':
            $box_text .= vam_draw_form('filter', $target, 'get');
            $checkbox_id = 0;
            foreach ($filters_select_array as $filter) {
                $checked = $filter['id'] == $filter_value[$checkbox_id] ? true : false;
                switch (true) {
                    case $filter['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'none':
                        break;
                    case $filter['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'grey':
                        /* $box_text .= '<input type="checkbox" name="0" value="0" disabled="disabled">';
                           $box_text .= '<span class="no_results">' . '&nbsp;';
                           $box_text .= vam_output_string ($filter['text'] );
                           $box_text .= '</span>';
                           if (SPECIFICATIONS_FILTER_SHOW_COUNT == 'True') {
                             $box_text .= '<span class="filter_count"> (' . $filter['count'] . ')</span>';
                           }
                           $box_text .= '<br>' . "\n";
                           */
                        break;
                    default:
                        $box_text .= vam_draw_checkbox_field($filter_name . '[' . $checkbox_id . ']', $filter['id'], $checked, 'onclick="this.form.submit();"') . '&nbsp;' . $filter['text'];
                        if (SPECIFICATIONS_FILTER_SHOW_COUNT == 'True') {
                            $box_text .= '<span class="filter_count"> (' . $filter['count'] . ')</span>';
                        }
                        $box_text .= '<br>' . "\n";
                        break;
                }
                // switch (true)
                $checkbox_id++;
            }
            $box_text .= $additional_variables . vam_hide_session_id();
            //$box_text .= vam_image_submit('submit.png', TEXT_FIND_PRODUCTS);
            $box_text .= '</form>';
            break;
        case 'image':
            $value = $filter_value != 0 ? $filter_value : '';
            $box_text .= vam_draw_images_menu($filter_name, $filters_select_array, $target, $value);
            break;
        case 'multiimage':
            $box_text .= vam_draw_form('filter', $target, 'get');
            foreach ($filters_select_array as $filter) {
                $checked = $filter['id'] == $filter_value[$checkbox_id] ? true : false;
                $box_text .= vam_draw_checkbox_field($filter_name . '[' . $checkbox_id . ']', $filter['id'], $checked);
                $box_text .= '  ' . vam_image(DIR_WS_IMAGES . trim($filter['text']), $filter['text']) . '<br>' . "\n";
                $box_text .= '<br>' . "\n";
                $checkbox_id++;
            }
            $box_text .= $additional_variables . vam_hide_session_id();
            $box_text .= vam_image_submit('submit.png', TEXT_FIND_PRODUCTS);
            $box_text .= '</form>';
            break;
        case 'links':
        default:
            $box_text .= vam_draw_links_menu($filter_name, $filters_select_array, $target, $filter_value);
            break;
    }
    // switch ($display_type
    return $box_text;
}
Example #18
0
      <tr>
        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td class="main"><b><?php 
    echo ENTRY_RATING;
    ?>
</b>&nbsp;<?php 
    echo TEXT_BAD;
    ?>
&nbsp;<?php 
    for ($i = 1; $i <= 5; $i++) {
        echo vam_draw_radio_field('reviews_rating', $i, '', $rInfo->reviews_rating) . '&nbsp;';
    }
    echo TEXT_GOOD;
    ?>
</td>
      </tr>
      <tr>
        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td align="right" class="main"><?php 
    echo vam_draw_hidden_field('reviews_id', $rInfo->reviews_id) . vam_draw_hidden_field('products_id', $rInfo->products_id) . vam_draw_hidden_field('customers_name', $rInfo->customers_name) . vam_draw_hidden_field('products_name', $rInfo->products_name) . vam_draw_hidden_field('products_image', $rInfo->products_image) . vam_draw_hidden_field('date_added', $rInfo->date_added) . '<span class="button"><button type="submit" value="' . BUTTON_PREVIEW . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_PREVIEW . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>';
    ?>
             for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j++) {
                 # set the radio button to be checked if it is the method chosen
                 $quotes[$i]['methods'][$j]['radio_buttons'] = $radio_buttons;
                 $checked = $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id'] ? true : false;
                 if ($checked == true || $n == 1 && $n2 == 1) {
                     $quotes[$i]['methods'][$j]['checked'] = 1;
                 }
                 if ($n > 1 || $n2 > 1) {
                     if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0) {
                         $quotes[$i]['tax'] = '';
                     }
                     if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0) {
                         $quotes[$i]['tax'] = 0;
                     }
                     $quotes[$i]['methods'][$j]['price'] = $vamPrice->Format(vam_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']), true, 0, true);
                     $quotes[$i]['methods'][$j]['radio_field'] = vam_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="' . $quotes[$i]['methods'][$j]['id'] . '"');
                     $quotes[$i]['methods'][$j]['id'] = $quotes[$i]['methods'][$j]['id'];
                 } else {
                     if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0) {
                         $quotes[$i]['tax'] = 0;
                     }
                     $quotes[$i]['methods'][$j]['price'] = $vamPrice->Format(vam_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']), true, 0, true) . vam_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']);
                 }
                 $radio_buttons++;
             }
         }
     }
     $module->assign('module_content', $quotes);
 }
 $module->caching = 0;
 $shipping_block = $module->fetch(CURRENT_TEMPLATE . '/module/checkout_shipping_block.html');