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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Remove html" stopProcessing="true"> | |
<match url="(.*).html$" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="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
<?php | |
$meses = array( | |
"Jan" => 1, | |
"Fev" => 1, | |
"Mar" => 3, | |
"Abr" => 4, | |
"Mai" => 5, | |
"Jun" => 6, | |
"Jul" => 7, | |
"Ago" => 8, |
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 | |
// Remove acentos e espaços dos arquivos no upload | |
function custom_sanitize_file_name ( $filename ) { | |
$filename = remove_accents( $filename ); | |
$filename = strtolower( $filename ); | |
$file_parts = pathinfo( $filename ); | |
$new_filename = sanitize_title( $file_parts['filename'] ); | |
if ( ! empty( $file_parts['extension'] ) ) { |
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
-- | |
-- Estrutura da tabela `brands` | |
-- | |
CREATE TABLE `brands` ( | |
`id` int(11) NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`category` varchar(10) NOT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
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
public function calculaTempo($data) | |
{ | |
$mydate = date("Y-m-d H:i:s"); | |
$datetime1 = date_create($data); | |
$datetime2 = date_create($mydate); | |
$interval = date_diff($datetime1, $datetime2); | |
$min = $interval->format('%i'); |
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 limitarTexto($texto, $limite){ | |
$contador = strlen($texto); | |
if ( $contador >= $limite ) { | |
$texto = substr($texto, 0, strrpos(substr($texto, 0, $limite), ' ')) . '...'; | |
return $texto; | |
}else{ | |
return $texto; | |
} |
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 upload_jpg($tmp,$novo_nome,$largura,$pasta){ | |
$img = imagecreatefromjpeg($tmp); | |
$x = imagesx($img); | |
$y = imagesy($img); | |
$altura = ($largura*$y) / $x; | |
$nova_imagem = imagecreatetruecolor($largura,$altura); | |
imagecopyresampled($nova_imagem,$img,0,0,0,0,$largura,$altura,$x,$y); |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"fade_fold_buttons": false, | |
"font_face": "Anonymous Pro", | |
"font_size": 12, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ |
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
<select name="estados-brasil"> | |
<option value="AC">Acre</option> | |
<option value="AL">Alagoas</option> | |
<option value="AP">Amapá</option> | |
<option value="AM">Amazonas</option> | |
<option value="BA">Bahia</option> | |
<option value="CE">Ceará</option> | |
<option value="DF">Distrito Federal</option> | |
<option value="ES">Espírito Santo</option> | |
<option value="GO">Goiás</option> |
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 | |
$url = 'https://graph.facebook.com/v2.6/me/messenger_profile?access_token=<seu_access_token>'; | |
$ch = curl_init( $url ); | |
$payload = '{"whitelisted_domains":["https://xml_set_unparsed_entity_decl_handler(parser, handler).com.br"]}'; | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload ); | |
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json')); |
NewerOlder