• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_translation函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: process

function process($like_object, $additional, $fbuid, $domain = NULL)
{
    global $conf;
    $domain = 'fxp.co.il -site:fxp.co.il/archive';
    //$domain = 'fxp.co.il/archive';
    //$domain = NULL;
    save_like($like_object, $additional, $fbuid);
    $translation = get_translation($like_object['id'], $like_object['name']);
    $query = '"' . $translation . '"';
    if ($translation == '') {
        $query = '"' . $like_object['name'] . '"';
    }
    if ($domain != NULL) {
        $query .= " site:" . $domain;
    }
    //get bing data
    $results = getBingData($query);
    //Add category data
    if (is_array($results)) {
        foreach ($results as $entry) {
            if (is_null($entry)) {
                continue;
            }
            //			var_dump($entry);
            $item = get_object_vars($entry);
            $item['url'] = $entry->Url;
            $res[] = $item;
        }
    } else {
        $res[] = 'empty';
    }
    save_bing($like_object['id'], $res, $domain);
    return $res;
}
开发者ID:roieki,项目名称:CE_Core,代码行数:34,代码来源:controller.php


示例2: ach_translate_cc

function ach_translate_cc($cc = 'c_neutral')
{
    global $_USER;
    $t = array();
    $t['c_matis'] = 'Matis';
    $t['c_tryker'] = 'Tryker';
    $t['c_fyros'] = 'Fyros';
    $t['c_zorai'] = 'Zorai';
    $t['c_kami'] = 'Kami';
    $t['c_karavan'] = 'Karavan';
    $t['c_neutral'] = get_translation('ach_c_neutral', $_USER->getLang());
    return $t[$cc];
}
开发者ID:cls1991,项目名称:ryzomcore,代码行数:13,代码来源:ach_render_common.php


示例3: AchMenu

 function AchMenu($open = false)
 {
     global $DBc, $_USER;
     parent::__construct();
     $this->open = $open;
     // the summary page is autogenerated and has no database entry. We add it manually here.
     $tmp = array();
     $tmp['ac_id'] = 0;
     $tmp['ac_parent'] = null;
     $tmp['acl_name'] = get_translation('ach_summary', $_USER->getLang());
     $tmp['ac_image'] = "summary.png";
     $tmp['ac_order'] = -1;
     $tmp['open'] = $open;
     $this->addChild(new AchMenuNode($tmp, $this));
     $res = $DBc->sqlQuery("SELECT * FROM ach_category LEFT JOIN (ach_category_lang) ON (acl_lang='" . $_USER->getLang() . "' AND acl_category=ac_id) WHERE ac_parent IS NULL ORDER by ac_order ASC, acl_name ASC");
     $sz = sizeof($res);
     for ($i = 0; $i < $sz; $i++) {
         $res[$i]['open'] = $open;
         $this->addChild($this->makeChild($res[$i]));
     }
 }
开发者ID:cls1991,项目名称:ryzomcore,代码行数:21,代码来源:AchMenu_class.php


示例4: va_time

