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
[ | |
{ | |
"name": "Aruba", | |
"name_pt": "Aruba", | |
"iso": "AW", | |
"cc": "+297" | |
}, | |
{ | |
"name": "Islamic Republic of Afghanistan", | |
"name_pt": "República Islâmica do Afeganistão", |
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
_ _ _ ____ _ _ | |
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| | | |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / | | |
| _ | (_| | (__| < | |_) | (_| | (__| <|_| | |
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_) | |
A DIY Guide for those without the patience to wait for whistleblowers | |
--[ 1 ]-- Introduction |
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
-- DICOFRE SQLite 3 dump | |
DROP VIEW IF EXISTS "CO"; | |
CREATE TABLE "CO" ("CONCELHO" text, "DICOFRE_CO" ); | |
DROP VIEW IF EXISTS "COFRE"; | |
CREATE TABLE "COFRE" ("CONCELHO" text, "FREGUESIA" text, "DICOFRE_CO" , "DICOFRE_FRE" ); | |
DROP VIEW IF EXISTS "DI"; | |
CREATE TABLE "DI" ("DISTRITO" text, "DICOFRE_DI" ); |
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 Nif{ | |
function calcularNif($string_nif){ | |
if(strlen($string_nif)==9){ | |
$nif_temp=str_split($string_nif); | |
//print_r($nif_temp); | |
//echo "<br>"; | |
$contador=9; | |
$soma_controlo=0; |
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 arrayToXML($array, SimpleXMLElement $xml, $child_name) | |
{ | |
foreach ($array as $k => $v) { | |
if(is_array($v)) { | |
(is_int($k)) ? arrayToXML($v, $xml->addChild($child_name), $v) : $this->arrayToXML($v, $xml->addChild(strtolower($k)), $child_name); | |
} else { | |
(is_int($k)) ? $xml->addChild($child_name, $v) : $xml->addChild(strtolower($k), $v); | |
} | |
} |
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 sqlite($method, $cmd) | |
{ | |
global $database, $values; | |
try { | |
if (!file_exists($database)){throw new PDOException("database not found");} | |
$db = new PDO("sqlite:$database"); | |
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$db->exec("PRAGMA journal_mode = wal;"); |
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 | |
$mobile_token = "o.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
$mobile_iden = "xxxxxxxxxxxxxxxxxxxxxxx"; | |
function sendSMS($to, $message) | |
{ | |
global $mobile_iden, $mobile_token; | |
$to = "+351" . $to; | |
$data = [ | |
"data" => [ |