function selection()
 {
     global $order;
     if (!parent::selection()) {
         $this->enabled = false;
         return false;
     }
     if (!isset($_SESSION['sofort']['sofort_sofortboxjs'])) {
         $title = MODULE_PAYMENT_SOFORT_MULTIPAY_JS_LIBS;
         $_SESSION['sofort']['sofort_sofortboxjs'] = true;
     } else {
         $title = '';
     }
     switch (MODULE_PAYMENT_SOFORT_MULTIPAY_IMAGE) {
         case 'Logo & Text':
             $title .= $this->setImageText(MODULE_PAYMENT_SOFORT_LS_LOGO, MODULE_PAYMENT_SOFORT_LS_CHECKOUT_TEXT);
             break;
         case 'Infographic':
             $title .= $this->setImageText(MODULE_PAYMENT_SOFORT_LS_BANNER, '');
             break;
     }
     $cost = '';
     if (array_key_exists('ot_sofort', $GLOBALS)) {
         $cost = $GLOBALS['ot_sofort']->get_percent($this->code, 'price');
     }
     $conditionsChecked = false;
     if (isset($_SESSION['sofort']['sofort_conditions_ls']) && $_SESSION['sofort']['sofort_conditions_ls'] == 'sofort_conditions_ls') {
         $conditionsChecked = true;
     }
     $fields = array(array('title' => MODULE_PAYMENT_SOFORT_LS_TEXT_HOLDER, 'field' => xtc_draw_input_field('ls_sender_holder', array_key_exists('ls_sender_holder', $_SESSION['sofort']) ? strip_tags($_SESSION['sofort']['ls_sender_holder']) : strip_tags($order->billing['firstname'] . ' ' . $order->billing['lastname']))), array('title' => MODULE_PAYMENT_SOFORT_LS_TEXT_ACCOUNT_NUMBER, 'field' => xtc_draw_input_field('ls_account_number', array_key_exists('ls_account_number', $_SESSION['sofort']) ? strip_tags($_SESSION['sofort']['ls_account_number']) : '')), array('title' => MODULE_PAYMENT_SOFORT_LS_TEXT_BANK_CODE, 'field' => xtc_draw_input_field('ls_bank_code', array_key_exists('ls_bank_code', $_SESSION['sofort']) ? strip_tags($_SESSION['sofort']['ls_bank_code']) : '')), array('title' => MODULE_PAYMENT_SOFORT_LS_CHECKOUT_CONDITIONS, 'field' => xtc_draw_checkbox_field('sofort_conditions_ls', 'sofort_conditions_ls', $conditionsChecked)));
     //commerce:SEO - Bugfix
     if (isset($_REQUEST['xajax']) && !empty($_REQUEST['xajax'])) {
         $fields[0]['title'] = utf8_decode($fields[0]['title']);
         //holder
         $fields[1]['title'] = utf8_decode($fields[1]['title']);
         //account-nr
         $fields[2]['title'] = utf8_decode($fields[2]['title']);
         //bankcode
         $fields[3]['title'] = utf8_decode($fields[3]['title']);
         //conditions
         return array('id' => $this->code, 'module' => utf8_decode($this->title_extern), 'fields' => $fields, 'description' => utf8_decode($title), 'module_cost' => utf8_decode($cost));
     } else {
         return array('id' => $this->code, 'module' => $this->title_extern, 'fields' => $fields, 'description' => $title, 'module_cost' => $cost);
     }
 }
 function selection()
 {
     if (!parent::selection()) {
         $this->enabled = false;
         return false;
     }
     if (!isset($_SESSION['sofort']['sofort_sofortboxjs'])) {
         $title = MODULE_PAYMENT_SOFORT_MULTIPAY_JS_LIBS;
         $_SESSION['sofort']['sofort_sofortboxjs'] = true;
     } else {
         $title = '';
     }
     switch (MODULE_PAYMENT_SOFORT_MULTIPAY_IMAGE) {
         case 'Logo & Text':
             if (MODULE_PAYMENT_SOFORT_SV_KS_STATUS == 'true') {
                 $title .= $this->setImageText('logo_155x50.png', MODULE_PAYMENT_SOFORT_MULTIPAY_SV_CHECKOUT_TEXT);
             } else {
                 $title .= $this->setImageText('logo_155x50.png', MODULE_PAYMENT_SOFORT_MULTIPAY_SV_CHECKOUT_TEXT);
             }
             break;
         case 'Infographic':
             if (MODULE_PAYMENT_SOFORT_SV_KS_STATUS == 'true') {
                 $title .= $this->setImageText('banner_400x100_ks.png', '');
             } else {
                 $title .= $this->setImageText('banner_300x100.png', '');
             }
             break;
     }
     $cost = '';
     if (array_key_exists('ot_sofort', $GLOBALS)) {
         $cost = $GLOBALS['ot_sofort']->get_percent($this->code, 'price');
     }
     $conditionsChecked = false;
     if (isset($_SESSION['sofort']['sofort_conditions_sv']) && $_SESSION['sofort']['sofort_conditions_sv'] == 'sofort_conditions_sv') {
         $conditionsChecked = true;
     }
     $fields = array(array('title' => MODULE_PAYMENT_SOFORT_SV_CHECKOUT_CONDITIONS, 'field' => xtc_draw_checkbox_field('sofort_conditions_sv', 'sofort_conditions_sv', $conditionsChecked)));
     //commerce:SEO - Bugfix
     if (isset($_REQUEST['xajax']) && !empty($_REQUEST['xajax'])) {
         $fields[0]['title'] = utf8_decode($fields[0]['title']);
         return array('id' => $this->code, 'module' => utf8_decode($this->title_extern), 'fields' => $fields, 'description' => utf8_decode($title), 'module_cost' => utf8_decode($cost));
     } else {
         return array('id' => $this->code, 'module' => $this->title_extern, 'fields' => $fields, 'description' => $title, 'module_cost' => $cost);
     }
 }
 function selection()
 {
     global $order;
     if (!parent::selection()) {
         $this->enabled = false;
         return false;
     }
     //virtual content with SR is not allowed
     if ($this->_orderHasVirtualProducts($order) || $this->_deliveryAddressDoesNotExist($order)) {
         $this->enabled = false;
         return false;
     }
     if (!isset($_SESSION['sofort']['sofort_sofortboxjs'])) {
         $title = MODULE_PAYMENT_SOFORT_MULTIPAY_JS_LIBS;
         $_SESSION['sofort']['sofort_sofortboxjs'] = true;
     } else {
         $title = '';
     }
     switch (MODULE_PAYMENT_SOFORT_MULTIPAY_IMAGE) {
         case 'Logo & Text':
             $title .= $this->setImageText('logo_155x50.png', MODULE_PAYMENT_SOFORT_MULTIPAY_SR_CHECKOUT_TEXT);
             break;
         case 'Infographic':
             $title .= $this->setImageText('banner_300x100.png', '');
             break;
     }
     $cost = '';
     if (array_key_exists('ot_sofort', $GLOBALS)) {
         $cost = $GLOBALS['ot_sofort']->get_percent($this->code, 'price');
     }
     $conditionsChecked = false;
     if (isset($_SESSION['sofort']['sofort_conditions_sr']) && $_SESSION['sofort']['sofort_conditions_sr'] == 'sofort_conditions_sr') {
         $conditionsChecked = true;
     }
     $fields = array(array('title' => MODULE_PAYMENT_SOFORT_SR_CHECKOUT_CONDITIONS, 'field' => xtc_draw_checkbox_field('sofort_conditions_sr', 'sofort_conditions_sr', $conditionsChecked)));
     //commerce:SEO - Bugfix
     if (isset($_REQUEST['xajax']) && !empty($_REQUEST['xajax'])) {
         $fields[0]['title'] = utf8_decode($fields[0]['title']);
         return array('id' => $this->code, 'module' => utf8_decode($this->title_extern), 'fields' => $fields, 'description' => utf8_decode($title), 'module_cost' => utf8_decode($cost));
     } else {
         return array('id' => $this->code, 'module' => $this->title_extern, 'fields' => $fields, 'description' => $title, 'module_cost' => $cost);
     }
 }
        <td align="left"><?php 
        echo xtc_draw_input_field('coupon_min_order', $coupon_min_order, 'style="width: 150px"');
        ?>
</td>
        <td align="left"><?php 
        echo COUPON_MIN_ORDER_HELP;
        ?>
</td>
      </tr>
      <tr>
        <td align="left"><?php 
        echo COUPON_FREE_SHIP;
        ?>
</td>
        <td align="left"><?php 
        echo xtc_draw_checkbox_field('coupon_free_ship', $coupon_free_ship);
        ?>
</td>
        <td align="left"><?php 
        echo COUPON_FREE_SHIP_HELP;
        ?>
</td>
      </tr>
      <tr>
        <td align="left"><?php 
        echo COUPON_CODE;
        ?>
