Ejemplo n.º 1
0
 function process_button()
 {
     global $oOrder, $oCurrencies;
     if (MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE == 'Selected Language') {
         $my_language = 'EN';
     } else {
         $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     }
     if (MODULE_PAYMENT_MONEYBOOKERS_CURRENCY == 'Selected Currency') {
         $my_currency = $_SESSION['currency'];
     } else {
         $my_currency = substr(MODULE_PAYMENT_MONEYBOOKERS_CURRENCY, 5);
     }
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'EUR';
     }
     $aPages = oos_get_pages();
     $process_button_string = oos_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . oos_draw_hidden_field('language', $my_language) . oos_draw_hidden_field('amount', number_format($oOrder->info['total'] * $oCurrencies->get_value($my_currency), $oCurrencies->get_decimal_places($my_currency))) . oos_draw_hidden_field('currency', $my_currency) . oos_draw_hidden_field('detail1_description', STORE_NAME) . oos_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . oos_draw_hidden_field('firstname', $oOrder->billing['firstname']) . oos_draw_hidden_field('lastname', $oOrder->billing['lastname']) . oos_draw_hidden_field('address', $oOrder->billing['street_address']) . oos_draw_hidden_field('postal_code', $oOrder->billing['postcode']) . oos_draw_hidden_field('city', $oOrder->billing['city']) . oos_draw_hidden_field('country', $oOrder->billing['country']['moneybookers']) . oos_draw_hidden_field('pay_from_email', $oOrder->customer['email_address']) . oos_draw_hidden_field('return', oos_href_link($aPages['checkout_process'], '', 'SSL')) . oos_draw_hidden_field('cancel_return', oos_href_link($aPages['checkout_payment'], '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 2
0
     if ($_GET['gName'] == '0') {
         $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_FALSE . '<br />&nbsp;');
     } elseif ($_GET['gName'] == 'used') {
         $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_USED . '<br />&nbsp;');
     }
     $contents[] = array('align' => 'center', 'text' => TEXT_INFO_EDIT_GROUP_INTRO . '<br />&nbsp;<br />' . oos_draw_input_field('admin_groups_name', $gInfo->admin_groups_name));
     $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('save', 'save_off.gif', IMAGE_SAVE) . ' <a href="' . oos_href_link_admin($aFilename['admin_members'], 'gID=' . $gInfo->admin_groups_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'del_group':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_GROUPS . '</b>');
     $contents = array('form' => oos_draw_form('delete_group', $aFilename['admin_members'], 'action=group_delete&gID=' . $gInfo->admin_groups_id, 'post', 'enctype="multipart/form-data"'));
     if ($gInfo->admin_groups_id == 1) {
         $contents[] = array('align' => 'center', 'text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO_NOT, $gInfo->admin_groups_name));
         $contents[] = array('align' => 'center', 'text' => '<br /><a href="' . oos_href_link_admin($aFilename['admin_members'], 'gID=' . $_GET['gID']) . '">' . oos_image_swap_button('back', 'back_off.gif', IMAGE_BACK) . '</a><br />&nbsp;');
     } else {
         $contents[] = array('text' => oos_draw_hidden_field('set_groups_id', substr($del_groups_prepare, 4)));
         $contents[] = array('align' => 'center', 'text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO, $gInfo->admin_groups_name));
         $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('delete', 'delete_off.gif', IMAGE_DELETE) . ' <a href="' . oos_href_link_admin($aFilename['admin_members'], 'gID=' . $_GET['gID']) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a><br />&nbsp;');
     }
     break;
 case 'define_group':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DEFINE . '</b>');
     $contents[] = array('text' => sprintf(TEXT_INFO_DEFINE_INTRO, $group_name['admin_groups_name']));
     if ($_GET['gPath'] == 1) {
         $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['admin_members'], 'gID=' . $_GET['gPath']) . '">' . oos_image_swap_button('back', 'back_off.gif', IMAGE_CANCEL) . '</a><br />');
     }
     break;
 case 'show_group':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_GROUP . '</b>');
     $check_email_query = "SELECT admin_email_address FROM " . $oostable['admin'] . "";
     $check_email_result =& $dbconn->Execute($check_email_query);
Ejemplo n.º 3
0
</td>
              </tr>
              <tr>
                <td><?php 
    echo oos_draw_separator('trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td>
<?php 
    /* Re-Post all POST'ed variables */
    reset($_POST);
    while (list($key, $value) = each($_POST)) {
        if (!is_array($_POST[$key])) {
            echo oos_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
        }
    }
    ?>
                <table border="0" width="100%" cellpadding="0" cellspacing="2">
                  <tr>
                    <td><?php 
    echo oos_image_swap_submits('back', 'back_off.gif', IMAGE_BACK, 'name="back"');
    ?>
</td>
                    <td align="right"><?php 
    echo '<a href="' . oos_href_link_admin($aFilename['gv_mail']) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a> ' . oos_image_swap_submits('send_mail', 'send_mail_off.gif', IMAGE_SEND_EMAIL);
    ?>
</td>
                  </tr>
                </table></td>
Ejemplo n.º 4
0
        $languages = oos_get_languages();
        for ($i = 0, $n = count($languages); $i < $n; $i++) {
            $lang_id = $languages[$i]['id'];
            echo oos_draw_hidden_field('coupon_name[' . $languages[$i]['id'] . ']', $_POST['coupon_name'][$lang_id]);
            echo oos_draw_hidden_field('coupon_desc[' . $languages[$i]['id'] . ']', $_POST['coupon_desc'][$lang_id]);
        }
        echo oos_draw_hidden_field('coupon_amount', $_POST['coupon_amount']);
        echo oos_draw_hidden_field('coupon_min_order', $_POST['coupon_min_order']);
        echo oos_draw_hidden_field('coupon_free_ship', $_POST['coupon_free_ship']);
        echo oos_draw_hidden_field('coupon_code', $c_code);
        echo oos_draw_hidden_field('coupon_uses_coupon', $_POST['coupon_uses_coupon']);
        echo oos_draw_hidden_field('coupon_uses_user', $_POST['coupon_uses_user']);
        echo oos_draw_hidden_field('coupon_products', $_POST['coupon_products']);
        echo oos_draw_hidden_field('coupon_categories', $_POST['coupon_categories']);
        echo oos_draw_hidden_field('coupon_startdate', date('Y-m-d', mktime(0, 0, 0, $_POST['coupon_startdate_month'], $_POST['coupon_startdate_day'], $_POST['coupon_startdate_year'])));
        echo oos_draw_hidden_field('coupon_finishdate', date('Y-m-d', mktime(0, 0, 0, $_POST['coupon_finishdate_month'], $_POST['coupon_finishdate_day'], $_POST['coupon_finishdate_year'])));
        ?>
     <tr>
        <td align="left"><?php 
        echo oos_image_swap_submits('confirm', 'confirm_off.gif', COUPON_BUTTON_CONFIRM);
        ?>
</td>
        <td align="left"><?php 
        echo oos_image_swap_submits('back', 'back_off.gif', COUPON_BUTTON_BACK, 'name=back');
        ?>
</td>
      </td>
      </tr>

      </td></table></form>
      </tr>
Ejemplo n.º 5
0
            echo oos_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));
            echo oos_draw_hidden_field('products_description_meta[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description_meta[$languages[$i]['id']])));
            echo oos_draw_hidden_field('products_keywords_meta[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_keywords_meta[$languages[$i]['id']])));
            echo oos_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));
        }
        echo oos_draw_hidden_field('products_image', stripslashes($products_image_name));
        echo oos_draw_hidden_field('products_subimage1', stripslashes($products_subimage1_name));
        echo oos_draw_hidden_field('products_subimage2', stripslashes($products_subimage2_name));
        echo oos_draw_hidden_field('products_subimage3', stripslashes($products_subimage3_name));
        echo oos_draw_hidden_field('products_subimage4', stripslashes($products_subimage4_name));
        echo oos_draw_hidden_field('products_subimage5', stripslashes($products_subimage5_name));
        echo oos_draw_hidden_field('products_subimage6', stripslashes($products_subimage6_name));
        if (isset($_POST['categories_ids'])) {
            $selected_catids = $_POST['categories_ids'];
            foreach ($selected_catids as $current_category_id) {
                echo oos_draw_hidden_field('categories_ids[]', stripslashes($current_category_id));
            }
        }
        echo oos_image_swap_submits('back', 'back_off.gif', IMAGE_BACK, 'name="edit"') . '&nbsp;&nbsp;';
        if (isset($_GET['pID'])) {
            echo oos_image_swap_submits('update', 'update_off.gif', IMAGE_UPDATE);
        } else {
            echo oos_image_swap_submits('insert', 'insert_off.gif', IMAGE_INSERT);
        }
        echo '&nbsp;&nbsp;<a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&pID=' . $_GET['pID']) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>';
        ?>
