Add "Identificativo DB" field to Log Licenze functionality

Added support for the "Identificativo DB" field across Log Licenze views, controller actions, and database operations. Updated UI elements, including table headers, rows, and search filters, to display and manage the new field.
This commit is contained in:
2026-04-23 08:55:44 +02:00
parent 29a9c5116f
commit 21bf9acf48
5 changed files with 60 additions and 5 deletions
@@ -91,7 +91,8 @@ class Admin_IndexController extends App_Controller_Sections_Section
$this->render('dashboard');
}
public function infoAction(){
public function infoAction()
{
$this->_helper->getHelper('layout')->disableLayout();
$this->_helper->viewRenderer->setNoRender();
@@ -208,6 +209,54 @@ class Admin_IndexController extends App_Controller_Sections_Section
}
}
public function testrootAction()
{
$this->getHelper('layout')->disableLayout();
$this->getHelper('viewRenderer')->setNoRender();
$userHostAdapter = new Zend_Db_Adapter_Pdo_Mysql([
'host' => '127.0.0.1',
'username' => 'root',
'password' => 'Adriatica108-110@',
'dbname' => 'gestionespiaggia_test',
'charset' => 'utf8'
]);
try {
// $res = $userHostAdapter->query("CREATE DATABASE IF NOT EXISTS gestionespiaggia_test")->fetch();
// $res = $userHostAdapter->query("GRANT ALL PRIVILEGES ON `gestionespiaggia\_test`.* TO `gestionespiaggia`@`localhost`")->fetch();
// $res = $userHostAdapter->query("SELECT user, host FROM mysql.user;")->fetchAll();
// $res = $userHostAdapter->query("SHOW DATABASES;")->fetchAll();
// $res = $userHostAdapter->query("SHOW GRANTS FOR 'gestionespiaggia'@'localhost';")->fetchAll();
/*$res = $userHostAdapter->query("SELECT
schema_name AS database_name,
default_character_set_name AS charset,
default_collation_name AS collation
FROM information_schema.schemata;")->fetchAll();*/
/*$res = $userHostAdapter->query("SELECT
user,
host,
Super_priv,
Create_priv,
Drop_priv,
Grant_priv,
Select_priv,
Insert_priv,
Update_priv,
Delete_priv
FROM mysql.user;")->fetchAll();*/
echo "<pre>" . print_r($res, true) . "</pre>";
} catch (Exception $e) {
echo "<pre>" . print_r($e, true) . "</pre>";
}
}
private function checkNullValue($value)
{
return (!$value || strtolower($value) === 'null') ? null : $value;
@@ -20,9 +20,9 @@
</div>
<div class="col-12 col-md-2 no-padding-r-l-sm">
<input type="text" id="Descrizione_search" name="Descrizione" value="<?= $this->search_params['Descrizione']; ?>"
class="form-control no-border-right-sm" placeholder="Descrizione"/>
<input type="hidden" id="Descrizione_search" name="DescrizioneOP" value="LIKE">
<input type="text" id="IdentificativoDB_search" name="IdentificativoDB" value="<?= $this->search_params['IdentificativoDB']; ?>"
class="form-control no-border-right-sm" placeholder="Identificativo DB"/>
<input type="hidden" id="IdentificativoDB_search" name="IdentificativoDBOP" value="LIKE">
</div>
<div class="col-12 col-md-2 no-padding-r-l-sm">
@@ -26,6 +26,10 @@
<?= $this->IdentificativoPC; ?>
</td>
<td>
<?= $this->IdentificativoDB; ?>
</td>
<!--<td>
<div class="text-center">
<button id="edit" class="btn btn-sm btn-brand btn-flat" type="button" data-toggle="tooltip"
@@ -17,5 +17,6 @@
<th data-ord="PartitaIva" width="130px">Partita Iva</th>
<th data-ord="CodiceFiscale" width="160px">Codice Fiscale</th>
<th data-ord="IdentificativoPC" width="300px">Identificativo PC</th>
<th data-ord="IdentificativoDB" width="300px">Identificativo DB</th>
<!--<th width="100px"></th>-->
</tr>
@@ -43,6 +43,7 @@ class V1_LicenzeController extends App_Controller_Rest_Controller
$this->_genericModel->insert('LogLicenze', [
'Descrizione' => $op,
'IdentificativoPC' => $data['IdentificativoPC'],
'IdentificativoDB' => $data['IdentificativoDB'],
'PartitaIva' => $data['PartitaIva'],
'CodiceFiscale' => $data['CodiceFiscale']
]);