</td>
        <td align="left"><?php 
        echo xtc_draw_input_field('coupon_code', $coupon_code, 'style="width: 150px"');
        ?>
    //BOF - Dokuman - 2009-12-23 - send contact form information with SSL
    //$smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID='.(int) $_GET['coID'])));
    $smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID=' . (int) $_GET['coID'], 'SSL')));
    //EOF - Dokuman - 2009-12-23 - send contact form information with SSL
    $smarty->assign('INPUT_NAME', xtc_draw_input_field('name', $error ? $_POST['name'] : $customers_name, 'size="30"'));
    $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email', $error ? $_POST['email'] : $email_address, 'size="30"'));
    $smarty->assign('INPUT_HONEYPOT', xtc_draw_input_field('email2_FT7ughj521dfdf', $error ? $_POST['email2_FT7ughj521dfdf'] : '', 'size="30"'));
    // BOF - Tomcraft - 2009-11-05 - Advanced contact form (additional fields)
    $smarty->assign('INPUT_PHONE', xtc_draw_input_field('phone', $error ? $_POST['phone'] : $phone, 'size="30"'));
    $smarty->assign('INPUT_COMPANY', xtc_draw_input_field('company', $error ? $_POST['company'] : $company, 'size="30"'));
    $smarty->assign('INPUT_STREET', xtc_draw_input_field('street', $error ? $_POST['street'] : $street, 'size="30"'));
    $smarty->assign('INPUT_POSTCODE', xtc_draw_input_field('postcode', $error ? $_POST['postcode'] : $postcode, 'size="30"'));
    $smarty->assign('INPUT_CITY', xtc_draw_input_field('city', $error ? $_POST['city'] : $city, 'size="30"'));
    $smarty->assign('INPUT_FAX', xtc_draw_input_field('fax', $error ? $_POST['fax'] : $fax, 'size="30"'));
    if (CONTACT_FORM_CONSENT == 'true') {
        $smarty->assign('CHECKBOX', xtc_draw_checkbox_field('checkbox'));
    }
    // EOF - Tomcraft - 2009-11-05 - Advanced contact form (additional fields)
    // BOF - Tomcraft - 2009-09-29 - fixed word-wrap in contact-form
    //$smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 50, 15, ($error ? xtc_db_input($_POST['message_body']) : $first_name)));
    // BOF - Tomcraft - 2010-02-18 - Fixed width of textarea in FireFox under Linux.
    //$smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 50, 15, ($error ? $_POST['message_body'] : $message_body)));
    $smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 45, 15, $error ? $_POST['message_body'] : $message_body));
    // EOF - Tomcraft - 2010-02-18 - Fixed width of textarea in FireFox under Linux.
    // EOF - Tomcraft - 2009-09-29 - fixed word-wrap in contact-form
    $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_send.gif', IMAGE_BUTTON_SEND));
    $smarty->assign('FORM_END', '</form>');
}
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/contact_us.html');
                                    <div class="col-sm-10 col-xs-12" ><?php 
            echo xtc_draw_input_field('sort_order', isset($content['sort_order']) ? $content['sort_order'] : '', 'size="5"');
            ?>
</div>
                                  </div>
                                  <div class="col-xs-12">
                                    <div class="col-sm-2 col-xs-12" valign="top" ><?php 
            echo TEXT_STATUS;
            ?>
