Formattazione codice
This commit is contained in:
parent
47801bf4f8
commit
71b1f91005
|
@ -28,7 +28,8 @@ $microsoft = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$microsoft = $dbo->selectOne('zz_oauth2', '*', ['nome' => 'Microsoft', 'enabled' => 1, 'is_login' => 1]);
|
$microsoft = $dbo->selectOne('zz_oauth2', '*', ['nome' => 'Microsoft', 'enabled' => 1, 'is_login' => 1]);
|
||||||
} catch (Exception $e) {}
|
} catch (Exception $e) {
|
||||||
|
}
|
||||||
|
|
||||||
// LOGIN
|
// LOGIN
|
||||||
switch ($op) {
|
switch ($op) {
|
||||||
|
|
|
@ -66,6 +66,7 @@ function settings_diff($expected, $current)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $difference;
|
return $difference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +223,6 @@ if (!empty($results) || !empty($results_settings) || !empty($results_settings_ad
|
||||||
</table>';
|
</table>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($results_settings)) {
|
if (!empty($results_settings)) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Microsoft extends Azure implements ProviderInterface
|
||||||
'https://outlook.office.com/SMTP.Send',
|
'https://outlook.office.com/SMTP.Send',
|
||||||
// 'https://outlook.office.com/IMAP.AccessAsUser.All'
|
// 'https://outlook.office.com/IMAP.AccessAsUser.All'
|
||||||
],
|
],
|
||||||
'accessType' => 'offline'
|
'accessType' => 'offline',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(array $options = [], array $collaborators = [])
|
public function __construct(array $options = [], array $collaborators = [])
|
||||||
|
|
|
@ -9,7 +9,6 @@ class MicrosoftLogin extends Azure implements ProviderInterface
|
||||||
/**
|
/**
|
||||||
* Impostazioni native per la connessione.
|
* Impostazioni native per la connessione.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @var \string[][]
|
* @var \string[][]
|
||||||
*/
|
*/
|
||||||
protected static $options = [
|
protected static $options = [
|
||||||
|
|
|
@ -28,7 +28,7 @@ $richiesta = filter('richiesta');
|
||||||
$descrizione = filter('descrizione');
|
$descrizione = filter('descrizione');
|
||||||
$id_tipo = filter('id_tipo');
|
$id_tipo = filter('id_tipo');
|
||||||
|
|
||||||
$origine_dashboard = get('ref') == "dashboard" ? true : false;
|
$origine_dashboard = get('ref') == 'dashboard' ? true : false;
|
||||||
$module_anagrafiche = Modules::get('Anagrafiche');
|
$module_anagrafiche = Modules::get('Anagrafiche');
|
||||||
$id_plugin_sedi = Plugins::get('Sedi')['id'];
|
$id_plugin_sedi = Plugins::get('Sedi')['id'];
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ if (!empty($sessioni)) {
|
||||||
|
|
||||||
// ORE
|
// ORE
|
||||||
echo '
|
echo '
|
||||||
<td style="border-right:1px solid #aaa;">'.(((\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->eq(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine']))) || (\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->gt(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine'])))) ? '<i title="'.tr('Questa sessione non ha una durata valida.').'" class="fa fa-warning tip text-warning"></i>' : '').'
|
<td style="border-right:1px solid #aaa;">'.((Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->eq(Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine'])) || Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->gt(Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine']))) ? '<i title="'.tr('Questa sessione non ha una durata valida.').'" class="fa fa-warning tip text-warning"></i>' : '').'
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right:1px solid #aaa;">
|
<td style="border-right:1px solid #aaa;">
|
||||||
{[ "type": "number", "name": "ore_'.$sessione['id'].'", "required": 1, "value": "'.numberFormat($ore, 'qta').'", "disabled": "1" ]}
|
{[ "type": "number", "name": "ore_'.$sessione['id'].'", "required": 1, "value": "'.numberFormat($ore, 'qta').'", "disabled": "1" ]}
|
||||||
|
|
|
@ -21,7 +21,6 @@ use Models\OAuth2;
|
||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
|
||||||
if (isset($id_record)) {
|
if (isset($id_record)) {
|
||||||
$record = $dbo->fetchOne('SELECT * FROM `zz_oauth2` WHERE id='.prepare($id_record));
|
$record = $dbo->fetchOne('SELECT * FROM `zz_oauth2` WHERE id='.prepare($id_record));
|
||||||
$oauth2 = OAuth2::find($id_record);
|
$oauth2 = OAuth2::find($id_record);
|
||||||
|
|
|
@ -394,7 +394,7 @@ switch (filter('op')) {
|
||||||
|
|
||||||
// Formattazione dei contenuti dello storico
|
// Formattazione dei contenuti dello storico
|
||||||
foreach ($history as $key => $value) {
|
foreach ($history as $key => $value) {
|
||||||
$history[$key]['size'] = (($history[$key]['size']) ? Filesystem::formatBytes($value['size']) : '-');
|
$history[$key]['size'] = (($history[$key]['size']) ? FileSystem::formatBytes($value['size']) : '-');
|
||||||
// $history[$key]['invoices_size'] = Filesystem::formatBytes($value['invoices_size']);
|
// $history[$key]['invoices_size'] = Filesystem::formatBytes($value['invoices_size']);
|
||||||
// $history[$key]['notifies_size'] = Filesystem::formatBytes($value['notifies_size']);
|
// $history[$key]['notifies_size'] = Filesystem::formatBytes($value['notifies_size']);
|
||||||
}
|
}
|
||||||
|
@ -408,8 +408,8 @@ switch (filter('op')) {
|
||||||
'maxNumber' => $max_number,
|
'maxNumber' => $max_number,
|
||||||
'avviso_numero' => $avviso_numero,
|
'avviso_numero' => $avviso_numero,
|
||||||
'avviso_spazio' => $avviso_spazio,
|
'avviso_spazio' => $avviso_spazio,
|
||||||
'spazio_totale' => Filesystem::formatBytes($spazio_totale),
|
'spazio_totale' => FileSystem::formatBytes($spazio_totale),
|
||||||
'spazio_occupato' => Filesystem::formatBytes($informazioni['size']),
|
'spazio_occupato' => FileSystem::formatBytes($informazioni['size']),
|
||||||
|
|
||||||
'history' => $history,
|
'history' => $history,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -26,14 +26,12 @@ $id_utente = filter('id_utente');
|
||||||
switch (filter('op')) {
|
switch (filter('op')) {
|
||||||
// Aggiunta nuovo gruppo
|
// Aggiunta nuovo gruppo
|
||||||
case 'add':
|
case 'add':
|
||||||
|
|
||||||
$nome = filter('nome');
|
$nome = filter('nome');
|
||||||
$id_module_start = filter('id_module_start') ?: null;
|
$id_module_start = filter('id_module_start') ?: null;
|
||||||
$theme = filter('theme') ?: null;
|
$theme = filter('theme') ?: null;
|
||||||
|
|
||||||
// Verifico che questo nome gruppo non sia già stato usato
|
// Verifico che questo nome gruppo non sia già stato usato
|
||||||
if ($dbo->fetchNum('SELECT nome FROM zz_groups WHERE nome='.prepare($nome)) == 0) {
|
if ($dbo->fetchNum('SELECT nome FROM zz_groups WHERE nome='.prepare($nome)) == 0) {
|
||||||
|
|
||||||
$dbo->insert('zz_groups', [
|
$dbo->insert('zz_groups', [
|
||||||
'nome' => $nome,
|
'nome' => $nome,
|
||||||
'id_module_start' => $id_module_start,
|
'id_module_start' => $id_module_start,
|
||||||
|
|
|
@ -68,7 +68,6 @@ if (empty($_GET['error'])) {
|
||||||
redirect($redirect);
|
redirect($redirect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
echo strip_tags($_GET['error']).'<br>'.strip_tags($_GET['error_description']).'
|
echo strip_tags($_GET['error']).'<br>'.strip_tags($_GET['error_description']).'
|
||||||
|
|
|
@ -21,7 +21,6 @@ namespace Plugins\ExportFE;
|
||||||
|
|
||||||
use FluidXml\FluidXml;
|
use FluidXml\FluidXml;
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
use Modules;
|
|
||||||
use Modules\Anagrafiche\Anagrafica;
|
use Modules\Anagrafiche\Anagrafica;
|
||||||
use Modules\Anagrafiche\Sede;
|
use Modules\Anagrafiche\Sede;
|
||||||
use Modules\Banche\Banca;
|
use Modules\Banche\Banca;
|
||||||
|
@ -43,7 +42,7 @@ class FatturaElettronica
|
||||||
/** @var Anagrafica Informazioni sull'anagrafica Cliente del documento */
|
/** @var Anagrafica Informazioni sull'anagrafica Cliente del documento */
|
||||||
protected $cliente = [];
|
protected $cliente = [];
|
||||||
|
|
||||||
/** @var Modules\Fatture\Fattura Informazioni sul documento */
|
/** @var Fattura Informazioni sul documento */
|
||||||
protected $documento;
|
protected $documento;
|
||||||
|
|
||||||
/** @var Validator Oggetto dedicato alla validazione dell'XML */
|
/** @var Validator Oggetto dedicato alla validazione dell'XML */
|
||||||
|
@ -314,7 +313,7 @@ class FatturaElettronica
|
||||||
]));
|
]));
|
||||||
|
|
||||||
// Aggiornamento effettivo
|
// Aggiornamento effettivo
|
||||||
database()->update('co_documenti', [
|
$result=database()->update('co_documenti', [
|
||||||
'progressivo_invio' => $this->getDocumento()['progressivo_invio'],
|
'progressivo_invio' => $this->getDocumento()['progressivo_invio'],
|
||||||
'codice_stato_fe' => 'GEN',
|
'codice_stato_fe' => 'GEN',
|
||||||
'id_ricevuta_principale' => null,
|
'id_ricevuta_principale' => null,
|
||||||
|
|
|
@ -126,8 +126,8 @@ class FieldManager implements ManagerInterface
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getValue($options, $name)
|
||||||
public function getValue($options, $name) {
|
{
|
||||||
$database = database();
|
$database = database();
|
||||||
|
|
||||||
$query = 'SELECT `zz_fields`.*'.(isset($options['id_record']) ? ', `zz_field_record`.`value`' : '').' FROM `zz_fields`';
|
$query = 'SELECT `zz_fields`.*'.(isset($options['id_record']) ? ', `zz_field_record`.`value`' : '').' FROM `zz_fields`';
|
||||||
|
@ -156,4 +156,3 @@ class FieldManager implements ManagerInterface
|
||||||
return $results[0]['value'];
|
return $results[0]['value'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class OAuth2 extends Model
|
||||||
$config = $this->config ?? [];
|
$config = $this->config ?? [];
|
||||||
$config = array_merge($config, [
|
$config = array_merge($config, [
|
||||||
'clientId' => $this->client_id,
|
'clientId' => $this->client_id,
|
||||||
'clientSecret' => $this->client_secret
|
'clientSecret' => $this->client_secret,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$class = $this->class;
|
$class = $this->class;
|
||||||
|
|
Loading…
Reference in New Issue