Cookies

Cookie-Nutzung

require_once(WP_PLUGIN_DIR . ‚/orakel/cache_lite/Lite.php‘);
$cache_life_time = 604800;
$cache_options = array(
‚cacheDir‘ => WP_PLUGIN_DIR . ‚/orakel/tmp/‘,
‚lifeTime‘ => $cache_life_time
);
$Cache_Lite = new Cache_Lite($cache_options);

if ($data = $Cache_Lite->get($asin, ‚produktvorstellung‘) and (mb_strlen($data, ‚8bit‘) >= 1900) and (strpos($data,’span content=““‚) == false) ) {
$output = $data;
} else {
if (!isset($_SERVER[‚HTTPS‘]) || $_SERVER[‚HTTPS‘] != ‚on‘) { $protocol = „http“; } else { $protocol = „https“; }

$host = $_SERVER[‚HTTP_HOST‘];
$prices = file_get_contents($protocol . ‚://‘ . $host . ‚/wp-content/plugins/orakel/getimageprice.php?id=‘ . $asin);
$obj = json_decode($prices);
if (is_array($obj)) {
foreach ($obj as $val) {
$test = get_object_vars($val);

$price_clean = number_format($test[‚preis‘], 2, ‚.‘, “);
if ($test[‚ab‘] == 1) {
$price = „ab “ . number_format($test[‚preis‘], 2, ‚,‘, “);
} else {
$price = number_format($test[‚preis‘], 2, ‚,‘, “);
}

$image = $test[‚imagename‘];
}
}
if($image == “) {
$imageURL = ‚/wp-content/plugins/orakel/images/standard.jpg‘;
} else {
$imageURL = ‚/wp-content/plugins/orakel/resize.php?src=‘ . $image . ‚.jpg&w=300&h=300&zc=2&q=80‘;
}
$reviewData = file_get_contents($protocol . ‚://‘ . $host . ‚/wp-content/plugins/orakel/reviews.php?id=‘ . $asin);
$obj = json_decode($reviewData);
if (is_array($obj)) {
foreach ($obj as $val) {
$review = get_object_vars($val);
$review_cnt = $review[‚reviews‘];
$review = $review[‚bewertung‘];
$review_percent = $review / 5 * 100;
}
}
su_query_asset( ‚css‘, ’su-box-shortcodes‘ );

$pricebutton = ( $preisbutton === ‚yes‘ ) ? ‚

Amazon.de
‚ . $price . ‚

inkl 19% MwSt

‚ : “;

$pricebutton = ( $snippets === ’no‘ & $preisbutton === ‚yes‘ ) ? ‚

Amazon.de
‚ . $price . ‚

inkl 19% MwSt

‚ : $pricebutton;

$output = ( $snippets === ‚yes‘ ) ? ‚

<' . $headline_tag . ' style="color:' . $title_txt_color . '; font-weight: 200;margin:auto;font-size:1.4em;">‚ . $titel . ‚

(‚ . $review_cnt . ‚ Rezensionen)

' . $titel . '‚ . $content . ‚

‚ . $pricebutton . ‚

‚ : ‚

<' . $headline_tag . ' style="color:' . $title_txt_color . '; font-weight: 200;margin:auto;font-size:1.4em;">‚ . $titel . ‚

(‚ . $review_cnt . ‚ Rezensionen)

' . $titel . '‚ . $content . ‚

‚ . $pricebutton . ‚

‚;
$Cache_Lite->save($output, $asin, ‚produktvorstellung‘);
}
echo $output;

nach oben