$current_date = va_time();
$cc_start_years = get_db_values("SELECT start_year AS year_value, start_year AS year_description FROM " . $table_prefix . "cc_start_years", array(array("", YEAR_MSG)));
if (sizeof($cc_start_years) < 2) {
    $cc_start_years = array(array("", YEAR_MSG));
    for ($y = 7; $y >= 0; $y--) {
        $cc_start_years[] = array($current_date[YEAR] - $y, $current_date[YEAR] - $y);
    }
}
$cc_expiry_years = get_db_values("SELECT expiry_year AS year_value, expiry_year AS year_description FROM " . $table_prefix . "cc_expiry_years", array(array("", YEAR_MSG)));
if (sizeof($cc_expiry_years) < 2) {
    $cc_expiry_years = array(array("", YEAR_MSG));
    for ($y = 0; $y <= 7; $y++) {
        $cc_expiry_years[] = array($current_date[YEAR] + $y, $current_date[YEAR] + $y);
    }
}
set_options($cc_start_years, $cc_start_year, "cc_start_year");
set_options($cc_expiry_years, $cc_expiry_year, "cc_expiry_year");
$cc_months = array_merge(array(array("", MONTH_MSG)), $months);
set_options($cc_months, $cc_start_month, "cc_start_month");
set_options($cc_months, $cc_expiry_month, "cc_expiry_month");
$r->set_parameters();
$intro_text = trim($cc_info["intro_text"]);
$intro_text = get_translation($intro_text);
$intro_text = get_currency_message($intro_text, $currency);
if ($intro_text) {
    $t->set_var("intro_text", $intro_text);
    $t->parse("intro_block", false);
}
$t->set_var("billing_address", "test");
$block_parsed = true;
$t->parse("block_body", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_order_payment_form.php


示例5: get_translation

$r->set_value("delivery_company_id", get_translation(get_db_value("SELECT company_name FROM " . $table_prefix . "companies WHERE company_id=" . $db->tosql($r->get_value("delivery_company_id"), INTEGER, true, false))));
$r->set_value("delivery_state_id", get_translation(get_db_value("SELECT state_name FROM " . $table_prefix . "states WHERE state_id=" . $db->tosql($r->get_value("delivery_state_id"), INTEGER))));
$r->set_value("delivery_country_id", get_translation(get_db_value("SELECT country_name FROM " . $table_prefix . "countries WHERE country_id=" . $db->tosql($r->get_value("delivery_country_id"), INTEGER))));
$r->set_value("cc_type", get_db_value("SELECT credit_card_name FROM " . $table_prefix . "credit_cards WHERE credit_card_id=" . $db->tosql($r->get_value("cc_type"), INTEGER)));
$r->set_parameters();
if ($personal_number > 0 || $personal_properties) {
    $t->parse("personal", false);
}
if ($delivery_number > 0 || $delivery_properties) {
    $t->parse("delivery", false);
}
if (trim($payment_info)) {
    $payment_number++;
    $t->set_block("payment_info", $payment_info);
    $t->parse("payment_info", false);
    $t->global_parse("payment_info_block", false, false, true);
} else {
    $t->set_var("payment_info_block", "");
}
if ($payment_number > 0 || $payment_properties) {
    $t->sparse("payment", false);
}
$intro_text = get_setting_value($order_confirmation, "intro_text", "");
$intro_text = get_translation(trim($intro_text));
$intro_text = get_currency_message($intro_text, $currency);
if ($intro_text) {
    $t->set_var("intro_text", $intro_text);
    $t->parse("intro_block", false);
}
$block_parsed = true;
$t->parse("block_body", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_order_data_preview.php


示例6: ach_render_summary_footer

function ach_render_summary_footer(&$summary)
{
    global $_USER;
    $nodes = $summary->getSummary();
    $html = "";
    $sum_done = 0;
    $sum_total = 0;
    $i = 0;
    foreach ($nodes as $elem) {
        if ($i % 3 == 0) {
            $html .= "<tr>";
        }
        $html .= "<td width='50%' align='center'>" . $elem[0] . "<br>";
        if ($elem[3] == 0) {
            $html .= ach_render_progressbar($elem[1], $elem[2], 200);
        } else {
            $html .= ach_render_progressbar($elem[1], false, 200);
        }
        $html .= "</td>";
        $sum_done += $elem[1];
        $sum_total += $elem[2];
        if ($i % 3 == 2) {
            $html .= "</tr>";
        }
        $i++;
    }
    if ($i % 3 == 2) {
        $html .= "</tr>";
    }
    $html = "<p />\n\t\t<div style='display:block;font-weight:bold;font-size:30px;color:#FFFFFF;text-align:center;margin-bottom:10px;'>" . get_translation('ach_summary_stats', $_USER->getLang()) . "</div>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td colspan='3' align='center'>" . get_translation('ach_summary_stats_total', $_USER->getLang()) . "<br>" . ach_render_progressbar($sum_done, $sum_total, 450) . "<br></td>\n\t\t\t</tr>\n\t\t\t" . $html . "\n\t\t</table>";
    return $html;
}
开发者ID:cls1991,项目名称:ryzomcore,代码行数:32,代码来源:ach_render_web.php


示例7: get_setting_value

    if (isset($auto_meta_title) && strlen($auto_meta_title)) {
        $meta_title = $auto_meta_title;
    } else {
        $meta_title = get_setting_value($settings, "site_name");
    }
}
if (!strlen($meta_description) && isset($auto_meta_description)) {
    $meta_description = $auto_meta_description;
}
// set some meta data
$t->set_var("meta_title", get_translation($meta_title));
if ($meta_keywords) {
    set_head_tag("meta", array("name" => "keywords", "content" => get_translation($meta_keywords)), "name", 1);
}
if ($meta_description) {
    set_head_tag("meta", array("name" => "description", "content" => get_translation(get_meta_desc($meta_description))), "name", 1);
}
if (!isset($canonical_url) || !strlen($canonical_url)) {
    $canonical_url = "";
}
set_link_tag(htmlspecialchars($canonical_url), "canonical", "");
if ($google_analytics && $google_tracking_code) {
    $t->parse_to("head_tag", "head_tags");
}
//Customization by Vital - Open Graph tags
if (!isset($meta_OG_image) || !strlen($meta_OG_image)) {
    $meta_OG_image = "http://www.cuttingedgestencils.com/images/small/Casablanca-stencil-design.jpg";
}
$meta_OG_image = strpos($meta_OG_image, "cuttingedgestencils.com") ? $meta_OG_image : "http://www.cuttingedgestencils.com/" . $meta_OG_image;
set_head_tag("meta", array("property" => "og:type", "content" => "website"), "property", 1);
set_head_tag("meta", array("property" => "og:image", "content" => $meta_OG_image), "property", 1);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:page_layout.php


示例8: show_site_map_tree

function show_site_map_tree($item, $key, $parent_key = -1, $type = '')
{
    global $t, $settings, $site_map_tree;
    global $records_per_page, $first_record_on_page, $last_record_on_page, $current_record;
    $current_record++;
    if ($records_per_page && $current_record > $last_record_on_page) {
        return;
    }
    if ($parent_key < 0) {
        $type = $key;
    }
    if (!is_array($item)) {
        $key = $item;
        $item = $site_map_tree[$key];
    }
    $current_item_record = $current_record;
    if (isset($item[SITEMAP_SUBS_INDEX])) {
        foreach ($item[SITEMAP_SUBS_INDEX] as $sub_item_key) {
            show_site_map_tree($type ? $site_map_tree[$type][$sub_item_key] : $site_map_tree[$sub_item_key], $sub_item_key, $key, $type);
        }
    }
    if (!$records_per_page || $current_item_record > $first_record_on_page && $current_item_record <= $last_record_on_page) {
        $t->set_var("item_url", $settings["site_url"] . $item[SITEMAP_URL_INDEX]);
        $t->set_var("item_name", get_translation($item[SITEMAP_TITLE_INDEX]));
        $show_item = true;
    } else {
        $t->set_var("item_url", "");
        $t->set_var("item_name", "");
        $show_item = false;
    }
    $subitems = $t->get_var("subitems_" . $key);
    if ($subitems) {
        $t->set_var("subitems", "<ul>" . $subitems . "</ul>");
    } else {
        $t->set_var("subitems", "");
    }
    if ($subitems || $show_item) {
        if ($parent_key >= 0) {
            $t->parse_to("item", "subitems_" . $parent_key);
        } else {
            $t->parse("item");
        }
    }
}
开发者ID:nisargadesign,项目名称:CES,代码行数:44,代码来源:block_site_map.php


示例9: bloginfo

bloginfo('activity_license_url');
?>
/"><?php 
echo $activity_license_name;
?>
</a></li>
        </ul>
    </div>
    <!-- END .subMenu_box -->
    <div class="contentLeft">
        <span class="blue18Ins"><?php 
the_title();
?>
</span>
        <span class="formBlack12"><?php 
echo get_translation('activity_geography_move_over_flag');
?>
:</span>
        <div class="bMap">
            <div class="f1">
                <img class="flagImg" alt="" border="0" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/big_flag_blue.png" width="45" height="42" onclick="showPostByFlag( 1 );"/>
            </div>
            <!--<div class="f2">
                <img class="flagImg" alt="" border="0" src="<?php 
/*bloginfo( 'stylesheet_directory' ); */
?>
/images/big_flag_red.png" width="45" height="42" onclick="showPostByFlag( 2 );"/>
            </div>-->
开发者ID:popovdenis,项目名称:kmst,代码行数:31,代码来源:activity-geography.php


示例10: get_translation

 $description = "";
 if ($desc_type == 2) {
     $description = get_translation($db->f("full_description"));
     //----ADDED SHORT DESCRIPTION TO TEMPLATE
     $description2 = get_translation($db->f("short_description"));
 } elseif ($desc_type == 1) {
     $description = get_translation($db->f("short_description"));
 }
 $image = "";
 $image_alt = "";
 if ($desc_image == 3) {
     $image = $db->f("image_large");
     $image_alt = get_translation($db->f("image_large_alt"));
 } elseif ($desc_image == 2) {
     $image = $db->f("image");
     $image_alt = get_translation($db->f("image_alt"));
 }
 if (!strlen($image)) {
     $image_exists = false;
 } elseif (!image_exists($image)) {
     $image_exists = false;
 } else {
     $image_exists = true;
 }
 if (strlen($description) || $image_exists) {
     $html_template = get_setting_value($block, "html_template", "block_category_description.html");
     $t->set_file("block_body", $html_template);
     if ($image_exists) {
         if (preg_match("/^http\\:\\/\\//", $image)) {
             $image_size = "";
         } else {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_category_description.php


示例11: write_to

 if ($dbd->next_record()) {
     if ($dbd->f("category_name")) {
         $specific_item_type = $dbd->f("category_name");
     }
 }
 //END customization
 write_to("\t\t<" . $schema_type . ":product_type>" . htmlspecialchars($item_google_type) . " &gt; " . $specific_item_type . "</" . $schema_type . ":product_type>" . $eol);
 write_to("\t\t<" . $schema_type . ":google_product_category>" . htmlspecialchars($item_google_type) . "</" . $schema_type . ":google_product_category>" . $eol);
 write_to("\t\t<" . $schema_type . ":expiration_date>" . $expiration_date_formatted . "</" . $schema_type . ":expiration_date>" . $eol);
 write_to("\t\t<" . $schema_type . ":condition>" . $google_base_product_condition . "</" . $schema_type . ":condition>" . $eol);
 $description = trim(strip_tags(get_translation($db->f("full_description"))));
 if (!strlen($description)) {
     $description = trim(strip_tags(get_translation($db->f("short_description"))));
 }
 if (!strlen($description)) {
     $description = trim(strip_tags(get_translation($db->f("features"))));
 }
 if (!strlen($description)) {
     $description = $item_name;
 }
 write_to("\t\t<description><![CDATA[" . charset_conv($description) . "]]></description>" . $eol);
 if (preg_match('/.*apparel.*/i', $item_google_type) && !strlen($manufacturer_name) && $google_base_country != 0) {
     $warning[$item_id]['brand'] = APPAREL_BRAND_WARN_GB . $eol;
 }
 if (strlen($manufacturer_name)) {
     write_to("\t\t<" . $schema_type . ":brand><![CDATA[" . charset_conv($manufacturer_name) . "]]></" . $schema_type . ":brand>" . $eol);
 }
 if (preg_match('/.*apparel.*/i', $item_google_type) == 0 && (!strlen($manufacturer_code) && !strlen($item_code) || !strlen($manufacturer_code) && !strlen($manufacturer_name) || !strlen($item_code) && !strlen($manufacturer_name)) && ($google_base_country != 0 || $google_base_country != 3) && preg_match('/.*books.*/i', $item_google_type) == 0) {
     $warning[$item_id]['codes'] = CODE_WARN_GB . $eol;
 } else {
     if (preg_match('/.*books.*/i', $item_google_type) && !strlen($item_code) && $google_base_country != 0) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:admin_export_google_base.php


示例12: va_date

     $t->set_var("article_date_block", "");
 }
 if (strpos($details_fields, ",date_end,")) {
     $date_end = $db->f("date_end", DATETIME);
     $date_end_string = va_date($datetime_show_format, $date_end);
     $t->set_var("date_end", $date_end_string);
     $t->global_parse("date_end_block", false, false, true);
 } else {
     $t->set_var("date_end_block", "");
 }
 if (strlen($article_date_string) || strlen($date_end_string)) {
     $t->global_parse("date_block", false, false, true);
 }
 for ($i = 0; $i < sizeof($article_fields); $i++) {
     $field_name = $article_fields[$i];
     $fields[$field_name] = get_currency_message(get_translation($db->f($field_name)), $currency);
     if (strlen($fields[$field_name]) && strpos($details_fields, "," . $field_name . ",")) {
         $t->set_var($field_name, $fields[$field_name]);
         $t->global_parse($field_name . "_block", false, false, true);
     } else {
         $fields[$field_name] = "";
         $t->set_var($field_name, "");
         $t->set_var($field_name . "_block", "");
     }
 }
 if (strlen($fields["author_name"]) || strlen($fields["author_email"]) || strlen($fields["author_url"])) {
     $t->global_parse("author_block", false, false, true);
 } else {
     $t->set_var("author_block", false);
 }
 if (strpos($details_fields, ",full_description,")) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_articles_details.php


示例13: get_translation

        $meta_description = get_translation($db->f("meta_description"));
        $meta_keywords = get_translation($db->f("meta_keywords"));
        $is_html = $db->f("is_html");
        $custom_page_id = $db->f("page_id");
        $page_type = $db->f("page_type");
        $page_url = $db->f("page_url");
        $page_path = $db->f("page_path");
        if (strlen($page_url)) {
            header("HTTP/1.0 302 OK");
            header("Status: 302 OK");
            header("Location: " . $page_url);
            exit;
        }
        $page_title = get_translation($db->f("page_title"));
        $page_title = get_currency_message($page_title, $currency);
        $page_body = get_translation($db->f("page_body"));
        $page_body = strlen($page_path) ? @join("", file($page_path)) : $page_body;
        $page_body = get_currency_message($page_body, $currency);
        if (get_setting_value($settings, "php_in_custom_pages", 0)) {
            eval_php_code($page_body);
        }
        $page_body = $is_html ? $page_body : "<div align=\"justify\">" . nl2br(htmlspecialchars($page_body)) . "</div>";
    } else {
        //$page_title = "Page Error";
        //$page_body = "<div align=\"center\"><font color=\"red\"><b>Page '" . htmlspecialchars($custom_page_code) . "' was not found</b></font></div>";
        header("Location: index.php");
        exit;
    }
} else {
    header("Location: index.php");
    exit;
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:page.php


示例14: function

                    <input maxlength="22" class="searchF" name="s" id="s" type="text" value=""/>
                </form>
                <script type="text/javascript">
                    $(document).ready( function(){
                        $( '.searchF' ).DefaultValue( '<?php 
echo get_translation('header_search_input');
?>
' );
                    });
                </script>
            </div>
            <!-- END .head_kont -->
            <div class="head_stand">
                <div class="otstup_1">
                    <span class="grey12_txt"><?php 
echo get_translation('header_quality_standarts_label');
?>
:</span>
                </div>
                <!-- END .otstup_1 -->
                <div class="otstup_2">
                    <a href="#" class="grey14d_lin">ИСО 9001:2009</a><br/>
                    <a href="#" class="grey14d_lin">ИСО 14001:2006</a>
                </div>
                <!-- END .otstup_2 -->
                <div class="pic_home">
                    <a href="<?php 
echo get_bloginfo('wpurl');
?>
/<?php 
echo $lang;
开发者ID:popovdenis,项目名称:kmst,代码行数:31,代码来源:header.php


示例15: md5

 $order_currency["separator"] = $db->f("thousands_separator");
 $vc = md5($order_id . $placed_date[3] . $placed_date[4] . $placed_date[5]);
 if ($orders_currency != 1) {
     $order_currency["left"] = $currency["left"];
     $order_currency["right"] = $currency["right"];
     $order_currency["decimals"] = $currency["decimals"];
     $order_currency["point"] = $currency["point"];
     $order_currency["separator"] = $currency["separator"];
     if (strtolower($currency["code"]) != strtolower($order_currency_code)) {
         $order_currency["rate"] = $currency["rate"];
     }
 }
 $t->set_var("order_id", $order_id);
 $t->set_var("vc", $vc);
 $t->set_var("order_placed_date", va_date($datetime_show_format, $placed_date));
 $t->set_var("order_status", get_translation($db->f("status_name")));
 $tracking_number = $db->f("shipping_tracking_id");
 if (strlen($tracking_number) > 3 && strpos($db->f("shipping_type_desc"), "USPS") !== false) {
     $tracking = '<a class="tracking" href="https://tools.usps.com/go/TrackConfirmAction.action?tLabels=' . $tracking_number . '" target="_blank">' . $tracking_number . '</a>';
 } else {
     $tracking = $tracking_number;
 }
 $t->set_var("tracking", $tracking);
 $t->set_var("order_total", currency_format($order_total, $order_currency));
 if ($is_placed || $paid_status) {
     $t->set_var("pay_link", "");
 } else {
     $t->sparse("pay_link", false);
 }
 if ($user_invoice_activation) {
     $t->sparse("invoice_links", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_user_orders.php


示例16: get_translation

        if ($r->get_value("subscription_id")) {
            $t->parse("current_subscription", false);
        }
        if (is_array($expiry_date) || $r->get_value("subscription_id")) {
            $t->parse("subscription_title", false);
        }
    } else {
        $t->parse("subscription_title", false);
        $t->parse("subscription_options", false);
    }
}
if (strlen($user_id) && strlen(trim(get_setting_value($user_profile, "intro_text_registered")))) {
    $t->set_var("intro_text", get_translation($user_profile["intro_text_registered"]));
    $t->parse("intro_block", false);
} elseif (!strlen($user_id) && strlen(trim(get_setting_value($user_profile, "intro_text_new")))) {
    $t->set_var("intro_text", get_translation($user_profile["intro_text_new"]));
    $t->parse("intro_block", false);
}
$block_parsed = true;
$t->parse("block_body", false);
function update_user_properties()
{
    global $r, $pp, $db, $table_prefix;
    $user_id = $r->get_value("user_id");
    foreach ($pp as $id => $data) {
        $property_id = $data["property_id"];
        $param_name = "pp_" . $property_id;
        if ($r->parameter_exists($param_name)) {
            $values = array();
            if ($r->get_property_value($param_name, CONTROL_TYPE) == CHECKBOXLIST) {
                $values = $r->get_value($param_name);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_user_profile.php


示例17: FROM

 $sql .= " i.buying_price, i." . $price_field . ", i." . $properties_field . ", i." . $sales_field . ", i.is_sales, i.tax_id, i.tax_free ";
 $sql .= " FROM ((" . $table_prefix . "items i ";
 $sql .= " INNER JOIN " . $table_prefix . "items_accessories ia ON i.item_id=ia.accessory_id)";
 $sql .= " LEFT JOIN " . $table_prefix . "manufacturers m ON i.manufacturer_id=m.manufacturer_id) ";
 $sql .= " WHERE ia.item_id=" . $db->tosql($item_id, INTEGER);
 $sql .= " AND i.item_id IN (" . $db->tosql($accessories_ids, INTEGERS_LIST) . ")";
 $sql .= " ORDER BY ia.accessory_order ";
 $db->query($sql);
 while ($db->next_record()) {
     $accessory_number++;
     $accessory_id = $db->f("item_id");
     $accessory_type_id = $db->f("item_type_id");
     $accessory_name = get_translation($db->f("item_name"));
     $accessory_a_title = get_translation($db->f("a_title"));
     $accessory_friendly_url = $db->f("friendly_url");
     $accessory_description = get_translation($db->f("short_description"));
     $buy_accessory_href = $page . "&rnd=" . $random_value . "&cart=ADD&accessory_id=" . $accessory_id;
     if ($friendly_urls && $accessory_friendly_url) {
         $t->set_var("accessory_details_url", $accessory_friendly_url . $friendly_extension);
     } else {
         $t->set_var("accessory_details_url", get_custom_friendly_url("product_details.php") . "?item_id=" . $accessory_id);
     }
     $price = $db->f($price_field);
     $buying_price = $db->f("buying_price");
     $sales_price = $db->f($sales_field);
     $is_sales = $db->f("is_sales");
     $user_price = false;
     $user_price_action = 0;
     $q_prices = get_quantity_price($item_id, 1);
     if ($q_prices) {
         $user_price = $q_prices[0];
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_product_details.php


示例18: friendly_url_redirect

     $page_friendly_params[] = "category_id";
     friendly_url_redirect($page_friendly_url, $page_friendly_params);
 }
 $short_description = get_translation($db->f("short_description"));
 $full_description = get_translation($db->f("full_description"));
 $show_sub_products = $db->f("show_sub_products");
 $category_path = $db->f("category_path") . $category_id . ",";
 $list_template = $db->f("list_template");
 if (!@file_exists($list_template)) {
     if (!@file_exists($settings["templates_dir"] . "/" . $list_template) && !@file_exists("templates/user/" . $list_template)) {
         $list_template = "";
     }
 }
 $meta_title = get_translation($db->f("meta_title"));
 $meta_description = get_translation($db->f("meta_description"));
 $meta_keywords = get_translation($db->f("meta_keywords"));
 $total_views = $db->f("total_views");
 // check if we need to generate auto meta data
 if (!strlen($meta_title)) {
     $auto_meta_title = $current_category;
 }
 if (!strlen($meta_description)) {
     if (strlen($short_description)) {
         $auto_meta_description = $short_description;
     } elseif (strlen($full_description)) {
         $auto_meta_description = $full_description;
     }
 }
 // update total views for categories
 $products_cats_viewed = get_session("session_products_cats_viewed");
 if (!isset($products_cats_viewed[$category_id])) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:products.php


示例19: ach_render_summary_footer

function ach_render_summary_footer(&$summary)
{
    global $_USER;
    $nodes = $summary->getSummary();
    $html = "";
    $sum_done = 0;
    $sum_total = 0;
    $i = 0;
    foreach ($nodes as $elem) {
        if ($i % 2 == 0) {
            $html .= "<tr>";
        }
        $html .= "<td width='225px'>" . $elem[0];
        if ($elem[3] == false) {
            $html .= ach_render_progressbar($elem[1], $elem[2], 150);
        } else {
            $html .= ach_render_progressbar($elem[1], false, 150);
        }
        $html .= "<br></td>";
        $sum_done += $elem[1];
        $sum_total += $elem[2];
        if ($i % 2 == 2) {
            $html .= "</tr>";
        }
        $i++;
    }
    if ($i % 2 == 2) {
        $html .= "</tr>";
    }
    $html = "<p />\r\n\t\t<font size='30px' color='#FFFFFF'>" . get_translation('ach_summary_stats', $_USER->getLang()) . "</font>\r\n\t\t<table width='450px'>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width='450px'>" . get_translation('ach_summary_stats_total', $_USER->getLang()) . ach_render_progressbar($sum_done, $sum_total, 350) . "<br></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width='450px'><table width='450px'>" . $html . "</table></td>\r\n\t\t\t</tr>\r\n\t\t</table>";
    return $html;
}
开发者ID:ryzom,项目名称:ryzomcore,代码行数:32,代码来源:ach_render_ig.php


示例20: ach_render_tiebar

function ach_render_tiebar($cult = "c_neutral", $civ = "c_neutral", &$cat)
{
    global $_USER;
    $html = "<style>\r\n\t\t\t.o {\r\n\t\t\t\tcolor:orange;\r\n\t\t\t}\r\n\t\t</style>\r\n\r\n\t\t<div style='display:block;text-align:center;'><form method='post' action='?cat=" . $cat->getID() . "&mode=player&pid=" . $_REQUEST['pid'] . "' id='cc_form'>\r\n\t\t\t<table>\r\n\t\t\t\t<tr>";
    if ($cat->isAllowedCult()) {
        $html .= "<td>\r\n\t\t\t\t\t\t<select name='cult' onchange='document.getElementById(\"cc_form\").submit();'>\r\n\t\t\t\t\t\t\t<option value='c_neutral'";
        if ($cult == "c_neutral") {
            $html .= " selected='selected'";
        }
        $html .= ">" . get_translation('ach_c_neutral', $_USER->getLang()) . "</option>\r\n\t\t\t\t\t\t\t<option value='c_kami'";
        if ($cult == "c_kami") {
            $html .= " selected='selected'";
        }
        $html .= ">Kami</option>\r\n\t\t\t\t\t\t\t<option value='c_karavan'";
        if ($cult == "c_karavan") {
            $html .= " selected='selected'";
        }
        $html .= ">Karavan</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>";
    }
    if ($cat->isAllowedCiv()) {
        $html .= "<td>\r\n\t\t\t\t\t\t<select name='civ' onchange='document.getElementById(\"cc_form\").submit();'>\r\n\t\t\t\t\t\t\t<option value='c_neutral'";
        if ($civ == "c_neutral") {
            $html .= " selected='selected'";
        }
        $html .= ">" . get_translation('ach_c_neutral', $_USER->getLang()) . "</option>\r\n\t\t\t\t\t\t\t<option value='c_fyros'";
        if ($civ == "c_fyros") {
            $html .= " selected='selected'";
        }
        $html .= ">Fyros</option>\r\n\t\t\t\t\t\t\t<option value='c_matis'";
        if ($civ == "c_matis") {
            $html .= " selected='selected'";
        }
        $html .= ">Matis</option>\r\n\t\t\t\t\t\t\t<option value='c_tryker'";
        if ($civ == "c_tryker") {
            $html .= " selected='selected'";
        }
        $html .= ">Tryker</option>\r\n\t\t\t\t\t\t\t<option value='c_zorai'";
        if ($civ == "c_zorai") {
            $html .= " selected='selected'";
        }
        $html .= ">Zorai</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>";
    }
    $html .= "</tr>\r\n\t\t\t</table>\r\n\t\t</form></div>\r\n\t\t\r\n\t\t<div style='display:block;font-weight:bold;font-size:20px;color:#FFFFFF;text-align:center;margin-bottom:5px;'>";
    /*if($cat->isTiedCult() && !$cat->isTiedCiv() && $cult == "c_neutral") { // neutral / xx
    			#While being of neutral allegiance with the higher powers
    			$html .= get_translation('ach_allegiance_neutral_cult',$_USER->getLang(),array("<span class='o'>".get_translation('ach_c_neutral',$_USER->getLang())."</span>"));
    		}
    		elseif($cat->isTiedCiv() && !$cat->isTiedCult() && $civ == "c_neutral") { // xx / neutral
    			#While being of neutral allegiance with the homin civilizations
    			$html .= get_translation('ach_allegiance_neutral_civ',$_USER->getLang(),array("<span class='o'>".get_translation('ach_c_neutral',$_USER->getLang())."</span>"));
    		}*/
    if (($cult == "c_neutral" || !$cat->isAllowedCult()) && ($civ == "c_neutral" || !$cat->isAllowedCiv())) {
        // neutral / neutral
        #While being of neutral allegiance
        $html .= get_translation('ach_allegiance_neutral', $_USER->getLang(), array("<span class='o'>" . get_translation('ach_c_neutral', $_USER->getLang()) . "</span>"));
    } else {
        //other
        #While being aligned with the
        $html .= get_translation('ach_allegiance_start', $_USER->getLang());
        if ($cat->isAllowedCult() && $cult != "c_neutral") {
            #CULT
            $html .= "<span class='o'>" . ach_translate_cc($cult) . "</span>";
            if ($cat->isAllowedCiv() && $civ != "c_neutral") {
                #and the CIV
                $html .= get_translation('ach_allegiance_and', $_USER->getLang()) . " <span class='o'>" . ach_translate_cc($civ) . "</span>";
            }
        } elseif ($cat->isAllowedCiv() && $civ != "c_neutral") {
            #CIV
            $html .= "<span class='o'>" . ach_translate_cc($civ) . "</span>";
        }
    }
    #, accomplish the following achievements:
    $html .= get_translation('ach_allegiance_end', $_USER->getLang()) . "</div>";
    return $html;
}
开发者ID:ryzom,项目名称:ryzomcore,代码行数:75,代码来源:adm_render_csr.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_translations函数代码示例发布时间:2022-05-15
下一篇:
PHP get_translated_text函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap