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
| <?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" => [ |