</div>
                                    <div class="col-sm-10 col-xs-12" >
                                      <?php 
            if (isset($content['content_status']) && $content['content_status'] == '1') {
                echo xtc_draw_checkbox_field('status', 'yes', true) . ' ' . TEXT_STATUS_DESCRIPTION;
            } else {
                echo xtc_draw_checkbox_field('status', 'yes', false) . ' ' . TEXT_STATUS_DESCRIPTION;
            }
            ?>
                                      <br /><br />
                                    </div>
                                  </div>
                                  <?php 
            if (GROUP_CHECK == 'true') {
                $customers_statuses_array = xtc_get_customers_statuses();
                $customers_statuses_array = array_merge(array(array('id' => 'all', 'text' => TXT_ALL)), $customers_statuses_array);
                ?>
                                      <div class="col-xs-12">
                                        <div class="col-sm-2 col-xs-12" valign="top" class="main" ><?php 
                echo ENTRY_CUSTOMERS_STATUS;
                ?>
</div>
                <div class='col-xs-12'>
                    <div class="main col-xs-12">
                    <form action="customers_group.php?action=send" method="post">
                    <?php 
$group_query = xtc_db_query('SELECT customers_status_id,
                                                        customers_status_name
                                                 FROM ' . TABLE_CUSTOMERS_STATUS . '
                                                 WHERE language_id=' . (int) $_SESSION['languages_id'] . '
                                                 ORDER BY customers_status_id ASC');
while ($result = xtc_db_fetch_array($group_query)) {
    echo xtc_draw_checkbox_field('cg[' . $result['customers_status_id'] . ']', '1') . ' ' . $result['customers_status_name'] . '<br />';
}
echo '<br /><br />';
echo xtc_draw_checkbox_field('categories', '1') . ' ' . TEXT_CATEGORIES . '<br />';
echo xtc_draw_checkbox_field('products', '1') . ' ' . TEXT_PRODUCTS . '<br />';
echo xtc_draw_checkbox_field('content', '1') . ' ' . TEXT_CONTENT . '<br />';
echo '<br /><br />';
echo '<strong>' . TEXT_PERMISSION . ':</strong> ' . TEXT_SET . ' ' . xtc_draw_radio_field('permission', 'true', true) . ' ' . TEXT_UNSET . ' ' . xtc_draw_radio_field('permission', 'false', false) . '<br />';
echo '<br /><br />' . xtc_draw_input_field('senden', TEXT_SEND, '', false, 'submit');
?>
                    </form>
                    </div>
                </div>
            </div>
</div>

<!-- footer //-->
<?php 
require DIR_WS_INCLUDES . 'footer.php';
?>
<!-- footer_eof //-->
Example #8
0
    echo $orders_split->display_links($orders_query_numrows, '20', MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xtc_get_all_get_params(array('page', 'oID', 'action')));
    ?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>');
            $contents = array('form' => xtc_draw_form('orders', FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br /><br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
            $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
            $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="button" value="' . BUTTON_DELETE . '"><a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . BUTTON_CANCEL . '</a>');
            break;
        default:
            if (is_object($oInfo)) {
                $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . xtc_datetime_short($oInfo->date_purchased) . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . BUTTON_EDIT . '</a> <a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>');
                if (AFTERBUY_ACTIVATED == 'true') {
                    $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=afterbuy_send') . '">' . BUTTON_AFTERBUY_SEND . '</a>');
                }
                // RATEPAY START
                include 'includes/ratepay_order_buttons.php';
                // RATEPAY END
                //$contents[] = array('align' => 'center', 'text' => '');
                $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . xtc_date_short($oInfo->date_purchased));
                if (xtc_not_null($oInfo->last_modified)) {
            <td><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><b><?php 
    echo PAYMENT_STATUS;
    ?>
</b> <?php 
    echo xtc_draw_pull_down_menu('status', $payments_statuses, $payments['affiliate_payment_status']);
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><b><?php 
    echo PAYMENT_NOTIFY_AFFILIATE;
    ?>
</b><?php 
    echo xtc_draw_checkbox_field('notify', '', true);
    ?>
</td>
              </tr>
            </table></td>
            <td valign="top"><?php 
    echo xtc_image_submit('button_update.gif', IMAGE_UPDATE);
    ?>
</td>
          </tr>
        </table></td>
      </form></tr>

      <tr>
        <td><?php 
    echo xtc_draw_separator('pixel_trans.gif', '1', '10');
                 $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
             }
         }
     }
     if (is_array($_POST['multi_products'])) {
         foreach ($_POST['multi_products'] as $multi_product) {
             $contents[] = array('text' => '<tr><td style="border-bottom: 1px solid Black; margin-bottom: 10px;" class="infoBoxContent"><b>' . xtc_get_products_name($multi_product) . '</b></td></tr>');
             $product_categories_string = '';
             $product_categories = xtc_generate_category_path($multi_product, 'product');
             for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) {
                 $category_path = '';
                 for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) {
                     $category_path .= $product_categories[$i][$j]['text'] . '&nbsp;&gt;&nbsp;';
                 }
                 $category_path = substr($category_path, 0, -16);
                 $product_categories_string .= xtc_draw_checkbox_field('multi_products_categories[' . $multi_product . '][]', $product_categories[$i][sizeof($product_categories[$i]) - 1]['id'], true) . '&nbsp;' . $category_path . '<br />';
             }
             $product_categories_string = substr($product_categories_string, 0, -4);
             $product_categories_string = '<tr><td class="infoBoxContent">' . $product_categories_string . '</td></tr>';
             $contents[] = array('text' => $product_categories_string);
         }
     }
     //close list table
     $contents[] = array('text' => '</table>');
     $contents[] = array('align' => 'center', 'text' => '<input class="btn btn-default" type="submit" name="multi_delete_confirm" value="' . BUTTON_DELETE . '"> <a class="btn btn-default" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&cID=' . $cInfo->categories_id) . '">' . BUTTON_CANCEL . '</a>');
     //close multi-action form
     $contents[] = array('text' => '</form>');
 }
 // multi_delete confirm ENDS
 // --------------------
 // multi_copy confirm
     $contents[] = array('text' => '<br />' . TEXT_INFO_PRODUCTS_VPE_NAME . $products_vpe_inputs_string);
     $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
     $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_INSERT . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page']) . '">' . BUTTON_CANCEL . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_PRODUCTS_VPE . '</b>');
     $contents = array('form' => xtc_draw_form('status', FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $products_vpe_inputs_string = '';
     $languages = xtc_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $products_vpe_inputs_string .= '<br />' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']) . '&nbsp;' . xtc_draw_input_field('products_vpe_name[' . $languages[$i]['id'] . ']', xtc_get_products_vpe_name($oInfo->products_vpe_id, $languages[$i]['id']));
     }
     $contents[] = array('text' => '<br />' . TEXT_INFO_PRODUCTS_VPE_NAME . $products_vpe_inputs_string);
     if (DEFAULT_PRODUCTS_VPE_ID != $oInfo->products_vpe_id) {
         $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
     }
     $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id) . '">' . BUTTON_CANCEL . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCTS_VPE . '</b>');
     $contents = array('form' => xtc_draw_form('status', FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $oInfo->products_vpe_name . '</b>');
     if ($remove_status) {
         $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_DELETE . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id) . '">' . BUTTON_CANCEL . '</a>');
     }
     break;
 default:
     if (isset($oInfo) && is_object($oInfo)) {
         $heading[] = array('text' => '<b>' . $oInfo->products_vpe_name . '</b>');
Example #12
0
                    <?php 
$heading = array();
$contents = array();
switch ($action) {
    case 'backup':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_BACKUP . '</b>');
        $contents = array('form' => xtc_draw_form('backup', BK_FILENAME, 'action=backupnow'));
        $contents[] = array('text' => TEXT_INFO_NEW_BACKUP);
        if ($messageStack->size > 0) {
            $contents[] = array('text' => '<br />' . xtc_draw_radio_field('compress', 'no', true) . ' ' . TEXT_INFO_USE_NO_COMPRESSION);
        } else {
            if (function_exists('gzopen')) {
                $contents[] = array('text' => '<br />' . xtc_draw_radio_field('compress', 'gzip', true) . ' ' . TEXT_INFO_USE_GZIP);
            }
            $contents[] = array('text' => xtc_draw_radio_field('compress', 'no') . ' ' . TEXT_INFO_USE_NO_COMPRESSION);
            $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('complete_inserts', 'yes', true) . ' ' . TEXT_COMPLETE_INSERTS);
        }
        $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_BACKUP . '"/>&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_BACKUP) . '">' . BUTTON_CANCEL . '</a>');
        break;
    case 'restore':
        $heading[] = array('text' => '<b>' . $buInfo->date . '</b>');
        $contents[] = array('text' => xtc_break_string(sprintf(TEXT_INFO_RESTORE, DIR_FS_BACKUP . ($buInfo->compression != TEXT_NO_EXTENSION ? substr($buInfo->file, 0, strrpos($buInfo->file, '.')) : $buInfo->file), $buInfo->compression != TEXT_NO_EXTENSION ? TEXT_INFO_UNPACK : ''), 35, ' '));
        $contents[] = array('align' => 'center', 'text' => '<br /><a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(RS_FILENAME, 'file=' . $buInfo->file . '&action=restorenow') . '">' . BUTTON_RESTORE . '</a>&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '">' . BUTTON_CANCEL . '</a>');
        break;
    case 'restorelocal':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_RESTORE_LOCAL . '</b>');
        $contents = array('form' => xtc_draw_form('restore', FILENAME_BACKUP, 'action=restorelocalnow', 'post', 'enctype="multipart/form-data"'));
        $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL . '<br /><br />' . TEXT_INFO_BEST_THROUGH_HTTPS);
        $contents[] = array('text' => '<br />' . xtc_draw_file_field('sql_file'));
        $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE);
        $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPLOAD . '"/>&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_BACKUP) . '">' . BUTTON_CANCEL . '</a>');
 function display()
 {
     //Array für max. Bilder pro Seitenreload
     $max_array = array(array('id' => '5', 'text' => '5'));
     $max_array[] = array('id' => '10', 'text' => '10');
     $max_array[] = array('id' => '15', 'text' => '15');
     $max_array[] = array('id' => '20', 'text' => '20');
     $max_array[] = array('id' => '50', 'text' => '50');
     return array('text' => xtc_draw_hidden_field('process', 'module_processing_do') . xtc_draw_hidden_field('max_images1', '5') . IMAGE_EXPORT_TYPE . '<br />' . IMAGE_EXPORT . '<br />' . '<br />' . xtc_draw_pull_down_menu('max_datasets', $max_array, '5') . ' ' . TEXT_MAX_IMAGES . '<br />' . '<br />' . xtc_draw_checkbox_field('only_missing_images', '1', false) . ' ' . TEXT_ONLY_MISSING_IMAGES . '<br />' . '<br />' . xtc_button(BUTTON_START) . '&nbsp;' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=image_processing_step')));
 }
 function get_html($p_products_array)
 {
     $coo_properties_control = MainFactory::create_object('PropertiesControl');
     $coo_properties_view = MainFactory::create_object('PropertiesView');
     $t_content_array = array();
     $module_content = array();
     $any_out_of_stock = '';
     $mark_stock = '';
     $coo_seo_boost = MainFactory::create_object('GMSEOBoost');
     $coo_main = new main();
     $xtPrice = new xtcPrice($_SESSION['currency'], $_SESSION['customers_status']['customers_status_id']);
     for ($i = 0, $n = sizeof($p_products_array); $i < $n; $i++) {
         $t_combis_id = $coo_properties_control->extract_combis_id($p_products_array[$i]['id']);
         // check if combis_id is empty
         if ($t_combis_id == '') {
             // combis_id is empty = article without properties
             if (STOCK_CHECK == 'true') {
                 $mark_stock = xtc_check_stock($p_products_array[$i]['id'], $p_products_array[$i]['quantity']);
                 if ($mark_stock) {
                     $_SESSION['any_out_of_stock'] = 1;
                 }
             }
         }
         $image = '';
         if ($p_products_array[$i]['image'] != '') {
             $image = DIR_WS_THUMBNAIL_IMAGES . $p_products_array[$i]['image'];
         }
         //bof gm
         $gm_products_id = $p_products_array[$i]['id'];
         $gm_products_id = str_replace('{', '_', $gm_products_id);
         $gm_products_id = str_replace('}', '_', $gm_products_id);
         $gm_query = xtc_db_query("SELECT gm_show_weight FROM products WHERE products_id='" . $p_products_array[$i]['id'] . "'");
         $gm_array = xtc_db_fetch_array($gm_query);
         if (empty($gm_array['gm_show_weight'])) {
             $p_products_array[$i]['gm_weight'] = 0;
         }
         $gm_product_link = xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($p_products_array[$i]['id'], $p_products_array[$i]['name']) . '&no_boost=1');
         include DIR_FS_CATALOG . 'gm/modules/gm_gprint_order_details_cart.php';
         $t_shipping_time = $p_products_array[$i]['shipping_time'];
         $t_products_weight = $p_products_array[$i]['gm_weight'];
         $t_products_model = $p_products_array[$i]['model'];
         #properties
         if ($t_combis_id != '') {
             $t_properties_html = $coo_properties_view->get_order_details_by_combis_id($t_combis_id, 'cart');
             $coo_products = MainFactory::create_object('GMDataObject', array('products', array('products_id' => $p_products_array[$i]['id'])));
             $use_properties_combis_quantity = $coo_products->get_data_value('use_properties_combis_quantity');
             if ($use_properties_combis_quantity == 1) {
                 // check article quantity
                 $mark_stock = xtc_check_stock($p_products_array[$i]['id'], $p_products_array[$i]['quantity']);
                 if ($mark_stock) {
                     $_SESSION['any_out_of_stock'] = 1;
                 }
             } else {
                 if ($use_properties_combis_quantity == 0 && ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true' || $use_properties_combis_quantity == 2) {
                     // check combis quantity
                     $t_properties_stock = $coo_properties_control->get_properties_combis_quantity($t_combis_id);
                     if ($t_properties_stock < $p_products_array[$i]['quantity']) {
                         $_SESSION['any_out_of_stock'] = 1;
                         $mark_stock = '<span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
                     }
                 }
             }
             $t_weight = $coo_properties_control->get_properties_combis_weight($t_combis_id);
             if ($coo_products->get_data_value('use_properties_combis_weight') == 1) {
                 $t_products_weight = gm_prepare_number($t_weight, $xtPrice->currencies[$xtPrice->actualCurr]['decimal_point']);
             } else {
                 $t_products_weight = gm_prepare_number($t_weight + $p_products_array[$i]['weight'], $xtPrice->currencies[$xtPrice->actualCurr]['decimal_point']);
             }
             if ($coo_products->get_data_value('use_properties_combis_shipping_time') == 1) {
                 $t_shipping_time = $coo_properties_control->get_properties_combis_shipping_time($t_combis_id);
             }
             $t_combi_model = $coo_properties_control->get_properties_combis_model($t_combis_id);
             if (APPEND_PROPERTIES_MODEL == "true") {
                 // Artikelnummer (Kombi) an Artikelnummer (Artikel) anhängen
                 if ($t_products_model != '' && $t_combi_model != '') {
                     $t_products_model = $t_products_model . '-' . $t_combi_model;
                 } else {
                     if ($t_combi_model != '') {
                         $t_products_model = $t_combi_model;
                     }
                 }
             } else {
                 // Artikelnummer (Artikel) durch Artikelnummer (Kombi) ersetzen
                 if ($t_combi_model != '') {
                     $t_products_model = $t_combi_model;
                 }
             }
         } else {
             $t_properties_html = '';
         }
         $module_content[$i] = array('PRODUCTS_NAME' => $p_products_array[$i]['name'] . $mark_stock, 'PRODUCTS_QTY' => xtc_draw_input_field('cart_quantity[]', gm_convert_qty($p_products_array[$i]['quantity'], false), ' size="2" onblur="gm_qty_is_changed(' . $p_products_array[$i]['quantity'] . ', this.value, \'' . GM_QTY_CHANGED_MESSAGE . '\')"', 'text', true, "gm_cart_data gm_class_input") . xtc_draw_hidden_field('products_id[]', $p_products_array[$i]['id'], 'class="gm_cart_data"') . xtc_draw_hidden_field('old_qty[]', $p_products_array[$i]['quantity']), 'PRODUCTS_OLDQTY_INPUT_NAME' => 'old_qty[]', 'PRODUCTS_QTY_INPUT_NAME' => 'cart_quantity[]', 'PRODUCTS_QTY_VALUE' => gm_convert_qty($p_products_array[$i]['quantity'], false), 'PRODUCTS_ID_INPUT_NAME' => 'products_id[]', 'PRODUCTS_ID_EXTENDED' => $p_products_array[$i]['id'], 'PRODUCTS_MODEL' => $t_products_model, 'SHOW_PRODUCTS_MODEL' => SHOW_PRODUCTS_MODEL, 'PRODUCTS_SHIPPING_TIME' => $t_shipping_time, 'PRODUCTS_TAX' => (double) $p_products_array[$i]['tax'], 'PRODUCTS_IMAGE' => $image, 'IMAGE_ALT' => $p_products_array[$i]['name'], 'BOX_DELETE' => xtc_draw_checkbox_field('cart_delete[]', $p_products_array[$i]['id'], false, 'id="gm_delete_product_' . $gm_products_id . '"'), 'PRODUCTS_LINK' => $gm_product_link, 'PRODUCTS_PRICE' => $xtPrice->xtcFormat($p_products_array[$i]['price'] * $p_products_array[$i]['quantity'], true), 'PRODUCTS_SINGLE_PRICE' => $xtPrice->xtcFormat($p_products_array[$i]['price'], true), 'PRODUCTS_SHORT_DESCRIPTION' => xtc_get_short_description($p_products_array[$i]['id']), 'ATTRIBUTES' => '', 'PROPERTIES' => $t_properties_html, 'GM_WEIGHT' => $t_products_weight, 'PRODUCTS_ID' => $gm_products_id, 'UNIT' => $p_products_array[$i]['unit_name']);
         //eof gm
         // Product options names
         $attributes_exist = isset($p_products_array[$i]['attributes']) ? 1 : 0;
         if ($attributes_exist == 1) {
             reset($p_products_array[$i]['attributes']);
             while (list($option, $value) = each($p_products_array[$i]['attributes'])) {
                 if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true' && $value != 0) {
                     $attribute_stock_check = xtc_check_stock_attributes($p_products_array[$i][$option]['products_attributes_id'], $p_products_array[$i]['quantity']);
                     if ($attribute_stock_check) {
                         $_SESSION['any_out_of_stock'] = 1;
                     }
                 }
                 $module_content[$i]['ATTRIBUTES'][] = array('ID' => $p_products_array[$i][$option]['products_attributes_id'], 'MODEL' => xtc_get_attributes_model(xtc_get_prid($p_products_array[$i]['id']), $p_products_array[$i][$option]['products_options_values_name'], $p_products_array[$i][$option]['products_options_name']), 'NAME' => $p_products_array[$i][$option]['products_options_name'], 'VALUE_NAME' => $p_products_array[$i][$option]['products_options_values_name'] . $attribute_stock_check);
                 // BOF GM_MOD GX-Customizer:
                 require DIR_FS_CATALOG . 'gm/modules/gm_gprint_order_details_cart_2.php';
             }
         }
     }
     $total_content = '';
     $total = $_SESSION['cart']->show_total();
     if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') {
         if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
             $price = $total - $_SESSION['cart']->show_tax(false);
         } else {
             $price = $total;
         }
         // BOF GM_MOD
         $discount = round($xtPrice->xtcGetDC($price, $_SESSION['customers_status']['customers_status_ot_discount']), 2);
         $total_content = $_SESSION['customers_status']['customers_status_ot_discount'] . ' % ' . SUB_TITLE_OT_DISCOUNT . ' -' . xtc_format_price($discount, $price_special = 1, $calculate_currencies = false) . '<br />';
         $this->set_content_data('DISCOUNT_TEXT', round((double) $_SESSION['customers_status']['customers_status_ot_discount'], 2) . '% ' . SUB_TITLE_OT_DISCOUNT);
         $this->set_content_data('DISCOUNT_VALUE', '-' . xtc_format_price($discount, $price_special = 1, $calculate_currencies = false));
     }
     if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
         if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) {
             $total -= $discount;
         }
         if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
             $total -= $discount;
         }
         if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) {
             $total -= $discount;
         }
         $total_content .= SUB_TITLE_SUB_TOTAL . $xtPrice->xtcFormat($total, true) . '<br />';
         $t_total = $xtPrice->xtcFormat($total + $discount, true);
     } else {
         $total_content .= NOT_ALLOWED_TO_SEE_PRICES . '<br />';
     }
     // display only if there is an ot_discount
     if ($customer_status_value['customers_status_ot_discount'] != 0) {
         $total_content .= TEXT_CART_OT_DISCOUNT . $customer_status_value['customers_status_ot_discount'] . '%';
     }
     if (SHOW_SHIPPING == 'true') {
         $this->set_content_data('SHIPPING_INFO', ' ' . SHIPPING_EXCL . '<a href="' . $coo_main->gm_get_shipping_link(true) . '" target="_blank" class="lightbox_iframe"> ' . SHIPPING_COSTS . '</a>');
     }
     if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
         $gm_cart_tax_info = '';
         if (gm_get_conf('TAX_INFO_TAX_FREE') == 'true') {
             $gm_cart_tax_info = GM_TAX_FREE . '<br />';
             $this->set_content_data('TAX_FREE_TEXT', GM_TAX_FREE);
         } else {
             $gm_cart_tax_info = $_SESSION['cart']->show_tax();
             if (!empty($gm_cart_tax_info) && $_SESSION['customers_status']['customers_status_show_price_tax'] == '0' && $_SESSION['customers_status']['customers_status_add_tax_ot'] == '1') {
                 if (!defined(MODULE_ORDER_TOTAL_SUBTOTAL_TITLE_NO_TAX)) {
                     include_once DIR_FS_CATALOG . 'lang/' . $_SESSION['language'] . '/modules/order_total/ot_subtotal.php';
                 }
                 $t_gm_tax = 0;
                 foreach ($_SESSION['cart']->tax as $t_gm_key => $t_gm_value) {
                     $t_gm_tax += $t_gm_value['value'];
                 }
                 $gm_cart_tax_info = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE_NO_TAX . ': ' . $xtPrice->xtcFormat((double) $total - (double) $t_gm_tax, true) . '<br />' . $gm_cart_tax_info;
                 $t_total = $xtPrice->xtcFormat((double) $total - (double) $t_gm_tax + $discount, true);
             }
         }
         $this->set_content_data('UST_CONTENT', $gm_cart_tax_info, 1);
     }
     $t_taxes_data_array = explode('<br />', $_SESSION['cart']->show_tax(true));
     $t_tax_array = array();
     for ($i = 0; $i < count($t_taxes_data_array); $i++) {
         if (!empty($t_taxes_data_array[$i])) {
             $t_tax_data_array = explode(':', $t_taxes_data_array[$i]);
             $t_tax_array[] = array('TEXT' => $t_tax_data_array[0], 'VALUE' => $t_tax_data_array[1]);
         }
     }
     $this->set_content_data('tax_data', $t_tax_array);
     $this->set_content_data('SUBTOTAL', $t_total);
     $this->set_content_data('TOTAL', $xtPrice->xtcFormat($total, true));
     $this->set_content_data('TOTAL_CONTENT', $total_content, 1);
     $this->set_content_data('language', $_SESSION['language']);
     $this->set_content_data('module_content', $module_content);
     $coo_gift_cart = MainFactory::create_object('GiftCartContentView');
     $t_view_html = $coo_gift_cart->get_html();
     $this->set_content_data('MODULE_gift_cart', $t_view_html);
     // Bitcoin Payment - Commerce Coding - BEGIN
     $multiplier = 1;
     $digits = 8;
     switch (MODULE_PAYMENT_BITCOIN_UNITS) {
         case 'uBTC':
             $multiplier *= 1000;
             $digits -= 3;
         case 'mBTC':
             $multiplier *= 1000;
             $digits -= 3;
         case 'BTC':
             $btcPrice = number_format($total / MODULE_PAYMENT_BITCOIN_BTCEUR * $multiplier, $digits, '.', '');
             $this->set_content_data('BITCOIN_PRICE', $btcPrice . ' ' . MODULE_PAYMENT_BITCOIN_UNITS);
     }
     // Bitcoin Payment - Commerce Coding - END
     $t_html_output = $this->build_html();
     return $t_html_output;
 }
