Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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];
}
Ejemplo n.º 3
0
 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]));
     }
 }
Ejemplo n.º 4
0
$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);
Ejemplo n.º 5
0
$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);
Ejemplo n.º 6
0
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;
}
Ejemplo n.º 7
0
    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);
Ejemplo n.º 8
0
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");
        }
    }
}
Ejemplo n.º 9
0
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>-->
 $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 {
Ejemplo n.º 11
0
 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) {
Ejemplo n.º 12
0
     $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,")) {
Ejemplo n.º 13
0
        $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;
Ejemplo n.º 14
0
                    <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;
Ejemplo n.º 15
0
 $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);
Ejemplo n.º 16
0
        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);
Ejemplo n.º 17
0
 $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];
Ejemplo n.º 18
0
     $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])) {
Ejemplo n.º 19
0
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;
}
Ejemplo n.º 20
0
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;
}
Ejemplo n.º 21
0
bloginfo('company_careers_url');
?>
/"><?php 
echo $company_careers_name;
?>
</a></li>
        </ul>
    </div>
    <!-- END .subMenu_box -->
    <div class="contentFull">
        <span class="blue18Ins"><?php 
echo get_translation('key_events');
?>
</span>
        <span class="smallT47"><?php 
echo get_translation('move_cursor_on_year');
?>
:</span><br/><br/>
        <div class="line_time">
            <div class="lineyka">
            </div>
            <!-- END .lineyka -->
            <div class="tabl_dann">
                <table class="table_line" border="0" cellspacing="0" cellpadding="0">
                    <tr class="krug">
                        <td class="circle_2007 circle_active"><a href="#"><img alt="" border="0" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/time_shar.png" width="23" height="22"/></a></td>
                        <td class="circle_2008"></td>
                        <td class="circle_2009"></td>
