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
$.jMaskGlobals = { | |
maskElements: 'input,td,span,div', | |
dataMaskAttr: '*[data-mask]', | |
dataMask: true, | |
watchInterval: 300, | |
watchInputs: true, | |
watchDataMask: false, | |
byPassKeys: [9, 16, 17, 18, 36, 37, 38, 39, 40, 91], | |
translation: { | |
'0': {pattern: /\d/}, |
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 | |
'components'=>[ | |
'response' => [ | |
'format' => \yii\web\Response::FORMAT_JSON, | |
'on beforeSend' => function ($event) { | |
$response = $event->sender; | |
$response = $event->sender; | |
if ($response->data !== null) { | |
$data = ['success' => $response->isSuccessful]; | |
$rawdata = $response->data; |
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
<script type="text/javascript"> | |
$('form').submit(function () { | |
$('form button').attr("disabled", "disabled"); | |
$('#loading').fadeIn(); | |
$('#msj').html(''); | |
$.post('<?php echo Flight::base_url('contacto'); ?>', $('form').serializeArray(), function (d) { | |
$('#loading').fadeOut(); | |
$('form button').removeAttr('disabled'); | |
$('#msj').html(d.msj); | |
$('html, body').animate({scrollTop: $("#msj").offset().top}, 500); |
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 | |
//Directorio | |
$dir = getcwd(); | |
$directorio = opendir($dir); | |
$archivos = array(); | |
$carpetas = array(); | |
//Carpetas y Archivos a excluir | |
$excluir = array('.', '..', 'index.php', 'favicon.ico','folder.png','file.png','.dropbox.cache','.dropbox'); |
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
<h1><?php echo $text; ?></h1> |
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 | |
// reCAPTCHA | |
// https://www.google.com/recaptcha/intro/index.html | |
if (isset($_POST['g-recaptcha-response']) && filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) { | |
$captcha = json_decode(file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=your_secret_key&response=' . $_POST['g-recaptcha-response'] . '&remoteip=' . $_SERVER['REMOTE_ADDR']), TRUE); | |
if (isset($captcha['success']) && $captcha['success'] === TRUE) { | |
//Captcha OK | |
} else { | |
//Captcha Error |