diff --git a/admin/survey/classes/objects/obj.MailAdapter.php b/admin/survey/classes/objects/obj.MailAdapter.php index 393cc475c..81b2cd247 100644 --- a/admin/survey/classes/objects/obj.MailAdapter.php +++ b/admin/survey/classes/objects/obj.MailAdapter.php @@ -537,7 +537,7 @@ class MailAdapter{ $this->phpMailerClass->Subject = $email_subject; // Vsebina maila - $this->phpMailerClass->msgHTML($email_msg); + $this->prepareEmailDesign($email_msg); // Loop cez prejemnike in posiljanje @@ -664,7 +664,7 @@ class MailAdapter{ $this->phpMailerClass->Subject = $email_subject; // Vsebina maila - $this->phpMailerClass->msgHTML($email_msg); + $this->prepareEmailDesign($email_msg); // Loop cez prejemnike in posiljanje @@ -707,6 +707,163 @@ class MailAdapter{ } } + // Pripravimo design emaila + private function prepareEmailDesign($content){ + global $lang, $app_settings, $site_domain; + + // V nekaterih primerih ne designeramo maila + if(!in_array($this->type, array('account', 'payments')) || !in_array($site_domain, array('localhost', 'www.1ka.si', 'test.1ka.si', 'test2.1ka.si'))){ + $this->phpMailerClass->msgHTML($content); + return; + } + + + // Logo + $logo_src = ($lang['id'] == '1') ? 'https://www.1ka.si/public/img/logo/1ka_slo.png' : 'https://www.1ka.si/public/img/logo/1ka_eng.png'; + + // Naslov + //$heading = 'Naslovček'; + $heading_html = ($heading != '') ? '

'.$heading.'

' : ''; + + // Vsebina + $text = $content; + $text_html = ($text != '') ? '

'.$text.'

' : ''; + + // Slika + //$image = ''; + $image_html = ($image != '') ? ''.$image.'' : ''; + + // Gumb + //$button_html = '

Call to Action

'; + + // Podpis + $signature_html = '

'.$lang['srv_1ka_mail_signature_bye'].'

'; + + + $designed_content = ' + + + + + + 1ka template + + + + + + + + + + +
+ + + + + + + + + + +
+ header +
+ + + + '.$heading_html.' + + + '.$image_html.' + + + '.$text_html.' + + + '.$button_html.' + + + '.$signature_html.' + +
+
+ + + + + + + +
+

'.$lang['email_template_footer'].'

+
+ + + + + + + + +
+ + Facebook. + +   + + youtube. + +   + + Twitter. + +
+
+
+

+ Sporočilo smo vam poslali na tralala@gmail.com. +
+ Za odjavo kliknite tukaj. +
+ Za spremembo nastavitev kliknite tukaj +

+
+ + + + '; + + + /*echo $designed_content; + die();*/ + + $this->phpMailerClass->msgHTML($designed_content); + } + // Preveri ce je mail veljaven diff --git a/lang/1.php b/lang/1.php index 4c2914c5f..b8687a0f4 100644 --- a/lang/1.php +++ b/lang/1.php @@ -7903,7 +7903,15 @@ $lang = array ( 'install_finish_title' => 'Zaključek namestitve', 'install_finish_text' => 'Namestitev je uspešno zaključena.', - 'install_finish_redirect' => 'Na naslovnico', + 'install_finish_redirect' => 'Na naslovnico', + + + + /* EMAIL TEMPLATE */ + 'email_template_footer' => 'Potrebujete pomoč pri ustvarjanju ankete ali analiziranju podatkov? Poglejte naš priročnik ali zaprosite za pomoč enega od naših strokovnjakov.', + 'email_template_footer2_recipient' => 'Sporočilo smo vam poslali na', + 'email_template_footer2_unsubscribe' => 'Za odjavo kliknite tukaj.', + 'email_template_footer2_unsubscribe' => 'Za spremembo nastavitev kliknite tukaj.', diff --git a/lang/2.php b/lang/2.php index 218f27f24..30bb2311d 100644 --- a/lang/2.php +++ b/lang/2.php @@ -7797,6 +7797,15 @@ GDPR introduction preview", 'install_finish_title' => 'Installation finished.', 'install_finish_text' => 'Application installation successfully finished.', 'install_finish_redirect' => 'To main page', + + + + /* EMAIL TEMPLATE */ + 'email_template_footer' => 'Do you need help with creating a survey or analizing data? Take a look at our in-detail help section or hire one of our specialists to help you.', + 'email_template_footer2_recipient' => 'This message was sent to', + 'email_template_footer2_unsubscribe' => 'To unsubscribe click here.', + 'email_template_footer2_unsubscribe' => 'To change your settings click here.', +