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 | |
| // This can be found in the Symfony\Component\HttpFoundation\Response class | |
| const HTTP_CONTINUE = 100; | |
| const HTTP_SWITCHING_PROTOCOLS = 101; | |
| const HTTP_PROCESSING = 102; // RFC2518 | |
| const HTTP_OK = 200; | |
| const HTTP_CREATED = 201; | |
| const HTTP_ACCEPTED = 202; |
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 | |
| public function getPagseguroStatusAttribute($value) | |
| { | |
| switch ($value) { | |
| case 1: return 'Aguardando pagamento'; | |
| case 2: return 'Em análise'; | |
| case 3: return 'Paga'; | |
| case 4: return 'Disponível'; | |
| case 5: return 'Em disputa'; |
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 | |
| public function setPagseguroStatusAttribute($value) | |
| { | |
| switch ($value) { | |
| case 1: case 'WAITING': $status = 'Aguardando pagamento'; break; | |
| case 2: $status = 'Em análise'; break; | |
| case 3: case 'PAID': $status = 'Paga'; break; | |
| case 4: $status = 'Disponível'; break; | |
| case 5: $status = 'Em disputa'; break; |
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 | |
| function validar_cnpj($cnpj) | |
| { | |
| $cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj); | |
| // Valida tamanho | |
| if (strlen($cnpj) != 14) | |
| return false; |
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
| /** | |
| * Converter estados - (padrão americano sem acentos) - Glauber Funez | |
| **/ | |
| const ConverterEstados = function(val) { | |
| var data; | |
| switch (val.toUpperCase()) { | |
| case "AC" : data = "Acre"; break; | |
| case "AL" : data = "Alagoas"; break; | |
| case "AM" : data = "Amazonas"; break; |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <script type="text/javascript" src="jquery-1.7.1.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| $.getJSON('estados_cidades.json', function (data) { |