当前位置: 首页>>代码示例>>PHP>>正文


PHP fn_get_lang_var函数代码示例

本文整理汇总了PHP中fn_get_lang_var函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_lang_var函数的具体用法?PHP fn_get_lang_var怎么用?PHP fn_get_lang_var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了fn_get_lang_var函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fn_get_aup_rates

function fn_get_aup_rates($code, $weight_data, $location, &$auth, $shipping_settings, $package_info, $origination)
{
    if ($shipping_settings['aup_enabled'] != 'Y') {
        return false;
    }
    $weight = $weight_data['full_pounds'] * 453.6;
    //Registered Post International: price as Air Mail, plus $5, weight limit of 2kg.
    if ($code == 'RPI' && $weight > 2000) {
        return array('error' => fn_get_lang_var('illegal_item_weight'));
    }
    $request = array('Pickup_Postcode' => $origination['zipcode'], 'Destination_Postcode' => $location['zipcode'], 'Country' => $location['country'], 'Weight' => $weight, 'Length' => $shipping_settings['aup']['length'] * 10, 'Width' => $shipping_settings['aup']['width'] * 10, 'Height' => $shipping_settings['aup']['height'] * 10, 'Service_type' => $code == 'RPI' ? 'AIR' : $code, 'Quantity' => 1);
    list($header, $result) = fn_http_request('GET', 'http://drc.edeliver.com.au/ratecalc.asp', $request);
    if (!empty($result)) {
        $result = explode("\n", $result);
        if (preg_match("/charge=([\\d\\.]+)/i", $result[0], $matches)) {
            if (!empty($matches[1])) {
                $cost = (double) trim($matches[1]);
                if ($code == 'RPI') {
                    $cost += (double) $shipping_settings['aup']['rpi_fee'];
                }
                if ($shipping_settings['aup']['use_delivery_confirmation'] == 'Y') {
                    $cost += $code == 'STANDARD' || $code == 'EXPRESS' ? (double) $shipping_settings['aup']['delivery_confirmation_cost'] : (double) $shipping_settings['aup']['delivery_confirmation_international_cost'];
                }
                return array('cost' => $cost);
            } else {
                if (defined('SHIPPING_DEBUG') && preg_match("/err_msg=([\\w ]*)/i", $result[2], $matches)) {
                    return array('error' => $matches[1]);
                }
            }
        }
    }
    return false;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:33,代码来源:aup.php

示例2: fn_init_search

function fn_init_search()
{
    fn_search_init_object();
    fn_search_register_object('products', 'fn_create_products_condition', array('type' => 'extended', 'pshort' => 'Y', 'pfull' => 'Y', 'pname' => 'Y', 'pkeywords' => 'Y'), fn_get_lang_var('products'), 'fn_gather_additional_product_data_for_search');
    fn_search_register_object('pages', 'fn_create_pages_condition', array('pdescr' => 'Y', 'pname' => 'Y'), fn_get_lang_var('pages'), '');
    fn_set_hook('search_init');
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:7,代码来源:fn.search.php

示例3: fn_settings_actions_addons_webmail

function fn_settings_actions_addons_webmail(&$new_value, $old_value)
{
    if ($new_value == 'A') {
        // Copy data directory to "var"
        $dir_data = DIR_ROOT . '/var/webmail';
        if (fn_copy(DIR_ADDONS . 'webmail/lib/webmail/data', $dir_data) == false) {
            $msg = fn_get_lang_var('text_cannot_write_directory');
            fn_set_notification('E', fn_get_lang_var('error'), str_replace('[directory]', $dir_data, $msg));
            $new_value = 'D';
            return false;
        }
        $config = Registry::get('config');
        $_settings = $dir_data . '/settings/settings.xml';
        // 1 step, generate config file
        $xml = simplexml_load_file($_settings);
        $xml->Common->DBLogin = $config['db_user'];
        $xml->Common->DBPassword = $config['db_password'];
        $xml->Common->DBName = $config['db_name'];
        $xml->Common->DBHost = $config['db_host'];
        if (fn_put_contents($_settings, $xml->asXML()) == false) {
            $msg = fn_get_lang_var('cannot_write_file');
            fn_set_notification('E', fn_get_lang_var('error'), str_replace('[file]', $_settings, $msg));
            $new_value = 'D';
            return false;
        }
        include DIR_ADDONS . 'webmail/lib/webmail/web/class_settings.php';
        include DIR_ADDONS . 'webmail/lib/webmail/web/class_dbstorage.php';
        // Init mailbee core
        $null = null;
        $settings =& Settings::CreateInstance();
        $dbStorage =& DbStorageCreator::CreateDatabaseStorage($null);
        $dbStorage->Connect();
        $dbStorage->CreateTables($settings->DbPrefix);
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:35,代码来源:actions.post.php

示例4: fn_insurance_calculate_cart

function fn_insurance_calculate_cart(&$cart, $cart_products, $auth, $calculate_shipping, $calculate_taxes, $apply_cart_promotions)
{
    // Set default value
    // [eileen]
    //	if (!isset($cart['is_insurance'])) {
    // 		$cart['is_insurance'] = Registry::get('addons.insurance.enabled_by_default') == 'Y' ? 'Y' : 'N';
    $cart['is_insurance'] = Registry::get('addons.insurance.enabled_by_default') == 'Y' ? 'Y' : (!isset($cart['is_insurance']) ? 'N' : $cart['is_insurance']);
    //	}
    // [/eileen]
    // Set setting from checkbox
    if (isset($_GET['is_insurance'])) {
        if ($_GET['is_insurance'] == 'Y') {
            $cart['is_insurance'] = 'Y';
            fn_set_notification('N', fn_get_lang_var('notice'), fn_get_lang_var('insurance_is_on'));
        } elseif ($_GET['is_insurance'] == 'N') {
            $cart['is_insurance'] = 'N';
            fn_set_notification('N', fn_get_lang_var('notice'), fn_get_lang_var('insurance_is_off'));
        }
    }
    // Add insurance cost to total
    if ($cart['is_insurance'] == 'Y') {
        $cart['insurance_cost'] = fn_format_price(floatval(Registry::get('addons.insurance.price')));
        $cart['total'] = fn_format_price($cart['total'] + $cart['insurance_cost']);
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:25,代码来源:func.php

示例5: fn_settings_actions_addons_access_restrictions_admin_reverse_ip_access

/**
 * Reverse IP filter
 */
function fn_settings_actions_addons_access_restrictions_admin_reverse_ip_access(&$new_value, $old_value)
{
    $ip = fn_get_ip(true);
    if ($new_value == 'Y') {
        $ip_data = db_get_row("SELECT item_id, status FROM ?:access_restriction WHERE ip_from = ?i AND ip_to = ?i AND type IN ('aas', 'aab', 'aar')", $ip['host'], $ip['host']);
        if (empty($ip_data) || empty($ip_data['item_id'])) {
            // Add IP
            $restrict_ip = array('ip_from' => $ip['host'], 'ip_to' => $ip['host'], 'type' => 'aas', 'timestamp' => TIME, 'expires' => '0', 'status' => 'A');
            $__data = array();
            $__data['item_id'] = db_query("REPLACE INTO ?:access_restriction ?e", $restrict_ip);
            $__data['type'] = 'aas';
            foreach ((array) Registry::get('languages') as $__data['lang_code'] => $_v) {
                $__data['reason'] = fn_get_lang_var('store_admin', $__data['lang_code']);
                db_query("REPLACE INTO ?:access_restriction_reason_descriptions ?e", $__data);
            }
            fn_set_notification('W', fn_get_lang_var('warning'), str_replace('[ip]', long2ip($ip['host']), fn_get_lang_var('your_ip_added')));
        } elseif (empty($ip_data['status']) || $ip_data['status'] != 'A') {
            // Change IP status to available
            db_query("UPDATE ?:access_restriction SET ?u WHERE item_id = ?i", array('status' => 'A'), $ip_data['item_id']);
            fn_set_notification('W', fn_get_lang_var('warning'), str_replace('[ip]', long2ip($ip['host']), fn_get_lang_var('your_ip_enabled')));
        }
    } else {
        // Delete IP
        $ips_data = db_get_array("SELECT item_id, type FROM ?:access_restriction WHERE ip_from <= ?i AND ip_to >= ?i AND type IN ('aas', 'aab', 'aar')", $ip['host'], $ip['host']);
        if (!empty($ips_data)) {
            foreach ($ips_data as $ip_data) {
                db_query("DELETE FROM ?:access_restriction WHERE item_id = ?i", $ip_data['item_id']);
                db_query("DELETE FROM ?:access_restriction_reason_descriptions WHERE item_id = ?i AND type = ?s", $ip_data['item_id'], $ip_data['type']);
            }
            fn_set_notification('W', fn_get_lang_var('warning'), str_replace('[ip]', long2ip($ip['host']), fn_get_lang_var('your_ip_removed')));
        }
    }
    return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:37,代码来源:actions.post.php

示例6: fn_exim_put_product_combination

function fn_exim_put_product_combination($product_id, $product_name, $combination_code, $combination, $amount, &$counter, $lang_code = CART_LANGUAGE)
{
    $pair_delimiter = ':';
    $set_delimiter = ',';
    if (!empty($combination)) {
        // Get product_id
        $object_id = 0;
        if (!empty($product_id)) {
            $object_exists = db_get_field('SELECT COUNT(*) FROM ?:products WHERE product_id = ?i', $product_id);
            if ($object_exists) {
                $object_id = $product_id;
            }
        }
        if (empty($object_id) && !empty($product_name)) {
            $object_id = db_get_field('SELECT product_id FROM ?:product_descriptions WHERE product = ?s AND lang_code = ?s', $product_name, $lang_code);
        }
        if (empty($object_id)) {
            $counter['S']++;
            return false;
        }
        $options = explode($set_delimiter, $combination);
        if (!empty($options)) {
            $_combination = array();
            foreach ($options as $option_pair) {
                $pair = explode($pair_delimiter, $option_pair);
                if (is_array($pair)) {
                    array_walk($pair, 'fn_trim_helper');
                    $option_id = db_get_field("SELECT o.option_id FROM ?:product_options_descriptions as d INNER JOIN ?:product_options as o ON o.option_id = d.option_id AND o.product_id = ?i WHERE d.option_name = ?s AND d.lang_code = ?s LIMIT 1", $object_id, $pair[0], $lang_code);
                    $variant_id = db_get_field("SELECT v.variant_id FROM ?:product_option_variants_descriptions as d INNER JOIN ?:product_option_variants as v ON v.variant_id = d.variant_id AND v.option_id = ?i WHERE d.variant_name = ?s AND d.lang_code = ?s LIMIT 1", $option_id, $pair[1], $lang_code);
                    if (empty($option_id) || empty($variant_id)) {
                        $counter['S']++;
                        return false;
                    }
                    $_combination[$option_id] = $variant_id;
                }
            }
            $combination = fn_get_options_combination($_combination);
            $combination_hash = fn_generate_cart_id($object_id, array('product_options' => $_combination));
            $object_exists = db_get_field('SELECT COUNT(*) FROM ?:product_options_inventory WHERE combination_hash = ?i AND product_id = ?i', $combination_hash, $object_id);
            $_data = array('product_id' => $object_id, 'product_code' => $combination_code, 'combination_hash' => $combination_hash, 'combination' => $combination, 'amount' => $amount);
            if ($object_exists) {
                db_query('UPDATE ?:product_options_inventory SET ?u WHERE combination_hash = ?i', $_data, $combination_hash);
                fn_echo(fn_get_lang_var('updating') . ' ' . fn_get_lang_var('product_combinations') . '...');
                $counter['E']++;
            } else {
                db_query('INSERT INTO ?:product_options_inventory ?e', $_data);
                fn_echo(fn_get_lang_var('creating') . ' ' . fn_get_lang_var('product_combinations') . '...');
                $counter['N']++;
            }
            fn_echo('<b>' . $object_id . '</b>.<br />');
            return $combination;
        }
    }
    $counter['S']++;
    return false;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:56,代码来源:product_combinations.php

示例7: fn_settings_actions_addons_seo_html_catalog

function fn_settings_actions_addons_seo_html_catalog(&$new_value, $old_value)
{
    if ($new_value == 'Y') {
        if (!is_writable(DIR_ROOT . '/catalog')) {
            $s = fn_get_lang_var('text_cannot_write_directory');
            fn_set_notification('E', fn_get_lang_var('error'), str_replace('[directory]', DIR_ROOT . '/catalog', $s));
            $new_value = 'N';
        }
    }
    return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:11,代码来源:actions.post.php

示例8: fn_delete_affiliate_groups

function fn_delete_affiliate_groups($group_ids)
{
    $groups_names = array();
    foreach ($group_ids as $group_id) {
        $groups_names[] = fn_get_group_name($group_id, DESCR_SL);
        db_query("DELETE FROM ?:aff_group_descriptions WHERE group_id = ?i", $group_id);
        db_query("DELETE FROM ?:aff_groups WHERE group_id = ?i", $group_id);
    }
    if (!empty($groups_names)) {
        $groups_names = '&nbsp;-&nbsp;' . implode('<br />&nbsp;-&nbsp;', $groups_names);
        fn_set_notification('N', fn_get_lang_var('information'), fn_get_lang_var('deleted_product_groups') . ':<br />' . $groups_names);
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:13,代码来源:product_groups.php

示例9: fn_settings_variants_general_active_revisions_objects

/**
 * Get list of objects, available for revisioning
 */
function fn_settings_variants_general_active_revisions_objects()
{
    include_once DIR_CORE . 'fn.revisions.php';
    fn_init_revisions();
    $revisions = Registry::get('revisions');
    if (empty($revisions['objects'])) {
        return array();
    }
    $data = array();
    foreach ($revisions['objects'] as $object => $entry) {
        $data[$object] = fn_get_lang_var($entry['title']);
    }
    return $data;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:17,代码来源:variants.php

示例10: dev_link_images

function dev_link_images($file, $delete_links = null)
{
    /** 
     * Fucking parser
     * it sucks
     * return dick
     */
    $handle = fopen($file, 'r');
    $i = 0;
    $some_uploaded = 0;
    $products = array();
    set_time_limit(2000000000);
    ini_set('memory_limit', '12582912222222222222222');
    while (($row = fgetcsv($handle, 1000, ';')) !== false) {
        if ($i > 0) {
            /* пропускаем первую строку с названиями колонок */
            $article = $row[0];
            $image = $row[3];
            $small = $row[1];
            //формируем массив для альтернативных изображений
            for ($j = 3; $j < 8; $j++) {
                $alt[$j - 1] = $row[$j];
            }
            if ($delete_links != null) {
                //находим id продукта с артикулем из цсв файла
                $q = db_query("SELECT `product_id` FROM  `cscart_products` WHERE  `product_code` =  '" . $article . "'");
                $product_id = mysql_result($q, 0);
                if (!empty($product_id)) {
                    //удаляем связи
                    db_query("DELETE FROM `cscart_images_links` WHERE `object_id` = " . $product_id . " AND  `type` = 'A' ");
                    $s_image_id = null;
                    //соответсвено записей больше нету.
                    $deleted = 1;
                }
            }
            $image_file = '' . DIR_ROOT . '/images/uploaded/products/' . $image . '';
            if (!file_exists($image_file)) {
                fn_set_notification('E', fn_get_lang_var('error'), fn_get_lang_var('Не был загружен файл: ' . $image . ''));
                $ers = 1;
            } else {
                //находим размеры нужного изображения
                $sizes = getimagesize('' . DIR_ROOT . '/images/uploaded/products/' . $image . '');
                $sizes_small = getimagesize('' . DIR_ROOT . '/images/uploaded/products/' . $small . '');
                //находим id продукта с артикулем из цсв файла
                $q = db_query("SELECT * FROM  cscart_products WHERE  `product_code` =   '{$article}' ");
                $product_id = mysql_result($q, 0);
                //делаем проверку, есть ли уже изображение у этого товара
                $qu = db_query("SELECT  `detailed_id` FROM  `cscart_images_links` WHERE  `object_id` = '" . $product_id . "' AND `type` = 'M'");
                $s = mysql_num_rows($qu);
                if ($s > 0) {
                    $s_image_id = mysql_result($qu, 0);
                }
                $pair_id_query = db_query("SELECT  `pair_id` FROM  `cscart_images_links` WHERE  `object_id` = '" . (int) $product_id . "' AND `type` = 'M'");
                $pair_id_rows = mysql_num_rows($pair_id_query);
                if ($pair_id_rows > 0) {
                    $s_pair_id = mysql_result($pair_id_query, 0);
                }
                if ($pair_id_rows > 1) {
                    for ($counter = 1; $counter < $pair_id_rows; $counter++) {
                        $to_del_pair_id = mysql_result($pair_id_query, $counter);
                        db_query("DELETE FROM `cscart_images_links` WHERE `pair_id` = " . $to_del_pair_id . "");
                    }
                }
                /*		if($delete_links != null)
                					{
                						var_dump('vreadly');
                						//удаляем связи
                						db_query("DELETE FROM `cscart_images_links` WHERE `object_id` = ".$product_id."");
                						$s_image_id = null; //соответсвено записей больше нету.
                					}		
                				*/
                if (!empty($s_image_id)) {
                    //находим название старого файла
                    $oldim = db_query("SELECT  `image_path` FROM  `cscart_images` WHERE  `image_id` = '" . $s_image_id . "'");
                    $oldimg = mysql_result($oldim, 0);
                    //обновляем запись
                    db_query("UPDATE `cscart_images` SET  `image_path` =  '" . $image . "', `image_x` =  '" . $sizes[0] . "',\n\t\t\t\t\t\t `image_y` =  '" . $sizes[1] . "'\tWHERE  `cscart_images`.`image_id` = '" . $s_image_id . "'");
                    //ОБНОВЛЯЕМ ОБЕ ПОЗИЦИИ
                    db_query("UPDATE  `cscart_images_links` SET  `image_id` =  '" . $s_image_id . "', `TYPE` = 'M', `detailed_id` = '" . $s_image_id . "' WHERE  `pair_id` = '" . $s_pair_id . "' LIMIT 1 ;");
                    //формируем полный путь к файлу который надо удалить
                    $folder = floor($s_image_id / 1000);
                    $dest_to_del = '' . DIR_ROOT . '/images/product/' . $folder . '/' . $oldimg . '';
                    $detailed_to_del = '' . DIR_ROOT . '/images/detailed/' . $folder . '/' . $oldimg . '';
                    //удаляем
                    //unlink($dest_to_del);
                    //unlink($detailed_to_del);
                } else {
                    db_query("INSERT INTO `cscart_images` (`image_id`, `image_path`, `image_x`, `image_y`) VALUES (NULL, '" . $image . "', '" . $sizes[0] . "', '" . $sizes[1] . "')");
                    $image_id = mysql_insert_id();
                    //получаем айди записи
                    db_query("INSERT INTO `cscart_images` (`image_id`, `image_path`, `image_x`, `image_y`) VALUES (NULL, '" . $small . "', '" . $sizes_small[0] . "', '" . $sizes_small[1] . "')");
                    $image_small_id = mysql_insert_id();
                    //получаем айди записи
                    //создаем запись в таблице images_links тем самым привязываем фото с продуктом,  помечаем изображение как альтернативное
                    db_query("INSERT INTO `cscart_images_links` (`pair_id`, `object_id`, `object_type`, `image_id`, `detailed_id`, `type`) VALUES (NULL, '" . $product_id . "', 'product', '" . $image_id . "', '" . $image_id . "', 'M')");
                    $folder = floor($image_id / 1000);
                }
                $dest = '' . DIR_ROOT . '/images/product/' . $folder . '/' . $image . '';
                $detailed = '' . DIR_ROOT . '/images/detailed/' . $folder . '/' . $image . '';
                $dest_f = '' . DIR_ROOT . '/images/product/' . $folder . '/';
//.........这里部分代码省略.........
开发者ID:diedsmiling,项目名称:busenika,代码行数:101,代码来源:fn.fs.php

示例11: die

    die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($mode == 'export_to_iif') {
        header('Content-type: text/csv');
        header('Content-disposition: attachment; filename=orders.iif');
        foreach ($_REQUEST['order_ids'] as $k => $v) {
            $orders[$k] = fn_get_order_info($v);
        }
        $order_users = $order_products = array();
        foreach ($orders as $k => $v) {
            $order_users[$v['user_id'] . '_' . $v['email']] = $v;
            foreach ($v['items'] as $key => $value) {
                $order_products[$value['cart_id']] = $value;
                if (!empty($value['product_options'])) {
                    $selected_options = '; ' . fn_get_lang_var('product_options') . ': ';
                    foreach ($value['product_options'] as $option) {
                        $selected_options .= "{$option['option_name']}: {$option['variant_name']};";
                    }
                    $order_products[$value['cart_id']]['selected_options'] = $selected_options;
                }
            }
        }
        $view->assign('_d', '	');
        $view->assign('orders', $orders, false);
        $view->assign('order_users', $order_users, false);
        $view->assign('order_products', $order_products, false);
        $view->display('addons/quickbooks/views/orders/components/export_to_iif.tpl');
        exit;
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:quickbooks_export.php

示例12: elseif

    $post['home_page'] = $current_location;
    $post['acceptcards'] = 1;
    $post['acceptchecks'] = 1;
    $post['accepteft'] = 1;
    $post['passback'] = 'cntrl';
    $post['lookup'] = 'xid';
    $lang_postfix = '';
    if (CART_LANGUAGE == 'ES') {
        $lang_postfix = '_esp';
    } elseif (CART_LANGUAGE == 'FR') {
        $lang_postfix = '_french';
    }
    $form_tag = '<form method="post" action="https://secure.paymentclearing.com/cgi-bin/mas/split' . $lang_postfix . '.cgi" name="process">';
    echo <<<EOT
<html>
<body onLoad="document.process.submit();">
{$form_tag}
EOT;
    foreach ($post as $name => $value) {
        echo "<input type=\"hidden\" name=\"{$name}\" value=\"{$value}\" />\n";
    }
    $msg = fn_get_lang_var('text_cc_processor_connection');
    $msg = str_replace('[processor]', 'iTransact', $msg);
    echo <<<EOT
</form>
<p><div align=center>{$msg}</div></p>
</body>
</html>
EOT;
    exit;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:itransact_split_form.php

示例13: Send

 /**
  * Creates message and assigns Mailer. If the message is
  * not sent successfully then it returns false.  Use the ErrorInfo
  * variable to view description of the error.
  * @return bool
  */
 public function Send()
 {
     try {
         if (count($this->to) + count($this->cc) + count($this->bcc) < 1) {
             throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL);
         }
         // Set whether the message is multipart/alternative
         if (!empty($this->AltBody)) {
             $this->ContentType = 'multipart/alternative';
         }
         $this->error_count = 0;
         // reset errors
         $this->SetMessageType();
         $header = $this->CreateHeader();
         $body = $this->CreateBody();
         if (empty($this->Body)) {
             throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL);
         }
         // digitally sign with DKIM if enabled
         if ($this->DKIM_domain && $this->DKIM_private) {
             $header_dkim = $this->DKIM_Add($header, $this->Subject, $body);
             $header = str_replace("\r\n", "\n", $header_dkim) . $header;
         }
         // Choose the mailer and send through it
         switch ($this->Mailer) {
             case 'sendmail':
                 return $this->SendmailSend($header, $body);
             case 'smtp':
                 return $this->SmtpSend($header, $body);
             default:
                 return $this->MailSend($header, $body);
         }
     } catch (phpmailerException $e) {
         $this->SetError($e->getMessage());
         if ($this->exceptions) {
             throw $e;
         }
         if (function_exists('fn_set_notification')) {
             fn_set_notification('E', fn_get_lang_var('error'), $e->getMessage());
         } else {
             echo $e->getMessage() . "\n";
         }
         return false;
     }
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:51,代码来源:class.phpmailer.php

示例14: fn_reports_get_conditions

function fn_reports_get_conditions($conditions)
{
    $result = array();
    foreach ($conditions as $key => $value) {
        $result[$key]['objects'] = array();
        if ($key == "order") {
            foreach ($value as $v) {
                $result[$key]['objects'][] = array('href' => 'orders.details?order_id=' . $v, 'name' => '#' . $v);
            }
            $result[$key]['name'] = fn_get_lang_var('orders');
        } elseif ($key == "status") {
            $order_status_descr = fn_get_statuses(STATUSES_ORDER, true, true, true);
            foreach ($value as $k => $v) {
                $result[$key]['objects'][]['name'] = $order_status_descr[$v];
            }
            $result[$key]['name'] = fn_get_lang_var('status');
        } elseif ($key == "payment") {
            foreach ($value as $k => $v) {
                $result[$key]['objects'][]['name'] = db_get_field("SELECT payment FROM ?:payment_descriptions WHERE payment_id = ?i AND lang_code = ?s", $v, CART_LANGUAGE);
            }
            $result[$key]['name'] = fn_get_lang_var('payment_methods');
        } elseif ($key == "location") {
            foreach ($value as $k => $v) {
                $result[$key]['objects'][]['name'] = db_get_field("SELECT destination FROM ?:destination_descriptions WHERE destination_id = ?i AND lang_code = ?s", $v, CART_LANGUAGE);
            }
            $result[$key]['name'] = fn_get_lang_var('locations');
        } elseif ($key == "user") {
            foreach ($value as $v) {
                $result[$key]['objects'][] = array('href' => 'profiles.update?user_id=' . $v, 'name' => $v);
            }
            $result[$key]['name'] = fn_get_lang_var('users');
        } elseif ($key == "category") {
            foreach ($value as $k => $v) {
                $result[$key]['objects'][] = array('href' => 'categories.update?category_id=' . $v, 'name' => db_get_field("SELECT category FROM ?:category_descriptions WHERE category_id = ?i AND lang_code = ?s", $v, CART_LANGUAGE));
            }
            $result[$key]['name'] = fn_get_lang_var('categories');
        } elseif ($key == "product") {
            foreach ($value as $v) {
                $result[$key]['objects'][] = array('href' => 'products.update&product_id=' . $v, 'name' => $v);
            }
            $result[$key]['name'] = fn_get_lang_var('products');
        }
    }
    return $result;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:45,代码来源:fn.sales_reports.php

示例15: array

                    $_REQUEST['page'] = $page;
                }
                $_SESSION['discussion_post_id'] = $_REQUEST['post_id'];
                return array(CONTROLLER_STATUS_REDIRECT, fn_query_remove(Registry::get('config.current_url'), 'page', 'post_id'));
            }
        }
    }
    $show_discussion_crumb = true;
    if ($data['object_type'] == 'E') {
        // testimonials
        $show_discussion_crumb = false;
    }
    $discussion_object_data = fn_get_discussion_object_data($data['object_id'], $data['object_type']);
    fn_add_breadcrumb($discussion_object_data['description'], $discussion_object_data['url']);
    if ($show_discussion_crumb && AREA != 'A') {
        fn_add_breadcrumb(fn_get_lang_var('discussion'));
    }
    if (!empty($_SESSION['discussion_post_id'])) {
        $view->assign('current_post_id', $_SESSION['discussion_post_id']);
        unset($_SESSION['discussion_post_id']);
    }
    $view->assign('object_id', $data['object_id']);
    $view->assign('title', $discussion_object_data['description']);
    $view->assign('object_type', $data['object_type']);
}
function fn_discussion_get_object_by_thread($thread_id)
{
    static $cache = array();
    if (empty($cache[$thread_id])) {
        $cache[$thread_id] = db_get_row("SELECT object_type, object_id, type FROM ?:discussion WHERE thread_id = ?i", $thread_id);
    }
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:discussion.php


注:本文中的fn_get_lang_var函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。