@@ -217,9 +217,9 @@ |
||
| 217 | 217 | */ |
| 218 | 218 | |
| 219 | 219 | Configure::write('Session', array( |
| 220 | - 'defaults' => 'php', |
|
| 221 | - 'cookie' => 'my_app', |
|
| 222 | - 'timeout' => 99999999999999 //3 days |
|
| 220 | + 'defaults' => 'php', |
|
| 221 | + 'cookie' => 'my_app', |
|
| 222 | + 'timeout' => 99999999999999 //3 days |
|
| 223 | 223 | )); |
| 224 | 224 | |
| 225 | 225 | Configure::write('Session.timeout', '99999999999999'); |
@@ -1,24 +1,24 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -class HomeController extends AppController{ |
|
| 3 | +class HomeController extends AppController { |
|
| 4 | 4 | |
| 5 | - public function beforeFilter(){ |
|
| 5 | + public function beforeFilter() { |
|
| 6 | 6 | return true; |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | - function index(){ |
|
| 9 | + function index() { |
|
| 10 | 10 | $this->layout = 'winners'; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | - function servicos(){ |
|
| 13 | + function servicos() { |
|
| 14 | 14 | $this->layout = 'winners'; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | - function contact(){ |
|
| 17 | + function contact() { |
|
| 18 | 18 | $this->layout = 'winners'; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - function timeline(){ |
|
| 21 | + function timeline() { |
|
| 22 | 22 | $this->layout = 'winners'; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | $dados = $this->request->data('dados'); |
| 32 | 32 | |
| 33 | 33 | // Check for empty fields |
| 34 | - if(empty($dados['name']) || |
|
| 35 | - empty($dados['email']) || |
|
| 36 | - empty($dados['message']) || |
|
| 37 | - !filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) { |
|
| 34 | + if (empty($dados['name']) || |
|
| 35 | + empty($dados['email']) || |
|
| 36 | + empty($dados['message']) || |
|
| 37 | + ! filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) { |
|
| 38 | 38 | $this->Session->setFlash('Você deve preencher todos os dados!'); |
| 39 | 39 | return $this->redirect('/'); |
| 40 | 40 | } |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | $email_body = "Mensagem site: ".$message; |
| 50 | 50 | $headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected]. |
| 51 | 51 | $headers .= "Reply-To: $email_address"; |
| 52 | - mail($to,$email_subject,$email_body,$headers); |
|
| 52 | + mail($to, $email_subject, $email_body, $headers); |
|
| 53 | 53 | //resposta automatica ao cliente |
| 54 | 54 | $to = $email_address; |
| 55 | 55 | $email_subject = '[email protected]'; |
| 56 | 56 | $email_body = "A sua mensagem foi recebida, em breve responderemos"; |
| 57 | 57 | $headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected]. |
| 58 | 58 | $headers .= "Reply-To: $email_address"; |
| 59 | - mail($to,$email_subject,$email_body,$headers); |
|
| 59 | + mail($to, $email_subject, $email_body, $headers); |
|
| 60 | 60 | |
| 61 | 61 | $this->Session->setFlash('Seu e-mail foi enviado com sucesso em breve responderemos!'); |
| 62 | 62 | return $this->redirect('/'); |