</td>
      </form></tr>
<?php 
    }
}
Ejemplo n.º 6
0
                            WHERE pa.products_id = '" . intval($products_id) . "'
                              AND pa.options_id = '" . oos_db_input($option) . "'
                              AND pa.options_id = popt.products_options_id
                              AND pa.options_values_id = '" . oos_db_input($value) . "'
                              AND pa.options_values_id = poval.products_options_values_id
                              AND popt.products_options_languages_id = '" . intval($nLanguageID) . "'
                              AND poval.products_options_values_languages_id = '" .  intval($nLanguageID) . "'";
                }

                $attributes_values = $dbconn->GetRow($sql);

                if ($value == PRODUCTS_OPTIONS_VALUE_TEXT_ID) {
                    $hidden_field .=  oos_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']',$products[$i]['attributes_values'][$option]);
                    $attr_value = $products[$i]['attributes_values'][$option];
                } else {
                    $hidden_field .= oos_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
                    $attr_value = $attributes_values['products_options_values_name'];
                }

                $attr_price = $attributes_values['options_values_price'];

                if ($_SESSION['member']->group['discount'] != 0) {
                    $max_product_discount = min($products[$i]['discount_allowed'], $_SESSION['member']->group['discount']);
                    if ( ($max_product_discount > 0) && ($products[$i]['spezial'] == '0') ) {
                        $attr_price = $attr_price*(100-$max_product_discount)/100;
                    }
                }

                $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
                $products[$i][$option]['options_values_id'] = $value;
                $products[$i][$option]['products_options_values_name'] = $attr_value;
Ejemplo n.º 7
0
    function process_button() {

      $process_button_string = oos_draw_hidden_field('cc_owner', $_POST['cc_owner']) .
                               oos_draw_hidden_field('cc_expires', $_POST['cc_expires_month'] . $_POST['cc_expires_year']) .
                               oos_draw_hidden_field('cc_start', $_POST['cc_start_month'].$_POST['cc_start_year']) .
                               oos_draw_hidden_field('cc_cvv', $_POST['cc_cvv']) .
                               oos_draw_hidden_field('cc_issue', $_POST['cc_issue']) .
                               oos_draw_hidden_field('cc_type', $this->cc_card_type) .
                               oos_draw_hidden_field('cc_number', $this->cc_card_number);

      return $process_button_string;
    }