Ejemplo n.º 22
0
    $query_string = get_query_string($ps_parameters, "", "", false);
    $tree_url = get_custom_friendly_url("products_search.php") . $query_string;
    $tree_title = SEARCH_RESULTS_MSG;
    if ($erase_tags) {
        $tree_title = strip_tags($tree_title);
    }
    $breadcrumbs_tree_array[] = array($tree_url, $tree_title);
}
if (strlen($item_id)) {
    $ps_parameters["category_id"] = get_param("category_id");
    $sql = "SELECT i.item_name, i.friendly_url FROM ";
    $sql .= $table_prefix . "items i";
    $sql .= " WHERE i.item_id=" . $db->tosql($item_id, INTEGER);
    $db->query($sql);
    if ($db->next_record()) {
        $item_name = get_translation($db->f("item_name"));
        $friendly_url = $db->f("friendly_url");
        if ($friendly_urls && $friendly_url) {
            $query_string = get_query_string($ps_parameters, "", "", false);
            $tree_url = $friendly_url . $friendly_extension . $query_string;
        } else {
            $ps_parameters["item_id"] = $item_id;
            $query_string = get_query_string($ps_parameters, "", "", false);
            $tree_url = get_custom_friendly_url("product_details.php") . $query_string;
        }
        $tree_title = $item_name;
        if ($erase_tags) {
            $tree_title = strip_tags($tree_title);
        }
        $breadcrumbs_tree_array[] = array($tree_url, $tree_title);
    }
<?php

/*
Template Name: Privacy Policy
*/
$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
$context['datenschutz_preambel_title'] = get_translation('Datenschutz', 'options');
$context['datenschutz_preambel'] = get_translation(get_field('datenschutz-preambel', 'options'), 'options');
$context['datenschutz_like_title'] = get_translation('Datenschutzerklärung für die Nutzung von Facebook-Plugins (Like-Button)', 'options');
$context['datenschutz_like'] = get_translation(get_field('datenschutz-like', 'options'), 'options');
$context['datenschutz_analytics_title'] = get_translation('Datenschutzerklärung für die Nutzung von Google
Analytics', 'options');
$context['datenschutz_analytics'] = get_translation(get_field('datenschutz-analytics', 'options'), 'options');
$context['datenschutz_adsense_title'] = get_translation('Datenschutzerklärung für die Nutzung von Google Adsense', 'options');
$context['datenschutz_adsense'] = get_translation(get_field('datenschutz-adsense', 'options'), 'options');
$context['datenschutz_plus_title'] = get_translation('Datenschutzerklärung für die Nutzung von Google +1', 'options');
$context['datenschutz_plus'] = get_translation(get_field('datenschutz-plus', 'options'), 'options');
$context['datenschutz_twitter_title'] = get_translation('Datenschutzerklärung für die Nutzung von Twitter', 'options');
$context['datenschutz_twitter'] = get_translation(get_field('datenschutz-twitter', 'options'), 'options');
Timber::render(array('page-privacy-policy.twig', 'page.twig'), $context);
Ejemplo n.º 24
0
function get_field_value($field_source)
{
    global $db, $db_columns, $related_columns, $related_table_alias, $apply_translation, $date_formats, $date_edit_format, $datetime_edit_format;
    if (preg_match_all("/\\{(\\w+)\\}/i", $field_source, $matches)) {
        $field_value = $field_source;
        for ($p = 0; $p < sizeof($matches[1]); $p++) {
            $f_source = $matches[1][$p];
            // get field type
            $column_type = TEXT;
            $column_name = "";
            $column_format = "";
            if (isset($db_columns[$f_source])) {
                $column_type = $db_columns[$f_source][1];
                $column_name = $f_source;
            } else {
                if (isset($related_table_alias) && $related_table_alias && preg_match("/^" . $related_table_alias . "_/", $f_source)) {
                    $related_column_name = preg_replace("/^" . $related_table_alias . "_/", "", $f_source);
                    if (isset($related_columns[$related_column_name])) {
                        $column_type = $related_columns[$related_column_name][1];
                        $column_name = $f_source;
                    }
                } else {
                    $date_formats_regexp = implode("|", $date_formats);
                    if (preg_match("/" . $date_formats_regexp . "\$/", $f_source, $format_match)) {
                        $f_source_wf = preg_replace("/_" . $format_match[0] . "\$/", "", $f_source);
                        if (isset($db_columns[$f_source_wf]) && ($db_columns[$f_source_wf][1] == DATE || $db_columns[$f_source_wf][1] == DATETIME)) {
                            $column_name = $f_source_wf;
                            $column_type = $db_columns[$column_name][1];
                            $column_format = $format_match[0];
                        }
                    }
                }
            }
            if ($column_name) {
                if ($column_type == DATE) {
                    $f_source_value = $db->f($column_name, DATETIME);
                    if (is_array($f_source_value)) {
                        if ($column_format) {
                            $f_source_value = va_date(array($column_format), $f_source_value);
                        } else {
                            $f_source_value = va_date($date_edit_format, $f_source_value);
                        }
                    }
                } else {
                    if ($column_type == DATETIME) {
                        $f_source_value = $db->f($column_name, DATETIME);
                        if (is_array($f_source_value)) {
                            if ($column_format) {
                                $f_source_value = va_date(array($column_format), $f_source_value);
                            } else {
                                $f_source_value = va_date($datetime_edit_format, $f_source_value);
                            }
                        }
                    } else {
                        $f_source_value = $db->f($column_name);
                        if ($apply_translation) {
                            $f_source_value = get_translation($f_source_value);
                        }
                    }
                }
                $field_value = str_replace("{" . $f_source . "}", $f_source_value, $field_value);
            }
        }
    } else {
        $field_value = $field_source;
    }
    return $field_value;
}
Ejemplo n.º 25
0
function prepare_product_params()
{
    global $currency, $settings;
    $product_params["cleft"] = $currency["left"];
    $product_params["cright"] = $currency["right"];
    $product_params["crate"] = $currency["rate"];
    $product_params["cdecimals"] = $currency["decimals"];
    $product_params["cpoint"] = $currency["point"];
    $product_params["cseparator"] = $currency["separator"];
    $show_prices = get_setting_value($settings, "tax_prices", 0);
    $product_params["show_prices"] = $show_prices;
    $product_params["tax_prices_type"] = get_setting_value($settings, "tax_prices_type", 0);
    $product_params["points_rate"] = get_setting_value($settings, "points_conversion_rate", 1);
    $product_params["points_decimals"] = get_setting_value($settings, "points_decimals", 0);
    $product_params["zero_price_type"] = get_setting_value($settings, "zero_price_type", 0);
    $product_params["zero_price_message"] = get_translation(get_setting_value($settings, "zero_price_message", ""));
    $product_params["zero_product_action"] = get_setting_value($settings, "zero_product_action", 1);
    $product_params["zero_product_warn"] = get_translation(get_setting_value($settings, "zero_product_warn", ""));
    $product_params["redirect_to_cart"] = get_setting_value($settings, "redirect_to_cart", "");
    if ($show_prices == 2) {
        $tax_note = get_translation(get_setting_value($settings, "tax_note_excl", ""));
    } else {
        $tax_note = get_translation(get_setting_value($settings, "tax_note", ""));
    }
    $product_params["tax_note"] = $tax_note;
    return $product_params;
}
Ejemplo n.º 26
0
        $captcha_instance = new ReallySimpleCaptcha();
        $word = $captcha_instance->generate_random_word();
        $_SESSION['captcha_words'] = strtolower($word);
        $prefix = mt_rand();
        $image = $captcha_instance->generate_image($prefix, $word);
        ?>
                <!-- END .title_verif_b -->
                <div class="box_verif">
                    <img id="captchaImg" src="<?php 
        echo $image;
        ?>
" width="78" height="24">
                </div>
                <!-- end .box_verif -->
                <a class="chImg" href="javascript:;" onclick="contactObj.reloadCaptcha();"><?php 
        echo get_translation('contact_form_feedback_change_image');
        ?>
</a>
                <input class="smallField" name="captcha_words" type="text"/>
                <div class="butt_place">
                    <?php 
        $urlImage = get_bloginfo('stylesheet_directory') . '/images/butt_send_' . qtrans_getLanguage() . '.png';
        ?>
                    <input class="buttSend" name="" type="submit" value="" style="background: url(<?php 
        echo $urlImage;
        ?>
) no-repeat scroll 0 0 transparent;"/>
                </div>
                <!-- END .butt_place -->
            </form>
        </div>
Ejemplo n.º 27
0
 if ($is_new_product) {
     $t->set_var("product_new_class", " newProduct");
     $t->sparse("product_new_image", false);
 } else {
     $t->set_var("product_new_class", "");
     $t->set_var("product_new_image", "");
 }
 if (!$allowed_items_ids || !in_array($item_id, $allowed_items_ids)) {
     $t->set_var("restricted_class", " restrictedItem");
     $t->sparse("restricted_image", false);
 } else {
     $t->set_var("restricted_class", "");
     $t->set_var("restricted_image", "");
 }
 $small_image = $db->f("small_image");
 $small_image_alt = get_translation($db->f("small_image_alt"));
 if (!strlen($small_image)) {
     $image_exists = false;
     $small_image = $product_no_image;
 } elseif (!image_exists($small_image)) {
     $image_exists = false;
     $small_image = $product_no_image;
 } else {
     $image_exists = true;
 }
 if ($small_image) {
     if (preg_match("/^http\\:\\/\\//", $small_image)) {
         $image_size = "";
     } else {
         $image_size = @GetImageSize($small_image);
         if ($image_exists && ($watermark || $restrict_products_images)) {
Ejemplo n.º 28
0
$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
// disclaimer
$context['show_disclaimer'] = get_translation(get_field('disclaimer_anzeigen', 'options'), 'options');
$context['haftung_fuer_inhalte'] = get_translation(get_field('haftung-fuer-inhalte', 'options'), 'options');
$context['haftung_fuer_links'] = get_translation(get_field('haftung-fuer-links', 'options'), 'options');
$context['urheberrecht'] = get_translation(get_field('urheberrecht', 'options'), 'options');
// tmg
//$context['title_tmg'] = get_translation('Angaben gemäß § 5 TMG:', 'options);
$context['firmenbezeichnung'] = get_field('firmenbezeichnung', 'options');
$context['strasse_hausnummer'] = get_field('strasse_hausnummer', 'options');
$context['postleitzahl'] = get_field('postleitzahl', 'options');
$context['ort'] = get_field('ort', 'options');
$context['vertretungsberechtigt_title'] = get_translation('Vertreten durch:', 'options');
$context['vertretungsberechtigt'] = get_translation(get_field('vertretungsberechtigt', 'options'), 'options');
$context['kontakt_title'] = get_translation('Kontakt', 'options');
$context['telefon_label'] = get_translation('Telefon:', 'options');
$context['telefon'] = get_translation(get_field('telefon', 'options'), 'options');
$context['telefax_label'] = get_translation('Telefax:', 'options');
$context['telefax'] = get_translation(get_field('telefax', 'options'), 'options');
$context['email_label'] = get_translation('E-Mail:', 'options');
$context['email'] = get_translation(get_field('e-mail', 'options'), 'options');
$context['registereintrag_title'] = get_translation('Registereintrag', 'options');
$context['registereintrag_art'] = get_translation(get_field('registereintrag-art', 'options'), 'options');
$context['registergericht'] = get_translation(get_field('registergericht', 'options'), 'options');
$context['registernummer'] = get_translation(get_field('registernummer', 'options'), 'options');
$context['ust_id_title'] = get_translation('Umsatzsteuer-ID:', 'options');
$context['ust_id_label'] = get_translation('Umsatzsteuer-Identifikationsnummer gemäß §27 a Umsatzsteuergesetz:', 'options');
$context['ust_id'] = get_translation(get_field('ust-id', 'options'), 'options');
Timber::render(array('page-imprint.twig', 'page.twig'), $context);
Ejemplo n.º 29
0
     *
     * #code taken from facebook tutorial
     *
     * // Get the url to redirect for login to facebook
     * // and request permission to write on the user's wall.
     * $login_url = $facebook->getLoginUrl(
     * array('scope' => 'publish_stream')
     * );
     *
     * // If not authenticated, redirect to the facebook login dialog.
     * // The $login_url will take care of redirecting back to us
     * // after successful login.
     * if (! $facebook->getUser()) {
     * $c .= '<script type="text/javascript">
     * top.location.href = "'.$login_url.'";
     * </script>;';
     * }
     * else {
     * $DBc->sqlQuery("INSERT INTO ach_fb_token (aft_player,aft_token,aft_date,aft_allow) VALUES ('".$_USER->getID()."','".$DBc->sqlEscape($facebook->getAccessToken())."','".time()."','1') ON DUPLICATE KEY UPDATE aft_token='".$DBc->sqlEscape($facebook->getAccessToken())."', aft_date='".time()."'");
     * }
     */
}
if (!$_USER->isIG && $_CONF['enable_webig'] == false) {
    $c .= ach_render_forbidden(false);
} elseif ($_USER->isIG && $_CONF['enable_offgame'] == false) {
    $c .= ach_render_forbidden(true);
} else {
    $c .= ach_render();
}
echo ryzom_app_render(strtoupper(get_translation('ach_app_name', $_USER->getLang())), $c, $_USER->isIG());
Ejemplo n.º 30
0
} else {
    // parse user types allowed for registration
    $sql = " SELECT ut.type_id, ut.type_name ";
    if (isset($site_id)) {
        $sql .= " FROM (" . $table_prefix . "user_types ut ";
        $sql .= " LEFT JOIN " . $table_prefix . "user_types_sites uts ON uts.type_id=ut.type_id)";
        $sql .= " WHERE (ut.sites_all=1 OR uts.site_id=" . $db->tosql($site_id, INTEGER, true, false) . ") ";
    } else {
        $sql .= " FROM " . $table_prefix . "user_types ut ";
        $sql .= " WHERE ut.sites_all=1 ";
    }
    $sql .= " AND ut.is_active=1 AND ut.show_for_user=1";
    $db->query($sql);
    if ($db->next_record()) {
        do {
            $type_id = $db->f("type_id");
            $type_name = get_translation($db->f("type_name"));
            $t->set_var("user_type_name", $type_name);
            $t->set_var("user_profile_url", $user_profile_url . "?type=" . $type_id);
            $t->parse("user_types", true);
        } while ($db->next_record());
        $t->sparse("new_user_block", false);
    }
    $t->set_var("return_page", htmlspecialchars($return_page));
    $t->set_var("login", htmlspecialchars($login));
    $t->set_var("operation", "login");
    $t->set_var("logout_form", "");
    $t->parse("login_form", false);
}
$block_parsed = true;
$t->parse("block_body", false);