echo TEXT_CC;
        ?>
</td>
        <td width="90%"><?php 
        echo vam_draw_input_field('cc', $newsletters_data['cc'], 'size=100');
        ?>
</td>
   </tr>
        </tr>
        <tr>
        <td width="10%" valign="top"><?php 
        echo TEXT_BODY;
        ?>
</td>
        <td width="90%"><?php 
        echo vam_draw_textarea_field('newsletter_body', 'soft', '95', '25', stripslashes($newsletters_data['body']));
        ?>
<br /><a href="javascript:toggleHTMLEditor('newsletter_body');"><?php 
        echo TEXT_TOGGLE_EDITOR;
        ?>
</a></td>
   </tr>
   </table>
   <a class="button" href="<?php 
        echo vam_href_link(FILENAME_MODULE_NEWSLETTER);
        ?>
"><span><?php 
        echo vam_image(DIR_WS_IMAGES . 'icons/buttons/back.png', '', '12', '12');
        ?>
 <?php 
        echo BUTTON_BACK;
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td valign="top" class="main"><?php 
    echo TEXT_MESSAGE;
    ?>
</td>
                <td><?php 
    echo vam_draw_textarea_field('message', 'soft', '60', '15');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2" align="right"><?php 
    echo '<span class="button"><button type="submit" class="button" value="' . BUTTON_SEND . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_SEND . '</button></span>';
    ?>
</td>
              </tr>
Beispiel #3
0
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
        ?>
          <tr>
            <td class="main" valign="top"><?php 
        echo TEXT_AUTHORS_DESCRIPTION;
        ?>
</td>
            <td>
              <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="main" valign="top"><?php 
        echo $languages[$i]['name'] . '&nbsp;';
        ?>
</td>
                  <td class="main" valign="top"><?php 
        echo vam_draw_textarea_field('authors_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', vam_get_author_description($authors['authors_id'], $languages[$i]['id']));
        ?>
</td>
                </tr>
              </table>
            </td>
          <tr>
          <tr>
            <td colspan="2"><?php 
        echo vam_draw_separator('pixel_trans.gif', '1', '10');
        ?>
</td>
          </tr>
          <tr>
            <td class="main" valign="top"><?php 
        echo TEXT_AUTHORS_URL;
Beispiel #4
0
</td>
            <td class="main" align="right" valign="top"><?php 
    echo vam_product_thumb_image($rInfo->products_image, $rInfo->products_name);
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table witdh="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="main" valign="top"><b><?php 
    echo ENTRY_REVIEW;
    ?>
</b><br /><br /><?php 
    echo vam_draw_textarea_field('reviews_text', 'soft', '60', '15', $rInfo->reviews_text);
    ?>
</td>
          </tr>
          <tr>
            <td class="smallText" align="right"><?php 
    echo ENTRY_REVIEW_TEXT;
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
                    $prodAttribs .= '<small><i> - ' . $attribrecs['poname'] . ' ' . $attribrecs['povname'] . '</i></small><br>';
                }
            }
        }
        // END OF ATTRIBUTE DB CODE
        $tprice = $tprice + $inrec['qty'] * $inrec2['price'];
        if ($inrec['qty'] != 0) {
            $pprice_formated = $currencies->format($inrec2['price']);
            $tpprice_formated = $currencies->format($inrec['qty'] * $inrec2['price']);
            $cline .= "<tr class='dataTableRow'>\n                    <td class='dataTableContent' align='left' vAlign='top' colspan='2' width='12%' nowrap> &nbsp;</td>\n                    <td class='dataTableContent' align='left' vAlign='top' width='13%' nowrap>" . $inrec2['model'] . "</td>\n                    <td class='dataTableContent' align='left' vAlign='top' colspan='2' width='55%'><a href='" . vam_href_link(FILENAME_CATEGORIES, 'action=new_product&read=only&pID=' . $inrec['pid'] . '&origin=' . FILENAME_RECOVER_CART_SALES . '?page=' . $_GET['page'], 'NONSSL') . "'><b>" . $inrec2['name'] . "</b></a>\n                    " . $prodAttribs . "\n                    </td>\n                    <td class='dataTableContent' align='center' vAlign='top' width='5%' nowrap>" . $inrec['qty'] . "</td>\n                    <td class='dataTableContent' align='right'  vAlign='top' width='5%' nowrap>" . $pprice_formated . "</td>\n                    <td class='dataTableContent' align='right'  vAlign='top' width='10%' nowrap>" . $tpprice_formated . "</td>\n                 </tr>";
        }
    }
    $totalAll_formated = $currencies->format($totalAll);
    $cline = "<tr></tr><td class='dataTableContent' align='right' colspan='8'><b>" . TABLE_GRAND_TOTAL . "</b>" . $totalAll_formated . "</td>\n              </tr>";
    echo $cline;
    echo "<tr><td colspan=8><b>" . PSMSG . "</b><br>" . vam_draw_textarea_field('message', 'soft', '80', '5') . "<br /><span class=button><button type=submit value=.TEXT_SEND_EMAIL.>" . TEXT_SEND_EMAIL . "</button></span></td></tr>";
    ?>
 </form>
<?php 
}
//
// end footer of both e-mail and report
//
?>

            </table>
          <!-- REPORT TABLE END //-->
          </td>
        </tr>
      </table>
    </td>
    } 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');
