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


PHP get_currency函数代码示例

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


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

示例1: currency_symbol_shortcode

 /**
  * Shortcode callback function to output a currency symbol.
  *
  * @uses get_currency()
  *
  * @since 1.4.0
  *
  * @param  array  $atts	Shortcode attributes.
  * @return string HTML entity of the symbol of the specified currency code.
  */
 public function currency_symbol_shortcode($atts)
 {
     $args = shortcode_atts(array('currency' => ''), $atts);
     // get currency data
     $currency_data = get_currency(strtoupper($args['currency']));
     $symbol = $currency_data['symbol'];
     return '<span class"currency currency-symbol">' . $symbol . '</span>';
 }
开发者ID:nekojira,项目名称:wp-currencies,代码行数:18,代码来源:shortcodes.php

示例2: getById

 public function getById($rest, $id)
 {
     $curr = get_currency($id);
     if (!$curr) {
         $curr = array();
     }
     api_success_response(json_encode($curr));
 }
开发者ID:M-Shahbaz,项目名称:FrontAccountingSimpleAPI,代码行数:8,代码来源:Currencies.php

示例3: currencyFrom

function currencyFrom($value, $sourceCurrencyId, $format = true, $round = false)
{
    $value = myCurrency::convertFromTo($value, $sourceCurrencyId, get_currency());
    if ($round) {
        $value = round($value);
    }
    if ($format) {
        $value = currency_apply_format($value);
    }
    return $value;
}
开发者ID:pycmam,项目名称:myCurrencyPlugin,代码行数:11,代码来源:myCurrencyHelper.php

示例4: print_price_listing

