<?php
/* --------------------------------------------------------------
GMTSWidget.php 2011-06-10 gm
Gambio GmbH
http://www.gambio.de
Copyright (c) 2011 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
*/
class GMTSWidget
{
/*
* actual used languages id
* @var int
*/
var $coo_languages_id;
/*
* trusted shops id
* @var String
*/
var $coo_ts_id;
/*
* trusted shops name
* @var String
*/
var $coo_ts_shop_name;
/*
* trusted shops widget url
* @var String
*/
var $coo_ts_widget = 'https://www.trustedshops.com/bewertung/widget/widgets/';
/*
* trusted shops info html code
* @var array
*/
var $coo_ts_info_link = array(
1 => '<a href="https://www.trustedshops.com/buyerfeedback/signin.html?partnerPackage={#TS_ONLINESHOP#}" target="_blank" title="" rel="nofollow"></a>',
2 => '<a href="https://www.trustedshops.com/bewertung/anmeldung.html?partnerPackage={#TS_ONLINESHOP#}" target="_blank" title="" rel="nofollow"></a>'
);
/*
* trusted shops rating html code
* @var array
*/
var $coo_ts_rating_link = array(
1 => '<a href="https://www.trustedshops.com/buyerrating/rate_{#TS_ID#}.html&buyerEmail={#TS_BUYER_EMAIL#}&shopOrderID={#TS_ORDER_ID#}" target="_blank" title="Write a review!" rel="nofollow"><img src="{#TS_RATING_IMAGE#}images/trusted_bewerten_en.gif" alt="Write a review!" border="0" /></a>',
2 => '<a href="https://www.trustedshops.com/bewertung/seite/bewerten_{#TS_ID#}.html&buyerEmail={#TS_BUYER_EMAIL#}&shopOrderID={#TS_ORDER_ID#}" target="_blank" title="Bewerten Sie unseren Shop!" rel="nofollow"><img src="{#TS_RATING_IMAGE#}images/trusted_bewerten_de.gif" alt="Bewerten Sie unseren Shop!" border="0" /></a>'
);
/*
* trusted shops profile html code
* @var array
* 1 english
* 2 german
*/
var $coo_ts_profile_link = array(
1 => '<a target="_blank" href="https://www.trustedshops.com/buyerrating/info_{#TS_ID#}.html" title="Rating Profile {#TS_SHOP_NAME#}" rel="nofollow"><img class="bewertung" alt="Rating Profile {#TS_SHOP_NAME#}" border="0" src="{#TS_IMAGE#}" /></a>',
2 => '<a target="_blank" href="https://www.trustedshops.com/bewertung/seite/info_{#TS_ID#}.html" title="Kundenbewertungen von {#TS_SHOP_NAME#} einsehen" rel="nofollow"><img class="bewertung" alt="Kundenbewertungen von {#TS_SHOP_NAME#} einsehen" border="0" src="{#TS_IMAGE#}" /></a>'
);
/*
* constructor
* @param int $p_languages_id
*/
function GMTSWidget($p_languages_id)
{
$this->coo_languages_id = (int)$p_languages_id;
$this->coo_ts_id = gm_get_content('GM_TRUSTED_SHOPS_WIDGET_SHOP_ID', $this->coo_languages_id);
$this->coo_ts_shop_name = gm_get_content('GM_TRUSTED_SHOPS_WIDGET_SHOP_NAME', $this->coo_languages_id);
return;
}
/*
* function to get the rating link
* @return String
*/
function get_info_link()
{
}
/*
* function to get the rating link
* @param int $p_order_id
* @param String $p_area (confirmation / checkout)
* @return String
*/
function get_rating_link($p_order_id, $p_area)
{
if(gm_get_content($p_area, $this->coo_languages_id) == '1' && gm_get_content('GM_TRUSTED_SHOPS_WIDGET_USE', $this->coo_languages_id) == '1')
{
$t_ts_link = $this->coo_ts_rating_link[$this->coo_languages_id];
/* get customers email adress */
$gm_ts_query = xtc_db_query("
SELECT
customers_email_address
AS
mail
FROM " .
TABLE_ORDERS . "
WHERE
orders_id = '" . $p_order_id . "'"
);
$gm_ts_query_data = xtc_db_fetch_array($gm_ts_query);
/* create trusted shops rating html code */
if($p_area == 'GM_TRUSTED_SHOPS_WIDGET_SHOW_CONFIRMATION')
{
$t_ts_link = str_replace('{#TS_RATING_IMAGE#}', HTTP_SERVER . DIR_WS_CATALOG, $t_ts_link);
}
else
{
$t_ts_link = str_replace('{#TS_RATING_IMAGE#}', '', $t_ts_link);
}
$t_ts_link = str_replace('{#TS_ID#}', $this->coo_ts_id, $t_ts_link);
$t_ts_link = str_replace('{#TS_BUYER_EMAIL#}', urlencode(base64_encode($gm_ts_query_data['mail'])), $t_ts_link);
$t_ts_link = str_replace('{#TS_ORDER_ID#}', urlencode(base64_encode($p_order_id)), $t_ts_link);
return $t_ts_link;
}
}
/*
* function to get the profile link
* @return String
*/
function get_profile_link()
{
$t_ts_link = $this->coo_ts_profile_link[$this->coo_languages_id];
/* create trusted shops profile html code */
$t_ts_link = str_replace('{#TS_ID#}', $this->coo_ts_id, $t_ts_link);
$t_ts_link = str_replace('{#TS_IMAGE#}', $this->coo_ts_widget . $this->coo_ts_id . ".gif", $t_ts_link);
$t_ts_link = str_replace('{#TS_SHOP_NAME#}', $this->coo_ts_shop_name, $t_ts_link);
return $t_ts_link;
}
}
?>| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| csstidy/ | 2013-11-12 21:03 | 125.89 KB | 76129f60960:kunden | dxwrx-rx-r | |
| lib/ | 2013-11-12 21:03 | 601.96 KB | 76129f60960:kunden | dxwrx-rx-r | |
| ErrorHandler.php | 2013-11-12 21:03 | 10.34 KB | 76129f60960:kunden | -xw-x----- | |
| FileLog.php | 2013-11-12 21:02 | 2.93 KB | 76129f60960:kunden | -xw-x----- | |
| GMAltText.php | 2013-11-12 21:03 | 2.94 KB | 76129f60960:kunden | -xw-x----- | |
| GMAttributesCalculator.php | 2013-11-12 21:03 | 4.65 KB | 76129f60960:kunden | -xw-x----- | |
| GMCSSMonitor.php | 2013-11-12 21:03 | 13.19 KB | 76129f60960:kunden | -xw-x----- | |
| GMCSSOptimizer.php | 2013-11-12 21:03 | 32.87 KB | 76129f60960:kunden | -xw-x----- | |
| GMCat.php | 2013-11-12 21:03 | 9.08 KB | 76129f60960:kunden | -xw-x----- | |
| GMCounter.php | 2013-11-12 21:03 | 17.05 KB | 76129f60960:kunden | -xw-x----- | |
| GMEbay.php | 2013-11-12 21:02 | 9.16 KB | 76129f60960:kunden | -xw-x----- | |
| GMGMotion.php | 2013-11-12 21:02 | 24.31 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintCartManager.php | 2013-11-12 21:03 | 14.66 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintConfiguration.php | 2013-11-12 21:03 | 2.17 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintContentManager.php | 2013-11-12 21:02 | 8.79 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintElements.php | 2013-11-12 21:03 | 15.79 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintFileManager.php | 2013-11-12 21:02 | 6.06 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintOrderElements.php | 2013-11-12 21:03 | 7.46 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintOrderManager.php | 2013-11-12 21:03 | 6.27 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintOrderSurfaces.php | 2013-11-12 21:03 | 6.41 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintOrderSurfacesManager.php | 2013-11-12 21:03 | 4.86 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintProductManager.php | 2013-11-12 21:02 | 4.55 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintSurfaces.php | 2013-11-12 21:03 | 9.99 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintSurfacesGroupsManager.php | 2013-11-12 21:03 | 1.96 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintSurfacesManager.php | 2013-11-12 21:03 | 9.62 KB | 76129f60960:kunden | -xw-x----- | |
| GMGPrintWishlistManager.php | 2013-11-12 21:03 | 14.81 KB | 76129f60960:kunden | -xw-x----- | |
| GMJSON.php | 2013-11-12 21:03 | 2.44 KB | 76129f60960:kunden | -xw-x----- | |
| GMJanolaw.php | 2013-11-12 21:03 | 3.76 KB | 76129f60960:kunden | -xw-x----- | |
| GMLangFileMaster.php | 2013-11-12 21:03 | 965 B | 76129f60960:kunden | -xw-x----- | |
| GMLightboxControl.php | 2013-11-12 21:03 | 691 B | 76129f60960:kunden | -xw-x----- | |
| GMLogoManager.php | 2013-11-12 21:03 | 6.78 KB | 76129f60960:kunden | -xw-x----- | |
| GMMeta.php | 2013-11-12 21:02 | 8.29 KB | 76129f60960:kunden | -xw-x----- | |
| GMProduct.php | 2013-11-12 21:03 | 2.37 KB | 76129f60960:kunden | -xw-x----- | |
| GMSEOBoost.php | 2013-11-12 21:03 | 25.63 KB | 76129f60960:kunden | -xw-x----- | |
| GMSitemap.php | 2013-11-12 21:03 | 5.32 KB | 76129f60960:kunden | -xw-x----- | |
| GMStatusbar.php | 2013-11-12 21:02 | 2.46 KB | 76129f60960:kunden | -xw-x----- | |
| GMTSWidget.php | 2013-11-12 21:03 | 4.93 KB | 76129f60960:kunden | -xw-x----- | |
| GMTabTokenizer.php | 2013-11-12 21:03 | 2.81 KB | 76129f60960:kunden | -xw-x----- | |
| GMTracker.php | 2013-11-12 21:03 | 3.49 KB | 76129f60960:kunden | -xw-x----- | |
| JSON.php | 2013-11-12 21:03 | 39.98 KB | 76129f60960:kunden | -xw-x----- | |
| application_top.php | 2013-11-12 21:03 | 34.02 KB | 76129f60960:kunden | -xw-x----- | |