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 | |
/** | |
* Update the posts widget or portfolio widget query. | |
* | |
* @since 1.0.0 | |
* @param \WP_Query $query The WordPress query instance. | |
*/ | |
function custom_query_callback( $query ) { | |
// Obter a data de início da semana anterior | |
$start_of_last_week = strtotime('last monday', strtotime('-1 week')); |
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
selector { | |
animation: shake-animation 4.72s ease infinite; | |
transform-origin: 50% 50%; | |
display: block; | |
} | |
@keyframes shake-animation { | |
0% { | |
transform: translate(0, 0); | |
} |
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 | |
if (!isset($_GET['ILoveMauticReallyIDo'])) { | |
echo 'The secret phrase is wrong.'; | |
die; | |
} | |
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
$allowedTasks = array( | |
'cache:clear', |
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
function tableFilter(input, tableSelector, index){ | |
// Declare variables | |
var filter, table, tr, td, i; | |
filter = input.value.toUpperCase(); | |
table = document.querySelector(tableSelector); | |
tr = table.getElementsByTagName("tr"); | |
// Loop through all table rows, and hide those who don't match the search query | |
for (i = 0; i < tr.length; i++) { | |
td = tr[i].getElementsByTagName("td")[index]; |
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
<input type="text" onkeyup="tableFilter(this, '#table-categories', 0);" /> | |
<table id="table-categories"> | |
<thead> | |
<tr> | |
<th>Categoria</th> | |
<th>Qntd. de Postagens</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> |
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 | |
require_once "autoload.php"; | |
$sg = new SG(); //Sistemas de Gerenciamento | |
$sg->getRequestsByUser(); | |
// .... |
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 | |
spl_autoload_register(function($class){ | |
if(file_exists(DIR . "/class/$class.php")) | |
require_once DIR . "/class/$class.php"; | |
}); |
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
for(i = 0; i < res.length; i++){ | |
var marker = new google.maps.Marker({ | |
position: {lat: parseFloat(res[i].latHotel), lng: parseFloat(res[i].lngHotel)}, | |
draggable: true, | |
animation: google.maps.Animation.DROP, | |
map: map, | |
icon: image, | |
title: res[i].nameHotel | |
}); | |
google.maps.event.addListener(marker, 'click', function(){ |
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 | |
require_once("DB.class.php"); | |
class Commerce extends DB{ | |
public $ip; | |
public function getCommerceList($lat, $lng, $ct = null){ | |
if(!empty($ct)): | |
$ct = strip_tags(addslashes($ct)); |
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 | |
require_once("class/Upload.class.php"); | |
#Instanciamos a classe Upload: | |
$Upin = new Upload; | |
$Upin->get( | |
"imagens/", //Pasta de uploads (previamente criada) | |
$_FILES["photos"]["name"], //Pega o nome dos arquivos, altere apenas "photos" | |
10, //Tamanho máximo | |
"jpeg,png,jpg,gif", //Extensões permitidas |
NewerOlder