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 | |
namespace App\Controllers\Site\Ads; | |
use Silex\Application; | |
use Symfony\Component\HttpFoundation\Request; | |
use Silex\Api\ControllerProviderInterface; | |
class AdsControllerProvider implements ControllerProviderInterface { |
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 | |
/** | |
* Check if a string is a valid based on $formats['input'], then format an output based on $formats['output'] | |
* @author Marcos Freitas | |
* @param string $value The string of the date | |
* @param array $formats The given input and wanted output formats of the date. | |
* @return string|boolean | |
*/ | |
public static function getDate($value, $formats){ |
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
<style> | |
.mf-pagination { | |
display: block; | |
list-style: none; | |
margin: 2em 0 0 0; | |
width: 100%; | |
padding: 1em; | |
text-align: right; | |
font-size: 1.2em; | |
} |
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
# Project'a Structure | |
# localhost/projects/myProject/ | |
# -- .htacess | |
# | -- RewriteEngine On | |
# | -- RewriteBase /projects/myProject/ | |
# | -- DirectoryIndex web/index.php | |
# -- src/ | |
# ----- App/ | |
# -- web/ |
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
// first go to https://www.facebook.com/groups/XXXX/members/ | |
// then paste this in the javascript console | |
// IF YOU WANT NOT TO INSTALL THE FIREBUG EXTENSION, YOU CAN ACTIVATE THE USE OF THE CONSOLE HERE: https://www.facebook.com/selfxss | |
deleteAll = []; | |
deleteAll.elms = []; | |
deleteAll.canClick = function (el) { | |
return (typeof el != 'undefined') && (typeof el.click != 'undefined'); | |
} | |
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 | |
/* | |
Seleciona todos os campos da tabela wp_posts (p.*) e todos os resultados vindos do LEFT OUTER JOIN (R.*). | |
E também mostra a QUANTIDADE de avaliações e a MEDIA vindas dos outros LEFT OUTER JOIN (X e Y). | |
O Primeiro LEFT OUTER JOIN (R) trata a busca pelas categorias de cada produto, | |
os outros JOINS trazem a soma das avaliações e a quantidade de votos, a partir daí a MÉDIA é formada dividindo as soma pela quantidade de votos. | |
*/ | |
SELECT p.*, R.*, X.TAXA AS TAXA, Y.QUANTIDADE AS QUANTIDADE, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Responsive Image</title> | |
</head> | |
<body> | |
<div class="videos"> |
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 | |
header('Content-Type: application/json; charset=utf-8'); | |
error_reporting(true); | |
try{ | |
/** |
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 | |
header('Content-Type: text/html; charset=ISO-8859-1'); | |
//header('Content-Type: application/json; charset=utf-8'); | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
ob_clean(); //apaga o buffer de saída | |
/* Definições */ | |
/*===================================================================== |