Subversion Repositories wpShopGermany4

Rev

Rev 7329 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7094 florian 1
<style>
2
	.email-logo { padding-bottom: 10px; }
3
	.email-logo-watermark { position:absolute; top:10%; left:0; right:0; display:flex; justify-content:center; align-items:center; }
4
</style>
5
 
6
<?php
7329 daniel 7
 
8
	$logoPath = '';
9
 
7094 florian 10
	if($this->get_option('wpsg_email_logo_activated'))
11
	{
12
 
13
		$logoWatermark = $this->get_option('wpsg_email_logo_watermark') ? "email-logo-watermark" : "";
14
 
15
		$logoTransparency = str_replace("#", "", get_option('wpsg_email_logo_transparency'));
16
		if($logoTransparency !== "100") $logoTransparency = str_replace(array("0", "00"), "", $logoTransparency);
17
		if($logoTransparency !== "100") $logoTransparency = "0." . $logoTransparency;
18
 
19
		$logoAlignment = $this->get_option('wpsg_email_logo_alignment');
20
		$logoPath = WPSG_PATH_CONTENT . 'uploads/wpsg/wpsg_mailconf/wpsg_email_logo.jpg';
21
 
22
		if(file_exists($logoPath))
23
		{
7716 daniel 24
			$logoType = mime_content_type($logoPath);
7094 florian 25
			$logoData = file_get_contents($logoPath);
7716 daniel 26
			$logoBase64 = 'data:'.$logoType.';base64,'.base64_encode($logoData);
7094 florian 27
		}
28
 
29
	}
30
?>
31
 
7329 daniel 32
<?php if (file_exists($logoPath) && $this->get_option('wpsg_email_logo_activated')) { ?>
33
 
7094 florian 34
	<?php echo "<div class='email-logo $logoWatermark' style='text-align:$logoAlignment; opacity:$logoTransparency;'>" ?>
35
	<?php echo "<img alt='Emaillogo' class='email-logo-$logoAlignment' src='$logoBase64'>"; ?>
36
	<?php echo "</div>"; ?>
7329 daniel 37
 
7094 florian 38
<?php } ?>