This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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] |
NewerOlder