2014-06-01 18:24:45 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
App::uses('AppController', 'Controller');
|
|
|
|
App::uses('CakeEmail', 'Network/Email');
|
|
|
|
|
|
|
|
class ExtraController extends AppController {
|
|
|
|
|
|
|
|
public $uses = array();
|
|
|
|
|
|
|
|
public function contact() {
|
|
|
|
if ($this->request->is('post')) {
|
|
|
|
$Email = new CakeEmail('dreamjobMain');
|
|
|
|
$Email->to('service@dream-job.eu');
|
|
|
|
$Email->from(array($this->request->data['mail']['adresse'] => $this->request->data['mail']['first_name'] . ' ' . $this->request->data['mail']['last_name']));
|
|
|
|
$Email->subject('[Dreamjob-Kontakt]' . $this->request->data['mail']['subject']);
|
|
|
|
$Email->template('contact');
|
|
|
|
$Email->viewVars(array('text' => $this->request->data, 'strip_tags' => $this->MiconwareSession->strip_tags));
|
|
|
|
if ($Email->send())
|
|
|
|
$this->MiconwareSession->setFlash(__('dreamjob.contactSend'), 'flash', array('alert' => 'success'));
|
|
|
|
else
|
|
|
|
$this->MiconwareSession->setFlash(__('dreamjob.contactSend.error'), 'flash', array('alert' => 'danger'));
|
|
|
|
}
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->set('title', 'dreamjob.contact');
|
|
|
|
$this->render('/Extra/contact');
|
|
|
|
}
|
|
|
|
public function cooperators(){
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->set('title','dreamjob.cooperators');
|
|
|
|
$this->render('/Extra/cooperators');
|
|
|
|
}
|
|
|
|
public function team(){
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->set('title','dreamjob.team');
|
|
|
|
$this->render('/Extra/team');
|
|
|
|
}
|
2014-06-01 19:07:41 +02:00
|
|
|
public function muell1(){
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->render('/Extra/muell1');
|
|
|
|
}
|
|
|
|
public function muell2(){
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->render('/Extra/muell2');
|
|
|
|
}
|
2014-06-01 18:24:45 +02:00
|
|
|
public function premium(){
|
|
|
|
if ($this->request->is('post')) {
|
|
|
|
$Email = new CakeEmail('dreamjobMain');
|
|
|
|
$Email->to('service@dream-job.eu');
|
2014-06-01 19:07:41 +02:00
|
|
|
$Email->from(array($this->request->data['mail']['adresse'] => $this->request->data['mail']['owner'] . ' von ' . $this->request->data['mail']['company']));
|
|
|
|
$Email->subject('[Dreamjob-Kontakt-Premium]');
|
2014-06-01 18:24:45 +02:00
|
|
|
$Email->template('contact');
|
|
|
|
$Email->viewVars(array('text' => $this->request->data, 'strip_tags' => $this->MiconwareSession->strip_tags));
|
|
|
|
if ($Email->send())
|
|
|
|
$this->MiconwareSession->setFlash(__('dreamjob.contactSend'), 'flash', array('alert' => 'success'));
|
|
|
|
else
|
|
|
|
$this->MiconwareSession->setFlash(__('dreamjob.contactSend.error'), 'flash', array('alert' => 'danger'));
|
|
|
|
}
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->set('title','dreamjob.premium');
|
|
|
|
$this->render('/Extra/premium');
|
|
|
|
}
|
|
|
|
public function advertise(){
|
|
|
|
if ($this->request->is('post')) {
|
|
|
|
$Email = new CakeEmail('dreamjobMain');
|
|
|
|
$Email->to('service@dream-job.eu');
|
2014-06-01 19:07:41 +02:00
|
|
|
$Email->from(array($this->request->data['mail']['adresse'] => $this->request->data['mail']['owner'] . ' von ' . $this->request->data['mail']['company']));
|
2014-06-01 18:24:45 +02:00
|
|
|
$Email->subject('[Dreamjob-Kontakt-Advertise]' . $this->request->data['mail']['subject']);
|
|
|
|
$Email->template('contact');
|
|
|
|
$Email->viewVars(array('text' => $this->request->data, 'strip_tags' => $this->MiconwareSession->strip_tags));
|
|
|
|
if ($Email->send())
|
|
|
|
$this->MiconwareSession->setFlash(__('dreamjob.contactSend'), 'flash', array('alert' => 'success'));
|
|
|
|
else
|
|
|
|
$this->MiconwareSession->setFlash(__('dreamjob.contactSend.error'), 'flash', array('alert' => 'danger'));
|
|
|
|
}
|
|
|
|
$this->MiconwareSession->init($this);
|
|
|
|
$this->MiconwareSession->initWeb($this);
|
|
|
|
$this->set('title','dreamjob.advertise');
|
|
|
|
$this->render('/Extra/advertise');
|
|
|
|
}
|
|
|
|
}
|