Ejemplo n.º 8
0
     $products_attribs_result = $dbconn->Execute($products_attribs_sql);
     $products_attribs_array = $products_attribs_result->fields;
     $options .= '<tr><td class="main">' . "\n";
     $options .= $products_options_name['products_options_name'];
     $options .= ':&nbsp;';
     if ($products_attribs_array['options_values_price'] > '0') {
         if ($_SESSION['member']->group['show_price'] == 1) {
             if ($info_product_discount != 0) {
                 $options .= ' (' . $products_attribs_array['price_prefix'] . $oCurrencies->display_price($products_attribs_array['options_values_price'], oos_get_tax_rate($product_info['products_tax_class_id'])) . ' -' . number_format($info_product_discount, 2) . '% )&nbsp';
             } else {
                 $options .= ' (' . $products_attribs_array['price_prefix'] . $oCurrencies->display_price($products_attribs_array['options_values_price'], oos_get_tax_rate($product_info['products_tax_class_id'])) . ')&nbsp';
             }
         }
     }
     $options .= '</td><td class="main"><input type="file" name="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']"><br />' . $_SESSION['cart']->contents[$sProductsId]['attributes_values'][$products_options_name['products_options_id']] . oos_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $products_options_name['products_options_id']) . oos_draw_hidden_field(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $_SESSION['cart']->contents[$sProductsId]['attributes_values'][$products_options_name['products_options_id']]);
     $options .= oos_draw_hidden_field('number_of_uploads', $number_of_uploads);
     $options .= '</td></tr>';
     break;
 case PRODUCTS_OPTIONS_TYPE_SELECT:
 default:
     $options .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td class="main">' . "\n";
     $selected = 0;
     $products_options_array = array();
     $products_attributestable = $oostable['products_attributes'];
     $products_options_valuestable = $oostable['products_options_values'];
     $products_options_sql = "SELECT pov.products_options_values_id, pov.products_options_values_name,\n                                                  pa.options_values_price, pa.price_prefix, pa.options_sort_order\n                                           FROM {$products_attributestable} pa,\n                                                {$products_options_valuestable} pov\n                                           WHERE pa.products_id = '" . intval($nProductsId) . "'\n                                             AND pa.options_id = '" . $products_options_name['products_options_id'] . "'\n                                             AND pa.options_values_id = pov.products_options_values_id\n                                             AND pov.products_options_values_languages_id = '" . intval($nLanguageID) . "'\n                                          " . $options_sort_by;
     $products_options_result = $dbconn->Execute($products_options_sql);
     while ($products_options = $products_options_result->fields) {
         $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
         if ($products_options['options_values_price'] > '0') {
             if ($_SESSION['member']->group['show_price'] == 1) {
Ejemplo n.º 9
0
      $mail_result->MoveNext();
    }
    echo oos_draw_pull_down_menu('email_address', $customers, $_GET['customer']);
    echo oos_draw_hidden_field('verif_key', $newkey);
?></td>
         </tr>
           <tr class="dataTableRow">
           <td class="dataTableContenta" align="left">&nbsp;</td>
           <td class="dataTableContenta" align="center"><?php echo oos_image_swap_submits('login','login_off.gif', IMAGE_LOGIN);  ?></td>
         </tr></form>
        </table></td>
        </tr>
        <tr><td width="100%" align="center"><br />
<?php
    echo oos_draw_login_form('login', $aCatalogPage['create_account_admin'], 'action=login_admin','POST', 'target=_blank');
    echo oos_draw_hidden_field('verif_key', $newkey);
?>
         <table border="0" cellspacing="0" cellpadding="2" width="70%">
    <tr class="dataTableHeadingRowa">
            <td class="dataTableHeadingContenta" align="left"><?php echo HEADING_CREATE_ORDER_ADMIN; ?></td>
          </tr>
          <tr class="dataTableRow">
            <td class="dataTableContenta" align="left"><?php echo HEADING_CREATE_ORDER_EXPLAIN; ?></td>
          </tr>
           <tr class="dataTableRow">
            <td class="dataTableContenta" align="center"><?php echo oos_image_swap_submits('create_order','create_order_off.gif', IMAGE_CREATE_ORDER); ?></td>
          </tr>
        </table></form>
       </td></tr>
<?php
  }
Ejemplo n.º 10
0
    function process_button() {
      global $oOrder, $oCurrencies;

      switch (MODULE_PAYMENT_IPAYMENT_CURRENCY) {
        case 'Always EUR':
          $trx_currency = 'EUR';
          break;
        case 'Always USD':
          $trx_currency = 'USD';
          break;
        case 'Either EUR or USD, else EUR':
          if ( ($_SESSION['currency'] == 'EUR') || ($_SESSION['currency'] == 'USD') ) {
            $trx_currency = $_SESSION['currency'];
          } else {
            $trx_currency = 'EUR';
          }
          break;
        case 'Either EUR or USD, else USD':
          if ( ($_SESSION['currency'] == 'EUR') || ($_SESSION['currency'] == 'USD') ) {
            $trx_currency = $_SESSION['currency'];
          } else {
            $trx_currency = 'USD';
          }
          break;
      }

      $aPages = oos_get_pages();

      $process_button_string = oos_draw_hidden_field('silent', '1') .
                               oos_draw_hidden_field('trx_paymenttyp', 'cc') .
                               oos_draw_hidden_field('trxuser_id', MODULE_PAYMENT_IPAYMENT_USER_ID) .
                               oos_draw_hidden_field('trxpassword', MODULE_PAYMENT_IPAYMENT_PASSWORD) .
                               oos_draw_hidden_field('item_name', STORE_NAME) .
                               oos_draw_hidden_field('trx_currency', $trx_currency) .
                               oos_draw_hidden_field('trx_amount', number_format($oOrder->info['total'] * 100 * $oCurrencies->get_value($trx_currency), 0, '','')) .
                               oos_draw_hidden_field('cc_expdate_month', $_POST['ipayment_cc_expires_month']) .
                               oos_draw_hidden_field('cc_expdate_year', $_POST['ipayment_cc_expires_year']) .
                               oos_draw_hidden_field('cc_number', $_POST['ipayment_cc_number']) .
                               oos_draw_hidden_field('cc_checkcode', $_POST['ipayment_cc_checkcode']) .
                               oos_draw_hidden_field('addr_name', $_POST['ipayment_cc_owner']) .
                               oos_draw_hidden_field('addr_email', $oOrder->customer['email_address']) .
                               oos_draw_hidden_field('redirect_url', oos_href_link($aPages['checkout_process'], '', 'SSL', true)) .
                               oos_draw_hidden_field('silent_error_url', oos_href_link($aPages['checkout_payment'], 'payment_error=' . $this->code . '&ipayment_cc_owner=' . urlencode($_POST['ipayment_cc_owner']), 'SSL', true));

      return $process_button_string;
    }
Ejemplo n.º 11
0
?>
</td><tr></table></td>
              </tr>
            </table>
            </td>
<?php 
$heading = array();
$contents = array();
switch ($action) {
    case 'edit_process':
        $heading[] = array('text' => '<b>&nbsp;' . TEXT_INFO_HEADING_DEFAULT . '</b>');
        $contents[] = array('text' => TEXT_INFO_INTRO_EDIT_PROCESS . oos_draw_hidden_field('id_info', $myAccount['admin_id']));
        break;
    case 'check_account':
        $heading[] = array('text' => '<b>&nbsp;' . TEXT_INFO_HEADING_CONFIRM_PASSWORD . '</b>');
        $contents[] = array('text' => '&nbsp;' . TEXT_INFO_INTRO_CONFIRM_PASSWORD . oos_draw_hidden_field('id_info', $myAccount['admin_id']));
        if ($_GET['error']) {
            $contents[] = array('text' => '&nbsp;' . TEXT_INFO_INTRO_CONFIRM_PASSWORD_ERROR);
        }
        $contents[] = array('align' => 'center', 'text' => oos_draw_password_field('password_confirmation'));
        $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['admin_account']) . '">' . oos_image_swap_button('back', 'back_off.gif', IMAGE_BACK) . '</a> ' . oos_image_swap_submits('confirm', 'confirm_off.gif', IMAGE_CONFIRM) . '<br />&nbsp');
        break;
    default:
        $heading[] = array('text' => '<b>&nbsp;' . TEXT_INFO_HEADING_DEFAULT . '</b>');
        $contents[] = array('text' => TEXT_INFO_INTRO_DEFAULT);
        if ($myAccount['admin_email_address'] == '*****@*****.**') {
            $contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST, $myAccount['admin_firstname']) . '<br />&nbsp');
        } elseif ($myAccount['admin_modified'] == '0000-00-00 00:00:00' || $myAccount['admin_logdate'] <= 1) {
            $contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST_TIME, $myAccount['admin_firstname']) . '<br />&nbsp');
        }
}
Ejemplo n.º 12
0
     }
     $product_categories_string = substr($product_categories_string, 0, -4);
     $contents[] = array('text' => '<br />' . $product_categories_string);
     $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('delete', 'delete_off.gif', IMAGE_DELETE) . ' <a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&pID=' . $pInfo->products_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'move_product':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>');
     $contents = array('form' => oos_draw_form('products', $aFilename['categories'], 'action=move_product_confirm&categories=' . $categories) . oos_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . oos_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br />' . oos_draw_pull_down_menu('move_to_category_id', oos_get_category_tree(), $current_category_id));
     $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('move', 'move_off.gif', IMAGE_MOVE) . ' <a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&pID=' . $pInfo->products_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'copy_to':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
     $contents = array('form' => oos_draw_form('copy_to', $aFilename['categories'], 'action=copy_to_confirm&categories=' . $categories) . oos_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . oos_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . oos_draw_pull_down_menu('categories_id', oos_get_category_tree(), $current_category_id));
     $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . oos_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . oos_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
     $contents[] = array('text' => '<br />' . oos_image(OOS_IMAGES . 'pixel_black.gif', '', '100%', '3'));
     $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_ONLY);
     $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES . '<br />' . oos_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br />' . oos_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO);
     $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('copy', 'copy_off.gif', IMAGE_COPY) . ' <a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&pID=' . $pInfo->products_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if ($rows > 0) {
         if (isset($cInfo) && is_object($cInfo)) {
             // category info box contents
             $heading[] = array('text' => '<b>' . $cInfo->categories_name . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . oos_image_swap_button('edit', 'edit_off.gif', IMAGE_EDIT) . '</a> <a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&cID=' . $cInfo->categories_id . '&action=delete_category') . '">' . oos_image_swap_button('delete', 'delete_off.gif', IMAGE_DELETE) . '</a> <a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&cID=' . $cInfo->categories_id . '&action=move_category') . '">' . oos_image_swap_button('move', 'move_off.gif', IMAGE_MOVE) . '</a>');
