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
$("form").submit(function(e) { | |
e.preventDefault(); | |
var data = $(this).serialize(); | |
var url = $(this).attr("action"); | |
var form = $(this); | |
$.ajax({ | |
type : 'post', |
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
//Load CSS | |
if(device.platform == 'iOS'){ | |
loadCSS('css/css-ios.css'); | |
} | |
/** | |
* Carrega Ficheiro de CSS |
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
using System.IO; | |
using Windows.Networking.Sockets; | |
using Windows.Networking; | |
using Windows.Storage; | |
using System; | |
using Windows.Foundation; | |
using System.Runtime.InteropServices.WindowsRuntime; | |
using System.Threading.Tasks; | |
using System.Net.Sockets; |
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
alert(getDateLogFormat()); | |
/** | |
* Devolve data atual no formato: dd-mm-yyyy hh:mm:ss.nnn | |
* @returns {string} | |
*/ | |
function getDateLogFormat() { | |
var now = new Date(); | |
var dia, mes, ano, horas, minutos, segundos, milisegundos; |
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
/* | |
* https://social.msdn.microsoft.com/Forums/en-US/a038defe-2594-4c1a-85ef-7a98a0a409b2/can-i-call-async-methods-of-winmd-from-javascript?forum=winappswithhtml5 | |
* === NOTAS === | |
* Os nomes dos metodos devem estar em letra minuscula | |
*/ | |
using System.IO; | |
using Windows.Networking.Sockets; | |
using Windows.Networking; | |
using System; |
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
$.ajax({ | |
contentType: 'application/json', | |
data: JSON.stringify({"teste":"valor_teste"}), | |
dataType: 'json', | |
type: 'post', | |
url: '<?php echo base_url('registar/teste_json') ?>', | |
success: function (data) { | |
alert(data.modo); |
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 | |
/** | |
* User: Cláudio Hilário | |
* Date: 25/10/17 | |
* Time: 22:31 | |
*/ | |
class Permissao{ | |
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 | |
/** | |
* LanguageLoader | |
* | |
* Classe responsável por verificar qual o idioma que está a ser utilizado | |
* e carregar os respetivos ficheiros que se encontram em 'application/language' | |
* | |
* @package Hooks | |
* @author Cláudio Hilário <[email protected]> | |
* @link http://www.ontech.pt |
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
/* globals console,document,window,cordova */ | |
document.addEventListener('deviceready', onDeviceReady, false); | |
/** | |
* Objeto de compatibilidade | |
* window.logToFile.info('Olá, entrou!'); | |
*/ | |
var logToFile = { | |
info: function (text, tipo = 'INFO') { | |
window.writeLog(text, tipo); | |
} |
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 uploadImagem($file_input,$caminho){ | |
$CI = & get_instance(); | |
//Preferências do Upload | |
//Destino do ficheiro | |
$config['upload_path'] = './uploads/'.$caminho.'/'; | |
//Tipos de ficheiros suportados. * Todos os ficheiros |