$vamTemplate->assign('COMMENTS', vam_draw_textarea_field('comments', 'soft', '60', '5', $_POST['comments']) . vam_draw_hidden_field('comments_added', 'YES'));
$vamTemplate->assign('conditions', 'false');
//check if display conditions on checkout page is true
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
    $vamTemplate->assign('conditions', 'true');
    if (GROUP_CHECK == 'true') {
        $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
    }
    $shop_content_query = vam_db_query("SELECT\n\t                                                content_title,\n\t                                                content_heading,\n\t                                                content_text,\n\t                                                content_file\n\t                                                FROM " . TABLE_CONTENT_MANAGER . "\n\t                                                WHERE content_group='3' " . $group_check . "\n\t                                                AND languages_id='" . $_SESSION['languages_id'] . "'");
    $shop_content_data = vam_db_fetch_array($shop_content_query);
    if ($shop_content_data['content_file'] != '') {
        $conditions = '<iframe SRC="' . DIR_WS_CATALOG . 'media/content/' . $shop_content_data['content_file'] . '" width="100%" height="300">';
        $conditions .= '</iframe>';
    } else {
        $conditions = '<textarea name="blabla" cols="60" rows="10" readonly="readonly">' . strip_tags(str_replace('<br />', "\n", $shop_content_data['content_text'])) . '</textarea>';
    }
    echo TEXT_EDIT_CATEGORIES_HEADING_TITLE;
    ?>
</td>
            <td valign="top" class="main"><?php 
    echo vam_draw_input_field('categories_heading_title[' . $languages[$i]['id'] . ']', $categories_name[$languages[$i]['id']] ? stripslashes($categories_name[$languages[$i]['id']]) : vam_get_categories_heading_title($cInfo->categories_id, $languages[$i]['id']));
    ?>
</td>
          </tr>

          <tr>
            <td valign="top" class="main"><?php 
    echo TEXT_EDIT_CATEGORIES_DESCRIPTION;
    ?>
</td>
            <td valign="top" class="main"><?php 
    echo vam_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', 'soft', '95', '25', $categories_description[$languages[$i]['id']] ? stripslashes($categories_description[$languages[$i]['id']]) : vam_get_categories_description($cInfo->categories_id, $languages[$i]['id']));
    ?>
<br /><a href="javascript:toggleHTMLEditor('<?php 
    echo 'categories_description[' . $languages[$i]['id'] . ']';
    ?>
');"><?php 
    echo TEXT_TOGGLE_EDITOR;
    ?>
</a></td>
          </tr>

          <tr>
            <td valign="top" class="main"><?php 
    echo TEXT_META_TITLE;
    ?>
</td>
   </tr>