// include needed functions
require_once DIR_FS_INC . 'xtc_get_categories.inc.php';
require_once DIR_FS_INC . 'xtc_get_manufacturers.inc.php';
require_once DIR_FS_INC . 'xtc_checkdate.inc.php';
$breadcrumb->add(NAVBAR_TITLE_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH));
require DIR_WS_INCLUDES . 'header.php';
$smarty->assign('FORM_ACTION', xtc_draw_form('advanced_search', xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get', 'onsubmit="return check_form(this);"') . xtc_hide_session_id());
//WEB28 change NONSSL to $request_type
$smarty->assign('INPUT_KEYWORDS', xtc_draw_input_field('keywords', '', 'style="width: 100%"'));
//BOF - DokuMan - 2009-05-31 - removed quotationmark
//$smarty->assign('HELP_LINK', xtc_href_link(FILENAME_POPUP_SEARCH_HELP.'?KeepThis=true&TB_iframe=true&height=400&width=600"'));
$smarty->assign('HELP_LINK', xtc_href_link(FILENAME_POPUP_SEARCH_HELP . '?KeepThis=true&TB_iframe=true&height=400&width=600'));
//EOF - DokuMan - 2009-05-31 - removed quotationmark
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH));
$smarty->assign('SELECT_CATEGORIES', xtc_draw_pull_down_menu('categories_id', xtc_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))));
$smarty->assign('ENTRY_SUBCAT', xtc_draw_checkbox_field('inc_subcat', '1', true));
$smarty->assign('SELECT_MANUFACTURERS', xtc_draw_pull_down_menu('manufacturers_id', xtc_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))));
$smarty->assign('SELECT_PFROM', xtc_draw_input_field('pfrom'));
$smarty->assign('SELECT_PTO', xtc_draw_input_field('pto'));
$error = '';
if (isset($_GET['errorno'])) {
    if (($_GET['errorno'] & 1) == 1) {
        $error .= str_replace('\\n', '<br />', JS_AT_LEAST_ONE_INPUT);
    }
    if (($_GET['errorno'] & 10) == 10) {
        $error .= str_replace('\\n', '<br />', JS_INVALID_FROM_DATE);
    }
    if (($_GET['errorno'] & 100) == 100) {
        $error .= str_replace('\\n', '<br />', JS_INVALID_TO_DATE);
    }
    if (($_GET['errorno'] & 1000) == 1000) {
 public function display()
 {
     $tools = new tools();
     $missing_config_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_MISSING_CONFIG' LIMIT 1");
     $missing_config_db = xtc_db_fetch_array($missing_config_query);
     $missing_config_db = $missing_config_db['configuration_value'];
     $missing_config_user = '';
     $missing_config_url_input = '';
     $missing_config_shop_id_input = '';
     $missing_config_password_input = '';
     $missing_config_pagesize_input = '';
     $missing_config_shipping = '';
     $missing_config_payment = '';
     $missing_config_costs_idealo_DE_active = '';
     $missing_config_costs_idealo_DE_active = '';
     if ($missing_config_db != '') {
         if (strpos($missing_config_db, "user") !== false) {
             $missing_config_user = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "url_input") !== false) {
             $missing_config_url_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "shop_id_input") !== false) {
             $missing_config_shop_id_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "password_input") !== false) {
             $missing_config_password_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "pagesize_input") !== false) {
             $missing_config_page_size_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "shipping") !== false && strpos($missing_config_db, "shippingDE") === false) {
             $missing_config_shipping = IDEALO_TEXT_MISSING_SHIPPING;
         }
         if (strpos($missing_config_db, "payment") !== false) {
             $missing_config_payment = IDEALO_TEXT_MISSING_PAYMENT;
         }
         if (strpos($missing_config_db, "idealo_DE_active") !== false) {
             $missing_config_costs_idealo_DE_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "idealo_AT_active") !== false) {
             $missing_config_costs_idealo_AT_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "shippingDElenght") !== false || strpos($missing_config_db, "shippingDEone") !== false) {
             $missing_config_format_idealo_DE_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_DE . '</b></font>';
         }
         if (strpos($missing_config_db, "shippingATlenght") !== false || strpos($missing_config_db, "shippingATone") !== false) {
             $missing_config_format_idealo_AT_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_AT . '</b></font>';
         }
     }
     $realtime_link = $path = HTTP_CATALOG_SERVER . DIR_WS_CATALOG . IDEALO_REALTIME_LINK;
     $shipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_SHIPPINGCOMMENT' LIMIT 1");
     $shipping_comment_db = xtc_db_fetch_array($shipping_input_query);
     $shipping_comment_text = $shipping_comment_db !== false ? $shipping_comment_db['configuration_value'] : '';
     $shop_id_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_SHOP_ID' LIMIT 1");
     $shop_id_db = xtc_db_fetch_array($shop_id_query);
     $shop_id = $shop_id_db['configuration_value'];
     $password_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_PASSWORD' LIMIT 1");
     $password_db = xtc_db_fetch_array($password_query);
     $password = $password_db['configuration_value'];
     $pagesize_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_PAGESIZE' LIMIT 1");
     $pagesize_db = xtc_db_fetch_array($pagesize_query);
     $pagesize = $pagesize_db['configuration_value'];
     $customers_statuses_array = xtc_get_customers_statuses();
     $campaign_array[] = array('id' => '0', 'text' => 'no');
     $campaign_array[] = array('id' => 'refID=' . CAMPAIGN . '&', 'text' => '94511215 (idealo)');
     $campaign_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CAMPAIGN' LIMIT 1");
     $campaign_db = xtc_db_fetch_array($campaign_query);
     $campaign = $campaign_db['configuration_value'];
     $ship_text = '';
     $tools->getShipping();
     $this->shipping = $tools->shipping;
     foreach ($this->shipping as $ship) {
         if ($ship['country'] == 'DE') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_DE_active, $missing_config_format_idealo_DE_shipping);
         }
         if ($ship['country'] == 'AT') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_AT_active, $missing_config_format_idealo_AT_shipping);
         }
     }
     $payment_text = '';
     $tools->getPayment();
     $this->payment = $tools->payment;
     foreach ($this->payment as $payment) {
         $payment_text .= $this->getDisplayPayment($payment);
     }
     $testmode_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_TESTMODE' LIMIT 1");
     $testmode_db = xtc_db_fetch_array($testmode_query);
     $testmode_db = $testmode_db['configuration_value'];
     $textfile_array[] = array('id' => 'yes', 'text' => 'ja');
     $textfile_array[] = array('id' => 'no', 'text' => 'nein');
     $certificate_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_CERTIFICATE' LIMIT 1");
     $certificate_db = xtc_db_fetch_array($certificate_query);
     $certificate_db = $certificate_db['configuration_value'];
     $certificate_array[] = array('id' => '1', 'text' => 'ja');
     $certificate_array[] = array('id' => '0', 'text' => 'nein');
     $testmode = IDEALO_REALTIME_TESTMODE_ACTIVE . '<br>' . xtc_draw_pull_down_menu('testmode', $textfile_array, $testmode_db) . '<br>';
     $article_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $article_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $article_filter_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_ARTICLE_FILTER' LIMIT 1");
     $article_filter_db = xtc_db_fetch_array($article_filter_query);
     $article_value = $article_filter_db['configuration_value'];
     $article_filter_value_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_ARTICLE_FILTER_VALUE' LIMIT 1");
     $article_filter_value_db = xtc_db_fetch_array($article_filter_value_query);
     $article_filter_value = $article_filter_value_db['configuration_value'];
     $article_filter = IDEALO_REALTIME_ARTICLE_FILTER . '<br>' . IDEALO_REALTIME_ARTICLE_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('article_filter', $article_filter_array, $article_value) . '<br><br>' . IDEALO_REALTIME_ARTICLE_FILTER_TEXT . '<br>' . xtc_draw_input_field('article_filter_value', $article_filter_value) . '<br><br>';
     $brand_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $brand_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $brand_filter_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_BRAND_FILTER' LIMIT 1");
     $brand_filter_db = xtc_db_fetch_array($brand_filter_query);
     $brand_value = $brand_filter_db['configuration_value'];
     $brand_filter_value_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_BRAND_FILTER_VALUE' LIMIT 1");
     $brand_filter_value_db = xtc_db_fetch_array($brand_filter_value_query);
     $brand_filter_value = $brand_filter_value_db['configuration_value'];
     $brand_filter = IDEALO_REALTIME_BRAND_FILTER . '<br>' . IDEALO_REALTIME_BRAND_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('brand_filter', $brand_filter_array, $brand_value) . '<br><br>' . IDEALO_REALTIME_BRAND_FILTER_TEXT . '<br>' . xtc_draw_input_field('brand_filter_value', $brand_filter_value) . '<br><br>';
     $cat_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $cat_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $cat_filter_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_CAT_FILTER' LIMIT 1");
     $cat_filter_db = xtc_db_fetch_array($cat_filter_query);
     $cat_value = $cat_filter_db['configuration_value'];
     $cat_filter_value_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_CAT_FILTER_VALUE' LIMIT 1");
     $cat_filter_value_db = xtc_db_fetch_array($cat_filter_value_query);
     $cat_filter_value = $cat_filter_value_db['configuration_value'];
     $cat_filter = IDEALO_REALTIME_CAT_FILTER . '<br>' . IDEALO_REALTIME_CAT_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('cat_filter', $cat_filter_array, $cat_value) . '<br><br>' . IDEALO_REALTIME_CAT_FILTER_TEXT . '<br>' . xtc_draw_input_field('cat_filter_value', $cat_filter_value) . '<br><br>';
     $tools->getMinorderValues();
     $minOrderDisplay = IDEALO_REALTIME_MIN_ORDER_TITLE . '<br><br>' . IDEALO_REALTIME_MIN_ORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_realtime_minOrder_input', $tools->minOrder) . '<br>' . IDEALO_REALTIME_MIN_ORDER_TEXT . '<br><br>' . IDEALO_REALTIME_MIN_EXTRA_COSTS . '<br>' . xtc_draw_input_field('idealo_realtime_minOrderPrice_input', $tools->minOrderPrice) . '<br>' . IDEALO_REALTIME_MIN_ORDER_BORDER_TEXT . '<br>' . IDEALO_REALTIME_MIN_ORDER_BORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_realtime_minOrderBorder_input', $tools->idealoMinorderBorder) . '<br>' . IDEALO_REALTIME_MIN_ORDER_PRICE_TEXT;
     return array('text' => $missing_config_user . '<br><br>' . $testmode . '<br>' . SHOP_ID . '<br>' . SHOP_ID_HINT . '<br>' . xtc_draw_input_field('shop_id_input', $shop_id) . '<br>' . $missing_config_shop_id_input . '<br><br>' . PASSWORT . '<br>' . PASSWORT_HINT . '<br>' . xtc_draw_password_field('password_input', $password) . '<br>' . $missing_config_password_input . '<br><br>' . PAGESIZE . '<br>' . PAGESIZE_HINT . '<br>' . xtc_draw_input_field('pagesize_input', $pagesize) . '<br>' . $missing_config_page_size_input . '<br><br>' . CERTIFICATE_TEXT . '<br>' . CERTIFICATE_TEXT_DESCRIPTION . '<br>' . xtc_draw_pull_down_menu('certificate', $certificate_array, $certificate_db) . '<br>' . SHIPPING . '<br>' . $missing_config_shipping . '<br><br>' . $ship_text . PAYMENT . '<br>' . $missing_config_payment . '<br><br>' . $payment_text . SHIPPINGCOMMENT . '<br>' . SHIPPINGCOMMENT_HINT . '<br>' . xtc_draw_input_field('shippingcomment_input', $shipping_comment_text) . '<br><br>' . CAMPAIGNS . '<br>' . CAMPAIGNS_DESC . '<br>' . xtc_draw_pull_down_menu('campaign', $campaign_array, $campaign) . '<br><br>' . $article_filter . $brand_filter . $cat_filter . $minOrderDisplay . $this->displayExportKonfigs() . IDEALO_REALTIME_EXPORT_TEXT . '<br>' . REAL_TEXT . '<br><br>' . $realtime_link . '<br><br>' . xtc_draw_checkbox_field('hardReset', '', $checked = false) . IDEALO_TEXT_HARD_RESET_BUTTON_TEXT . '<br>' . IDEALO_TEXT_HARD_RESET_TEXT . '<br>' . xtc_button(IDEALO_TEXT_SOFT_RESET_BUTTON_TEXT) . '<font size="+1">*</font> ' . '<br>' . IDEALO_TEXT_SOFT_RESET_TEXT . '<br><br>' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=idealo_real')) . '<input id ="come_from" type="hidden" name="come_from" value="' . $_SERVER['HTTP_REFERER'] . '"> <br><br>' . EXPORT . '<br><br>' . TEXT_WARANTY_IDEALO_REALTIME);
 }
