2018-02-20 14:23:00 +01:00
|
|
|
<?php
|
2020-09-07 15:04:06 +02:00
|
|
|
/*
|
|
|
|
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
2021-01-20 15:08:51 +01:00
|
|
|
* Copyright (C) DevCode s.r.l.
|
2020-09-07 15:04:06 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2024-03-05 16:01:45 +01:00
|
|
|
use Models\Module;
|
|
|
|
|
2018-02-20 14:23:00 +01:00
|
|
|
$skip_permissions = true;
|
2018-10-01 18:07:44 +02:00
|
|
|
include_once __DIR__.'/../../core.php';
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2018-03-02 19:36:42 +01:00
|
|
|
$pageTitle = tr('Utente');
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2018-06-26 09:41:43 +02:00
|
|
|
include_once App::filepath('include|custom|', 'top.php');
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2019-07-18 18:33:56 +02:00
|
|
|
if (post('op') == 'self_update') {
|
2018-10-01 18:07:44 +02:00
|
|
|
include_once __DIR__.'/actions.php';
|
2018-03-22 15:35:13 +01:00
|
|
|
}
|
|
|
|
|
2018-02-20 14:23:00 +01:00
|
|
|
$user = Auth::user();
|
2018-09-20 12:05:22 +02:00
|
|
|
$token = auth()->getToken();
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2018-03-02 19:36:42 +01:00
|
|
|
$rs = $dbo->fetchArray('SELECT * FROM an_anagrafiche WHERE idanagrafica = '.prepare($user['idanagrafica']));
|
|
|
|
$anagrafica = [];
|
|
|
|
if (!empty($rs)) {
|
|
|
|
$anagrafica = $rs[0];
|
|
|
|
}
|
|
|
|
|
2020-09-23 13:36:37 +02:00
|
|
|
$api = base_url().'/api/?token='.$token;
|
2024-03-05 16:01:45 +01:00
|
|
|
$module = Module::find((new Module())->getByName('Utenti e permessi')->id_record);
|
2018-03-02 19:36:42 +01:00
|
|
|
|
2018-02-20 14:23:00 +01:00
|
|
|
echo '
|
2019-07-26 11:57:59 +02:00
|
|
|
<div class="box box-widget widget-user">
|
2019-07-30 17:15:38 +02:00
|
|
|
<div class="widget-user-header bg-'.(($theme != 'default') ? $theme : 'primary').'">
|
2019-07-26 11:57:59 +02:00
|
|
|
<h3 class="widget-user-username">'.$user['username'].'</h3>
|
|
|
|
<h5 class="widget-user-desc">'.$user['gruppo'].'</h5>
|
2018-02-20 14:23:00 +01:00
|
|
|
</div>
|
2020-09-07 15:04:06 +02:00
|
|
|
|
2019-07-26 11:57:59 +02:00
|
|
|
<div class="widget-user-image">';
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2019-07-26 11:57:59 +02:00
|
|
|
$user_photo = $user->photo;
|
|
|
|
if ($user_photo) {
|
2018-03-02 19:36:42 +01:00
|
|
|
echo '
|
2019-07-30 16:51:33 +02:00
|
|
|
<img src="'.$user_photo.'" class="img-circle" alt="'.$user['username'].'" />';
|
2019-07-26 11:57:59 +02:00
|
|
|
} else {
|
|
|
|
echo '
|
2023-03-28 00:18:38 +02:00
|
|
|
<i style="color:white;margin-left:5px;" class="fa fa-user-circle-o fa-5x" alt="'.tr('OpenSTAManager').'"></i>';
|
2018-03-02 19:36:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
echo '
|
2019-07-26 11:57:59 +02:00
|
|
|
</div>
|
|
|
|
<div class="box-footer">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4 border-right">
|
|
|
|
<div class="description-block">
|
|
|
|
<h5 class="description-header">'.tr('Anagrafica associata').'</h5>
|
|
|
|
<span class="description-text">'.(!empty($anagrafica) ? $anagrafica['ragione_sociale'] : tr('Nessuna')).'</span>
|
|
|
|
</div>
|
2019-07-25 14:49:24 +02:00
|
|
|
</div>
|
2020-09-07 15:04:06 +02:00
|
|
|
|
2019-07-26 11:57:59 +02:00
|
|
|
<div class="col-sm-4 border-right">
|
|
|
|
<div class="description-block">
|
2020-02-11 11:43:59 +01:00
|
|
|
<a class="btn btn-info btn-block tip '.(($module) ? '' : 'disabled').'" data-href="'.(($module) ? ($module->fileurl('self.php').'?id_module='.$module->id) : '#').'&resource=photo" data-toggle="modal" data-title="'.tr('Cambia foto utente').'">
|
2019-07-26 11:57:59 +02:00
|
|
|
<i class="fa fa-picture-o"></i> '.tr('Cambia foto utente').'
|
|
|
|
</a>
|
|
|
|
</div>
|
2019-07-18 18:33:56 +02:00
|
|
|
</div>
|
2020-09-07 15:04:06 +02:00
|
|
|
|
2019-07-26 11:57:59 +02:00
|
|
|
<div class="col-sm-4 border-right">
|
|
|
|
<div class="description-block">
|
2020-02-11 11:43:59 +01:00
|
|
|
<a class="btn btn-warning btn-block tip '.(($module) ? '' : 'disabled').'" data-href="'.(($module) ? $module->fileurl('self.php').'?id_module='.$module->id : '#').'&resource=password" data-toggle="modal" data-title="'.tr('Cambia password').'">
|
2019-07-26 11:57:59 +02:00
|
|
|
<i class="fa fa-unlock-alt"></i> '.tr('Cambia password').'
|
|
|
|
</a>
|
|
|
|
</div>
|
2019-07-18 18:33:56 +02:00
|
|
|
</div>
|
2019-07-26 11:57:59 +02:00
|
|
|
</div>
|
2018-03-02 19:36:42 +01:00
|
|
|
</div>
|
|
|
|
</div>';
|
|
|
|
|
2018-02-20 14:23:00 +01:00
|
|
|
echo '
|
2018-03-02 19:36:42 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2018-03-02 19:36:42 +01:00
|
|
|
<div class="box box-success">
|
|
|
|
<div class="box-header">
|
|
|
|
<h3 class="box-title">'.tr('API').'</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
2018-03-28 00:53:07 +02:00
|
|
|
<p>'.tr("Puoi utilizzare il token per accedere all'API del gestionale e per visualizzare il calendario su applicazioni esterne").'.</p>
|
2018-03-02 19:36:42 +01:00
|
|
|
|
2018-03-28 00:53:07 +02:00
|
|
|
<p>'.tr('Token personale').': <b>'.$token.'</b></p>
|
2018-03-02 19:36:42 +01:00
|
|
|
<p>'.tr("URL dell'API").': <a href="'.$api.'" target="_blank">'.$api.'</a></p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>';
|
|
|
|
|
|
|
|
$link = $api.'&resource=sync';
|
2018-02-20 14:23:00 +01:00
|
|
|
echo '
|
|
|
|
|
2018-03-02 19:36:42 +01:00
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="box box-info">
|
|
|
|
<div class="box-header">
|
|
|
|
<h3 class="box-title">'.tr('Calendario interventi').'</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
2018-02-20 14:23:00 +01:00
|
|
|
<p>'.tr("Per accedere al calendario eventi attraverso l'API, accedi al seguente link").':</p>
|
|
|
|
<a href="'.$link.'" target="_blank">'.$link.'</a>
|
2018-03-28 00:53:07 +02:00
|
|
|
</div>
|
2018-02-20 14:23:00 +01:00
|
|
|
|
2018-03-28 00:53:07 +02:00
|
|
|
<div class="box-header">
|
|
|
|
<h3 class="box-title">'.tr('Configurazione').'</h3>
|
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
2018-03-02 19:36:42 +01:00
|
|
|
<div>
|
2018-03-03 11:35:25 +01:00
|
|
|
<p>'.tr("Per _ANDROID_, scarica un'applicazione dedicata dal _LINK_", [
|
2018-03-02 19:36:42 +01:00
|
|
|
'_ANDROID_' => '<b>'.tr('Android').'</b>',
|
2018-03-03 11:35:25 +01:00
|
|
|
'_LINK_' => '<a href="https://play.google.com/store/search?q=iCalSync&c=apps" target="_blank">'.tr('Play Store').'</a>',
|
2018-03-02 19:36:42 +01:00
|
|
|
]).'.</p>
|
|
|
|
|
|
|
|
<p>'.tr("Per _APPLE_, puoi configurare un nuovo calendario dall'app standard del calendario", [
|
|
|
|
'_APPLE_' => '<b>'.tr('Apple').'</b>',
|
|
|
|
]).'.</p>
|
|
|
|
|
2018-03-28 00:53:07 +02:00
|
|
|
<p>'.tr('Per _PC_ e altri client di posta, considerare le relative funzionalità o eventuali plugin', [
|
2018-03-02 19:36:42 +01:00
|
|
|
'_PC_' => '<b>'.tr('PC').'</b>',
|
|
|
|
]).'.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-02-20 14:23:00 +01:00
|
|
|
</div>
|
2018-03-02 19:36:42 +01:00
|
|
|
|
2018-02-20 14:23:00 +01:00
|
|
|
</div>';
|
|
|
|
|
2018-06-26 09:41:43 +02:00
|
|
|
include_once App::filepath('include|custom|', 'bottom.php');
|