This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
DirectoryIndex pararaio.php | |
Options All -Indexes | |
#non-www to www | |
RewriteCond %{HTTP_HOST} ^datacoper\.com\.br | |
RewriteRule (.*) http://www.datacoper.com.br/$1 [R=301,L] | |
#RewriteCond %{HTTP_HOST} ^agenciapararaio.com.br$ [NC,OR] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$infos = $this->Page->Galeria->find('all', array( | |
'limit' => 10000, | |
'conditions' => array( | |
"Galeria.status" => 1, | |
), | |
'group by' => 'Galeria.categoria_id', | |
)); | |
$this->set('galerias',$infos); | |
$infos = $this->Page->Categoria->find('all', array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.listaProdutos = {}; | |
$scope.loadData = function(){ | |
$http.get('http://www.cittolinalimentos.com.br/ajax/').success(function(data) { | |
$scope.listaProdutos = data; | |
}); | |
} | |
$scope.loadData(); | |
console.log($scope.listaProdutos); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.factory('Cupons', function($http, $q) { | |
var cupons = []; | |
return { | |
all: function(info) { | |
console.log(deferred); | |
cupons = $http({ | |
url: 'http://ofertasdahora.me/json/cupons/cupons/list', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Router::connect('/ambientes/residencial', array('controller' => 'pages', 'action' => 'tipos')); // aqui queria passar algo como um tipo=1 | |
Router::connect('/ambientes/corporativo', array('controller' => 'pages', 'action' => 'tipos')); // aqui queria passar algo como um tipo=2 | |
Router::connect('/ambientes/*', array('controller' => 'pages', 'action' => 'ambientes')); // aqui ta certo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
class User extends AppModel{ | |
public $name = 'User'; | |
public function beforeSave($options = array()) { | |
if (isset($this->data[$this->alias]['password'])) { | |
$this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']); | |
} | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Tarefa extends AppModel{ | |
public $name = 'Tarefa'; | |
public $belongsTo = array('Cliente','User'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `tarefas` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`titulo` varchar(45) DEFAULT NULL, | |
`data_final` date DEFAULT NULL, | |
`conteudo` text, | |
`cliente_id` int(11) DEFAULT NULL, | |
`created_by_id` int(11) DEFAULT NULL, | |
`user_id` int(11) DEFAULT NULL, | |
`status` int(11) DEFAULT NULL, | |
`created` datetime DEFAULT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Venda extends AppModel{ | |
public $name = 'Venda'; | |
public $belongsTo = array('User','Cliente'); | |
public $hasMany = array('Pedido'); | |
} | |
class Pedido extends AppModel{ | |
public $name = 'Pedido'; | |
public $belongsTo = array('User','Venda','Produto'); |
OlderNewer