<?php 
    $r = 0;
    $orders_history_query = vam_db_query("SELECT orders_status_history_id, orders_status_id, date_added, customer_notified, comments \n                                    FROM " . TABLE_ORDERS_STATUS_HISTORY . " \n\t\t\t\t\t\t\t\t\tWHERE orders_id = '" . vam_db_prepare_input($_GET['oID']) . "' \n\t\t\t\t\t\t\t\t\tORDER BY date_added");
    if (vam_db_num_rows($orders_history_query)) {
        while ($orders_history = vam_db_fetch_array($orders_history_query)) {
            $r++;
            $rowClass = $r / 2 == floor($r / 2) ? 'dataRowOver' : 'dataRow';
            echo '  <tr class="' . $rowClass . '" id="commentRow' . $orders_history['orders_status_history_id'] . '" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this, \'' . $rowClass . '\')">' . "\n" . '	  <td class="smallText" align="center"><div id="do_not_delete"><input name="update_comments[' . $orders_history['orders_status_history_id'] . '][delete]" type="checkbox" onClick="updateCommentsField(\'delete\', \'' . $orders_history['orders_status_history_id'] . '\', this.checked, \'\', this)"></div></td>' . "\n" . '    <td class="smallText" align="center">' . vam_datetime_short($orders_history['date_added']) . '</td>' . "\n" . '    <td class="smallText" align="center">';
            if ($orders_history['customer_notified'] == '1') {
                echo vam_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n";
            } else {
                echo vam_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n";
            }
            echo '<td class="smallText" align="left">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n";
            echo '<td class="smallText" align="left">' . vam_draw_textarea_field("update_comments[" . $orders_history['orders_status_history_id'] . "][comments]", "soft", "40", "5", "" . vam_db_output($orders_history['comments']) . "", "onChange=\"updateCommentsField('update', '" . $orders_history['orders_status_history_id'] . "', 'false', encodeURIComponent(this.value))\"") . '' . "\n" . '    </td>' . "\n";
            echo '  </tr>' . "\n";
        }
    } else {
        echo '  <tr>' . "\n" . '    <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . '  </tr>' . "\n";
    }
    ?>
  
  </table>
  
  <?php 
}
// end if ($action == 'insert_new_comment') {
//12. insert shipping method when one doesn't already exist
if ($action == 'insert_shipping') {
    $order = new manualOrder($_GET['oID']);
        }
    } else {
        $error = true;
    }
}
$breadcrumb->add(NAVBAR_TITLE, vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_CONTACT, vam_href_link(FILENAME_AFFILIATE_CONTACT));
require DIR_WS_INCLUDES . 'header.php';
if (isset($_GET['action']) && $_GET['action'] == 'success') {
    $vamTemplate->assign('SUMMARY_LINK', '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_SUMMARY) . '">' . vam_image_button('submit.png', IMAGE_BUTTON_CONTINUE) . '</a>');
} else {
    // Get some values of the Affiliate
    $affili_sql = vam_db_query("SELECT affiliate_firstname, affiliate_lastname, affiliate_email_address FROM " . TABLE_AFFILIATE . " WHERE affiliate_id = " . $_SESSION['affiliate_id']);
    $affili_res = vam_db_fetch_array($affili_sql);
    $vamTemplate->assign('FORM_ACTION', vam_draw_form('contact_us', vam_href_link(FILENAME_AFFILIATE_CONTACT, 'action=send')));
    $vamTemplate->assign('INPUT_NAME', vam_draw_input_field('name', $affili_res['affiliate_firstname'] . ' ' . $affili_res['affiliate_lastname']));
    $vamTemplate->assign('INPUT_EMAIL', vam_draw_input_field('email', $affili_res['affiliate_email_address']));
    $vamTemplate->assign('error', $error);
    $vamTemplate->assign('TEXTAREA_ENQUIRY', vam_draw_textarea_field('enquiry', 'soft', 50, 15, $_POST['enquiry']));
    $vamTemplate->assign('BUTTON_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
}
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/affiliate_contact.html');
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
$vamTemplate->display(CURRENT_TEMPLATE . '/index.html');
     $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=' . $_GET['fID']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
     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>');
            }
            include DIR_FS_CATALOG . 'media/content/' . $shop_content_data['content_file'];
            if ($isTextFile) {
                echo '';
            }
            $contact_content = ob_get_contents();
            ob_end_clean();
        } else {
            $contact_content = $shop_content_data['content_text'];
        }
        require DIR_WS_INCLUDES . 'header.php';
        $vamTemplate->assign('CONTACT_CONTENT', $contact_content);
        $vamTemplate->assign('FORM_ACTION', vam_draw_form('contact_us', vam_href_link(FILENAME_CONTENT, 'action=send&coID=' . (int) $_GET['coID'])));
        $vamTemplate->assign('INPUT_NAME', vam_draw_input_field('name', $error ? $_POST['name'] : $first_name));
        $vamTemplate->assign('INPUT_EMAIL', vam_draw_input_field('email', $error ? $_POST['email'] : $email_address));
        $vamTemplate->assign('INPUT_TEXT', vam_draw_textarea_field('message_body', 'soft', 50, 15, $_POST[''], ''));
        $vamTemplate->assign('BUTTON_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
        $vamTemplate->assign('FORM_END', '</form>');
    }
    $vamTemplate->assign('language', $_SESSION['language']);
    $vamTemplate->caching = 0;
    $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/contact_us.html');
} else {
    if ($shop_content_data['content_file'] != '') {
        ob_start();
        $file_name = basename($shop_content_data['content_file']);
        $isTextFile = strpos($file_name, '.txt');
        if ($isTextFile) {
            echo '';
        }
        include DIR_FS_CATALOG . 'media/content/' . $shop_content_data['content_file'];
<?php 
        }
        $languages = vam_get_languages();
        for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
            $language_id = $languages[$i]['id'];
            ?>

      <tr>
        <td align="left" valign="top" class="main"><?php 
            if ($i == 0) {
                echo COUPON_DESC;
            }
            ?>
</td>
        <td align="left" valign="top"><?php 
            echo vam_draw_textarea_field('coupon_desc[' . $languages[$i]['id'] . ']', 'physical', '24', '3', $coupon_desc[$language_id]);
            ?>
</td>
        <td align="left" valign="top" class="main"><?php 
            if ($i == 0) {
                echo COUPON_DESC_HELP;
            }
            ?>
</td>
      </tr>
<?php 
        }
        ?>
      <tr>
        <td align="left" class="main"><?php 
        echo COUPON_AMOUNT;
    ?>
<br /><a href="javascript:toggleHTMLEditor('<?php 
    echo 'products_description_' . $languages[$i]['id'];
    ?>
');"><?php 
    echo TEXT_TOGGLE_EDITOR;
    ?>
</a></td>
          </tr>
          <tr>
            <td valign="top" class="main"><?php 
    echo TEXT_PRODUCTS_SHORT_DESCRIPTION;
    ?>
</td>
            <td valign="top" class="main"><?php 
    echo vam_draw_textarea_field('products_short_description_' . $languages[$i]['id'], 'soft', '95', '25', $products_short_description[$languages[$i]['id']] ? stripslashes($products_short_description[$languages[$i]['id']]) : vam_get_products_short_description($pInfo->products_id, $languages[$i]['id']));
    ?>
<br /><a href="javascript:toggleHTMLEditor('<?php 
    echo 'products_short_description_' . $languages[$i]['id'];
    ?>
');"><?php 
    echo TEXT_TOGGLE_EDITOR;
    ?>
</a></td>
          </tr>
          <tr>
            <td valign="top" class="main"><?php 
    echo TEXT_PRODUCTS_KEYWORDS;
    ?>
