示例#1
0
 }
 $products_images = array();
 if ($products_types_id == 1) {
     $products_files_dir = UPLOAD_DIR . 'ElKnigi/' . substr($original_products_code, 0, 8) . '/';
     if (is_dir($products_files_dir)) {
         $temp_products_images = tep_get_files($products_files_dir);
         reset($temp_products_images);
         while (list(, $temp_products_image) = each($temp_products_images)) {
             if (substr($temp_products_image, 0, 10) == $original_products_code) {
                 $products_images[] = $temp_products_image;
             }
         }
     }
 } else {
     $products_files_dir = UPLOAD_DIR . 'elproduct/' . $products_types_id . '/' . substr($original_products_code, 0, 8) . '/' . $original_products_code . '/';
     $products_images = tep_get_files($products_files_dir);
 }
 $categories_ids = array();
 $categories = array();
 if ((int) $categories_code > 0) {
     $categories[] = 'bfd' . sprintf("%010d", (int) $categories_code);
 }
 $subcategories_array = explode(';', trim($subcategories));
 reset($subcategories_array);
 while (list(, $subcategories_code) = each($subcategories_array)) {
     if ((int) $subcategories_code > 0) {
         $subcategories_code = 'bfd' . sprintf("%010d", (int) $subcategories_code);
         if (!in_array($subcategories_code, $categories)) {
             $categories[] = $subcategories_code;
         }
     }
            if ($description == '') {
                $description = 'Предоплата за иностранные товары, заявка #' . $order_id . ' в магазине ' . STORE_NAME;
            }
            $sign = md5(MODULE_PAYMENT_ROBOX_LOGIN . ':' . $ot_total_value . ':' . $order_id . ':' . MODULE_PAYMENT_ROBOX_PASSWORD_1 . ':shp_prefix=aa');
            $link = 'https://merchant.roboxchange.com/Index.aspx?Culture=ru&IncCurrLabel=RUR' . '&MrchLogin='******'&OutSum=' . urlencode($ot_total_value) . '&InvId=' . $order_id . '&Desc=' . urlencode($description) . '&SignatureValue=' . urlencode($sign) . '&shp_prefix=aa';
            echo tep_draw_textarea_field('payment_link', 'soft', '55', '10', $link) . '<br>' . '<a href="' . $link . '" target="_blank"><u>Перейти по ссылке &raquo;</u></a><br><br>';
            require 'includes/application_bottom.php';
            die;
    }
}
// автоматическое обновление заявок
$is_default_shop_query = tep_db_query("select shops_default_status from " . TABLE_SHOPS . " where shops_id = '" . (int) SHOP_ID . "'");
$is_default_shop = tep_db_fetch_array($is_default_shop_query);
if ($is_default_shop['shops_default_status'] == '1' && empty($HTTP_GET_VARS['oID'])) {
    $rows = 0;
    $files = tep_get_files(UPLOAD_DIR . 'changed_orders/', '.csv');
    $new_files = array();
    reset($files);
    while (list($i, $file) = each($files)) {
        if (substr($file, 0, 2) == 'aa') {
            $new_files[] = $file;
        }
    }
    if (sizeof($new_files) > 0) {
        //	  tep_set_time_limit(300);
        $all_shipping_modules = array();
        $shops_query = tep_db_query("select shops_id from " . TABLE_SHOPS . " where 1");
        while ($shops = tep_db_fetch_array($shops_query)) {
            $all_shipping_modules[$shops['shops_id']] = tep_get_shipping_modules($shops['shops_id']);
        }
        $statuses_asc = array();
示例#3
0
        $language_id = $languages_id;
    }
    $pages_translation_query = tep_db_query("select " . tep_db_input($field) . " from " . TABLE_PAGES_TRANSLATION . " where pages_translation_id = '" . (int) $pages_translation_id . "' and language_id = '" . (int) $language_id . "'");
    $pages_translation = tep_db_fetch_array($pages_translation_query);
    return $pages_translation[$field];
}
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (DEBUG_MODE == 'off') {
    if (in_array($action, array('new_translation', 'insert_translation', 'delete_translation', 'delete_translation_confirm'))) {
        tep_redirect(tep_href_link(FILENAME_PAGES, tep_get_all_get_params(array('action'))));
    }
}
$added = 0;
$deleted = 0;
$languages = tep_get_languages();
$files = tep_get_files(DIR_FS_CATALOG . 'includes/content/');
$message = '';
reset($files);
while (list(, $filename) = each($files)) {
    $shops_query = tep_db_query("select shops_database from " . TABLE_SHOPS . " where shops_database <> ''");
    while ($shops = tep_db_fetch_array($shops_query)) {
        tep_db_select_db($shops['shops_database']);
        $store_name_query = tep_db_query("select configuration_value as store_name from " . TABLE_CONFIGURATION . " where configuration_key = 'STORE_NAME'");
        $store_name = tep_db_fetch_array($store_name_query);
        $page_check_query = tep_db_query("select count(*) as total from " . TABLE_PAGES . " where pages_filename = '" . tep_db_input($filename) . "'");
        $page_check = tep_db_fetch_array($page_check_query);
        if ($page_check['total'] == '0') {
            $max_id_query = tep_db_query("select max(pages_id) + 1 as new_id from " . TABLE_PAGES . "");
            $max_id = tep_db_fetch_array($max_id_query);
            $pages_id = (int) $max_id['new_id'] + 1;
            for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {