<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Privacy_mail extends CI_Controller
{
	public function german()
	{
		$this->load->model('common_model');
		$getData = $this->common_model->getAll('usr_users',array('subscribe'=>1,'userlanguage'=>1),array('feu_userdetails','usr_users.id = feu_userdetails.user_id'),'','email,username,userlanguage');
		//pr($getData);
		if(!empty($getData))
		{
			foreach ($getData as $value) 
			{
				$to = $value['email'];
				$sub = 'Newsletter Datenschutzrichtlinie';
				$body= "<p>Wir hoffen, es geht Ihnen gut.</p> 
						<p>Wir möchten Sie darauf hinweisen, dass wir unsere Allgemeinen Geschäftsbedingungen geändert und unsere Datenschutzrichtlinie zum neuen europäischen Datenschutzrecht ab 25.05.2018 ergänzt haben.</p> 
						<p>Beim nächsten Login auf unserer Website, werden Sie aufgefordert, diese aktiv zu bestätigen.</p> 
						<p>Wir haben Ihr Vertrauen in uns gewonnen und freuen uns auf eine langjährige Beziehung. Daher möchten wir Sie ausdrücklich darauf hinweisen, dass wir Ihre persönlichen Daten aus keinerlei Gründen, die nicht legal sind, an andere Unternehmen weitergeben. Ihre Daten und jegliche Art von Informationen auf unserer Website dienen nur dem Zweck der Website und unseren Veranstaltungen.</p> 
						<p>Sie finden die vollständigen Informationen auf unserer Website unter <a href=".base_url().'terms'.">https://castleevents.com/terms</a> oder <a href=".base_url().'privacy'.">https://castleevents.com/privacy</a>. Für weiteren Fragen zu diesen Themen finden Sie dort auch unsere Kontaktdaten. Dieser Newsletter informiert Sie über unsere kontinuierlichen Entwicklungen und Angebote. Wenn Sie an unseren Newslettern nicht mehr interessiert sind, haben Sie die Möglichkeit, sich in Ihren Einstellungen abzumelden.</p> 
						<p>Bitte zögern Sie nicht uns zu kontaktieren,</p>";
				$bodys='<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#22222c" width="100%" style="max-width: 600px;">
                <tr>
                   	<td>
                      	<table cellspacing="0" cellpadding="0" border="0" width="100%">
                         	<tr>
	                            <td align="center" style="padding: 40px; font-family: sans-serif; font-size: 15px; mso-height-rule: exactly; line-height: 20px; color: #b3975b;">
	                               <h2>'.getLang('Dear').' <span style="text-transform:capitalize">'.$value['username'].'</span>'.' </h2>
	                            </td>
                         	</tr>
                         	<tr>
	                            <td style="font-family: sans-serif; color: #fff; padding: 0px 40px 40px; font-size: 16px; line-height: 30px;">
	                               '.$body.'
	                            </td>
                         	</tr>
                         	<tr>
	                         	<td align="center" style="font-family: sans-serif; color: rgb(179, 151, 91); padding: 20px 40px; border-top: 1px solid rgb(79, 79, 79); background: rgb(19, 18, 24) none repeat scroll 0px 0px;">
	                         		<p style="margin:5px 0 0"><a href="'.base_url().'" style="text-decoration:none; color: #b3975b;">'.getLang('Your_Castleeventscom_Team').'</a></p> 
	                         	</td>
                         	</tr>
                      	</table>
                   	</td>
                </tr>
            	</table>';
            	//echo $bodys; die;
            	$this->utility->sendCIMail($to,$sub,$bodys);
		    	/**********************MAIL**************************/
			}
		}
	}
	public function english()
	{
		$this->load->model('common_model');
		$getData = $this->common_model->getAll('usr_users',array('subscribe'=>1,'userlanguage'=>2),array('feu_userdetails','usr_users.id = feu_userdetails.user_id'),'','email,username,userlanguage');
		//pr($getData);
		if(!empty($getData))
		{
			foreach ($getData as $value) 
			{
				$to = $value['email'];
				$sub = 'Newsletter  Privacy Policy';
				$body= "<p>We hope this email finds you well.</p> 
						<p>We would like to advise you that we edited our Terms and Conditions and also completed our Privacy Policy regarding the new European law of data protection from 25th of June 2018.</p> 
						<p>You will need to finally  accept it during your next login on our website.</p> 
						<p>We gained your trust in us and look forward to a long-lasting relationship. Therefore we would like to explicitly let you know that we are not giving your personal details to other companies for any reason which are not legal. Your details and any kind of information on our website are just for the purpose of the site and its events.</p> 
						<p>You can find the complete information on our website under <a href=".base_url().'terms'.">https://castleevents.com/terms</a> or <a href=".base_url().'privacy'.">https://castleevents.com/privacy</a>. For any further question you can also find our contact information there. This newsletter is to inform you about our continuous developments and offers. If you are not interested in our newsletters anymore you have the possibility to unsubscribe in your settings.</p> 
						<p>Please don´t hesitate to contact us for any requests</p>";
				$bodys='<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#22222c" width="100%" style="max-width: 600px;">
                <tr>
                   	<td>
                      	<table cellspacing="0" cellpadding="0" border="0" width="100%">
                         	<tr>
	                            <td align="center" style="padding: 40px; font-family: sans-serif; font-size: 15px; mso-height-rule: exactly; line-height: 20px; color: #b3975b;">
	                               <h2>'.getLang('Dear').' <span style="text-transform:capitalize">'.$value['username'].'</span>'.' </h2>
	                            </td>
                         	</tr>
                         	<tr>
	                            <td style="font-family: sans-serif; color: #fff; padding: 0px 40px 40px; font-size: 16px; line-height: 30px;">
	                               '.$body.'
	                            </td>
                         	</tr>
                         	<tr>
	                         	<td align="center" style="font-family: sans-serif; color: rgb(179, 151, 91); padding: 20px 40px; border-top: 1px solid rgb(79, 79, 79); background: rgb(19, 18, 24) none repeat scroll 0px 0px;">
	                         		<p style="margin:5px 0 0"><a href="'.base_url().'" style="text-decoration:none; color: #b3975b;">'.getLang('Your_Castleeventscom_Team').'</a></p> 
	                         	</td>
                         	</tr>
                      	</table>
                   	</td>
                </tr>
            	</table>';
            	//echo $bodys; die;
            	$this->utility->sendCIMail($to,$sub,$bodys);
		    	/**********************MAIL**************************/
			}
		}
	}
	public function spanish()
	{
		$this->load->model('common_model');
		$getData = $this->common_model->getAll('usr_users',array('subscribe'=>1,'userlanguage'=>3),array('feu_userdetails','usr_users.id = feu_userdetails.user_id'),'','email,username,userlanguage');
		//pr($getData);
		if(!empty($getData))
		{
			foreach ($getData as $value) 
			{
				$to = $value['email'];
				$sub = 'Newsletter  Privacy Policy';
				$body= "<p>We hope this email finds you well.</p> 
						<p>We would like to advise you that we edited our Terms and Conditions and also completed our Privacy Policy regarding the new European law of data protection from 25th of June 2018.</p> 
						<p>You will need to finally  accept it during your next login on our website.</p> 
						<p>We gained your trust in us and look forward to a long-lasting relationship. Therefore we would like to explicitly let you know that we are not giving your personal details to other companies for any reason which are not legal. Your details and any kind of information on our website are just for the purpose of the site and its events.</p> 
						<p>You can find the complete information on our website under <a href=".base_url().'terms'.">https://castleevents.com/terms</a> or <a href=".base_url().'privacy'.">https://castleevents.com/privacy</a>. For any further question you can also find our contact information there. This newsletter is to inform you about our continuous developments and offers. If you are not interested in our newsletters anymore you have the possibility to unsubscribe in your settings.</p> 
						<p>Please don´t hesitate to contact us for any requests</p>";
				$bodys='<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#22222c" width="100%" style="max-width: 600px;">
                <tr>
                   	<td>
                      	<table cellspacing="0" cellpadding="0" border="0" width="100%">
                         	<tr>
	                            <td align="center" style="padding: 40px; font-family: sans-serif; font-size: 15px; mso-height-rule: exactly; line-height: 20px; color: #b3975b;">
	                               <h2>'.getLang('Dear').' <span style="text-transform:capitalize">'.$value['username'].'</span>'.' </h2>
	                            </td>
                         	</tr>
                         	<tr>
	                            <td style="font-family: sans-serif; color: #fff; padding: 0px 40px 40px; font-size: 16px; line-height: 30px;">
	                               '.$body.'
	                            </td>
                         	</tr>
                         	<tr>
	                         	<td align="center" style="font-family: sans-serif; color: rgb(179, 151, 91); padding: 20px 40px; border-top: 1px solid rgb(79, 79, 79); background: rgb(19, 18, 24) none repeat scroll 0px 0px;">
	                         		<p style="margin:5px 0 0"><a href="'.base_url().'" style="text-decoration:none; color: #b3975b;">'.getLang('Your_Castleeventscom_Team').'</a></p> 
	                         	</td>
                         	</tr>
                      	</table>
                   	</td>
                </tr>
            	</table>';
            	//echo $bodys; die;
            	$this->utility->sendCIMail($to,$sub,$bodys);
		    	/**********************MAIL**************************/
			}
		}
	}
}