Completed
Push — master ( 373ce5...4970c6 )
by Reginaldo
18:28
created
app/Controller/HomeController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@  discard block
 block discarded – undo
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
 
25
-	function developers(){
25
+	function developers() {
26 26
 		$this->layout = 'winners';
27 27
 	}
28 28
 
29
-	function cases(){
29
+	function cases() {
30 30
 		$this->layout = 'winners';
31 31
 	}
32 32
 
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 		$dados = $this->request->data('dados');
41 41
 
42 42
 		// Check for empty fields
43
-		if(empty($dados['name'])  		||
44
-   			empty($dados['email']) 		||
45
-   			empty($dados['message'])	||
46
-   			!filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) {
43
+		if (empty($dados['name']) ||
44
+   			empty($dados['email']) ||
45
+   			empty($dados['message']) ||
46
+   			! filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) {
47 47
 				$this->Session->setFlash('Você deve preencher todos os dados!');
48 48
 	            return $this->redirect('/');
49 49
 		}	
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		$email_body = "Mensagem site: ".$message;
59 59
 		$headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected].
60 60
 		$headers .= "Reply-To: $email_address";	
61
-		mail($to,$email_subject,$email_body,$headers);
61
+		mail($to, $email_subject, $email_body, $headers);
62 62
 		//resposta automatica ao cliente
63 63
 		$to = $email_address;
64 64
 		$email_subject = '[email protected]';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		$headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected].
67 67
 		$headers .= "Reply-To: $email_address";	
68 68
 
69
-		mail($to,$email_subject,$email_body,$headers);
69
+		mail($to, $email_subject, $email_body, $headers);
70 70
 
71 71
 		$this->Session->setFlash('O e-mail foi enviado em breve entraremos em contato!');
72 72
 
Please login to merge, or discard this patch.
app/Config/routes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		Router::connect('/', array('controller' => $dominio['controller'], 'action' => $dominio['funcao']));
39 39
 	}
40 40
 
41
-	$caminho = APP . 'Config/routesshop.php';
41
+	$caminho = APP.'Config/routesshop.php';
42 42
 	
43 43
 	Router::connect('/servicos', array('controller' => 'home', 'action', 'servicos'));
44 44
 	Router::connect('/linha-do-tempo-winners-opensource', array('controller' => 'home', 'action' => 'timeline'));
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
  * Load the CakePHP default routes. Only remove this if you do not want to use
58 58
  * the built-in default routes.
59 59
  */
60
-	require CAKE . 'Config' . DS . 'routes.php';
60
+	require CAKE.'Config'.DS.'routes.php';
61 61
 /**
62 62
  * Função para verificar se o dominio pentece ao site, caso não pertença redireciona ao site correto 
63 63
  */
64 64
 	function verificar_dominio() {
65
-		$dominiosWinners = array (
65
+		$dominiosWinners = array(
66 66
 			'winners.local',
67 67
 			'blog.winnersdesenvolvimento.com.br',
68 68
 			'ciawn.com.br',
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 			exit();
96 96
 		}
97 97
 		
98
-		$caminho = APP . 'Config/Domain/' . $varDominio . '.php';
99
-		if (!file_exists($caminho))
98
+		$caminho = APP.'Config/Domain/'.$varDominio.'.php';
99
+		if ( ! file_exists($caminho))
100 100
 		{
101 101
 			$retorno['is_winners'] = true;
102 102
 			return $retorno;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$retorno['is_winners'] = false;
108 108
 		$retorno['id_usuario'] = $dominio['id_usuario'];
109 109
 		$retorno['controller'] = $dominio['controller'];
110
-		$retorno['funcao']	   = $dominio['funcao'];
110
+		$retorno['funcao'] = $dominio['funcao'];
111 111
 
112 112
 		return $retorno;
113 113
 	}
114 114
\ No newline at end of file
Please login to merge, or discard this patch.