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
$db = JFactory::getDbo(); | |
$query = $db->getQuery(true); | |
$query->select($db->quoteName(array('id', 'name', 'cep', 'associacao_associado','cpf','cnpj','endereco','celular'))); | |
$query->from($db->quoteName('vjboleto')); | |
$query->where($db->quoteName('id') . ' = '.$db->quote($user->id)); | |
$query->order('id ASC'); | |
$db->setQuery($query); | |
$row = $db->loadRow(); | |
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
Demanda : | |
Criar uma listview no seblod que mostrasse apenas usuarios que pertencam um grupo especifico de usuarios no joomla. | |
No meu sistema , eu precisava mostrar somente na list os usuarios em dia.Estes usuarios, quando em dia faziam parte do grupo chamado "Associacoes Adiplentes" cujo Group_id é 118. Toda vez que um usuario comecava a participar deste grupo, um novo registro na tabela user_usergroup_map_BDEL era atualizado. | |
Desta forma, criei um campo na tabela users chamado "em_dia" e fiz uma trigger na tabela user_usergroup_map que validava esta a inclusao de usuarios no grupo 118 e retornava esta validacao para a tabela users. | |
Codigo | |
1) Alterar a tabela users criando a coluna "em_dia" |
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
1) gift/tmpl/added_items.php | |
Mudanca para aparecer o botão somente para um grupo de usuários | |
<?php | |
$user = JFactory::getUser(); | |
$groups = JUserHelper::getUserGroups($user->id); | |
if(!in_array('64', $groups)) | |
{ |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; This file controls many aspects of PHP's behavior. In order for PHP to | |
; read it, it must be named 'php.ini'. PHP looks for it in the current | |
; working directory, in the path designated by the environment variable | |
; PHPRC, and in the path that was defined in compile time (in that order). | |
; Under Windows, the compile-time path is the Windows directory. The |
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 | |
/** | |
* @package Joomla.Administrator | |
* | |
* @copyright Copyright (C) 2016 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
/** | |
* Define the application's minimum supported PHP version as a constant so it can be referenced within the application. |
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
window.onload = function() { | |
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('sw.js').then(function() { | |
console.log('Service Worker Registered'); | |
}); | |
} | |
let deferredPrompt; | |
const addBtn = document.querySelector('#enable-banner-install'); | |
window.addEventListener('beforeinstallprompt', (e) => { |
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 echo JHtml::_('content.prepare', '{loadposition home-banner}'); ?> | |
<?php $document = &JFactory::getDocument(); | |
$renderer = $document->loadRenderer('modules'); | |
$position = 'home-banner'; | |
$options = array('style' => 'raw'); | |
echo $renderer->render($position, $options, null); |
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
while (true) { | |
const password = gets(); | |
if (password.length === 0) { | |
break; | |
} | |
checaSenha(password); | |
} |
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
4/5 | |
let n = gets() | |
for (let i = 0; i < n; i++) { | |
let t = gets(); | |
let jogoArray = t.split(' '); | |
let [fernanda, marcia] = jogoArray; |
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
const listagem = new mongoose.Schema({ | |
nome: { type: String, required: [true, 'Nome'] }, | |
//lista:[{nome:String, sobrenome: String, numeroSerial: Number}], | |
lista:{type : Array,validate: v => Array.isArray(v) && v.length > 0}, | |
}); | |
const listagemModel = mongoose.model('listagem', listagem); | |