diff --git a/app/Config/routes.php b/app/Config/routes.php index 4589182..deb7815 100755 --- a/app/Config/routes.php +++ b/app/Config/routes.php @@ -31,6 +31,8 @@ Router::connect('/agb', array('controller' => 'home', 'action' => 'agb')); Router::connect('/contact', array('controller' => 'home', 'action' => 'contact')); + Router::connect('/company', array('controller' => 'home', 'action' => 'company')); + Router::connect('/registration', array('controller' => 'registration', 'action' => 'main')); Router::connect('/registration/user', array('controller' => 'registration', 'action' => 'worker')); Router::connect('/registration/company', array('controller' => 'registration', 'action' => 'company')); diff --git a/app/Controller/HomeController.php b/app/Controller/HomeController.php index 4f38eba..b696bc0 100755 --- a/app/Controller/HomeController.php +++ b/app/Controller/HomeController.php @@ -21,13 +21,18 @@ class HomeController extends AppController { * or MissingViewException in debug mode. */ - private $opening_limit = 3; + private static $opening_limit = 3; + + function beforeFilter(){ + $this->Security->unlockedActions[]="login"; + parent::beforeFilter(); + } public function home() { $this->MiconwareSession->init($this); $this->MiconwareSession->initWeb($this); $openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(), - 'order'=>'DreamjobJobOpening.id DESC','limit'=> $this->opening_limit)); + 'order'=>'DreamjobJobOpening.id DESC','limit'=> self::$opening_limit)); $this->set('openings',$openings); $this->set('title', 'dreamjob.startpage'); $this->set('MENU_START', true); @@ -55,7 +60,7 @@ class HomeController extends AppController { $this->MiconwareSession->initWeb($this); $openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(), - 'order'=>'DreamjobJobOpening.id DESC','limit'=> $this->opening_limit)); + 'order'=>'DreamjobJobOpening.id DESC','limit'=> self::$opening_limit)); $this->set('openings',$openings); $this->set('title', 'dreamjob.startpage'); $this->set('MENU_START', true); @@ -72,7 +77,7 @@ class HomeController extends AppController { $this->MiconwareSession->initWeb($this); $openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(), - 'order'=>'DreamjobJobOpening.id DESC','limit'=> $this->opening_limit)); + 'order'=>'DreamjobJobOpening.id DESC','limit'=> self::$opening_limit)); $this->set('openings',$openings); $this->set('title', 'dreamjob.startpage'); $this->set('MENU_START', true); @@ -102,4 +107,24 @@ class HomeController extends AppController { $this->set('title', 'dreamjob.agb'); $this->render('/Home/agb'); } + + public function company() { + if(false){ + $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-Firma]'.$this->request->data['mail']['subject']); + $Email->template('contact'); + $Email->viewVars(array('text'=>$this->request->data)); + 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('MENU_START_company', true); + $this->set('title', 'dreamjob.company'); + $this->render('/Home/company'); + } } diff --git a/app/Locale/default.pot b/app/Locale/default.pot index 2027f0c..2f09e84 100644 --- a/app/Locale/default.pot +++ b/app/Locale/default.pot @@ -1115,6 +1115,16 @@ msgstr "" msgid "dreamjob.favority.removeing" msgstr "" +# +msgid "dreamjob.contactSend" +msgstr "" + +# +msgid "dreamjob.contactSend.error" +msgstr "" + + + # # Generierte Fehlermeldungen eigenarbeit! # diff --git a/app/View/Elements/barleft.ctp b/app/View/Elements/barleft.ctp index 3e2e22e..a618873 100755 --- a/app/View/Elements/barleft.ctp +++ b/app/View/Elements/barleft.ctp @@ -57,6 +57,30 @@ if($isLoggedin){ --> Html->link(__('dreamjob.company.startpage'),array('controller'=>'home', 'action'=>'home'),array("class" => "btn btn-primary")); + echo $this->Html->link(__('dreamjob.company.startpage'),array('controller'=>'home', 'action'=>'company'),array("class" => "btn btn-primary")); +}elseif(!empty($MENU_START_company)){ + ?> + + Html->link(__('dreamjob.startpage'),array('controller'=>'home', 'action'=>'home'),array("class" => "btn btn-primary")); } ?> diff --git a/app/View/Emails/html/contact.ctp b/app/View/Emails/html/contact.ctp new file mode 100644 index 0000000..e12ccbd --- /dev/null +++ b/app/View/Emails/html/contact.ctp @@ -0,0 +1,12 @@ + + + + + + + + + + + +
request->data['mail']['subject']);?>
diff --git a/app/View/Emails/text/contact.ctp b/app/View/Emails/text/contact.ctp new file mode 100644 index 0000000..73d61f3 --- /dev/null +++ b/app/View/Emails/text/contact.ctp @@ -0,0 +1,42 @@ +\n +\n +\n +\n +request->data['mail']['subject']);?>\n +\n +\n +]*?>.*?@si', + '@<[\/\!]*?[^<>]*?>@si', + '@([\r\n])[\s]+@', + '@&(quot|#34);@i', + '@&(amp|#38);@i', + '@&(lt|#60);@i', + '@&(gt|#62);@i', + '@&(nbsp|#160);@i', + '@&(iexcl|#161);@i', + '@&(cent|#162);@i', + '@&(pound|#163);@i', + '@&(copy|#169);@i', + '@&(reg|#174);@i', + '@&#(d+);@e' + ); + $Replace = array ('', + '', + '', + '', + '&', + '<', + '>', + ' ', + chr(161), + chr(162), + chr(163), + chr(169), + chr(174), + 'chr()' + ); + echo preg_replace($Rules, $Replace, $Document); + ?> diff --git a/app/View/Home/company.ctp b/app/View/Home/company.ctp new file mode 100644 index 0000000..da7ed19 --- /dev/null +++ b/app/View/Home/company.ctp @@ -0,0 +1,62 @@ + + + + +
+ Die Plattform für Ihr komplettes Ausschreibungsverfahren!
+ übersichtlich - bequem - flexibel + +
+ +
+
+ Unser Prospekt für Arbeitgeber
+
+ - Unser kostenloses Angebot
+ - was dreamJOB Ihnen bietet
+
+ Html->image('start-company-broschuere.jpg'); ?> +
+
+
+ Bei Fragen kontaktieren Sie gerne unser Service-Team + 'margin-top:15px;'); + $default_Form['inputDefaults']['between']=false; + $default_Form['inputDefaults']['after']=false; + $default_Form['inputDefaults']['label']=false; + + echo $this->Form->create(null,$default_Form); + + echo $this->Form->input('mail.last_name',array('placeholder'=>'Name')); + echo $this->Form->input('mail.first_name',array('placeholder'=>'Vorname')); + echo $this->Form->input('mail.adresse',array('placeholder'=>'E-Mail')); + echo $this->Form->input('mail.subject',array('placeholder'=>'Betreff')); + echo $this->Form->input('mail.text',array('placeholder'=>'Nachricht')); + ?> +
+ Form->button(__('dreamjob.application.send'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?> +
+ Form->end(); + ?> +
+
diff --git a/app/View/Home/home.ctp b/app/View/Home/home.ctp index 014f340..b062f6b 100755 --- a/app/View/Home/home.ctp +++ b/app/View/Home/home.ctp @@ -4,7 +4,7 @@ */ ?>