</td>
            <td valign="top" class="main"><?php 
            $vamTemplate->display(CURRENT_TEMPLATE . '/module/ask_a_question.html', $cache_id);
        }
    }
} else {
    $product_info_query = vam_db_query("select * FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int) $_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'");
    $product_info = vam_db_fetch_array($product_info_query);
    include 'includes/header.php';
    $breadcrumb->add(NAVBAR_TITLE_ASK, vam_href_link(FILENAME_ASK_PRODUCT_QUESTION, 'products_id=' . $product->data['products_id'], 'SSL'));
    $vamTemplate->assign('PRODUCTS_NAME', $product_info['products_name']);
    $vamTemplate->assign('PRODUCTS_MODEL', $product_info['products_model']);
    $vamTemplate->assign('CAPTCHA_IMG', vam_image(HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DISPLAY_CAPTCHA, 'captcha', '', '', 'name="captcha" '));
    $vamTemplate->assign('CAPTCHA_INPUT', vam_draw_input_field('captcha', '', 'size="6" maxlength="6"', 'text', false));
    $vamTemplate->assign('FORM_ACTION', vam_draw_form('ask_a_question', vam_href_link(FILENAME_ASK_PRODUCT_QUESTION, 'products_id=' . $_GET['products_id'] . '')) . vam_draw_hidden_field('action', 'process') . vam_draw_hidden_field('products_id', $_GET['products_id']));
    if (isset($_SESSION['customer_id'])) {
        //-> registered user********************************************************
        $vamTemplate->assign('INPUT_FIRSTNAME', $_SESSION['customer_first_name']);
        $vamTemplate->assign('INPUT_LASTNAME', $_SESSION['customer_last_name']);
        $vamTemplate->assign('INPUT_EMAIL', $_SESSION['customer_email_address']);
    } else {
        //-> guest *********************************************************
        $vamTemplate->assign('INPUT_FIRSTNAME', vam_draw_input_fieldNote(array('name' => 'firstname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''))));
        $vamTemplate->assign('INPUT_LASTNAME', vam_draw_input_fieldNote(array('name' => 'lastname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''))));
        $vamTemplate->assign('INPUT_EMAIL', vam_draw_input_fieldNote(array('name' => 'email_address', 'text' => '&nbsp;' . (vam_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : ''))));
    }
    $vamTemplate->assign('INPUT_TEXT', vam_draw_textarea_field('message_body', 'soft', 50, 15, stripslashes($_POST['message_body'])));
    $vamTemplate->assign('FORM_END', '</form>');
    $vamTemplate->assign('BUTTON_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
    $vamTemplate->assign('BUTTON_CONTINUE', '<a class="button" href="javascript:window.close()">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
    $vamTemplate->caching = 0;
    $vamTemplate->display(CURRENT_TEMPLATE . '/module/ask_a_question.html');
}
Beispiel #15
0
    ?>
</td>
          </tr>
          <tr>
            <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_FAQ_ANSWER;
    ?>
:</td>
            <td class="main"><?php 
    echo vam_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . vam_draw_textarea_field('answer', '', '100%', '25', stripslashes($faq['answer']));
    ?>
<br /><a href="javascript:toggleHTMLEditor('answer');"><?php 
    echo TEXT_TOGGLE_EDITOR;
    ?>
</a></td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_FAQ_PAGE_URL;
    ?>
:</td>
            <td class="main"><?php 
    echo vam_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . vam_draw_input_field('faq_page_url', $faq['faq_page_url'], 'size="60"', true);
    ?>
</td>
    </td></tr></table></form>
    <?php

} 
else if($action=='edit') {
	echo vam_draw_form('pin', FILENAME_PIN_LOADER);
?>
	<table>
		<tr>
			<td class="main"><?php echo PIN_ACTION_EDIT; ?> <b><?php echo vam_get_products_name($_REQUEST['products_id']);?></b></td>
		</tr>
		<tr>
			<td><?php echo vam_draw_hidden_field('action', 'update') . vam_draw_hidden_field('products_id', $_REQUEST['products_id']); ?>&nbsp;</td>
		</tr>
		<tr>
			<td><?php echo vam_draw_textarea_field('pinstext', 'soft', 50, 30, $pin_stack);?></td>
		</tr>
		<tr>
			<span class="button"><button type="submit" onClick="return confirm('<?php echo BUTTON_UPDATE; ?>')" value="<?php echo BUTTON_UPDATE; ?>"><?php echo vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12'); ?>&nbsp;<?php echo BUTTON_UPDATE; ?></button></span>
		</tr>
	</table>
    </form>
    <?php

}
else { // default action - show stats
	?>
	<table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top">
			<table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td class="main"><b><?php 
    echo ENTRY_NOTIFY_COMMENTS;
    ?>
</b></td>
          <td class="main" align="right"><?php 
    echo oe_draw_checkbox_field('notify_comments', '', false, '', 'id="notify_comments"');
    ?>
</td>
        </tr>
     </table>
	  </td>
    <td class="main" width="10">&nbsp;</td>
    <td class="main">
    <?php 
    echo vam_draw_textarea_field('comments', 'soft', '40', '5', '', 'id="comments"');
    ?>
    </td>
  </tr>
    
	<?php 
    if (ORDER_EDITOR_USE_AJAX == 'true') {
        ?>
 
	<script language="JavaScript" type="text/javascript">
     <!--
	     document.write("<tr>");
         document.write("<td colspan=\"3\" align=\"right\">");
		 document.write("<span class=\"button\"><button type=\"button\" name=\"comments_button\" value=\"<?php 
        echo oe_html_no_quote(AJAX_SUBMIT_COMMENT);
        ?>
                break;
            case 2:
                // Link to Products
                if ($prod_id > 0) {
                    $link = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $_SESSION['affiliate_id'] . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $_SESSION['affiliate_id'] . '&affiliate_banner_id=' . $ban_id . '" border="0" alt="' . $affiliate_products['products_name'] . '"></a>';
                } else {
                    // generic_link
                    $link = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $_SESSION['affiliate_id'] . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $_SESSION['affiliate_id'] . '&affiliate_banner_id=' . $ban_id . '" border="0" alt="' . $affiliate_banners['affiliate_banners_title'] . '"></a>';
                }
                break;
        }
        $banner_table_content .= '<tr>';
        $banner_table_content .= '<td><table width="100%" border="0" cellspacing="0" cellpadding="2">';
        $banner_table_content .= '<tr><td class="infoBoxHeading" align="center">' . TEXT_AFFILIATE_NAME . ' ' . $affiliate_banners['affiliate_banners_title'] . '</td></tr>';
        $banner_table_content .= '<tr><td class="smallText" align="center"><br>' . $link . '</td></tr>';
        $banner_table_content .= '<tr><td class="smallText" align="center">' . TEXT_AFFILIATE_INFO . '</td></tr>';
        $banner_table_content .= '<tr><td class="smallText" align="center">' . vam_draw_textarea_field('affiliate_banner', 'soft', '60', '6', $link) . '</td></tr>';
        $banner_table_content .= '</table></td></tr>';
    }
    $vamTemplate->assign('banner_table_content', $banner_table_content);
}
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/affiliate_banners.html');
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
$vamTemplate->display(CURRENT_TEMPLATE . '/index.html');
Beispiel #19
0
        $vamTemplate->assign('PERSONAL_MESSAGE', sprintf(PERSONAL_MESSAGE, $gv_result['customers_firstname']));
        $vamTemplate->assign('POST_MESSAGE', stripslashes($_POST['message']));
    }
    $vamTemplate->assign('HIDDEN_FIELDS', vam_draw_hidden_field('send_name', $send_name) . vam_draw_hidden_field('to_name', stripslashes($_POST['to_name'])) . vam_draw_hidden_field('email', $_POST['email']) . vam_draw_hidden_field('amount', $gv_amount) . vam_draw_hidden_field('message', stripslashes($_POST['message'])));
    $vamTemplate->assign('LINK_BACK', vam_image_submit('back.png', IMAGE_BUTTON_BACK, 'name=back') . '</a>');
    $vamTemplate->assign('LINK_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
} elseif ($_GET['action'] == '' || $error) {
    $vamTemplate->assign('action', '');
    $vamTemplate->assign('FORM_ACTION', '<form action="' . vam_href_link(FILENAME_GV_SEND, 'action=send', 'NONSSL') . '" method="post">');
    $vamTemplate->assign('LINK_SEND', vam_href_link(FILENAME_GV_SEND, 'action=send', 'NONSSL'));
    $vamTemplate->assign('INPUT_TO_NAME', vam_draw_input_field('to_name', stripslashes($_POST['to_name'])));
    $vamTemplate->assign('INPUT_EMAIL', vam_draw_input_field('email', $_POST['email']));
    $vamTemplate->assign('ERROR_EMAIL', $error_email);
    $vamTemplate->assign('INPUT_AMOUNT', vam_draw_input_field('amount', $_POST['amount'], '', 'text', false));
    $vamTemplate->assign('ERROR_AMOUNT', $error_amount);
    $vamTemplate->assign('TEXTAREA_MESSAGE', vam_draw_textarea_field('message', 'soft', 50, 15, stripslashes($_POST['message'])));
    $vamTemplate->assign('LINK_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
}
$vamTemplate->assign('FORM_END', '</form>');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/gv_send.html');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
$template = file_exists('templates/' . CURRENT_TEMPLATE . '/' . FILENAME_GV_SEND . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_GV_SEND . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->display($template);
include 'includes/application_bottom.php';
    ?>
</td>
          </tr>
          <tr>
            <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
          </tr>
          <tr>
            <td valign="top" class="main"><?php 
    echo TEXT_BANNERS_HTML_TEXT;
    ?>
</td>
            <td class="main"><?php 
    echo vam_draw_textarea_field('html_text', 'soft', '60', '5', $bInfo->banners_html_text);
    ?>
            <br/><a href="javascript:toggleHTMLEditor('html_text');">On/Off HTML -editor</a>
            </td>
          </tr>
          <tr>
            <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_BANNERS_SCHEDULED_AT;
    ?>
<br /><small>(dd/mm/yyyy)</small></td>
Beispiel #21
0
        <td class="main"><br /><b><?php 
    echo TABLE_HEADING_COMMENTS;
    ?>
</b></td>
      </tr>
      <tr>
        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '5');
    ?>
</td>
      </tr>
      <tr><?php 
    echo vam_draw_form('status', FILENAME_ORDERS, vam_get_all_get_params(array('action')) . 'action=update_order');
    ?>
        <td class="main"><?php 
    echo vam_draw_textarea_field('comments', 'soft', '60', '5');
    ?>
</td>
      </tr>
      <tr>
        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><b><?php 
        echo vam_draw_password_field('entry_password', $customers_password_encrypted) . '&nbsp;' . ENTRY_PASSWORD_ERROR;
    } else {
        echo vam_draw_password_field('entry_password', $customers_password_encrypted);
    }
} else {
    echo vam_draw_password_field('entry_password', $customers_password_encrypted);
}
?>
</td>
          </tr>
            <td class="main" valign="top"><?php 
echo ENTRY_MAIL_COMMENTS;
?>
</td>
            <td class="main"><?php 
echo vam_draw_textarea_field('mail_comments', 'soft', '60', '5', $mail_comments);
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
echo vam_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
      </tr>
      <tr>
        <td align="right" class="main"><?php 
echo '<span class="button"><button type="submit" value="' . BUTTON_INSERT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('action'))) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>';
?>
Beispiel #23
0
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td valign="top" class="main"><?php 
    echo TEXT_MESSAGE;
    ?>
</td>
                <td><?php 
    echo vam_draw_textarea_field('message', 'soft', '100%', '55');
    ?>
<br /><a href="javascript:toggleHTMLEditor('message');"><?php 
    echo TEXT_TOGGLE_EDITOR;
    ?>
</a></td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2" align="right"><?php 
    echo '<span class="button"><button type="submit" value="' . BUTTON_SEND_EMAIL . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_SEND_EMAIL . '</button></span>';
?>
</div></p>
    <table width="100%">
      <tr>
      <form name="customers_memo" method="POST" action="popup_memo.php?action=save&ID=<?php 
echo (int) $_GET['ID'];
?>
">
        <td class="main" style="border-top: 1px solid; border-color: #cccccc;"><b><?php 
echo TEXT_TITLE;
?>
</b>: <?php 
echo vam_draw_input_field('memo_title') . vam_draw_hidden_field('ID', (int) $_GET['ID']);
?>
<br /><?php 
echo vam_draw_textarea_field('memo_text', 'soft', '60', '5');
?>
<br /><?php 
echo '<span class="button"><button type="submit" value="' . BUTTON_INSERT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span>';
?>
</td>
      </tr>
    </table></form>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">

  <tr>
    <td>



    <td class="main"><?php 
Beispiel #25
0
function vam_get_extra_fields($customer_id, $languages_id)
{
    $extra_fields_query = vam_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_input_value, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
    $extra_fields_string = '';
    if (vam_db_num_rows($extra_fields_query) > 0) {
        $extra_fields_string .= '<tr><td class="formAreaTitle"><b>' . CATEGORY_EXTRA_FIELDS . '</b></td></tr>';
        $extra_fields_string .= '<td class="formArea"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                                     <tr class="infoBoxContents"><td><table border="0" cellspacing="2" cellpadding="2">';
        while ($extra_fields = vam_db_fetch_array($extra_fields_query)) {
            $value = '';
            if (isset($customer_id)) {
                $value_query = vam_db_query("select value from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id . " and fields_id=" . $extra_fields['fields_id']);
                $value_info = vam_db_fetch_array($value_query);
                $value_list = explode("\n", $value_info['value']);
                for ($i = 0, $n = sizeof($value_list); $i < $n; $i++) {
                    $value_list[$i] = trim($value_list[$i]);
                }
                $value = $value_list[0];
            }
            $extra_fields_string .= '<tr>
                                        <td class="main" valign="top">' . $extra_fields['fields_name'] . ': </td><td class="main" valign="top">';
            $select_values_list = explode("\n", $extra_fields['fields_input_value']);
            $select_values = array();
            foreach ($select_values_list as $item) {
                $item = trim($item);
                $select_values[] = array('id' => $item, 'text' => $item);
            }
            switch ($extra_fields['fields_input_type']) {
                case 0:
                    $extra_fields_string .= vam_draw_input_field('fields_' . $extra_fields['fields_id'], $value) . ($extra_fields['fields_required_status'] == 1 ? '<span class="inputRequirement">*</span>' : '');
                    break;
                case 1:
                    $extra_fields_string .= vam_draw_textarea_field('fields_' . $extra_fields['fields_id'], 'soft', 50, 6, $value, 'style="width:400px;"') . ($extra_fields['fields_required_status'] == 1 ? '<span class="inputRequirement">*</span>' : '');
                    break;
                case 2:
                    foreach ($select_values_list as $item) {
                        $item = trim($item);
                        $extra_fields_string .= vam_draw_selection_field('fields_' . $extra_fields['fields_id'], 'radio', $item, $value == $item ? true : false) . $item . ($extra_fields['fields_required_status'] == 1 ? '<span class="inputRequirement">*</span>' : '') . '<br>';
                        $extra_fields['fields_required_status'] = 0;
                    }
                    break;
                case 3:
                    $cnt = 1;
                    foreach ($select_values_list as $item) {
                        $item = trim($item);
                        $extra_fields_string .= vam_draw_selection_field('fields_' . $extra_fields['fields_id'] . '_' . $cnt++, 'checkbox', $item, in_array($item, $value_list) ? true : false) . $item . ($extra_fields['fields_required_status'] == 1 ? '<span class="inputRequirement">*</span>' : '') . '<br>';
                        $extra_fields['fields_required_status'] = 0;
                    }
                    $extra_fields_string .= vam_draw_hidden_field('fields_' . $extra_fields['fields_id'] . '_total', $cnt);
                    break;
                case 4:
                    $extra_fields_string .= vam_draw_pull_down_menu('fields_' . $extra_fields['fields_id'], $select_values, $value) . ($extra_fields['fields_required_status'] == 1 ? '<span class="inputRequirement">*</span>' : '');
                    break;
                default:
                    $extra_fields_string .= vam_draw_input_field('fields_' . $extra_fields['fields_id'], $value) . ($extra_fields['fields_required_status'] == 1 ? '<span class="inputRequirement">*</span>' : '');
                    break;
            }
            $extra_fields_string .= ' ' . '</td></tr>';
        }
        $extra_fields_string .= '</table></td></tr></table></td></tr>';
        $extra_fields_string .= '<tr><td>' . vam_draw_separator('pixel_trans.gif', '100%', '10') . '</td></tr>';
    }
    return $extra_fields_string;
}
function vam_get_extra_fields($customer_id, $languages_id)
{
    $extra_fields_query = vam_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_input_value, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id);
    $extra_fields_string = '';
    $extra_fields_string_name = '';
    $extra_fields_string_value .= '';
    if (vam_db_num_rows($extra_fields_query) > 0) {
        while ($extra_fields = vam_db_fetch_array($extra_fields_query)) {
            $value = '';
            if (isset($customer_id)) {
                $value_query = vam_db_query("select value from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id . " and fields_id=" . $extra_fields['fields_id']);
                $value_info = vam_db_fetch_array($value_query);
                $value_list = explode("\n", $value_info['value']);
                for ($i = 0, $n = sizeof($value_list); $i < $n; $i++) {
                    $value_list[$i] = trim($value_list[$i]);
                }
                $value = $value_list[0];
            }
            $extra_fields_string_name = $extra_fields['fields_name'];
            $select_values_list = explode("\n", $extra_fields['fields_input_value']);
            $select_values = array();
            foreach ($select_values_list as $item) {
                $item = trim($item);
                $select_values[] = array('id' => $item, 'text' => $item);
            }
            switch ($extra_fields['fields_input_type']) {
                case 0:
                    $extra_fields_string_value = vam_draw_input_field('fields_' . $extra_fields['fields_id'], $value) . ($extra_fields['fields_required_status'] == 1 ? '&nbsp;<span class="Requirement">*</span>' : '');
                    break;
                case 1:
                    $extra_fields_string_value = vam_draw_textarea_field('fields_' . $extra_fields['fields_id'], 'soft', 50, 6, $value, 'style="width:400px;"') . ($extra_fields['fields_required_status'] == 1 ? '&nbsp;<span class="Requirement">*</span>' : '');
                    break;
                case 2:
                    $extra_fields_string_value = '';
                    foreach ($select_values_list as $item) {
                        $item = trim($item);
                        $extra_fields_string_value .= vam_draw_selection_field('fields_' . $extra_fields['fields_id'], 'radio', $item, $value == $item ? true : false) . $item . ($extra_fields['fields_required_status'] == 1 ? '&nbsp;<span class="Requirement">*</span>' : '') . '<br />';
                        $extra_fields['fields_required_status'] = 0;
                    }
                    break;
                case 3:
                    $extra_fields_string_value = '';
                    $cnt = 1;
                    foreach ($select_values_list as $item) {
                        $item = trim($item);
                        $extra_fields_string_value .= vam_draw_selection_field('fields_' . $extra_fields['fields_id'] . '_' . $cnt++, 'checkbox', $item, @in_array($item, $value_list) ? true : false) . $item . ($extra_fields['fields_required_status'] == 1 ? '&nbsp;<span class="Requirement">*</span>' : '') . '<br />';
                        $extra_fields['fields_required_status'] = 0;
                    }
                    $extra_fields_string_value .= vam_draw_hidden_field('fields_' . $extra_fields['fields_id'] . '_total', $cnt);
                    break;
                case 4:
                    $extra_fields_string_value = vam_draw_pull_down_menu('fields_' . $extra_fields['fields_id'], $select_values, $value) . ($extra_fields['fields_required_status'] == 1 ? '&nbsp;<span class="Requirement">*</span>' : '');
                    break;
                default:
                    $extra_fields_string_value = vam_draw_input_field('fields_' . $extra_fields['fields_id'], $value) . ($extra_fields['fields_required_status'] == 1 ? '&nbsp;<span class="Requirement">*</span>' : '');
                    break;
            }
            $extra_fields_string[] = array('NAME' => $extra_fields_string_name, 'VALUE' => $extra_fields_string_value);
        }
    }
    return $extra_fields_string;
}
                  <tr align="left">
                    <td valign="top" class="main"><?php 
echo TEXT_TITLE_6;
?>
&nbsp;</td>
                    <td><table border="0" cellspacing="0" cellpadding="0">
<?php 
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    ?>
                      <tr>
                        <td valign="top"><?php 
    echo vam_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);
    ?>
</td>
                        <td class="main"><?php 
    echo vam_draw_textarea_field('products_tab_6[' . $languages[$i]['id'] . ']', 'soft', '120', '15', isset($products_tab_6[$languages[$i]['id']]) ? $products_tab_6[$languages[$i]['id']] : $products_tabs[$languages[$i]['id']]['6']);
    ?>
</td>
                      </tr>
                      <tr>
                        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '100%', '10');
    ?>
</td>
                      </tr>
<?php 
}
?>
                    </table></td>
                  </tr>
                </table>
    $get_params_back = $get_params;
}
$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;
Beispiel #29
0
require_once DIR_FS_INC . 'vam_random_charcode.inc.php';
require_once DIR_FS_INC . 'vam_render_vvcode.inc.php';
// create smarty elements
if (isset($_POST['firstname'])) {
    $firstname = $_POST['firstname'];
}
if (isset($_POST['phone'])) {
    $phone = $_POST['phone'];
}
if (isset($_POST['message_body'])) {
    $message_body = stripslashes($_POST['message_body']);
}
if (isset($_POST['phone'])) {
    $subject = $_POST['subject'];
    $txt_mail = 'tel: ' . $phone . " " . $message_body;
    // отправка данных
    vam_php_mail('', EMAIL_SUPPORT_NAME, EMAIL_SUPPORT_ADDRESS, STORE_NAME, EMAIL_SUPPORT_FORWARDING_STRING, '', $firstname, '', '', $subject, '', $txt_mail);
    die('Спасибо. Ваше сообщение отправлено. Вскоре мы Вам перезвоним.');
}
$vamTemplate = new vamTemplate();
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('CAPTCHA_IMG', vam_image(HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DISPLAY_CAPTCHA, 'captcha', '150', '', 'name="captcha" '));
$vamTemplate->assign('CAPTCHA_INPUT', vam_draw_input_field('captcha', '', 'size="6" maxlength="6"', 'text', false));
$vamTemplate->assign('FORM_ACTION', vam_draw_form('callback_form', '') . vam_draw_hidden_field('action', 'process') . vam_draw_hidden_field('products_id', $_GET['products_id']));
$vamTemplate->assign('INPUT_FIRSTNAME', vam_draw_input_field('firstname', $firstname, 'size="30" maxlength="100"', 'text', true));
$vamTemplate->assign('INPUT_LASTNAME', vam_draw_input_field('phone', $phone, 'size="30" maxlength="100"', 'text', true));
$vamTemplate->assign('INPUT_TEXT', vam_draw_textarea_field('message_body', 'soft', 30, 3, $message_body));
$vamTemplate->assign('FORM_END', '</form>');
$vamTemplate->assign('BUTTON_SUBMIT', '<a class="button" id="callback_send" href="javascript:void(0);">' . vam_image_button('submit.png', IMAGE_BUTTON_SEND) . '</a>');
$vamTemplate->assign('BUTTON_CONTINUE', '<a class="button" href="javascript:void(0);" onclick="$(\'#showCart\').dialog(\'close\');">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->display(CURRENT_TEMPLATE . '/module/callback_form.html');
 $specification_name_string = '';
 $specification_description_string = '';
 $specification_prefix_string = '';
 $specification_suffix_string = '';
 $specification_query_raw = "select products_column_name,\n                                           specification_sort_order,\n                                           show_filter,\n                                           filter_class,\n                                           filter_show_all,\n                                           filter_display,\n                                           enter_values\n                                    from " . TABLE_SPECIFICATION . "\n                                    where specifications_id = '" . $sInfo->specifications_id . "'\n                                    limit 1";
 // print $specifications_query_raw . "<br />\n";
 $specification_query = vam_db_query($specification_query_raw);
 $specification_fixed_data = vam_db_fetch_array($specification_query);
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     $specification_query_raw = "select specification_name, \n                                             specification_description, \n                                             specification_prefix, \n                                             specification_suffix\n                                      from " . TABLE_SPECIFICATION_DESCRIPTION . "\n                                      where language_id = '" . $languages[$i]['id'] . "'\n                                        and specifications_id = '" . $sInfo->specifications_id . "'\n                                      limit 1";
     // print $specifications_query_raw . "<br />\n";
     $specification_query = vam_db_query($specification_query_raw);
     $specification_data = vam_db_fetch_array($specification_query);
     $specification_data = array_merge((array) $specification_fixed_data, (array) $specification_data);
     $specification_name_string .= '<br />' . $languages[$i]['name'] . ':&nbsp;' . vam_draw_input_field('specification_name[' . $languages[$i]['id'] . ']', $specification_data['specification_name']);
     $specification_description_string .= '<br />' . $languages[$i]['name'] . ':&nbsp;' . vam_draw_textarea_field('specification_description[' . $languages[$i]['id'] . ']', 'soft', '40', '5', $specification_data['specification_description']);
     $specification_prefix_string .= '<br />' . $languages[$i]['name'] . ':&nbsp;' . vam_draw_input_field('specification_prefix[' . $languages[$i]['id'] . ']', $specification_data['specification_prefix']);
     $specification_suffix_string .= '<br />' . $languages[$i]['name'] . ':&nbsp;' . vam_draw_input_field('specification_suffix[' . $languages[$i]['id'] . ']', $specification_data['specification_suffix']);
 }
 $contents[] = array('text' => '<br />' . TEXT_SPECIFICATION_NAME . $specification_name_string);
 $contents[] = array('text' => '<br />' . TEXT_SPECIFICATION_DESCRIPTION . $specification_description_string);
 $contents[] = array('text' => '<br />' . TEXT_SPECIFICATION_PREFIX . $specification_prefix_string);
 $contents[] = array('text' => '<br />' . TEXT_SPECIFICATION_SUFFIX . $specification_suffix_string);
 $contents[] = array('text' => '<br />' . TEXT_EDIT_SORT_ORDER . '<br />' . vam_draw_input_field('specification_sort_order', $specification_data['specification_sort_order'], 'size="5"'));
 $contents[] = array('text' => '<br />' . TEXT_COLUMN_JUSTIFY . '<br />' . vam_draw_pull_down_menu('column_justify', $alignment_array, $specification_data['column_justify']) . '<br />');
 $contents[] = array('text' => '<br />' . TEXT_EXISTING_FIELD . '<br />' . vam_draw_pull_down_menu('products_column_name', $products_database_fields, $specification_data['products_column_name']) . '<br />' . TEXT_EXISTING_FIELD_NOTE);
 $show_comparison = 'True';
 $dont_show_comparison = 'False';
 if ($sInfo->show_comparison == 'False') {
     $show_comparison = 'False';
     $dont_show_comparison = 'True';