function shopDrawCheckboxField($name, $value, $checked)
{
    return xtc_draw_checkbox_field($name, $value, $checked);
}
                $zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
            }
            $state_input = xtc_draw_pull_down_menuNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), $zones_array, $zone_id);
        } else {
            $state_input = xtc_draw_input_fieldNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')));
        }
    } else {
        $state_input = xtc_draw_input_fieldNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')));
    }
    $smarty->assign('INPUT_STATE', $state_input);
} else {
    $smarty->assign('state', '0');
}
$smarty->assign('SELECT_COUNTRY', xtc_get_country_list(array('name' => 'country', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>' : '')), $country));
$smarty->assign('INPUT_TEL', xtc_draw_input_fieldNote(array('name' => 'telephone', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''))));
$smarty->assign('INPUT_FAX', xtc_draw_input_fieldNote(array('name' => 'fax', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''))));
$smarty->assign('CHECKBOX_NEWSLETTER', xtc_draw_checkbox_field('newsletter', '1') . '&nbsp;' . (xtc_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>' : ''));
if (DISPLAY_PRIVACY_CHECK == 'true') {
    $smarty->assign('PRIVACY_CHECKBOX', xtc_draw_checkbox_field('privacy', 'privacy', $privacy));
    $smarty->assign('PRIVACY_LINK', $main->getContentLink(2, MORE_INFO, $request_type));
}
$smarty->assign('FORM_END', '</form>');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/create_account_guest.html');
$smarty->assign('main_content', $main_content);
if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include 'includes/application_bottom.php';
Example #19
0
     // --- eof -- ipdfbill --------
     $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
     // Paypal Express Modul
     if (defined('TABLE_PAYPAL')) {
         $db_installed = false;
         $tables = xtc_db_query('SHOW TABLES FROM `' . DB_DATABASE . '`');
         while ($row = mysqli_fetch_row($tables)) {
             if ($row[0] == TABLE_PAYPAL) {
                 $db_installed = true;
             }
         }
         if ($db_installed) {
             $query = "-- /admin/orders.php\n                                  SELECT *\n                                    FROM " . TABLE_PAYPAL . "\n                                   WHERE xtc_order_id = '" . $oInfo->orders_id . "'";
             $query = xtc_db_query($query);
             if (xtc_db_num_rows($query) > 0) {
                 $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('paypaldelete') . ' ' . TEXT_INFO_PAYPAL_DELETE);
             }
         }
     }
     $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" value="' . BUTTON_DELETE . '"><a class="btn btn-default" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . BUTTON_CANCEL . '</a>');
     break;
 default:
     if (isset($oInfo) && is_object($oInfo)) {
         $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . xtc_datetime_short($oInfo->date_purchased) . '</b>');
         $contents[] = array('align' => 'center', 'text' => '<a class="btn btn-default" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . BUTTON_EDIT . '</a> <a class="btn btn-default" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>');
         //BOF - Dokuman - 2012-06-19 - BILLSAFE payment module
         if ($oInfo->payment_method === 'billsafe_2') {
             $contents[] = array('align' => 'center', 'text' => '<a class="btn btn-default" href="billsafe_orders_2.php?oID=' . $oInfo->orders_id . '">BillSAFE Details</a>');
         } elseif ($oInfo->payment_method === 'billsafe_2hp') {
             $contents[] = array('align' => 'center', 'text' => '<a class="btn btn-default" href="billsafe_orders_2hp.php?oID=' . $oInfo->orders_id . '">BillSAFE Details</a>');
         }
                  </div>
                  <div class="col-xs-12">
                    <div class="col-xs-12 col-sm-1" ><?php 
        echo TEXT_TO;
        ?>
</div>
                    <div class="col-xs-12 col-sm-11" ><?php 
        for ($i = 0, $n = sizeof($customers_status); $i < $n; $i++) {
            $group_query = xtc_db_query("SELECT count(*) as count\r\n                                           FROM " . TABLE_NEWSLETTER_RECIPIENTS . "\r\n                                          WHERE mail_status='1'\r\n                                            AND customers_status='" . $customers_status[$i]['id'] . "'");
            $group_data = xtc_db_fetch_array($group_query);
            $group_query = xtc_db_query("SELECT count(*) as count\r\n                                           FROM " . TABLE_CUSTOMERS . "\r\n                                          WHERE customers_status='" . $customers_status[$i]['id'] . "'");
            $group_data_all = xtc_db_fetch_array($group_query);
            $bc_array = explode(',', $n_bc);
            echo xtc_draw_checkbox_field('status[' . $i . ']', 'yes', in_array($customers_status[$i]['id'], $bc_array)) . ' ' . $customers_status[$i]['text'] . '  <i>(<b>' . $group_data['count'] . '</b>' . TEXT_USERS . $group_data_all['count'] . TEXT_CUSTOMERS . '<br />';
        }
        echo xtc_draw_checkbox_field('status_all', 'yes', in_array('all', $bc_array)) . ' <b>' . TEXT_NEWSLETTER_ONLY . '</b>';
        ?>
</div>
                  </div>
                  <div class="col-xs-12">
                    <div class="col-xs-12 col-sm-1" ><?php 
        echo TEXT_CC;
        ?>
</div>
                    <div class="col-xs-12 col-sm-11" ><?php 
        echo xtc_draw_input_field('cc', $n_cc, 'size=100');
        ?>
</div>
                  </div>
                  <div class="col-xs-12">
                    <div class="col-xs-12 col-sm-1"><?php 
            $count = array_count_values($type_array);
            if ($admin_info_array['intent'] == 'authorize' && $admin_info_array['total'] > $amount_array['capture']) {
                ?>
                  <div class="pp_capture pp_box">
                    <div class="pp_boxheading"><?php 
                echo TEXT_PAYPAL_CAPTURE;
                ?>
</div>
                    <?php 
                echo xtc_draw_form('capture', FILENAME_ORDERS, xtc_get_all_get_params());
                echo xtc_draw_hidden_field('cmd', 'capture');
                echo '<div class="refund_row">';
                echo '<div class="' . (10 - $count['capture'] > 0 ? 'info_message' : 'error_message') . '">' . TEXT_PAYPAL_CAPTURE_LEFT . ' ' . (10 - $count['capture']) . '</div>';
                echo '<br/>';
                echo '<label for="final_capture">' . TEXT_PAYPAL_CAPTURE_IS_FINAL . '</label>';
                echo xtc_draw_checkbox_field('final_capture', '1', '', 'id="final_capture"');
                echo '<br/>';
                echo '<label for="capture_price">' . TEXT_PAYPAL_CAPTURE_AMOUNT . '</label>';
                echo xtc_draw_input_field('capture_price', '', 'id="capture_price" style="width: 135px"');
                echo '</div>';
                ?>
                    <br />
                    <input type="submit" class="button" name="capture_submit" value="<?php 
                echo TEXT_PAYPAL_CAPTURE_SUBMIT;
                ?>
">
                    </form>
                  </div>
                  <?php 
            }
            if ((in_array('captured', $status_array) || in_array('completed', $status_array)) && $admin_info_array['total'] > $amount_array['refund']) {
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_CAMPAIGN . '</b>');
     $contents = array('form' => xtc_draw_form('campaigns', FILENAME_CAMPAIGNS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->campaigns_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_EDIT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_CAMPAIGNS_NAME . '<br />' . xtc_draw_input_field('campaigns_name', $cInfo->campaigns_name));
     $contents[] = array('text' => '<br />' . TEXT_CAMPAIGNS_REFID . '<br />' . xtc_draw_input_field('campaigns_refID', $cInfo->campaigns_refID));
     $contents[] = array('align' => 'center', 'text' => '<br />' . xtc_button(BUTTON_SAVE) . '&nbsp;' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_CAMPAIGNS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->campaigns_id)));
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_CAMPAIGN . '</b>');
     $contents = array('form' => xtc_draw_form('campaigns', FILENAME_CAMPAIGNS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->campaigns_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $cInfo->campaigns_name . '</b>');
     if ($cInfo->refferers_count > 0) {
         $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('delete_refferers') . ' ' . TEXT_DELETE_REFFERERS);
         $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_REFFERERS, $cInfo->refferers_count));
     }
     $contents[] = array('align' => 'center', 'text' => '<br />' . xtc_button(BUTTON_DELETE) . '&nbsp;' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_CAMPAIGNS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->campaigns_id)));
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => '<b>' . $cInfo->campaigns_name . '</b>');
         $contents[] = array('align' => 'center', 'text' => xtc_button_link(BUTTON_EDIT, xtc_href_link(FILENAME_CAMPAIGNS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->campaigns_id . '&action=edit')) . '&nbsp;' . xtc_button_link(BUTTON_DELETE, xtc_href_link(FILENAME_CAMPAIGNS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->campaigns_id . '&action=delete')));
         $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xtc_date_short($cInfo->date_added));
         if (xtc_not_null($cInfo->last_modified)) {
             $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . xtc_date_short($cInfo->last_modified));
         }
         $contents[] = array('text' => TEXT_REFERER . '?refID=' . $cInfo->campaigns_refID);
     }
     break;
                </tr>
                <?php 
} elseif (isset($_GET['action']) && $_GET['action'] == 'new') {
    $list = $paypal->available_webhooks();
    if (is_array($list) && count($list) > 0) {
        echo xtc_draw_form('config', basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=insert');
        for ($i = 0, $t = count($list); $i < $t; $i++) {
            ?>
                    <tr>
                      <td class="dataTableConfig col-left"><?php 
            echo $list[$i]['name'];
            ?>
</td>
                      <td class="dataTableConfig col-middle">
                        <?php 
            echo xtc_draw_checkbox_field('config[data][' . $i . '][name]', $list[$i]['name'], 'checked="checked"');
            echo xtc_draw_pull_down_menu('config[data][' . $i . '][orders_status]', $orders_statuses, '-1', 'style="width: 300px;"');
            ?>
                      </td>
                      <td class="dataTableConfig col-right"><?php 
            echo $list[$i]['description'];
            ?>
</td>
                    </tr>
                    <?php 
        }
        ?>
                  <tr>
                    <td class="txta-r" colspan="3" style="border:none;">
                      <a class="button" href="<?php 
        echo xtc_href_link(basename($PHP_SELF));
              <div class="col-xs-12 col-sm-6 main"><span class="main"><?php 
echo TEXT_PRODUCTS_VPE;
?>
</span></div>
              <div class="col-xs-12 col-sm-6 main"><span class="main"><?php 
echo xtc_draw_pull_down_menu('products_vpe', $vpe_array, $pInfo->products_vpe == '' ? DEFAULT_PRODUCTS_VPE_ID : $pInfo->products_vpe, 'style="width: 135px"');
?>
</span></div>
            </div>
            <div class='col-xs-12'>
              <div class="col-xs-12 col-sm-6 main"><span class="main"><?php 
echo TEXT_FSK18;
?>
</span></div>
              <div class="col-xs-12 col-sm-6 main"><span class="main"><?php 
echo xtc_draw_checkbox_field('fsk18', '1', $pInfo->products_fsk18 == '1');
?>
</span></div>
            </div>
    </div>
    <div class='col-sm-6 col-xs-12'>
            <div class='col-xs-12'>
              <div class="col-xs-12 col-sm-6 main"><span class="main"><?php 
echo TEXT_PRODUCTS_QUANTITY;
?>
</span></div>
              <div class="col-xs-12 col-sm-6 main"><span class="main"><?php 
echo xtc_draw_input_field('products_quantity', $pInfo->products_quantity, 'style="width: 135px"');
?>
</span></div>
            </div>
        if ($entry_state_has_zones == true) {
            $zones_array = array();
            $zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input($country) . "' order by zone_name");
            while ($zones_values = xtc_db_fetch_array($zones_query)) {
                $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
            }
            $state_input = xtc_draw_pull_down_menuNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), $zones_array);
        } else {
            $state_input = xtc_draw_input_fieldNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')));
        }
    } else {
        $state_input = xtc_draw_input_fieldNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), xtc_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));
    }
    $module_smarty->assign('INPUT_STATE', $state_input);
}
if (isset($_POST['country'])) {
    $selected = $_POST['country'];
} elseif (isset($entry['entry_country_id'])) {
    $selected = $entry['entry_country_id'];
} else {
    $selected = STORE_COUNTRY;
}
$module_smarty->assign('SELECT_COUNTRY', xtc_get_country_list(array('name' => 'country', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>' : '')), $selected));
if (isset($_GET['edit']) && $_SESSION['customer_default_address_id'] != $_GET['edit'] || isset($_GET['edit']) == false) {
    $module_smarty->assign('new', '1');
    $module_smarty->assign('CHECKBOX_PRIMARY', xtc_draw_checkbox_field('primary', 'on', false, 'id="primary"'));
}
$module_smarty->assign('language', $_SESSION['language']);
$module_smarty->caching = 0;
$main_content = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/address_book_details.html');
$smarty->assign('MODULE_address_book_details', $main_content);
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'delete':
            $heading[] = array('text' => '<b>' . $abInfo->affiliate_banners_title . '</b>');
            $contents = array('form' => xtc_draw_form('affiliate_banners', FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
            $contents[] = array('text' => '<br><b>' . $abInfo->affiliate_banners_title . '</b>');
            if ($abInfo->affiliate_banners_image) {
                $contents[] = array('text' => '<br>' . xtc_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);
            }
            $contents[] = array('align' => 'center', 'text' => '<br>' . xtc_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $_GET['abID']) . '">' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        default:
            if (is_object($abInfo)) {
                $sql = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $abInfo->affiliate_products_id . "' and language_id = '" . $_SESSION['languages_id'] . "'";
                $product_description_query = xtc_db_query($sql);
                $product_description = xtc_db_fetch_array($product_description_query);
                $heading[] = array('text' => '<b>' . $abInfo->affiliate_banners_title . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=new') . '">' . xtc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=delete') . '">' . xtc_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
                $contents[] = array('text' => $product_description['products_name']);
                $contents[] = array('text' => '<br>' . TEXT_BANNERS_DATE_ADDED . ' ' . xtc_date_short($abInfo->affiliate_date_added));
                $contents[] = array('text' => '' . sprintf(TEXT_BANNERS_STATUS_CHANGE, xtc_date_short($abInfo->affiliate_date_status_change)));
            }
            break;
</div>
                    <div class="col-xs-6 col-sm-10 col-md-7"><?php 
echo xtc_draw_pull_down_menu('rules[order][condition]', $conditions, isset($grouped['order']) ? $grouped['order'][2] : 0);
?>
</div>
                </div>
            </div>
                <div class="col-xs-12 hidden-lg hidden-md" style="border-bottom:1px solid #bab9b9;margin-top:10px; margin-bottom: 10px;"></div> 
            <div class="col-xs-12 col-md-6 row" style="font-weight:bold; border-left:1px solid #bab9b9">
                <div class="col-xs-12">
                    <div class="col-xs-6 col-sm-2 col-md-5"><?php 
echo TEXT_ACTIVATE;
?>
</div>
                    <div class="col-xs-6 col-sm-10 col-md-7"><?php 
echo xtc_draw_checkbox_field('rules[customer][active]', '', isset($grouped['customer']) ? 1 : 0);
?>
</div>
                </div>
                <div class="col-xs-12">
                    <div class="col-xs-6 col-sm-2 col-md-5"><?php 
echo TEXT_SELECTOR;
?>
</div>
                    <div class="col-xs-6 col-sm-10 col-md-7"><?php 
echo TEXT_CUSTOMERS_STATUS;
?>
</div>
                </div>
                <div class="col-xs-12">
                    <div class="col-xs-6 col-sm-2 col-md-5"><?php 
 function selection()
 {
     global $order;
     $selection = array('id' => $this->code, 'module' => $this->title, 'description' => $this->info, 'fields' => array(array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE, 'field' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_INFO), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER, 'field' => isset($_GET['banktransfer_owner']) ? xtc_draw_input_field('banktransfer_owner', $_GET['banktransfer_owner'], 'size="40" maxlength="64"') : xtc_draw_input_field('banktransfer_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'size="40" maxlength="64"')), array('title' => MODULE_PAYMENT_BANKTRANSFER_IBAN_ONLY == 'false' ? MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER : MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_IBAN, 'field' => xtc_draw_input_field('banktransfer_number', isset($_GET['banktransfer_number']) ? $_GET['banktransfer_number'] : (isset($_SESSION['banktransfer_info']['banktransfer_number']) ? $_SESSION['banktransfer_info']['banktransfer_number'] : ''), 'size="40" maxlength="40"')), array('title' => MODULE_PAYMENT_BANKTRANSFER_IBAN_ONLY == 'false' ? MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ : MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BIC, 'field' => xtc_draw_input_field('banktransfer_blz', isset($_GET['banktransfer_blz']) ? $_GET['banktransfer_blz'] : (isset($_SESSION['banktransfer_info']['banktransfer_blz']) ? $_SESSION['banktransfer_info']['banktransfer_blz'] : ''), 'size="40" maxlength="11"')), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NAME, 'field' => xtc_draw_input_field('banktransfer_bankname', isset($_GET['banktransfer_bankname']) ? $_GET['banktransfer_bankname'] : (isset($_SESSION['banktransfer_info']['banktransfer_bankname']) ? $_SESSION['banktransfer_info']['banktransfer_bankname'] : ''), 'size="40" maxlength="64"')), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER_EMAIL, 'field' => isset($_GET['banktransfer_owner_email']) ? xtc_draw_input_field('banktransfer_owner_email', $_GET['banktransfer_owner_email'], 'size="40" maxlength="96"') : xtc_draw_input_field('banktransfer_owner_email', isset($_SESSION['banktransfer_info']['banktransfer_owner_email']) ? $_SESSION['banktransfer_info']['banktransfer_owner_email'] : $order->customer['email_address'], 'size="40" maxlength="96"')), array('title' => '', 'field' => isset($_POST['recheckok']) ? xtc_draw_hidden_field('recheckok', $_POST['recheckok']) : '')));
     if (MODULE_PAYMENT_BANKTRANSFER_FAX_CONFIRMATION == 'true') {
         $selection['fields'][] = array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE, 'field' => MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE2 . '<a href="' . MODULE_PAYMENT_BANKTRANSFER_URL_NOTE . '" target="_blank"><b>' . MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE3 . '</b></a>' . MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE4);
         $selection['fields'][] = array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_FAX, 'field' => xtc_draw_checkbox_field('banktransfer_fax', 'on'));
     }
     return $selection;
 }
</div>
                    </div>
                      <?php 
    }
    ?>
                </div>
              <?php 
    $heading = array();
    $contents = array();
    switch ($action) {
        case 'confirm':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>');
            $contents = array('form' => xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_DELETE_INTRO . '<br /><br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
            if ($cInfo->number_of_reviews > 0) {
                $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews));
            }
            $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" value="' . BUTTON_DELETE . '"><a class="btn btn-default" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . BUTTON_CANCEL . '</a>');
            break;
        case 'address_book':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ADRESS_BOOK . '</b>');
            $contents = array();
            require_once DIR_FS_INC . 'xtc_get_address_format_id.inc.php';
            require_once DIR_FS_INC . 'xtc_count_customer_address_book_entries.inc.php';
            $addresses_query = xtc_db_query("-- admin/customers.php\n                                                     select address_book_id,\n                                                            entry_firstname as firstname,\n                                                            entry_lastname as lastname,\n                                                            entry_company as company,\n                                                            entry_street_address as street_address,\n                                                            entry_suburb as suburb,\n                                                            entry_city as city,\n                                                            entry_postcode as postcode,\n                                                            entry_state as state,\n                                                            entry_zone_id as zone_id,\n                                                            entry_country_id as country_id\n                                                       FROM " . TABLE_ADDRESS_BOOK . "\n                                                      WHERE customers_id = '" . (int) $cInfo->customers_id . "'\n                                                   ORDER BY address_book_id\n                                                   ");
            while ($addresses = xtc_db_fetch_array($addresses_query)) {
                $format_id = xtc_get_address_format_id($addresses['country_id']);
                if (isset($_GET['delete']) && $_GET['delete'] != '') {
                    if ($addresses['address_book_id'] == $_GET['delete']) {
                        if ($_GET['delete'] != $cInfo->customers_default_address_id) {
                            $contents[] = array('text' => '<br/>');
Example #30
0
             // elari End add display products
             $contents[] = array('text' => '<br />');
             // BOF GM_MOD EOF
         }
         // bof gm
         $gm_heading_multi_status[] = array('text' => '<b>' . HEADING_GM_STATUS . '</b>');
         $content_multi_order_status[] = array('text' => xtc_draw_hidden_field(xtc_session_name(), xtc_session_id()));
         $content_multi_order_status[] = array('text' => xtc_draw_hidden_field('action', 'gm_multi_status') . xtc_draw_hidden_field('page', $_GET['page']));
         $content_multi_order_status[] = array('text' => xtc_draw_pull_down_menu('gm_status', array_merge(array(array('id' => '', 'text' => TEXT_GM_STATUS)), array(array('id' => '0', 'text' => TEXT_VALIDATING)), $orders_statuses)));
         /* magnalister v2.0.0 */
         if (function_exists('magnaExecute')) {
             magnaExecute('magnaRenderOrderStatusSync', array('multi' => true), array('order_details.php'));
         }
         /* END magnalister */
         $content_multi_order_status[] = array('text' => xtc_draw_checkbox_field('gm_notify', 'on') . ENTRY_NOTIFY_CUSTOMER);
         $content_multi_order_status[] = array('text' => xtc_draw_checkbox_field('gm_notify_comments', 'on') . ENTRY_NOTIFY_COMMENTS);
         $content_multi_order_status[] = array('text' => TABLE_HEADING_COMMENTS . '<br>' . xtc_draw_textarea_field('gm_comments', '', 24, 5, $_GET['comments'], '', false) . '<br>');
         $content_multi_order_status[] = array('align' => 'left', 'text' => '<div align="center"><input type="submit" class="button" value="' . BUTTON_CONFIRM . '"></form></div>');
         $content_multi_order_status[] = array('align' => 'left', 'text' => '<br />');
         // eof gm
         break;
 }
 if (xtc_not_null($heading) && xtc_not_null($contents)) {
     echo '            <td width="25%" valign="top" id="gm_orders">' . "\n";
     $box = new box();
     echo $box->infoBox($heading, $contents);
     echo "<br />";
     $box = new box();
     echo $box->infoBox($gm_heading_multi_status, $content_multi_order_status);
     echo '            </td>' . "\n";
 }