Ejemplo n.º 13
0
<?php 
if ($directory_writeable && $action == 'new_file' || $action == 'edit') {
    if (strstr($_GET['info'], '..')) {
        oos_redirect_admin(oos_href_link_admin($aFilename['file_manager']));
    }
    if (!isset($file_writeable)) {
        $file_writeable = true;
    }
    $file_contents = '';
    if ($action == 'new_file') {
        $filename_input_field = oos_draw_input_field('filename');
    } elseif ($action == 'edit') {
        if ($file_array = file($_SESSION['current_path'] . '/' . $_GET['info'])) {
            $file_contents = htmlspecialchars(implode('', $file_array));
        }
        $filename_input_field = $_GET['info'] . oos_draw_hidden_field('filename', $_GET['info']);
    }
    ?>
      <tr>
        <td><?php 
    echo oos_draw_separator('trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr><?php 
    echo oos_draw_form('new_file', $aFilename['file_manager'], 'action=save');
    ?>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_FILE_NAME;
Ejemplo n.º 14
0
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
    echo HEADING_TITLE;
    ?>
</td>
            <td class="pageHeading" align="right"><?php 
    echo oos_draw_separator('trans.gif', 1, HEADING_IMAGE_HEIGHT);
    ?>
</td>
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr><?php 
    echo oos_draw_form('orders', $aFilename['orders'], '', 'get');
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_SEARCH . ' ' . oos_draw_input_field('oID', '', 'size="12"') . oos_draw_hidden_field('action', 'edit');
    ?>
</td>
              </form></tr>
              <tr><?php 
    echo oos_draw_form('status', $aFilename['orders'], '', 'get');
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_STATUS . ' ' . oos_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onChange="this.form.submit();"');
    ?>
</td>
              </form></tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     if (!empty($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = intval($query_numrows / $max_rows_per_page);
     // $num_pages now contains int of pages needed unless there is a remainder from division
     if ($query_numrows % $max_rows_per_page) {
         $num_pages++;
     }
     // has remainder so add one page
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = oos_draw_form('pages', basename($_SERVER['PHP_SELF']), '', 'get');
         if ($current_page_number > 1) {
             $display_links .= '<a href="' . oos_href_link_admin(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, oos_draw_pull_down_menu($page_name, $pages_array, '', 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . oos_href_link_admin(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= oos_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= oos_draw_hidden_field(oos_session_name(), oos_session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
Ejemplo n.º 16
0
 function process_button()
 {
     global $oOrder, $oCurrencies;
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     $process_button_string = oos_draw_hidden_field('cmd', '_xclick') . oos_draw_hidden_field('email', MODULE_PAYMENT_NOCHEX_ID) . oos_draw_hidden_field('amount', number_format($oOrder->info['total'] * $oCurrencies->currencies['GBP']['value'], $oCurrencies->currencies['GBP']['decimal_places'])) . oos_draw_hidden_field('ordernumber', $_SESSION['customer_id'] . '-' . date('Ymdhis')) . oos_draw_hidden_field('returnurl', oos_href_link($aModules['checkout'], $aFilename['checkout_process'], '', 'SSL')) . oos_draw_hidden_field('cancel_return', oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 17
0
 /**
  * Hide form elements
  */
  function oos_hide_session_id() {
    if (defined('SID') && !oos_empty(SID)) return oos_draw_hidden_field(oos_session_name(), oos_session_id());
  }
Ejemplo n.º 18
0
     $shopping_cart_detail .= '    <td valign="top" class="main"><a href="' . oos_href_link($aPages['product_info'], 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
 } else {
     $shopping_cart_detail .= '    <td valign="top" class="main"><b>' . $products[$i]['name'] . '</b>';
 }
 // Display marker if stock quantity insufficient
 if (STOCK_CHECK == '1') {
     $shopping_cart_detail .= $stock_check = oos_check_stock($products[$i]['id'], $products[$i]['quantity']);
     if ($stock_check) {
         $any_out_of_stock = 1;
     }
 }
 // Wishlist names
 if (!empty($products[$i]['towlid'])) {
     $shopping_cart_detail .= '<br /><a href="' . oos_href_link($aPages['main_wishlist'], 'wlid=' . $products[$i]['towlid'], 'NONSSL') . '">' . oos_image(OOS_IMAGES . 'wl.gif', oos_get_wishlist_name($products[$i]['towlid'])) . '</a>' . "\n";
     $shopping_cart_detail .= '<small><i><a href="' . oos_href_link($aPages['main_wishlist'], 'wlid=' . $products[$i]['towlid'], 'NONSSL') . '">' . oos_get_wishlist_name($products[$i]['towlid']) . '</a></i></small>';
     $shopping_cart_detail .= oos_draw_hidden_field('to_wl_id[]', $products[$i]['towlid']);
 }
 // Product options names
 if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
     foreach ($products[$i]['attributes'] as $option => $value) {
         $shopping_cart_detail .= '<br /><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
     }
     if ($sPage == $aPages['shopping_cart']) {
         $shopping_cart_detail .= '<br /><br />';
         $shopping_cart_detail .= '<a href="' . oos_href_link($aPages['product_info'], 'products_id=' . $products[$i]['id'] . '&edit=yes') . '">' . $aLang['text_edit_product'] . '</a><br />';
         $shopping_cart_detail .= '<a href="' . oos_href_link($aPages['product_info'], 'products_id=' . $products[$i]['id'] . '&edit=yes') . '">' . $aLang['text_add_options'] . '</a><br />';
         $shopping_cart_detail .= '<a href="' . oos_href_link($aPages['product_info'], 'products_id=' . $products[$i]['id']) . '">' . $aLang['text_add_product'] . '</a><br />';
     }
 }
 $shopping_cart_detail .= '</td>' . "\n";
 if ($sPage == $aPages['shopping_cart']) {
Ejemplo n.º 19
0
<?php 
    if ($form_action == 'update') {
        echo oos_draw_hidden_field('featured_id', $_GET['fID']);
    } elseif (isset($_GET['pID'])) {
        echo oos_draw_hidden_field('products_id', $sInfo->products_id);
    }
    ?>
        <td><br /><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_FEATURED_PRODUCT;
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo $sInfo->products_name ? $sInfo->products_name : oos_draw_products_pull_down('products_id', 'style="font-size:10px"', $featured_array);
    echo oos_draw_hidden_field('products_price', $sInfo->products_price);
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_FEATURED_EXPIRES_DATE;
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo oos_draw_input_field('day', substr($sInfo->expires_date, 8, 2), 'size="2" maxlength="2" class="cal-TextBox"') . oos_draw_input_field('month', substr($sInfo->expires_date, 5, 2), 'size="2" maxlength="2" class="cal-TextBox"') . oos_draw_input_field('year', substr($sInfo->expires_date, 0, 4), 'size="4" maxlength="4" class="cal-TextBox"');
    ?>
<a class="so-BtnLink" href="javascript:calClick();return false;" onMouseOver="calSwapImg('BTN_date', 'img_Date_OVER',true);" onMouseOut="calSwapImg('BTN_date', 'img_Date_UP',true);" onClick="calSwapImg('BTN_date', 'img_Date_DOWN');showCalendar('new_feature','dteWhen','BTN_date');return false;"><?php 
    echo oos_image(OOS_IMAGES . 'cal_date_up.gif', 'Calendar', '22', '17', 'align="absmiddle" name="BTN_date"');
    ?>
</a></td>
Ejemplo n.º 20
0
/** ensure this file is being included by a parent file */
defined( 'OOS_VALID_MOD' ) or die( 'Direct Access to this location is not allowed.' );

if (isset($oCurrencies) && is_object($oCurrencies)) {

    reset($oCurrencies->currencies);
    $aCurrencies = array();

    foreach ($oCurrencies->currencies as $sKey => $value) {
        $aCurrencies[] = array('id' => $sKey, 'text' => $value['title']);
    }

    $hidden_get_variables = '';
    foreach ($_GET as $sKey => $value) {
        if ( is_string($value) && ($sKey != 'currency') && ($sKey != oos_session_name()) && ($sKey != 'x') && ($sKey != 'y') ) {
            $hidden_get_variables .= oos_draw_hidden_field($sKey, $value);
        }
    }

    $oos_pull_down_menu = oos_draw_pull_down_menu('currency', $aCurrencies, $_SESSION['currency'], 'onchange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . oos_hide_session_id();

    $oSmarty->assign(
        array(
            'oos_pull_down_menu' => $oos_pull_down_menu,
            'block_heading_currencies' => $block_heading
        )
    );
}

Ejemplo n.º 21
0
     if ($wishlist_product_discount != 0) {
         $wishlist_special_price = $wishlist_product['products_price'] * (100 - $wishlist_product_discount) / 100;
         $wishlist_product_discount_price = $oCurrencies->display_price($wishlist_special_price, oos_get_tax_rate($wishlist_product['products_tax_class_id']));
     }
 }
 if ($wishlist_product['products_base_price'] != 1) {
     $wishlist_base_product_price = $oCurrencies->display_price($wishlist_product['products_price'] * $wishlist_product['products_base_price'], oos_get_tax_rate($wishlist_product['products_tax_class_id']));
     if ($wishlist_special_price != '') {
         $wishlist_base_product_special_price = $oCurrencies->display_price($wishlist_special_price * $wishlist_product['products_base_price'], oos_get_tax_rate($wishlist_product['products_tax_class_id']));
     }
 }
 $sql = "SELECT products_options_id, products_options_value_id\n            FROM " . $oostable['customers_wishlist_attributes'] . "\n            WHERE customers_wishlist_link_id = '" . oos_db_input($wlid) . "'\n              AND products_id = '" . $wishlist['products_id'] . "'";
 $attributes_result = $dbconn->Execute($sql);
 $attributes_print = '';
 while ($attributes = $attributes_result->fields) {
     $attributes_print .= oos_draw_hidden_field('id[' . $attributes['products_options_id'] . ']', $attributes['products_options_value_id']);
     $attributes_print .= '                   <tr>';
     $sql = "SELECT popt.products_options_name,\n                       poval.products_options_values_name,\n                       pa.options_values_price, pa.price_prefix\n                FROM " . $oostable['products_options'] . " popt,\n                     " . $oostable['products_options_values'] . " poval,\n                     " . $oostable['products_attributes'] . " pa\n                WHERE pa.products_id = '" . intval($wl_products_id) . "'\n                  AND pa.options_id = '" . $attributes['products_options_id'] . "'\n                  AND pa.options_id = popt.products_options_id\n                  AND pa.options_values_id = '" . $attributes['products_options_value_id'] . "'\n                  AND pa.options_values_id = poval.products_options_values_id\n                  AND popt.products_options_languages_id = '" . intval($nLanguageID) . "'\n                  AND poval.products_options_values_languages_id = '" . intval($nLanguageID) . "'";
     $option = $dbconn->Execute($sql);
     $option_values = $option->fields;
     $attributes_print .= '<td><br /><small><i> - ' . $option_values['products_options_name'] . ' ' . $option_values['products_options_values_name'] . '</i></small></td>';
     if ($option_values['options_values_price'] != 0) {
         $attributes_print .= '<td align="right"><small><i>' . $option_values['price_prefix'] . $oCurrencies->display_price($option_values['options_values_price'], oos_get_tax_rate($wishlist_product['products_tax_class_id'])) . '</i></small></td>';
     } else {
         $attributes_print .= '<td><small><i>&nbsp;</i></small></td>';
     }
     $attributes_print .= '                   </tr>';
     $attributes_result->MoveNext();
 }
 $aWishlist[] = array('products_id' => $wishlist_product['products_id'], 'wl_products_id' => $wl_products_id, 'products_image' => $wishlist_product['products_image'], 'products_name' => $wishlist_product['products_name'], 'product_price' => $wishlist_product_price, 'product_special_price' => $wishlist_product_special_price, 'max_product_discount' => $wishlist_product_discount, 'product_discount_price' => $wishlist_product_discount_price, 'base_product_price' => $wishlist_base_product_price, 'base_product_special_price' => $wishlist_base_product_special_price, 'products_base_price' => $wishlist_product['products_base_price'], 'products_base_unit' => $wishlist_product['products_base_unit'], 'attributes_print' => $attributes_print);
 $wishlist_result->MoveNext();
Ejemplo n.º 22
0
/**
 * Hide form elements
 */
function oos_hide_session_id()
{
    if (defined('SID') && oos_is_not_null(SID)) {
        return oos_draw_hidden_field(oos_session_name(), oos_session_id());
    }
}
Ejemplo n.º 23
0
      $cs_payment = $customer_status['customers_status_payment'];

      if (isset($cInfo) && is_object($cInfo)) {
        $heading[] = array('text' => '<b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');

        $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['customers'], oos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . oos_image_swap_button('edit', 'edit_off.gif', IMAGE_EDIT) . '</a> <a href="' . oos_href_link_admin($aFilename['customers'], oos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . oos_image_swap_button('delete', 'delete_off.gif', IMAGE_DELETE) . '</a> <a href="' . oos_href_link_admin($aFilename['orders'], 'cID=' . $cInfo->customers_id) . '">' . oos_image_swap_button('orders', 'orders_off.gif', IMAGE_ORDERS) . '</a> <a href="' . oos_href_link_admin($aFilename['mail'], 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . oos_image_swap_button('email', 'email_off.gif', IMAGE_EMAIL) . '</a>');
        $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_catalog_link($aCatalogPage['wishlist'],  'wlid=' . $cInfo->customers_wishlist_link_id) . '">' . oos_image_swap_button('wishlist', 'wishlist_off.gif', IMAGE_WISHLIST) . '</a> <a href="' . oos_href_link_admin($aFilename['customers'], oos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=editstatus') . '">' . oos_image_swap_button('status', 'status_off.gif', IMAGE_STATUS) . '</a>');

        $manual_infotable = $oostable['manual_info'];
        $sql = "SELECT man_info_id, man_key, status
                FROM $manual_infotable
                WHERE man_info_id = '1'";
        $login_result = $dbconn->Execute($sql);
        $login = $login_result->fields;
        if ($login['status'] != '0') {
          $contents[] = array('align' => 'center', 'text' => oos_draw_login_form('login', $aCatalogPage['login_admin'], 'action=login_admin', 'POST', 'target=_blank') . oos_draw_hidden_field('verif_key', $login['man_key']) . oos_draw_hidden_field('email_address', $cInfo->customers_email_address) . oos_image_swap_submits('login', 'login_off.gif', IMAGE_LOGIN) . '</form>');
        }
        $contents[] = array('text' => '<br />'  . oos_customers_payment($customer_status['customers_status_payment']));
        $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . oos_date_short($cInfo->date_account_created));
        $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . oos_date_short($cInfo->date_account_last_modified));
        $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' '  . oos_date_short($cInfo->date_last_logon));
        $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
        $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
        $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
      }
      break;
  }

  if ( (!empty($heading)) && (!empty($contents) ) ) {
    echo '            <td width="25%" valign="top">' . "\n";
Ejemplo n.º 24
0
    function process_button() {
      global $oOrder, $oCurrencies;

      $worldpay_cardId = oos_session_name() . '=' . oos_session_id();

      $aPages = oos_get_pages();

      $callback_url = oos_href_link($aPages['checkout_process'], '', 'SSL', true);
      $worldpay_callback = explode('http://', $callback_url);

      // Get database information
      $dbconn =& oosDBGetConn();
      $oostable =& oosDBGetTables();

      $sLanguage = oos_var_prep_for_os($_SESSION['language']);

      $languagestable = $oostable['languages'];
      $query = "SELECT iso_639_1
                FROM $languagestable
                WHERE iso_639_2 = '" .  oos_db_input($sLanguage) . "'";
      $language_code = $dbconn->GetOne($query);

      $address = htmlspecialchars($oOrder->customer['street_address'] . "\n" . $oOrder->customer['suburb'] . "\n" . $oOrder->customer['city'] . "\n" . $oOrder->customer['state'], ENT_QUOTES);


      $process_button_string = oos_draw_hidden_field('instId', MODULE_PAYMENT_WORLDPAY_ID) .
                               oos_draw_hidden_field('currency', $_SESSION['currency']) .
                               oos_draw_hidden_field('desc', 'Purchase from '.STORE_NAME) .
                               oos_draw_hidden_field('cartId', $worldpay_cardId) .
                               oos_draw_hidden_field('amount', number_format($oOrder->info['total'] * $oCurrencies->get_value($_SESSION['currency']), $oCurrencies->get_decimal_places($_SESSION['currency']), '.', '')) ;

      if (MODULE_PAYMENT_WORLDPAY_USEPREAUTH == '1') {
        $process_button_string .= oos_draw_hidden_field('authMode', MODULE_PAYMENT_WORLDPAY_PREAUTH);
      }

      $process_button_string .= oos_draw_hidden_field('testMode', MODULE_PAYMENT_WORLDPAY_MODE) .
                                oos_draw_hidden_field('name', $oOrder->customer['firstname'] . ' ' . $oOrder->customer['lastname']) .
                                oos_draw_hidden_field('address', $address) .
                                oos_draw_hidden_field('postcode', $oOrder->customer['postcode']) .
                                oos_draw_hidden_field('country', $oOrder->customer['country']['iso_code_2']) .
                                oos_draw_hidden_field('tel', $oOrder->customer['telephone']) .
                                oos_draw_hidden_field('myvar', 'Y') .
                                oos_draw_hidden_field('fax', $oOrder->customer['fax']) .
                                oos_draw_hidden_field('email', $oOrder->customer['email_address']) .
                                oos_draw_hidden_field('lang', $language_code) .
                                oos_draw_hidden_field('MC_callback', $worldpay_callback[1]) .
                                oos_draw_hidden_field('MC_oscsid', $oscSid);

      if (MODULE_PAYMENT_WORLDPAY_USEMD5 == '1') {
        $md5_signature_fields = 'amount:language:email';
        $md5_signature = MODULE_PAYMENT_WORLDPAY_MD5KEY . ':' . (number_format($oOrder->info['total'] * $oCurrencies->get_value($_SESSION['currency']), $oCurrencies->get_decimal_places($_SESSION['currency']), '.', '')) . ':' . $language_code . ':' . $oOrder->customer['email_address'];
        $md5_signature_md5 = md5($md5_signature);

        $process_button_string .= oos_draw_hidden_field('signatureFields', $md5_signature_fields ) .
                                  oos_draw_hidden_field('signature',$md5_signature_md5);
      }
      return $process_button_string ;
    }
Ejemplo n.º 25
0
    for ($i = 1; $i <= 5; $i++) {
        echo oos_draw_radio_field('reviews_rating', $i, '', $rInfo->reviews_rating) . '&nbsp;';
    }
    echo TEXT_GOOD;
    ?>
</td>
      </tr>
      <tr>
        <td><?php 
    echo oos_draw_separator('trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td align="right" class="main"><?php 
    echo oos_draw_hidden_field('reviews_id', $rInfo->reviews_id) . oos_draw_hidden_field('products_id', $rInfo->products_id) . oos_draw_hidden_field('customers_name', $rInfo->customers_name) . oos_draw_hidden_field('products_name', $rInfo->products_name) . oos_draw_hidden_field('products_image', $rInfo->products_image) . oos_draw_hidden_field('date_added', $rInfo->date_added) . oos_image_swap_submits('preview', 'preview_off.gif', IMAGE_PREVIEW) . ' <a href="' . oos_href_link_admin($aFilename['reviews'], 'page=' . $_GET['page'] . '&rID=' . $_GET['rID']) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>';
    ?>
</td>
      </form></tr>
<?php 
} elseif ($action == 'preview') {
    if (oos_is_not_null($_POST)) {
        $rInfo = new objectInfo($_POST);
    } else {
        $reviewstable = $oostable['reviews'];
        $reviews_descriptiontable = $oostable['reviews_description'];
        $reviews_result = $dbconn->Execute("SELECT r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating FROM {$reviewstable} r, {$reviews_descriptiontable} rd WHERE r.reviews_id = '" . $_GET['rID'] . "' AND r.reviews_id = rd.reviews_id");
        $reviews = $reviews_result->fields;
        $productstable = $oostable['products'];
        $products_result = $dbconn->Execute("SELECT products_image FROM {$productstable} WHERE products_id = '" . $reviews['products_id'] . "'");
        $products = $products_result->fields;
Ejemplo n.º 26
0
 function process_button()
 {
     global $oOrder;
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     $process_button_string = oos_draw_hidden_field('x_login', MODULE_PAYMENT_2CHECKOUT_LOGIN) . oos_draw_hidden_field('x_amount', number_format($oOrder->info['total'], 2)) . oos_draw_hidden_field('x_invoice_num', date('YmdHis')) . oos_draw_hidden_field('x_test_request', MODULE_PAYMENT_2CHECKOUT_TESTMODE == 'Test' ? 'Y' : 'N') . oos_draw_hidden_field('x_card_num', $this->cc_card_number) . oos_draw_hidden_field('cvv', $_POST['pm_2checkout_cc_cvv']) . oos_draw_hidden_field('x_exp_date', $this->cc_expiry_month . substr($this->cc_expiry_year, -2)) . oos_draw_hidden_field('x_first_name', $_POST['pm_2checkout_cc_owner_firstname']) . oos_draw_hidden_field('x_last_name', $_POST['pm_2checkout_cc_owner_lastname']) . oos_draw_hidden_field('x_address', $oOrder->customer['street_address']) . oos_draw_hidden_field('x_city', $oOrder->customer['city']) . oos_draw_hidden_field('x_state', $oOrder->customer['state']) . oos_draw_hidden_field('x_zip', $oOrder->customer['postcode']) . oos_draw_hidden_field('x_country', $oOrder->customer['country']['title']) . oos_draw_hidden_field('x_email', $oOrder->customer['email_address']) . oos_draw_hidden_field('x_phone', $oOrder->customer['telephone']) . oos_draw_hidden_field('x_ship_to_first_name', $oOrder->delivery['firstname']) . oos_draw_hidden_field('x_ship_to_last_name', $oOrder->delivery['lastname']) . oos_draw_hidden_field('x_ship_to_address', $oOrder->delivery['street_address']) . oos_draw_hidden_field('x_ship_to_city', $oOrder->delivery['city']) . oos_draw_hidden_field('x_ship_to_state', $oOrder->delivery['state']) . oos_draw_hidden_field('x_ship_to_zip', $oOrder->delivery['postcode']) . oos_draw_hidden_field('x_ship_to_country', $oOrder->delivery['country']['title']) . oos_draw_hidden_field('x_receipt_link_url', oos_href_link($aModules['checkout'], $aFilename['checkout_process'], '', 'SSL')) . oos_draw_hidden_field('x_email_merchant', MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == '1' ? 'TRUE' : 'FALSE');
     return $process_button_string;
 }
Ejemplo n.º 27
0
        $dir->close();
    }
    for ($i = 0, $n = count($directory_array); $i < $n; $i++) {
        $modules_array[] = array('id' => substr($directory_array[$i], 0, strrpos($directory_array[$i], '.')), 'text' => substr($directory_array[$i], 0, strrpos($directory_array[$i], '.')));
    }
    ?>
      <tr>
        <td><?php 
    echo oos_draw_separator('trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr><?php 
    echo oos_draw_form('newsletter', $aFilename['newsletters'], 'page=' . $_GET['page'] . '&action=' . $form_action);
    if ($form_action == 'update') {
        echo oos_draw_hidden_field('newsletter_id', $nID);
    }
    ?>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_NEWSLETTER_MODULE;
    ?>
</td>
            <td class="main"><?php 
    echo oos_draw_pull_down_menu('module', $modules_array, $nInfo->module);
    ?>
</td>
          </tr>
          <tr>
            <td colspan="2"><?php 
Ejemplo n.º 28
0
      $tax_ratestable = $oostable['tax_rates'];
      $tax_result = $dbconn->Execute("SELECT tax_rate FROM $tax_ratestable WHERE tax_class_id = '" . $sInfo->products_tax_class_id . "' ");
      $tax = $tax_result->fields;
      $in_price = ($in_price*($tax[tax_rate]+100)/100);
      $in_new_price = ($in_new_price*($tax[tax_rate]+100)/100);
    }
    $in_price=round($in_price,TAX_DECIMAL_PLACES);
    $in_new_price=round($in_new_price,TAX_DECIMAL_PLACES);

    if (isset($_GET['pID']) ) {
      echo '<input type="hidden" name="products_id" value="' . $sInfo->products_id . '">';
    } else {
      echo '<input type="hidden" name="products_up_id" value="' . $sInfo->products_id . '">';
    }
?>
            <td class="main"><?php echo ($sInfo->products_name) ? $sInfo->products_name . ' <small>(' . $currencies->format($in_price) . ' - ' . TEXT_TAX_INFO . $currencies->format($in_price_netto) . ')</small>' : oos_draw_products_pull_down('products_id', 'style="font-size:10px"', $specials_array); echo oos_draw_hidden_field('products_price', $sInfo->products_price); ?></td>

          </tr>
          <tr>
            <td class="main"><?php echo TEXT_SPECIALS_SPECIAL_PRICE; ?>&nbsp;</td>
            <td class="main"><?php echo oos_draw_input_field('specials_price', $in_new_price); echo '  ' . TEXT_TAX_INFO . $in_new_price_netto; ?> </td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_SPECIALS_EXPIRES_DATE; ?>&nbsp;</td>
            <td class="main"><?php echo oos_draw_input_field('day', substr($sInfo->expires_date, 8, 2), 'size="2" maxlength="2" class="cal-TextBox"') . oos_draw_input_field('month', substr($sInfo->expires_date, 5, 2), 'size="2" maxlength="2" class="cal-TextBox"') . oos_draw_input_field('year', substr($sInfo->expires_date, 0, 4), 'size="4" maxlength="4" class="cal-TextBox"'); ?><a class="so-BtnLink" href="javascript:calClick();return false;" onmouseover="calSwapImg('BTN_date', 'img_Date_OVER',true);" onmouseout="calSwapImg('BTN_date', 'img_Date_UP',true);" onclick="calSwapImg('BTN_date', 'img_Date_DOWN');showCalendar('new_special','dteWhen','BTN_date');return false;"><?php echo oos_image(OOS_IMAGES . 'cal_date_up.gif', 'Calendar', '22', '17', 'align="absmiddle" name="BTN_date"'); ?></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
Ejemplo n.º 29
0
 function process_button()
 {
     global $oOrder, $oCurrencies;
     switch (MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE) {
         case 'Always Good':
             $transaction_mode = '1';
             break;
         case 'Always Duplicate':
             $transaction_mode = '2';
             break;
         case 'Always Decline':
             $transaction_mode = '3';
             break;
         case 'Production':
         default:
             $transaction_mode = '0';
             break;
     }
     switch (MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE) {
         case 'Sale':
             $transaction_type = '0';
             break;
         case 'PostAuth':
             $transaction_type = '2';
             break;
         case 'PreAuth':
         default:
             $transaction_type = '1';
             break;
     }
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     $process_button_string = oos_draw_hidden_field('MerchantID', MODULE_PAYMENT_PSIGATE_MERCHANT_ID) . oos_draw_hidden_field('FullTotal', number_format($oOrder->info['total'] * $oCurrencies->get_value(MODULE_PAYMENT_PSIGATE_CURRENCY), $oCurrencies->currencies[MODULE_PAYMENT_PSIGATE_CURRENCY]['decimal_places'])) . oos_draw_hidden_field('ThanksURL', oos_href_link($aModules['checkout'], $aFilename['checkout_process'], '', 'SSL', true)) . oos_draw_hidden_field('NoThanksURL', oos_href_link($aModules['checkout'], $aFilename['checkout_payment'], 'payment_error=' . $this->code, 'NONSSL', true)) . oos_draw_hidden_field('Bname', $oOrder->billing['firstname'] . ' ' . $oOrder->billing['lastname']) . oos_draw_hidden_field('Baddr1', $oOrder->billing['street_address']) . oos_draw_hidden_field('Bcity', $oOrder->billing['city']) . oos_draw_hidden_field('Bstate', $oOrder->billing['state']) . oos_draw_hidden_field('Bzip', $oOrder->billing['postcode']) . oos_draw_hidden_field('Bcountry', $oOrder->billing['country']['iso_code_2']) . oos_draw_hidden_field('Phone', $oOrder->customer['telephone']) . oos_draw_hidden_field('Email', $oOrder->customer['email_address']) . oos_draw_hidden_field('Sname', $oOrder->delivery['firstname'] . ' ' . $oOrder->delivery['lastname']) . oos_draw_hidden_field('Saddr1', $oOrder->delivery['street_address']) . oos_draw_hidden_field('Scity', $oOrder->delivery['city']) . oos_draw_hidden_field('Sstate', $oOrder->delivery['state']) . oos_draw_hidden_field('Szip', $oOrder->delivery['postcode']) . oos_draw_hidden_field('Scountry', $oOrder->delivery['country']['iso_code_2']) . oos_draw_hidden_field('ChargeType', $transaction_type) . oos_draw_hidden_field('Result', $transaction_mode) . oos_draw_hidden_field('IP', $_SERVER['REMOTE_ADDR']);
     if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') {
         $process_button_string .= oos_draw_hidden_field('CardNumber', $this->cc_card_number) . oos_draw_hidden_field('ExpMonth', $this->cc_expiry_month) . oos_draw_hidden_field('ExpYear', substr($this->cc_expiry_year, -2));
     }
     return $process_button_string;
 }
 function confirm()
 {
     $audience = array();
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aFilename = oos_get_filename();
     if ($_GET['global'] == 'true') {
         $products_result = $dbconn->Execute("SELECT distinct customers_id FROM " . $oostable['products_notifications']);
         while ($products = $products_result->fields) {
             $audience[$products['customers_id']] = '1';
             // Move that ADOdb pointer!
             $products_result->MoveNext();
         }
         $customers_result = $dbconn->Execute("SELECT customers_info_id FROM " . $oostable['customers_info'] . " WHERE global_product_notifications = '1'");
         while ($customers = $customers_result->fields) {
             $audience[$customers['customers_info_id']] = '1';
             // Move that ADOdb pointer!
             $customers_result->MoveNext();
         }
     } else {
         $chosen = $_POST['chosen'];
         $ids = implode(',', $chosen);
         $products_result = $dbconn->Execute("SELECT DISTINCT customers_id FROM " . $oostable['products_notifications'] . " WHERE products_id in (" . $ids . ")");
         while ($products = $products_result->fields) {
             $audience[$products['customers_id']] = '1';
             $products_result->MoveNext();
         }
         $customers_result = $dbconn->Execute("SELECT customers_info_id FROM " . $oostable['customers_info'] . " WHERE global_product_notifications = '1'");
         while ($customers = $customers_result->fields) {
             $audience[$customers['customers_info_id']] = '1';
             // Move that ADOdb pointer!
             $customers_result->MoveNext();
         }
     }
     $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td class="main"><font color="#ff0000"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, count($audience)) . '</b></font></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><b>' . $this->title . '</b></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><tt>' . nl2br($this->content) . '</tt></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . oos_draw_form('confirm', $aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . "\n" . '    <td align="right">';
     if (count($audience) > 0) {
         if ($_GET['global'] == 'true') {
             $confirm_string .= oos_draw_hidden_field('global', 'true');
         } else {
             for ($i = 0, $n = count($chosen); $i < $n; $i++) {
                 $confirm_string .= oos_draw_hidden_field('chosen[]', $chosen[$i]);
             }
         }
         $confirm_string .= oos_image_submit('send.gif', IMAGE_SEND) . ' ';
     }
     $confirm_string .= '<a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=send') . '">' . oos_image_button('back.gif', IMAGE_BACK) . '</a> <a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">' . oos_image_button('cancel_off.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . '  </tr>' . "\n" . '</table>';
     return $confirm_string;
 }