function print_price_listing()
{
    global $path_to_root, $pic_height, $pic_width;
    $currency = $_POST['PARAM_0'];
    $category = $_POST['PARAM_1'];
    $salestype = $_POST['PARAM_2'];
    $pictures = $_POST['PARAM_3'];
    $showGP = $_POST['PARAM_4'];
    $comments = $_POST['PARAM_5'];
    $orientation = $_POST['PARAM_6'];
    $destination = $_POST['PARAM_7'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    $dec = user_price_dec();
    $home_curr = get_company_pref('curr_default');
    if ($currency == ALL_TEXT) {
        $currency = $home_curr;
    }
    $curr = get_currency($currency);
    $curr_sel = $currency . " - " . $curr['currency'];
    if ($category == ALL_NUMERIC) {
        $category = 0;
    }
    if ($salestype == ALL_NUMERIC) {
        $salestype = 0;
    }
    if ($category == 0) {
        $cat = _('All');
    } else {
        $cat = get_category_name($category);
    }
    if ($salestype == 0) {
        $stype = _('All');
    } else {
        $stype = get_sales_type_name($salestype);
    }
    if ($showGP == 0) {
        $GP = _('No');
    } else {
        $GP = _('Yes');
    }
    $cols = array(0, 100, 360, 385, 450, 515);
    $headers = array(_('Category/Items'), _('Description'), _('UOM'), _('Price'), _('GP %'));
    $aligns = array('left', 'left', 'left', 'right', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Currency'), 'from' => $curr_sel, 'to' => ''), 2 => array('text' => _('Category'), 'from' => $cat, 'to' => ''), 3 => array('text' => _('Sales Type'), 'from' => $stype, 'to' => ''), 4 => array('text' => _('Show GP %'), 'from' => $GP, 'to' => ''));
    if ($pictures) {
        $user_comp = user_company();
    } else {
        $user_comp = "";
    }
    $rep = new FrontReport(_('Price Listing'), "PriceListing", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $result = fetch_items($category);
    $catgor = '';
    $_POST['sales_type_id'] = $salestype;
    while ($myrow = db_fetch($result)) {
        if ($catgor != $myrow['description']) {
            $rep->Line($rep->row - $rep->lineHeight);
            $rep->NewLine(2);
            $rep->fontSize += 2;
            $rep->TextCol(0, 3, $myrow['category_id'] . " - " . $myrow['description']);
            $catgor = $myrow['description'];
            $rep->fontSize -= 2;
            $rep->NewLine();
        }
        $rep->NewLine();
        $rep->TextCol(0, 1, $myrow['stock_id']);
        $rep->TextCol(1, 2, $myrow['name']);
        $rep->TextCol(2, 3, $myrow['units']);
        $price = get_price($myrow['stock_id'], $currency, $salestype);
        $rep->AmountCol(3, 4, $price, $dec);
        if ($showGP) {
            $price2 = get_price($myrow['stock_id'], $home_curr, $salestype);
            if ($price2 != 0.0) {
                $disp = ($price2 - $myrow['Standardcost']) * 100 / $price2;
            } else {
                $disp = 0.0;
            }
            $rep->TextCol(4, 5, number_format2($disp, user_percent_dec()) . " %");
        }
        if ($pictures) {
            $image = company_path() . "/images/" . item_img_name($myrow['stock_id']) . ".jpg";
            if (file_exists($image)) {
                $rep->NewLine();
                if ($rep->row - $pic_height < $rep->bottomMargin) {
                    $rep->NewPage();
                }
                $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
                $rep->row -= $pic_height;
                $rep->NewLine();
            }
//.........这里部分代码省略.........
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:101,代码来源:rep104.php

示例5: mysqli_query

 $FinanceName = "";
 $resultList = mysqli_query($connect, $queryFinancelist);
 while ($returnList = $resultList->fetch_assoc()) {
     $FinanceName .= $returnList['name'] . ",";
 }
 //이름이 없는경우 삭제해준다.
 //echo $returnList['name'];
 //$FinanceName = $returnList['name'];
 $BASE_URL = "http://query.yahooapis.com/v1/public/yql";
 $yql_query = "select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=";
 $yql_query .= $FinanceName;
 $yql_query .= "&f=sl1d1t1c1ohgv&e=.csv' and columns='symbol,price,date,time,change,col1,high,low,col2'";
 $yql_query_url = $BASE_URL . "?q=" . urlencode($yql_query) . "&format=xml";
 //환율
 //echo $yql_query_url."\n";
 $Currency = get_currency('USD', 'KRW');
 // $BASE_URL = "http://query.yahooapis.com/v1/public/yql";
 // $yql_query = "select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=005930.KS,YHOO,GOOG,IBM&f=sl1d1t1c1ohgv&e=.csv' and columns='symbol,price,date,time,change,col1,high,low,col2'";
 // $yql_query_url = $BASE_URL . "?q=" . urlencode($yql_query) . "&format=xml";
 // //환율
 //$currency_url = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20(%22USDKRW%22)&format=xml&env=store://datatables.org/alltableswithkeys&callback=";
 // Make call with cURL
 //환율
 //echo $Currency."\n";
 $response = file_get_contents($yql_query_url);
 $object = simplexml_load_string($response);
 $results = $object->results;
 $row = $results->row;
 $SymbolAndOpen = "";
 foreach ($row as $value) {
     $symbol = $value->symbol;
开发者ID:ost500,项目名称:ParamountInvestmentGame,代码行数:31,代码来源:GetFinance.php

示例6: email_row_ex

email_row_ex(_("Email Address:"), 'email', 25, 55);
email_row_ex(_("BCC Address for all outgoing mails:"), 'bcc_email', 25, 55);
text_row_ex(_("Official Company Number:"), 'coy_no', 25);
text_row_ex(_("GSTNo:"), 'gst_no', 25);
currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']);
fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']);
text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.'));
text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.'));
table_section(2);
label_row(_("Company Logo:"), $_POST['coy_logo']);
file_row(_("New Company Logo (.jpg)") . ":", 'pic', 'pic');
check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']);
number_list_row(_("Use Dimensions:"), 'use_dimension', null, 0, 2);
sales_types_list_row(_("Base for auto price calculations:"), 'base_sales', $_POST['base_sales'], false, _('No base price list'));
text_row_ex(_("Add Price from Std Cost:"), 'add_pct', 10, 10, '', null, null, "%");
$curr = get_currency($_POST['curr_default']);
text_row_ex(_("Round to nearest:"), 'round_to', 10, 10, '', null, null, $curr['hundreds_name']);
label_row("", "&nbsp;");
check_row(_("Search Item List"), 'no_item_list', null);
check_row(_("Search Customer List"), 'no_customer_list', null);
check_row(_("Search Supplier List"), 'no_supplier_list', null);
label_row("", "&nbsp;");
check_row(_("Automatic Revaluation Currency Accounts"), 'auto_curr_reval', $_POST['auto_curr_reval']);
check_row(_("Time Zone on Reports"), 'time_zone', $_POST['time_zone']);
text_row_ex(_("Login Timeout:"), 'login_tout', 10, 10, '', null, null, _('seconds'));
label_row(_("Version Id"), $_POST['version_id']);
end_outer_table(1);
hidden('coy_logo', $_POST['coy_logo']);
submit_center('update', _("Update"), true, '', 'default');
end_form(2);
//-------------------------------------------------------------------------------------------------
开发者ID:pthdnq,项目名称:ivalley-svn,代码行数:31,代码来源:company_preferences.php

示例7: user_login


//.........这里部分代码省略.........
                $reward_amount = $user_reward_amount;
            } elseif ($group_reward_type) {
                $reward_type = $group_reward_type;
                $reward_amount = $group_reward_amount;
            }
            $credit_reward_type = "";
            $credit_reward_amount = "";
            if ($user_credit_reward_type > 0) {
                $credit_reward_type = $user_credit_reward_type;
                $credit_reward_amount = $user_credit_reward_amount;
            } elseif ($group_credit_reward_type) {
                $credit_reward_type = $group_credit_reward_type;
                $credit_reward_amount = $group_credit_reward_amount;
            }
            // check for subscriptions
            $subscriptions_ids = "";
            $check_date_ts = mktime(0, 0, 0, $current_date[MONTH], $current_date[DAY], $current_date[YEAR]);
            $sql = " SELECT subscription_id ";
            $sql .= " FROM " . $table_prefix . "orders_items ";
            $sql .= " WHERE user_id=" . $db->tosql($user_id, INTEGER);
            $sql .= " AND is_subscription=1 ";
            $sql .= " AND subscription_expiry_date>=" . $db->tosql($check_date_ts, DATETIME);
            $db->query($sql);
            while ($db->next_record()) {
                if ($subscriptions_ids) {
                    $subscriptions_ids .= ",";
                }
                $subscriptions_ids .= $db->f("subscription_id");
            }
            set_session("session_subscriptions_ids", $subscriptions_ids);
            $user_info = array("user_id" => $user_id, "user_type_id" => $user_type_id, "layout_id" => $layout_id, "login" => $login, "nickname" => $nickname, "name" => $user_name, "subscriptions_ids" => $subscriptions_ids, "email" => $email, "discount_type" => $discount_type, "discount_amount" => $discount_amount, "price_type" => $price_type, "tax_free" => $tax_free, "is_sms_allowed" => $is_sms_allowed, "reward_type" => $reward_type, "reward_amount" => $reward_amount, "credit_reward_type" => $credit_reward_type, "credit_reward_amount" => $credit_reward_amount, "total_points" => $total_points, "credit_balance" => $credit_balance, "order_min_goods_cost" => $order_min_goods_cost, "order_max_goods_cost" => $order_max_goods_cost);
            set_session("session_user_info", $user_info);
            if ($remember_me && $login && $password) {
                setcookie("cookie_user_login", $login, va_timestamp() + 3600 * 24 * 366);
                setcookie("cookie_user_password", $password, va_timestamp() + 3600 * 24 * 366);
            }
            // get currency if available
            if ($currency_code) {
                get_currency($currency_code);
            }
            // update shopping cart if it's available
            $shopping_cart = get_session("shopping_cart");
            if (is_array($shopping_cart) && sizeof($shopping_cart) > 0) {
                include_once "./includes/shopping_cart.php";
                recalculate_shopping_cart();
                // check if any coupons can be added or removed
                check_coupons();
            }
            // check if need to regenerate session id for secure session
            if ($secure_sessions) {
                session_set_cookie_params(0, "/", "", true);
                session_regenerate_id();
            }
            // update last visit time
            $sql = " UPDATE " . $table_prefix . "users SET last_visit_date=" . $db->tosql(va_time(), DATETIME);
            $sql .= ", last_visit_ip=" . $db->tosql(get_ip(), TEXT);
            $sql .= ", last_visit_page=" . $db->tosql(get_request_uri(), TEXT);
            $sql .= ", last_logged_date=" . $db->tosql(va_time(), DATETIME);
            $sql .= ", last_logged_ip=" . $db->tosql(get_ip(), TEXT);
            $sql .= " WHERE user_id=" . $db->tosql($user_id, INTEGER);
            $db->query($sql);
            if ($make_redirects && $redirect_page) {
                // convert redirect page to the full url
                $ssl = get_param("ssl");
                if ($ssl) {
                    $page_site_url = $secure_url;
                } else {
                    $page_site_url = $site_url;
                }
                $return_page = get_request_uri();
                if (!preg_match("/^https?:\\/\\//i", $redirect_page) && preg_match("/^https?:\\/\\/[^\\/]+(\\/.*)\$/i", $page_site_url, $matches)) {
                    $page_path_regexp = prepare_regexp($matches[1]);
                    if (preg_match("/^" . $page_path_regexp . "/i", $redirect_page)) {
                        $redirect_page = $page_site_url . preg_replace("/^" . $page_path_regexp . "/i", "", $redirect_page);
                    }
                }
                header("Location: " . $redirect_page);
                exit;
            }
        } elseif ($current_ts > $expiry_date_ts) {
            $is_errors = true;
            $errors .= ACCOUNT_EXPIRED_MSG . "<br>";
        } else {
            $is_errors = true;
            $errors .= ACCOUNT_APPROVE_ERROR . "<br>";
        }
    } else {
        $is_errors = true;
        if ($user_id) {
            $errors .= NO_RECORDS_MSG . "<br>";
        } else {
            $errors .= LOGIN_PASSWORD_ERROR . "<br>";
        }
    }
    if ($is_errors) {
        setcookie("cookie_user_login");
        setcookie("cookie_user_password");
    }
    return !$is_errors;
}
开发者ID:nisargadesign,项目名称:CES,代码行数:101,代码来源:common_functions.php

示例8: userLoginCheck

<?php

userLoginCheck();
if (!tep_session_is_registered('payee_account') && tep_not_null($payee_account)) {
    tep_redirect(get_href_link(PAGE_TRANSFER));
}
//bof: get currencies
$currency = get_currency($checkout_currency);
$balance = get_currency_value_format($checkout_amount, $currency);
$transfer_info['fees_text'] = get_currency_value_format($fees, $currency);
$smarty->assign('amount', $balance);
$smarty->assign('fees_text', $fees_text);
$smarty->assign('success_url', $success_url);
$smarty->assign('fail_url', $fail_url);
$smarty->assign('cancel_url', $cancel_url);
$smarty->assign('status_url', $status_url);
$smarty->assign('extra_fields', $extra_fields);
$smarty->assign('to_acount', $payee_account);
//eof: get currencies
$sql_user = "SELECT user_id,account_number,account_name FROM " . _TABLE_USERS . " WHERE account_number='" . $payee_account . "'";
$user_query = db_query($sql_user);
if (db_num_rows($user_query) == 0) {
    tep_redirect(get_href_link(PAGE_TRANSFER));
}
$user_to_info = db_fetch_array($user_query);
$smarty->assign('user_to_info', $user_to_info);
$stepValue = 'confirm';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $master_key = db_prepare_input($_POST['master_key']);
    $memo = db_prepare_input($_POST['transaction_memo']);
    $sql_check = "SELECT account_name, firstname, lastname FROM " . _TABLE_USERS . " WHERE user_id='" . $login_userid . "' and account_number='" . $login_account_number . "' and master_key='" . $master_key . "'";
开发者ID:rongandat,项目名称:e-global-cya,代码行数:31,代码来源:sci_transfer.php

示例9: Aastra_get_label

     } else {
         $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=favorites&selection=' . $selection);
         $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     }
     break;
     # Display result
 # Display result
 case 'display':
 case 'displayfav':
     # Retrieve quote
     if ($action == 'display') {
         $array[0] = $data['last'];
     } else {
         $array[0] = $data['favorites'][$selection];
     }
     $return = get_currency($array);
     # Return OK
     if ($return[0]) {
         # Create the object
         $object = new AastraIPPhoneFormattedTextScreen();
         # Display results
         if ($nb_softkeys == 6) {
             # Regular phone
             if ($action == 'display') {
                 $object->addLine($data['last']['source'] . ' to ' . $data['last']['target'], NULL, 'center');
             } else {
                 $object->addLine($data['favorites'][$selection]['source'] . ' to ' . $data['favorites'][$selection]['target'], NULL, 'center');
             }
             $object->setScrollStart(Aastra_size_formattedtextscreen() - 1);
             $nb_carac = Aastra_size_display_line();
             $object->addLine('');
开发者ID:jamesrusso,项目名称:Aastra_Scripts,代码行数:31,代码来源:currency.php

示例10: _e

        }
    }
}
$cmp = 100;
if ($cmp) {
    ?>
							<div class="cmp_div">
								<a id="tool_tip_design" class="tooltip_product_cmp" title="<?php 
    _e('Current Market Price. But we can give you more lower price if CIQ( Current Interest Quantity )  is higher', TEXTDOMAIN);
    ?>
" >
									<span style="font-weight:bold;">
									<div style="text-align:center;">
										<input class="btn btn-default button button-medium exclusive"  type="button" name="add_to_cart_interest" value="<?php 
    _e('CMP: ', TEXTDOMAIN);
    echo $cmp . "&nbsp;" . get_currency();
    ?>
" >
									</div>
								</a>
							</div>
							<?php 
}
?>
						<!--<div class="clear"> </div>-->
						<?php 
if (sizeof($product_interest_validation_errors->get_error_messages()) <= 0 && empty($product_interest_id)) {
    $today_date = date('Y-m-d');
    if (!$my_interest_meta_data[0]->asa_price_is_reasonable) {
        $interest_start_date_deafult = date('Y-m-d', strtotime($today_date . ' + 14 days'));
    }
开发者ID:taherbth,项目名称:bestbuy-bestsell,代码行数:31,代码来源:content-single-product.php

示例11: defined

<?php

defined('CAFE') or die(header('Location: /'));
check_error();
// Добавление валюты
if ($_POST['add']) {
    $data = array('title' => $_POST['title'], 'code' => $_POST['code'], 'currency' => $_POST['currency'], 'period' => $_POST['period'], 'cur_date' => $date, 'nominal' => $nominal, 'rate' => $rate);
    $add_currency = $db->query("INSERT INTO " . DB_PREFIX . "_currency SET ?u", $data);
    if ($add_currency) {
        $message = 'Валюта добавлена';
    } else {
        $error = 'Возникла ошибка при добавлении валюты';
    }
}
// удаление валюты
if ($_GET['action'] == 'delete' && empty($error)) {
    terminator();
}
if ($_GET['action'] == 'add') {
    $tpl = "currency_add_tpl.php";
}
if ($_GET['action'] == 'list') {
    if ($_GET['id']) {
        get_currency($_GET['id']);
    }
    $limit = '10';
    $currency_list = get_currency_list($limit);
    $tpl = "currency_list_tpl.php";
}
include "currency_main_tpl.php";
开发者ID:rad-li,项目名称:Cafe-CMS,代码行数:30,代码来源:index.php

示例12: send_email_to_interest_confirmed

        /** Author: ABU TAHER, Logic-coder IT
         * send_email_to_interest_confirmed
         * Param $email_data, $interest_confirmed_details
         * return Success/Failure Message
         */
        public function send_email_to_interest_confirmed($email_data, $interest_confirmed_details, $deal_selection)
        {
            global $wpdb, $current_user;
            $current_user = wp_get_current_user();
            $dear_text = "";
            $interest_start_date = "";
            $interest_end_date = "";
            $group_price_list_text = "";
            $same_price_to_all = 0;
            $add_date = date("Y-m-d");
            $payment_email_sent = 0;
            $payment_confirmation_link_expire = "";
            $payment_confirmation_link_expire_text = "";
            $group_price_list_matched = "";
            $update_interest_data = "";
            $update_format_array = "";
            //$time_now =
            if ($email_data['payment_within']) {
                $time_now = date("Y-m-d H:i");
                $payment_within = $email_data['payment_within'] / 24;
                $payment_confirmation_link_expire = date('Y-m-d H:i', strtotime($time_now . ' + ' . $payment_within . 'days'));
                $expire_date_time_separation = explode(" ", $payment_confirmation_link_expire);
                $expire_date = explode("-", $expire_date_time_separation[0]);
                $expire_time = explode(":", $expire_date_time_separation[1]);
                $payment_confirmation_link_expire_text = mktime($expire_time[0], $expire_time[1], 0, $expire_date[1], $expire_date[2], $expire_date[0]);
            }
            if ($interest_confirmed_details) {
                $count_interest_confirmed = $this->count_interest_confirmed($interest_confirmed_details[0]['product_id'], $interest_confirmed_details[0]['group_id']);
                //echo $count_interest_confirmed[0]->total_qty; exit;
                //////////////////////////////////////////////////////
                $product_meta_values = get_post_meta($interest_confirmed_details[0]['product_id'], '', '');
                $minimum_target_sells = $product_meta_values['minimum_target_sells'][0];
                if ($count_interest_confirmed[0]['total_qty'] < $minimum_target_sells) {
                    $group_price_list_matched = $this->get_minimum_price_list($interest_confirmed_details[0]['group_id']);
                } else {
                    $group_price_list_matched = $this->get_group_price_list_matched($interest_confirmed_details[0]['group_id'], $count_interest_confirmed[0]['total_qty']);
                }
                /////////////////////////////////////////////////////
                if ($group_price_list_matched) {
                    foreach ($group_price_list_matched as $group_price_data) {
                        $group_price_list_text .= '<tr>
						<td><span>' . $group_price_data["no_of_sells"] . '</span></td>
						<td><span>' . $group_price_data["bestbuy_bestsell_price"] . '&nbsp;' . get_currency() . '</span></td>
						<td><span>' . $group_price_data["shipping_price"] . '&nbsp;' . get_currency() . '</span></td>
						</tr>' . "\n\n";
                    }
                }
                foreach ($interest_confirmed_details as $individual_data) {
                    /******************************************/
                    $user_info = get_userdata($individual_data['user_id']);
                    $user_meta_info = get_user_meta($individual_data['user_id'], '', '');
                    //return (print_r( $user_meta_info )); exit;
                    if ($user_meta_info['first_name'][0]) {
                        $dear_text = $user_meta_info['first_name'][0];
                    } else {
                        $dear_text = $user_info->display_name;
                    }
                    if ($individual_data['interest_start_date']) {
                        $interest_start_date = date("Y-m-d", $individual_data['interest_start_date']);
                        $interest_end_date = date("Y-m-d", $individual_data['interest_end_date']);
                    } else {
                        $interest_start_date = __("As soon as price is reasonable");
                    }
                    //////////////////////////////////////////////
                    $subject = "!NMID: " . $email_data["email_subject"] . " CaseNo(" . $interest_confirmed_details[0]['group_id'] . "_" . $individual_data['product_interest_id'] . ")\n\n";
                    $message = "<html><body>" . "\n";
                    $message .= "<table cellpadding='0' cellspacing='0' bgcolor=#319d00 width='100%' style='margin:0 auto'><tr style='font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; color: rgb(255,255,255); line-height: 140%;'><td width='23'></td><td><span>!NMID: A Business Aggregator</span></td></tr></table>" . "\n\n";
                    $message .= "<p>Dear Customer &nbsp;" . $dear_text . ",</p>" . "\n";
                    $message .= "<p>" . $email_data["email_message_to_interest_grp"] . "</p>" . "\n";
                    if ($deal_selection === 'want_to_deal') {
                        if ($individual_data['same_price_to_all'] || !intval($individual_data['interest_unit_price'])) {
                            //$same_price_to_all = 1;
                            $message .= "<p>A Price List is following for your interest:</p>" . "\n";
                            $message .= "<table cellpadding='5' cellspacing='2' bgcolor=#ffffff width='100%' style='margin:0 auto'><tr style='font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; color: 333333; line-height: 140%;'>\n\t\t\t\t\t\t<td><span style='font-weight:bold;'>No Of Sells</span></td>\n\t\t\t\t\t\t<td><span style='font-weight:bold;'>Unit Price</span></td>\n\t\t\t\t\t\t<td><span style='font-weight:bold;'>Shipping Price</span></td>\n\t\t\t\t\t\t</tr>" . "\n\n";
                            $message .= $group_price_list_text . "</table>" . "\n\n";
                        } else {
                            $message .= "<p>The Unit Price For Your Interest Is:" . get_currency() . " : " . $individual_data['interest_unit_price'] . "</p>";
                            $message .= "<p>Shipping Price:" . get_currency() . " : " . $individual_data['interest_shipping_price'] . "</p>\n";
                        }
                    }
                    $message .= "<p>Your Interest Details:</p>" . "\n";
                    $message .= "<p><b>Product Name: </b><a href=" . get_site_url() . "/my-interest-list/?action=edit&product_interest_id=" . $individual_data['product_interest_id'] . "&product_name=" . $individual_data['post_name'] . " >" . $individual_data['product_name'] . "</a></p>\n";
                    $message .= "<p><b>Qty: </b>" . $individual_data['interest_qty'] . "</p>\n";
                    $message .= "<p><b>Interest Start Date: </b>" . $interest_start_date . "</p>\n";
                    $message .= "<p><b>Interest End Date: </b>" . $interest_end_date . "</p>\n";
                    if ($deal_selection == "want_to_deal") {
                        if ($email_data['payment_within']) {
                            $message .= "<p>You Have&nbsp;" . $email_data['payment_within'] . "Hours For Payment to confirm that you are still want to purchase this product for the above Details</p>\n";
                        }
                        $message .= "<p>For Payment Please click on This Link: <a href=" . get_site_url() . "/my-interest-list/?action=interest_confirmed&product_interest_id=" . $individual_data['product_interest_id'] . " >Yes</a>\n\t\t\t\t\t</p>\n";
                    }
                    $message .= "<table cellpadding='0' cellspacing='0' bgcolor=#319d00 width='100%' style='margin:0 auto'><tr style='font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; color: rgb(255,255,255); line-height: 140%;'><td width='23'></td><td><span>!NMID: A Business Aggregator</span></td></tr></table>" . "\n\n";
                    $message .= "</body></html>\n";
                    $uid = md5(uniqid(time()));
                    $header = "From: !NMID <" . $current_user->user_email . ">\r\n";
//.........这里部分代码省略.........
开发者ID:taherbth,项目名称:bestbuy-bestsell,代码行数:101,代码来源:class-bestbuybestsell-interest.php

示例13: display_currency_edit

function display_currency_edit($selected_id)
{
    global $table_style2;
    start_form();
    start_table($table_style2);
    if ($selected_id != "") {
        //editing an existing currency
        $myrow = get_currency($selected_id);
        $_POST['Abbreviation'] = $myrow["curr_abrev"];
        $_POST['Symbol'] = $myrow["curr_symbol"];
        $_POST['CurrencyName'] = $myrow["currency"];
        $_POST['country'] = $myrow["country"];
        $_POST['hundreds_name'] = $myrow["hundreds_name"];
        hidden('selected_id', $selected_id);
        hidden('Abbreviation', $_POST['Abbreviation']);
        label_row(tr("Currency Abbreviation:"), $_POST['Abbreviation']);
    } else {
        text_row_ex(tr("Currency Abbreviation:"), 'Abbreviation', 4, 3);
    }
    text_row_ex(tr("Currency Symbol:"), 'Symbol', 10);
    text_row_ex(tr("Currency Name:"), 'CurrencyName', 20);
    text_row_ex(tr("Hundredths Name:"), 'hundreds_name', 15);
    text_row_ex(tr("Country:"), 'country', 40);
    end_table(1);
    submit_add_or_update_center($selected_id == "");
    end_form();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:27,代码来源:currencies.php

示例14: db_query

     }
     $sql = "SELECT id from " . TB_PREF . "item_codes WHERE item_code='{$code}' AND stock_id = '{$id}'";
     $result = db_query($sql, "item code could not be retrieved");
     $row = db_fetch_row($result);
     if (!$row) {
         add_item_code($code, $id, $description, $cat, 1);
     } else {
         update_item_code($row[0], $code, $id, $description, $cat, 1);
     }
 }
 if ($type == 'ITEM' || $type == 'KIT' || $type == 'PRICE') {
     if (isset($price) && $price != "") {
         if ($currency == "") {
             $currency = get_company_pref("curr_default");
         } else {
             $row = get_currency($currency);
             if (!$row) {
                 add_currency($currency, "", "", "", "");
             }
         }
         $sql = "SELECT * FROM " . TB_PREF . "prices\tWHERE stock_id='{$code}' AND sales_type_id={$_POST['sales_type_id']} AND\n\t\t\t\t\tcurr_abrev='{$currency}'";
         $result = db_query($sql, "price could not be retrieved");
         $row = db_fetch_row($result);
         if (!$row) {
             add_item_price($code, $_POST['sales_type_id'], $currency, $price);
         } else {
             update_item_price($row[0], $_POST['sales_type_id'], $currency, $price);
         }
         $pr++;
     }
 }
开发者ID:blestab,项目名称:frontaccounting,代码行数:31,代码来源:import_items.php

示例15: AND

// get order profile settings
$sql = "SELECT setting_name,setting_value FROM " . $table_prefix . "global_settings ";
$sql .= "WHERE setting_type='order_info'";
if (isset($site_id)) {
    $sql .= " AND (site_id=1 OR site_id=" . $db->tosql($site_id, INTEGER, true, false) . ")";
    $sql .= " ORDER BY site_id ASC ";
} else {
    $sql .= " AND site_id=1 ";
}
$db->query($sql);
while ($db->next_record()) {
    $order_info[$db->f("setting_name")] = $db->f("setting_value");
}
$eol = get_eol();
$sess_currency = get_currency();
$currency = get_currency($sess_currency["code"]);
$shipping_block = get_setting_value($order_info, "shipping_block", 0);
$default_currency_code = get_db_value("SELECT currency_code FROM " . $table_prefix . "currencies WHERE is_default=1");
$user_info = get_session("session_user_info");
$user_tax_free = get_setting_value($user_info, "tax_free", 0);
$points_balance = get_setting_value($user_info, "total_points", 0);
$order_min_goods_cost = get_setting_value($user_info, "order_min_goods_cost", "");
$order_max_goods_cost = get_setting_value($user_info, "order_max_goods_cost", "");
$order_min_weight = "";
$order_max_weight = "";
// check if credit system active
$credit_system = get_setting_value($settings, "credit_system", 0);
$credits_balance_order_profile = get_setting_value($settings, "credits_balance_order_profile", 0);
$credit_balance = 0;
$credit_amount = 0;
if ($credit_system && $user_id) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_order_info.php


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