PHP CRUD Generator - Documentazione

PHPCG è un CRUD Generator sviluppato in PHP puro per creare il tuo completo pannello di amministrazione Bootstrap utilizzando un' interfaccia visiva UI.

PHPCG è adatto sia ai non programmatori che ai programmatori PHP avanzati, che avranno accesso a codice pulito e ben organizzato per poter sfruttare tutto il suo potenziale.

PHPCG è in grado di analizzare il tuo database ed estrarre tabelle, campi e qualsiasi tipo di relazione in modo intelligente.

Il motore CRUD si basa su PHP PDO e supporta pienamente i seguenti Sistemi di Gestione di Database Relazionali (RDBMS):

  • MySQL

    MySQL
  • MariaDB

    MariaDB
  • Oracle

    Oracle
  • Firebird

    Firebird
  • PostgreSQL

    PostgreSQL

Puoi quindi utilizzare i dati del database analizzati per generare il tuo pannello di amministrazione:

  • Elenchi impaginati (CRUD READ)
    • filtraggio dei record, anche con tabelle relazionali interne/esterne
    • ordinamento
    • modifica avanzata in loco (testo, select, booleano, data e ora, ...)
    • tabelle annidate
    • tabelle di dati esterne (relazioni esterne)
    • esportazione nei formati Excel/CSV/PDF/STAMPA
  • Moduli di Creazione e Aggiornamento (CRUD CREATE/UPDATE)
    • moduli creati con PHP Form Builder, noto per la sua robustezza e affidabilità
    • Tutti i tipi di campi
    • Integrazione automatica dei migliori plugin jQuery per migliorare l'esperienza utente (select e radio personalizzati, editor di testo avanzato, uploader di file, selettori, ...)
    • elenchi a discesa con contenuto intelligente e personalizzabile
    • caricamento di file/immagini con ritaglio/ridimensionamento e generazione personalizzabile delle miniature
    • validazione automatica in base al tipo di dati personalizzabili
    • layout efficiente e semplice - Possibilità di raggruppare i campi in 2 e 3 colonne
  • Moduli di eliminazione (CRUD DELETE)
    • Eliminazione a cascata dei record dipendenti
    • Visualizzazione del numero di record dipendenti che verranno eliminati

Consigli rapidi

Ecco un breve video di presentazione che mostra come funziona PHP CRUD Generator da A a Z.

Per creare il tuo database relazionale ti consigliamo di dare un'occhiata a:

Requisiti

Requisiti del server

  • PHP 8.1+ con driver PDO, mb_string e curl estensioni abilitate.
    L'estensione PHP curl deve essere autorizzata a inviare richieste al server di licenza.
  • Server Apache con modulo Rewrite abilitato
    OPPURE
    Server NGINX | Microsoft IIS con regole di riscrittura aggiunte nel tuo file di configurazione
  • Un database MySQL, MariaDB, Oracle, Firebird o PostgreSQL
  • I set di caratteri di PHP e del database devono essere impostati su "utf8" o varianti di utf8 (utf8_general_ci, utf8mb4, ...)

Struttura del database

Denominazione di tabelle e campi

Le tabelle e i campi devono rispettare i seguenti standard:

  • I nomi delle tabelle e dei campi devono contenere solo i seguenti caratteri:
    • Caratteri minuscoli / maiuscoli
    • Underscore
    • Numeri
  • Un nome di tabella o un nome di campo non deve iniziare con un numero.
  • I tipi di campo devono essere impostati correttamente in base ai tipi di dati che contengono.

Ti invitiamo a visitare la pagina Requisiti del database e buone pratiche per maggiori dettagli.

Struttura del Pacchetto

  • your-project-root La root del progetto è la cartella a cui punta l'URL principale
    • admin* Il pannello di amministrazione Bootstrap di destinazione in cui verranno generati i file CRUD
    • class* Classi PHP utilizzabili sia per il tuo sito web sia con il pannello di amministrazione
      • bootstrap Genera navbar, nav e sidebar Bootstrap
      • common Utility varie
      • database* Livello database
        • db-connect.php Impostazioni di connessione PDO — contiene le impostazioni di connessione di un massimo di 2 server, selezionate automaticamente per il server corrente; possono essere sincronizzate tra i server
    • conf* File di configurazione principali
    • generator* Motore del generatore CRUD
      • class Classi principali del generatore
      • database Driver del database e classi di analisi dello schema
      • generator-assets Asset dell'interfaccia del generatore (fogli di stile, JavaScript, immagini)
      • generator-templates Template Twig utilizzati per costruire i file generati
      • inc Include del back-end del generatore e schede di configurazione
      • lib Librerie lato generatore
      • update Auto-updater integrato nell'applicazione — controlla phpcrudgenerator.com per verificare la presenza di nuove versioni
      • generator.php Punto di ingresso principale del generatore CRUD
    • install* Programma di installazione PHPCG — procedura guidata di configurazione una tantum
      • demo-database Database dimostrativi Sakila opzionali (MySQL, PostgreSQL, Oracle, Firebird)
    • lib* Librerie PHP utilizzate dai file generati e dal pannello di amministrazione
    • vendor* File vendor di Composer (motore di template Twig, Monolog, componenti Symfony, ...)

Legenda:

*
Richiesto sul tuo server di produzione

Guida Rapida

Informazioni sul flusso di lavoro locale e di produzione

La cartella "generator" è necessaria solo per creare e modificare il tuo pannello di amministrazione Bootstrap.


  • Se utilizzi un server locale + un server remoto ("server di produzione"):
    Puoi scegliere tra:
    • utilizzare il generatore locale per creare il tuo pannello di amministrazione, poi caricare le cartelle "admin" e "conf" sul tuo server remoto.
    • creare il pannello di amministrazione direttamente dal tuo server di produzione.
    Il secondo metodo è quello consigliato.
  • Se non utilizzi un server locale:
    Carica tutte le cartelle richieste e crea la tua dashboard di amministrazione CRUD direttamente dal generatore remoto.

Ti invitiamo a visitare la pagina tutorial sui server locali/remoti per maggiori informazioni.


Procedura di installazione Apri il Tutorial

  1. 1

    Carica le cartelle richieste* sul tuo server come descritto nella sezione "struttura del pacchetto".

    Se installi PHP CRUD Generator all'interno di una sottocartella

    (in altre parole, se la admin, class, conf, generator, ... le cartelle non si trovano nella radice del tuo progetto),
    devi modificare admin/.htaccess per evitare errori 404:

    1. apri /admin/.htaccess nel tuo editor di codice
    2. aggiungi la tua sottocartella al RewriteRule.
      Ad esempio: RewriteRule . /your-folder/admin/index.php [QSA,L]
  2. 2 Apri il programma di installazione - /install/index.php - nel tuo browser e segui la procedura guidata:
    Il Passo 1 verifica il tuo server (requisiti) e registra la tua licenza; il Passo 2 registra la connessione al tuo database; il Passo 3 imposta le informazioni generali essenziali (nome del progetto, logo, ...).
    Se utilizzi un server locale + un server remoto, devi eseguire il programma di installazione su entrambi.
    Maggiori informazioni disponibili nel Installazione/Registrazione sezione
  3. 3 Tutto è ora pronto per generare il tuo pannello di amministrazione utilizzando il CRUD Generator.
    Apri il generatore - /generator/generator.php - nel tuo browser.

Installazione/Registrazione

Se utilizzi un server locale + un server remoto, devi eseguire il programma di installazione su entrambi: ciascun server registra le proprie impostazioni di connessione e la propria attivazione della licenza.

Cosa fa il programma di installazione?

Il programma di installazione:

  • Verifica la compatibilità del tuo server (versione PHP, moduli disponibili, diritti di scrittura, ...)
  • Controlla e registra la tua licenza
  • Registra le credenziali di connessione al database per il server corrente in class/database/db-connect.php
  • Imposta le informazioni generali essenziali (nome del progetto, logo, ...)

Un file di connessione, fino a due server

class/database/db-connect.php contiene le impostazioni di connessione di fino a 2 server diversi (ad esempio il tuo server di sviluppo locale e il tuo server di produzione). Il programma calcola un fingerprint del server dall'hostname della macchina e dal percorso di installazione, e utilizza automaticamente le impostazioni registrate per il server su cui è in esecuzione.
Questo file può quindi essere sincronizzato tra i tuoi server senza rischi.

Non esiste nessun fallback: se il server corrente non ha una connessione registrata (installazione spostata, cartella rinominata, container ricostruito, nuovo deployment, ...), l'applicazione si ferma su una schermata Connessione al database richiesta che rimanda al programma di installazione. Eseguendo il programma di installazione su quel server, le impostazioni esistenti vengono precompilate e il server corrente viene registrato - nulla viene eliminato.

Se riscontri un errore

Come per qualsiasi programma PHP, potresti incontrare problemi durante l'installazione o l'avvio iniziale.
Questo non significa che il programma sia difettoso, ma piuttosto che devi configurare correttamente il tuo server per utilizzarlo.

Se dovesse accadere:

  1. Innanzitutto, verifica che il tuo server soddisfi i requisiti (versione PHP, rewriting abilitato, ...)
  2. Tutti i errori comuni e le relative soluzioni sono spiegati nel Centro Assistenza.

Se hai ancora bisogno di aiuto, ti preghiamo di leggere queste raccomandazioni quindi contattarci.

Se stai cercando soluzioni a domande specifiche:

La pagina dei tutorial offre molte guide passo-passo, scritte o in video, che rispondono alle situazioni più comuni, ad esempio:

Configurazione

Configurazione CORE

Non modificare nulla qui se non sai cosa stai facendo.

Configurazione USER (Impostazioni generali)

Questo file contiene alcune impostazioni globali che possono essere personalizzate

Per modificare queste impostazioni, apri il Generator nel tuo browser e fai clic sulla Configurazione scheda.

Progetto

Nome del sito web
Il nome del tuo progetto visualizzato nell'intestazione della dashboard di amministrazione.
Logo admin
Il logo del tuo progetto visualizzato nell'intestazione della dashboard di amministrazione.

Sicurezza

Blocca il Generator
Consente di bloccare/sbloccare l'accesso al generator.
Se il generator è bloccato, l'accesso è protetto da una pagina di identificazione. Dovrai inserire la tua email e la tua chiave di licenza per accedervi.

Licenza

Stato della licenza
Scheda di sola lettura che mostra lo stato della tua licenza: un badge di attivazione (Attivata con data, oppure Non attivata), la tua chiave di licenza mascherata, l'email di registrazione, il dominio con licenza e un collegamento al tuo portale clienti Polar per gestire le attivazioni. La scheda legge soltanto il record di licenza locale: l'attivazione e l'auto-ripristino sono gestiti da install/do-install.php.

Debug

Abilita il debug
Scegli "Sì" per visualizzare i dettagli quando una query al database incontra un errore, oltre ai messaggi di eccezione e alle informazioni estese sull'errore.
Simula ed esegui il debug
Se abilitato, tutte le query di insert/update/delete saranno simulate (NON eseguite) e i dettagli di tutte le query al database verranno visualizzati sullo schermo.

Monitoraggio degli errori PHP

Abilita il monitoraggio degli ERRORI PHP
scegli "Sì" per abilitare il monitoraggio degli errori PHP e ricevere un'email ogni volta che si verifica un errore nel pannello di amministrazione.
LIVELLO DI ERRORE
Sono disponibili 3 livelli di errore: NOTICE + WARNING + FATAL|UNKNOWN ERROR, WARNING + FATAL|UNKNOWN ERROR, FATAL|UNKNOWN ERROR.
Email
L'indirizzo (o gli indirizzi) email a cui desideri che gli errori vengano inviati.

Stili

Tema Bootstrap
Seleziona uno dei numerosi temi disponibili nell'elenco a discesa.
Stile della navbar
Stile del menu di navigazione superiore della dashboard di amministrazione.
Stile della sidebar
Stile della barra laterale della dashboard di amministrazione.
Classe CSS delle colonne filtrate
Nella dashboard di amministrazione, le colonne filtrate sono contrassegnate con uno stile specifico di tua scelta. Qui puoi inserire una classe CSS Bootstrap e regolare l'opacità. Per esempio: bg-danger bg-opacity-10
Stile dei selettori di data e ora
Stile dei selettori di data e ora ("Default" o "Material Design").
Classe predefinita dei pulsanti
Classe CSS Bootstrap per i pulsanti secondari del pannello di amministrazione. Per esempio: text-bg-light
Sfondo predefinito delle intestazioni di tabella
Classe CSS Bootstrap per le intestazioni di tabella del pannello di amministrazione. Per esempio: text-bg-dark

Interfaccia utente (UI)

Posizione dei pulsanti AZIONE nell'area di amministrazione
Scegli se desideri visualizzare i pulsanti di modifica dei record (visualizza/modifica/elimina) a sinistra o a destra negli elenchi READ dell'area di amministrazione.
Abilita la possibilità di modificare gli stili dalla dashboard di amministrazione
Se attivato, ogni utente può scegliere i colori del proprio tema e della barra di navigazione. Le sue preferenze vengono memorizzate nel browser e non influiscono sugli altri utenti.
Attiva i filtri
Quando un utente del pannello di amministrazione imposta un filtro, il filtro può essere applicato immediatamente oppure dopo un clic sul pulsante "filtro", come preferisci.
Comprimi le categorie inattive della barra laterale
Scegli se desideri che la barra laterale di amministrazione si comporti come un menu a fisarmonica o se più categorie possano rimanere aperte contemporaneamente.
Visualizzazione delle tabelle di dati
Scegli se desideri visualizzare i dati della tabella nella parte visibile della pagina con una barra di scorrimento interna, oppure in una tabella di altezza illimitata utilizzando la barra di scorrimento del browser.
Mostra i risultati della ricerca
Mostra i risultati della ricerca tutti sulla stessa pagina oppure utilizzando risultati paginati.
Vincolo sulla password per i nuovi account utente
Scegli il livello di sicurezza minimo per le password degli utenti amministratori.

Impostazioni della lingua

Lingua
La lingua principale della dashboard di amministrazione.
Traduzione di data/ora per gli elenchi di amministrazione
Imposta il PHP Locale::setDefault per tradurre automaticamente le date PHP
Fuso orario
Il tuo fuso orario
Lingua dei selettori di data e ora
Le lingue disponibili si trovano in class/phpformbuilder/plugins/pickadate/lib/compressed/translations/
Lingua della validazione live (JavaScript) dei moduli
Le lingue disponibili si trovano in class/phpformbuilder/plugins/formvalidation/js/locales
Lingua della validazione lato server (PHP) dei moduli
Consulta la documentazione di PHP Form Builder qui: https://www.phpformbuilder.pro/documentation/class-doc.php#php-validation-multilanguage

Generatore CRUD

Proteggi l'accesso al Generator con una pagina di login

Per proteggere l'accesso al Generator:

  1. Apri il Generator - generator/generator.php - nel tuo browser
  2. Apri la Configurazione scheda
  3. Imposta Lock the Generator a Sì
  4. Fatto - quando apri generator/generator.php nel tuo browser. Verrai reindirizzato alla pagina di login.
    Inserisci la tua email di registrazione e la tua chiave di licenza per effettuare l'accesso.

Pannello Principale

Quando apri il CRUD Generator, l'applicazione ti dà accesso a tutte le sue funzionalità principali.

Scegli la tabella che desideri configurare, quindi fai clic su uno dei tre pulsanti disponibili per creare o modificare l' elenco di lettura, creazione/aggiornamento dei moduli oppure eliminazione del modulo per la tabella scelta.

La pagina principale dell'applicazione consente inoltre di accedere all'installazione del modulo di autenticazione, allo strumento di confronto/unione dei file,, allo all'organizzazione della barra di navigazione di amministrazione e alla configurazione globale.

PHP CRUD Generator Main screen

Filtri degli elenchi

Add Filter

Fai clic sul pulsante "Aggiungi filtro" nel modulo del generatore di elenchi di lettura per aggiungere un nuovo filtro.

Verrà aggiunto un nuovo filtro al tuo elenco.

PHPCG ti offre due tipi di filtri:

Filtri semplici

Ti basta scegliere il campo da filtrare nell'elenco a discesa.

Filtri avanzati

I filtri avanzati sono utili:

  • se desideri visualizzare due o più valori nell'elenco a discesa del pannello di amministrazione.
    ad esempio, vengono visualizzati il nome e il cognome, mentre il valore filtrato è l'ID.
  • se desideri filtrare i valori dalle relazioni esterne.

Per utilizzare i filtri avanzati, è necessario inserire parametri di query con join.

È disponibile un pulsante di aiuto per assisterti nella costruzione della query, oltre a un pulsante di anteprima che ti permette di visualizzare l'elenco a discesa generato e verificarne la validità.

Qui troverai un tutorial che mostra come gestire i filtri.

Per creare le tue richieste, ti consigliamo l'eccellente software FlySpeed SQL Query.


Moduli di Eliminazione

Costruisci sempre prima la vista elenco e poi i moduli.

PHPCG Delete Forms

Spiegazioni dettagliate sono disponibili nel Moduli di eliminazione tutorial.


Pannello di Amministrazione Bootstrap

Tema e colori del Pannello di Amministrazione

Puoi scegliere il tema Bootstrap e i colori della barra di navigazione dalla scheda Configurazione del CRUD Generator.

Ogni utente della dashboard di amministrazione può quindi scegliere individualmente, dall'admin e in base alle proprie preferenze, il tema e i colori preferiti, che verranno applicati solo nel proprio browser (memorizzati come cookie).

Temi Bootstrap e CSS

Se sei uno sviluppatore e utilizzi Gulp + SASS, i file sorgente sono disponibili, pronti all'uso e ben organizzati:

SASS utenti: tutte le sorgenti SASS sono disponibili

Gulp utenti: Scarica PHP CRUD Generator Gulp su Github per modificare e compilare i tuoi file sorgente SCSS

Ti preghiamo di fare riferimento a questo tutorial sul personalizzazione della dashboard di amministrazione.

Accesso, protezione e login

Finché non hai installato e attivato il modulo di autenticazione (login), l'accesso al pannello di amministrazione è pubblico.

Per accedere al pannello di amministrazione, apri /admin/home

Se riscontri un errore 404, troverai la causa e la soluzione nel Centro assistenza.

Se provi ad accedere su /admin/login fallirà logicamente perché il modulo di autenticazione non è ancora installato.

Il modulo di autenticazione deve essere installato alla fine del processo, quando hai creato tutti i tuoi elenchi e moduli READ con il generatore.

Modulo di Autenticazione Utente Admin

Installazione del modulo di autenticazione utente dell'Admin

Il programma di installazione del modulo di autenticazione utente ti consente di configurare i diritti di accesso agli elementi dell'amministrazione.
Deve quindi essere installato per ultimo, dopo aver creato tutti gli elementi del CRUD.

Apri il generatore nel tuo browser, quindi fai clic sulla scheda "Modulo di autenticazione".

Il programma di installazione creerà le tabelle users e users_profiles tabelle

Dovrai anche inserire le informazioni dell'amministratore principale.

L'amministratore principale potrà quindi gestire utenti e profili nel pannello di amministrazione.

phpcg authentication module installer

Reinstallazione/Aggiornamento del modulo di autenticazione utente dell'Admin

Se aggiungi alcune tabelle al tuo pannello di amministrazione dopo aver installato il modulo di autenticazione utente, dovrai aggiornare la users_profiles tabella.

A tal fine, hai due possibilità:

1 - reinstallare con il programma di installazione automatica

  • Disattiva il modulo dal generatore
    Disable the module from the generator
  • Disinstalla il modulo dal generatore
    Uninstall the module from the generator
  • eliminazione admin/secure/install/install.lock dal tuo server
  • Elimina la tabella "users" e la tabella "users_profiles" dal tuo database.
  • Riavvia il programma di installazione e segui il processo

2 - Aggiornare con una semplice query SQL

Quando installi/reinstalli il modulo di autenticazione, il users_profiles tabella utilizzata da PHP CRUD Generator per gestire i diritti degli utenti è modificata. Per ogni tabella del tuo database utilizzata nel pannello di amministrazione, vengono creati quattro campi:

  • read_tabella
  • update_tabella
  • create_delete_tabella
  • constraint_query_tabella

Invece di utilizzare il programma di installazione automatico, puoi aggiungere i quattro campi con una semplice query MySQL.
Il risultato sarà esattamente lo stesso dell'utilizzo del programma di installazione.

Copia / incolla la query qui sotto nella tua interfaccia di gestione del database (es: phpmyadmin) per aggiungere i quattro campi alla users_profiles tabella.

Sostituisci users_profiles con il tuo users_profiles nome della tabella, che potrebbe avere un prefisso.

Sostituisci _table con il nome della tabella che desideri aggiungere al modulo di autenticazione.

ALTER TABLE `users_profiles`
    ADD `r_table` BOOLEAN NOT NULL DEFAULT TRUE AFTER `profile_name`,
    ADD `u_table` BOOLEAN NOT NULL DEFAULT TRUE AFTER `r_table`,
    ADD `cd_table` BOOLEAN NOT NULL DEFAULT TRUE AFTER `u_table`,
    ADD `cq_table` VARCHAR(255) NULL DEFAULT '' AFTER `cd_table`;

Struttura

Visita la pagina seguente per visualizzare la logica dettagliata dell'applicazione e la struttura della cartella admin.

Navigazione principale

La navbar è organizzata in categorie e elementi.

Ogni elemento rappresenta una tabella nel database e dà accesso alla pagina della tabella dati MySQL (elenco READ).

Gli utenti possono creare, modificare, eliminare categorie, organizzarle tramite drag-and-drope organizzare gli elementi allo stesso modo.

L'interfaccia consente inoltre di scegliere un'icona per ogni elemento.

L'accesso all'interfaccia di gestione della navbar avviene tramite il CRUD Generator, pulsante "Organizza Navbar".

Organize the Bootstrap Dashboard Navbar

Le informazioni vengono registrate in un semplice file JSON: php-crud-generator/admin/crud-data/nav-data.

Questo file può essere modificato manualmente. Non è necessario passare dall'interfaccia.

Tutto è spiegato in dettaglio qui nel tutorial sulla navbar dell'admin.

Esempi di codice Bootstrap Dashboard

I programmatori probabilmente apprezzeranno avere un'anteprima dei codici dei file del pannello di amministrazione generati da PHPCG

Ecco alcuni esempi di codice:

Elenco READ della tabella - Oggetto PHP

Questa è la classe PHP principale che recupera i record dal database e costruisce tutti i valori

<?php

namespace crud;

use common\Utils;
use Migliori\PowerLitePdo\Db;
use Migliori\PowerLitePdo\Pagination;
use secure\Secure;

class Actor extends Elements
{

    // item name passed in url
    public $item;

    // item name displayed
    public $item_label;

    // associative array : field => field displayed name
    public $fields;

    // external relations
    public $external_tables_count = 1;
    public $external_fields_count;
    public $external_rows_count;
    public $external_tables_labels = array('Film');
    public $external_add_btn = array();
    public $external_fields = array();

    // primary key passed to create|edit|delete
    public $primary_keys; // primary keys fieldnames

    // CREATE rights
    public $can_create = false;

    public $pks = array(); // primary key values for each row
    public $pk_concat_values = array(); // concatenated values of primary key(s) for each row
    public $pk_url_params = array(); // primary key(s) sent to the edit/delete forms URL for each row
    public $update_record_authorized = array();
    public $actor_id = array();
    public $first_name = array();
    public $last_name = array();
    public $last_update = array();

    public $active_filtered_fields = array();
    public $debug_content = '';
    public $export_data_button;
    public $filters_form;
    public $is_single_view = false;
    public $item_url;
    public $join_query = '';
    public $main_pdo_settings = array();
    public $pagination_html;

    // Array of primary fieldnames => values to select a single record for view
    public $params;

    public $records_count;
    public $select_number_per_page;
    public $sorting;

    public function __construct($element, $params = array())
    {
        $this->table         = $element->table;
        $this->item          = $element->item;
        $this->item_label    = $element->item_label;
        $this->primary_keys  = $element->primary_keys;
        $this->select_data   = $element->select_data;
        $this->fields        = $element->fields;

        $table = $this->table;

        $this->params = $params;

        if (!empty($params)) {
            $this->is_single_view = true;
        }

        $json = file_get_contents(ADMIN_DIR . 'crud-data/' . $this->item . '-filter-data.json');
        $filters_array = json_decode($json, true);
        $this->item_url = $_SERVER['REQUEST_URI'];

        // connect to the database
        // PowerLitePDO pagination service (shared container instance)
        $db = POWERLITEPDO_CONTAINER->get(Pagination::class);


        $columns = 'actor.actor_id, actor.first_name, actor.last_name, actor.last_update';
        $where = array();

        // restricted rights query
        if (Secure::canReadRestricted($table)) {
            $where = array_merge($where, Secure::getRestrictionQuery($table));
        }

        if (!isset($_SESSION['npp'])) {
            $_SESSION['npp'] = 20;
        }

        // filters
        $filters = new ElementsFilters($table, $filters_array, $this->join_query);
        $this->active_filtered_fields = $filters->getActiveFilteredFields();
        $where_filters = $filters->getWhere();
        $where = array_merge($where, $where_filters);

        // search
        $where_search = array();
        if (isset($_POST['search_field']) && isset($_POST['search_string'])) {
            $searchVals = explode(' + ', $_POST['search_string']);
            $search_string = $searchVals[0];
            $_SESSION['rp_search_field'][$table] = $_POST['search_field'];
            $_SESSION['rp_search_string'][$table] = $search_string;
            if (sizeof($searchVals) > 1) {
                $_SESSION['rp_search_string_2'][$table] = $searchVals[1];
            } else {
                unset($_SESSION['rp_search_string_2'][$table]);
            }
        }

        if (isset($_SESSION['rp_search_string'][$table]) && !empty($_SESSION['rp_search_string'][$table])) {
            $sf = $_SESSION['rp_search_field'][$table];
            $search_field = $table . '.' . $sf;
            $search_field2 = '';
            $search_string = '%' . $_SESSION['rp_search_string'][$table] . '%';
            if (isset($_SESSION['rp_search_string_2'][$table])) {
                $search_string_2 = '%' . $_SESSION['rp_search_string_2'][$table] . '%';
            }
            if (file_exists(ADMIN_DIR . 'crud-data/' . $this->item . '-select-data.json')) {
                $json = file_get_contents(ADMIN_DIR . 'crud-data/' . $this->item . '-select-data.json');
                $selects_array = json_decode($json, true);
                if (isset($selects_array[$sf]) && $selects_array[$sf]['from'] == 'from_table') {
                    $search_field = $selects_array[$sf]['from_table'] . '.' . $selects_array[$sf]['from_field_1'];
                    if (!empty($selects_array[$sf]['from_field_2'])) {
                        $search_field2 = $selects_array[$sf]['from_table'] . '.' . $selects_array[$sf]['from_field_2'];
                    }
                }
            }
            // The ILIKE operator is passed in the where key so the value is bound as a PDO parameter.
            // Case-insensitive search on every driver: native ILIKE on PostgreSQL, UPPER() on
            // Firebird and Oracle, LIKE fallback on MySQL (case-insensitive collation).
            $where_search[$search_field . ' ILIKE'] = $search_string;
            if (!empty($search_field2) && isset($search_string_2) && ($search_string_2 != '%%')) {
                $where_search[$search_field2 . ' ILIKE'] = $search_string_2;
            }
            $where = array_merge($where, $where_search);
        }

        $this->filters_form = $filters->returnForm($this->item_url);

        // Get join queries from active filters
        $active_filters_join_queries = $filters->buildElementJoinQuery();

        if (isset($_POST['search_field'])) {
            $pagination_url = str_replace(ADMIN_URL . 'search/', ADMIN_URL, $_SERVER['REQUEST_URI']);
        } else {
            $pagination_url = $_SERVER['REQUEST_URI'];
        }
        if (isset($_POST['npp']) && is_numeric($_POST['npp'])) {
            $_SESSION['npp'] = $_POST['npp'];
        }
        if ($this->is_single_view) {
            // if single record view
            $active_filters_join_queries = $filters->buildElementJoinQuery();
            $pagination_url = '';
            // replace 'fieldname' with 'table.fieldname' to avoid ambigous query
            $where_params = array_combine(
                array_map(function ($k) {
                    return $this->table . '.' . $k;
                }, array_keys($this->params)),
                $this->params
            );
            $where = array_merge($where, $where_params);
        }

        // order query
        $this->sorting = ElementsUtilities::getSorting($table, 'last_name', 'ASC');

        $npp = $_SESSION['npp'];
        if (!empty($where_search) && PAGINE_SEARCH_RESULTS === false) {
            $npp = 1000000;
        }

        if (empty($where)) {
            $where = null;
        }

        // $this->main_pdo_settings are the PDO settings without the pagination LIMIT.
        // Legacy array shape kept for ElementsUtilities::exportDataButtons() (consumed by export-data.php).
        $this->main_pdo_settings = array(
            'function' => 'select',
            'from'    => 'actor' . $active_filters_join_queries,
            'values'   => $columns,
            'where'    => $where,
            'extras'   => array('order_by' => $this->sorting),
            'debug'    => DEBUG_DB_QUERIES
        );

        $db->setRecordsPerPage($npp);
        $db->setOptions(array('navLength' => 5, 'rewriteLinks' => true, 'rewriteTransition' => '/'));

        try {
            $db->select(
                $this->main_pdo_settings['from'],
                $this->main_pdo_settings['values'],
                $this->main_pdo_settings['where'],
                array('orderBy' => $this->sorting),
                DEBUG_DB_QUERIES ? 'silent' : false
            );
            $this->pagination_html = $db->pagine($pagination_url);
            $this->records_count = $db->getCurrentNumberOfRecords();
        } catch (\Exception $e) {
            // no record matches : PowerLitePDO throws an exception on a negative pagination LIMIT
            $this->pagination_html = '';
            $this->records_count = 0;
        }

        if (DEBUG_DB_QUERIES) {
            $this->debug_content .= '<p class="debug-title text-bg-info">"' . $this->table . '" queries</p>' . $db->getDb()->getDebug()->get();
        }

        $update_authorized = false;
        if (Secure::canUpdate($this->table)) {
            // user can update ALL the records
            $update_authorized = true;
        }

        if (!empty($this->records_count)) {
            while ($row = $db->fetch()) {
                $primary_keys_array = array(
                    'actor_id' => $row->actor_id
                );
                $this->pks[] = $primary_keys_array;
                $pk_concatenated_values = $row->actor_id;
                $this->pk_concat_values[] = $pk_concatenated_values;
                $this->update_record_authorized[$pk_concatenated_values] = $update_authorized;
                $this->pk_url_params[] = http_build_query($primary_keys_array, '', '/');
                $this->actor_id[] = $row->actor_id;
                $this->first_name[] = $row->first_name;
                $this->last_name[] = $row->last_name;
                $this->last_update[] = $row->last_update;
            }
        }

        // Autocomplete doesn't need the followings settings
        if (!isset($_POST['is_autocomplete'])) {
            if (!$this->is_single_view) {
                // CREATE/DELETE rights
                if (Secure::canCreate($table) || Secure::canCreateRestricted($table)) {
                    $this->can_create = true;
                }

                // restricted UPDATE rights
                if (Secure::canUpdateRestricted($table)) {
                    $where = array_merge(
                        Secure::getRestrictionQuery($table),
                        $where_filters,
                        $where_search
                    );

                    // get authorized update primary keys
                    try {
                        $db->setRecordsPerPage($npp);
                        $db->select(
                            'actor' . $active_filters_join_queries,
                            $columns,
                            $where,
                            array('orderBy' => $this->sorting),
                            DEBUG_DB_QUERIES ? 'silent' : false
                        );
                        $records_count = $db->getCurrentNumberOfRecords();
                    } catch (\Exception $e) {
                        // no record matches : PowerLitePDO throws an exception on a negative pagination LIMIT
                        $records_count = 0;
                    }
                    if (DEBUG_DB_QUERIES) {
                        $this->debug_content .= '<p class="debug-title text-bg-info">"' . $this->table . '" - get authorized update primary keys</p>' . $db->getDb()->getDebug()->get();
                    }
                    if (!empty($records_count)) {
                        while ($row = $db->fetch()) {
                            $this->update_record_authorized[$row->actor_id] = true;
                        }
                    }
                }
            }

            /* external relations */

            // plain Db, not Pagination : a forced LIMIT on this query throws when the row has no related record (LIMIT -20,20)
            $db = POWERLITEPDO_CONTAINER->get(Db::class);

            for ($i = 0; $i < count($this->pks); $i++) {
                $this->external_rows_count[$i] = array();
                $this->external_fields[$i] = array();
                $this->external_add_btn[$i] = array();

                // actor => film_actor => film
                $from = 'actor INNER JOIN film_actor ON film_actor.actor_id=actor.actor_id INNER JOIN film ON film_actor.film_id=film.film_id';
                $values = 'film_actor.actor_id AS film_actor_actor_id, film_actor.film_id AS film_actor_film_id, film.title, film.release_year, film.film_id AS target_table_pk_0';
                $where = array();
                foreach ($this->pks[$i] as $key => $value) {
                    $where[] = 'actor.' . $key . ' = ' . $value;
                }
                $db->select($from, $values, $where, array('orderBy' => $this->sorting), DEBUG_DB_QUERIES ? 'silent' : false);
                if (DEBUG_DB_QUERIES) {
                    if ($i === 0) {
                        $this->debug_content .= '<p class="debug-title text-bg-info">"film" queries <small>(External relation)</small></p>' . $db->getDebug()->get();
                    } else {
                        $this->debug_content .= $db->getDebug()->get();
                    }
                }
                // $db is a plain Db instance: numRows() and getDebug() live directly on it
                $records_count = $db->numRows();
                $this->external_rows_count[$i][] = $records_count;
                $ext_fields = array(
                    'table' => 'film',
                    'table_label' => 'Film',
                    'uniqid' => 'f-' . uniqid(),
                    'fields' => array(
                        'title' => array(),
                        'release_year' => array()
                    ),
                    'fieldnames' => array(
                        'title' => 'title',
                        'release_year' => 'release_year'
                    )
                );

                // get user custom fieldnames
                $ext_fieldnames = ElementsUtilities::getFieldNames($ext_fields['table']);
                if ($ext_fieldnames !== false) {
                    foreach ($ext_fields['fieldnames'] as $key => $value) {
                        if (isset($ext_fieldnames[$key])) {
                            $ext_fields['fieldnames'][$key] = $ext_fieldnames[$key];
                        }
                    }
                }

                if (!$this->is_single_view) {
                    // add button
                    $add_btn = '';
                    if (Secure::canCreate('film_actor')) {
                        if (!empty($records_count)) {
                            // add button for nested table
                            $add_btn = '<div class="d-flex flex-row-reverse mb-2">';
                            $add_btn .= ' <a href="' . ADMIN_URL . 'filmactor/create?actor_id=' . $this->pks[$i]['actor_id'] . '" class="btn btn-xs btn-primary" data-bs-title="Add new" data-bs-toggle="tooltip"><span class="fas fa-plus-circle prepend"></span>Add new Film</a>';
                            $add_btn .= '</div>';
                        } else {
                            // add button for empty cell
                            $add_btn = '<div class="d-flex justify-content-center">';
                            $add_btn .= ' <a href="' . ADMIN_URL . 'filmactor/create?actor_id=' . $this->pks[$i]['actor_id'] . '" class="btn btn-xs btn-outline-secondary" data-bs-title="Add new" data-bs-toggle="tooltip"><span class="fas fa-plus-circle prepend"></span>Add new</a>';
                            $add_btn .= '</div>';
                        }
                    }
                    $this->external_add_btn[$i][] = $add_btn;
                }

                if (!empty($records_count)) {
                    while ($row = $db->fetch()) {
                        $json = Utils::decodeJson($row->title);
                        if (is_array($json)) {
                            $ext_fields['fields']['title'][] = implode(', ', $json);
                        } else {
                            $ext_fields['fields']['title'][] = $row->title;
                        }
                        $json = Utils::decodeJson($row->release_year);
                        if (is_array($json)) {
                            $ext_fields['fields']['release_year'][] = implode(', ', $json);
                        } else {
                            $ext_fields['fields']['release_year'][] = $row->release_year;
                        }
                        if (!$this->is_single_view) {
                            // edit/delete buttons
                            if (Secure::canUpdate('film_actor') || Secure::canCreate('film_actor')) {
                                $action_btns = '<div class="btn-group">';
                                $relation_table_pk_columns = array(
                                'actor_id' => $row->film_actor_actor_id,
                                'film_id' => $row->film_actor_film_id
                                );
                                $url_params = http_build_query($relation_table_pk_columns, '', '/');
                                if (Secure::canUpdate('film_actor')) {
                                    $action_btns .= '<a href="' . ADMIN_URL . 'filmactor/edit/' . $url_params . '" class="btn btn-xs btn-warning" data-bs-title="' . addslashes(EDIT) . '" rel="noindex" data-bs-toggle="tooltip"><span class="fas fa-pencil-alt"></span></a>';
                                }
                                if (Secure::canCreate('film_actor')) {
                                    $action_btns .= '<a href="' . ADMIN_URL . 'filmactor/delete/' . $url_params . '" class="btn btn-xs btn-danger" data-bs-title="' . addslashes(DELETE_CONST) . '" rel="noindex" data-bs-toggle="tooltip"><span class="fas fa-times-circle"></span></a>';
                                }
                                $action_btns .= '</div>';
                                $ext_fields['fieldnames']['action'] = ACTION_CONST;
                                $ext_fields['fields']['action'][] = $action_btns;
                            } // end if
                        } // end if !$this->is_single_view
                    } // end while
                } // end if
                $this->external_fields[$i][] = $ext_fields;
            } // end for
            $this->external_fields_count = count($this->external_fields);
        } // end if

        if (!$this->is_single_view) {
            // Export data button
            $this->export_data_button = ElementsUtilities::exportDataButtons($table, $this->main_pdo_settings);

            // number/page
            $numbers_array = array(5, 10, 20, 50, 100, 200, 10000);
            $this->select_number_per_page = ElementsUtilities::selectNumberPerPage($numbers_array, $_SESSION['npp'], $this->item_url);
        }
    }
}

Elenco READ della tabella - Template TWIG

Una volta costruito l'oggetto PHP, la vista viene realizzata con l'aiuto di un pulito template TWIG:

<div class="px-4">
    {# Partial block debug - rendered alone on the research results #}
    {% block object_debug %}
    <div id="debug-content">{{ object.debug_content|raw }}</div>
    {% endblock object_debug %}
    {# END Partial block - rendered alone on the research results #}
    <div id="toolbar" class="d-lg-flex flex-wrap justify-content-between">
        {% if object.records_count > 0 %}

        <div class="d-flex ms-auto order-lg-2">
            {{ object.select_number_per_page|raw }}
        </div>

        <hr class="w-100 d-lg-none">

        {% endif %}
        <div class="d-flex order-lg-0 mb-3">
            {% if object.can_create == true %}
            <a href="{{ constant('ADMIN_URL') }}{{ object.item }}/create" class="btn btn-sm me-1 btn-primary d-flex align-items-center"><i class="{{ constant('ICON_PLUS') }} prepend"></i>{{ constant('ADD_NEW') }}</a>
            {% endif %}
                {% if object.records_count > 0 %}
                {{ object.export_data_button|raw }}
                {% endif %}
            </div>

        <div class="order-lg-1 mx-lg-auto">
            <form name="rp-search-form" id="rp-search-form" class="form-inline justify-content-center">
                <div class="input-group input-group-sm">
                    <button class="input-group-text btn {{ constant('DEFAULT_BUTTONS_CLASS') }} dropdown-toggle ps-4 pe-3" type="button" data-bs-toggle="dropdown" aria-expanded="false"></button>
                    <ul id="rp-search-field" class="dropdown-menu">
                        {% for field_name, field_display_name in object.fields %}
                        {% set active = '' %}
                        {% if field_name == attribute(session.rp_search_field, object.table) %}
                        {% set active = ' active' %}
                        {% elseif field_name == 'last_name' %}
                        {% set active = ' active' %}
                        {% endif %}
                        <li><a class="dropdown-item{{ active }}" href="#" rel="noindex" data-value="{{ field_name }}">{{ field_display_name }}</a></li>
                        {% endfor %}
                    </ul>
                    {% set search_value = '' %}
                    {% if attribute(session.rp_search_string, object.table) is defined %}
                    {% set search_value = attribute(session.rp_search_string, object.table) %}
                    {% endif %}
                    <input id="rp-search" name="rp-search" type="text" value="{{ search_value }}" placeholder="{{ constant('SEARCH') }}" class="form-control form-control-sm flex-grow-1">
                    <button id="rp-search-submit" class="input-group-text btn {{ constant('DEFAULT_BUTTONS_CLASS') }}" data-ladda-button="true" data-style="zoom-in" type="submit"><span class="ladda-label"><i class="{{ constant('ICON_SEARCH') }}"></i></span></button>
                </div>
            </form>
        </div>
    </div>

    {# Partial block list - rendered alone on the research results #}
    {% block object_list %}

    {%
        set filtered_class = {
            actor_id: 'actor_id' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
                    first_name: 'first_name' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
                    last_name: 'last_name' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
                    last_update: 'last_update' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':''
                }
    %}

    <div id="{{ object.item }}-list">

        {% if object.records_count > 0 %}
        <div class="table-data-wrapper">
            <table class="table table-data" >
                <thead>
                    <tr class="{{ constant('DEFAULT_TABLE_HEADING_CLASS') }}">
                        {% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'left' %}
                        {% if object.can_create == true %}
                        <th>
                            <div class="form-check ps-1 d-flex mb-0" data-bs-toggle="tooltip" data-bs-title="{{ constant('TOGGLE_ALL') }}">
                                <input type="checkbox" id="bulk-check-toggle" name="bulk-check-toggle" class="form-check-input">
                                <label for="bulk-check-toggle" class="form-check-label me-0"></label>
                            </div>
                        </th>
                        {% endif %}
                            <th>{{ constant('ACTION_CONST') }}</th>
                        {% endif %}
                        <th>{{ object.fields.actor_id|raw }}</th>
                                    <th>{{ object.fields.first_name|raw }}</th>
                                    <th>{{ object.fields.last_name|raw }}</th>
                                    <th class="sorting">{{ object.fields.last_update|raw }}<a href="#" class="sorting-up py-1 d-flex align-items-start" rel="noindex" data-field="last_update" data-direction="ASC"><i class="{{ constant('ICON_ARROW_UP') }}"></i></a><a href="#" class="sorting-down py-1 d-flex align-items-end" rel="noindex" data-field="last_update" data-direction="DESC"><i class="{{ constant('ICON_ARROW_DOWN') }}"></i></a></th>
                                    <th>Film</th>
                                        {% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'right' %}
                        <th>{{ constant('ACTION_CONST') }}</th>
                            {% if object.can_create == true %}
                        <th>
                            <div class="form-check ps-1 d-flex mb-0" data-bs-toggle="tooltip" data-bs-title="{{ constant('TOGGLE_ALL') }}">
                                <input type="checkbox" id="bulk-check-toggle" name="bulk-check-toggle" class="form-check-input">
                                <label for="bulk-check-toggle" class="form-check-label me-0"></label>
                            </div>
                        </th>
                            {% endif %}
                                {% endif %}
                    </tr>
                </thead>
                <tbody>
                    {% for i in range(0, object.records_count - 1) %}
                    <tr>
                        {% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'left' %}
                        {% if object.can_create == true %}
                        <td>
                            <div class="form-check ps-0 pt-1 d-flex mb-0">
                                <input type="checkbox" id="bulk-check-{{ object.pk_url_params[loop.index0] }}" name="bulk-check-{{ object.pk_url_params[loop.index0] }}" class="form-check-input bulk-check" data-id="{{ object.pk_url_params[loop.index0] }}">
                                <label for="bulk-check-{{ object.pk_url_params[loop.index0] }}" class="form-check-label me-0"></label>
                            </div>
                        </td>
                        {% endif %}
                            <td class="has-btn-group no-ellipsis">
                            <div class="btn-group">
                                <a href="#" class="btn btn-sm btn-primary btn-view-record" data-target="{{ object.item }}/view/{{ object.pk_url_params[loop.index0] }}" data-bs-toggle="tooltip" data-bs-title="{{ constant('VIEW_DETAIL') }}"><span class="{{ constant('ICON_VIEW') }} icon-md"></span></a>
                                    {% if object.update_record_authorized[object.pk_concat_values[loop.index0]] == true %}
                                <a href="{{ constant('ADMIN_URL') }}{{ object.item }}/edit/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-warning" data-bs-toggle="tooltip" data-bs-title="{{ constant('EDIT') }}"><span class="{{ constant('ICON_EDIT') }} icon-md"></span></a>
                                {% endif %}
                                {% if object.can_create == true %}
                                <a href="{{ constant('ADMIN_URL') }}{{ object.item }}/delete/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-danger" data-bs-toggle="tooltip" data-bs-title="{{ constant('DELETE_CONST') }}"><span class="{{ constant('ICON_DELETE') }} icon-md"></span></a>
                                {% endif %}
                            </div>
                        </td>
                        {% endif %}
                        <td{{ filtered_class.actor_id|raw }}>{{ object.actor_id[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
                                        <td{{ filtered_class.first_name }}>
                            {% if object.update_record_authorized[object.pk_concat_values[loop.index0]] == true %}
                            <span class="jedit-text tip" data-field="first_name" data-delay="500" title="{{ constant('CLICK_TO_EDIT') }}" id="actor:first_name:{{ object.pk_url_params[loop.index0] }}">{{ object.first_name[ loop.index0 ]|replace({'[|]': ' '}) }}</span>
                            {% else %}
                            {{ object.first_name[ loop.index0 ]|replace({'[|]': ' '}) }}
                            {% endif %}
                            </td>
                            <td{{ filtered_class.last_name }}>
                            {% if object.update_record_authorized[object.pk_concat_values[loop.index0]] == true %}
                            <span class="jedit-text tip" data-field="last_name" data-delay="500" title="{{ constant('CLICK_TO_EDIT') }}" id="actor:last_name:{{ object.pk_url_params[loop.index0] }}">{{ object.last_name[ loop.index0 ]|replace({'[|]': ' '}) }}</span>
                            {% else %}
                            {{ object.last_name[ loop.index0 ]|replace({'[|]': ' '}) }}
                            {% endif %}
                            </td>
                        <td{{ filtered_class.last_update|raw }}>{{ toDate(object.last_update[ loop.index0 ], 'dd MMMM yyyy H:m a')|raw }}</td>
                                    {% if object.external_tables_count > 0 %}
                        {% for j in range(0, object.external_tables_count - 1) %}
                        <td class="no-ellipsis">
                            {% if object.external_rows_count[i][j] > 0 %}
                            <a class="dropdown-toggle text-nowrap" data-bs-toggle="collapse" href="#{{ object.external_fields[i][j]['uniqid'] }}" rel="noindex" role="button" aria-expanded="false" aria-controls="{{ object.external_fields[i][j]['uniqid'] }}"><small class="badge rounded-pill text-bg-light prepend">{{ object.external_rows_count[i][j] }}</small><span class="show-external">{{ constant('SHOW') }}</span><span class="hide-external">{{ constant('HIDE') }}</span></a>
                            <div class="collapse mt-2" id="{{ object.external_fields[i][j]['uniqid'] }}">
                                {{ object.external_add_btn[i][j]|raw }}
                                <div class="table table-sm text-bg-light">
                                    <div class="thead {{ constant('DEFAULT_TABLE_HEADING_CLASS') }}">
                                        <div class="tr">
                                            {% for field, value in object.external_fields[i][j].fieldnames %}
                                            <div class="th">{{ value }}</div>
                                            {% endfor %}
                                        </div>
                                    </div>
                                    <div class="tbody">

                                        {# Loop records #}

                                        {% for k in range(0, object.external_rows_count[i][j] - 1) %}
                                        <div class="tr">

                                            {# Loop fields #}

                                            {% for field, value in object.external_fields[i][j].fields %}
                                            <div class="td">{{ object.external_fields[i][j].fields[field][k]|raw }}</div>
                                            {% endfor %}
                                        </div>
                                        {% endfor %}
                                    </div>
                                </div>
                            </div>
                            {% else %}
                            {{ object.external_add_btn[i][j]|raw }}
                            {% endif %}
                        </td>
                        {% endfor %}
                        {% endif %}
                            {% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'right' %}
                        <td class="has-btn-group no-ellipsis">
                            <div class="btn-group">
                                <a href="#" class="btn btn-sm btn-primary btn-view-record" data-target="{{ object.item }}/view/{{ object.pk_url_params[loop.index0] }}" data-bs-toggle="tooltip" data-bs-title="{{ constant('VIEW_DETAIL') }}"><span class="{{ constant('ICON_VIEW') }} icon-md"></span></a>
                                    {% if object.update_record_authorized[object.pk_concat_values[loop.index0]] == true %}
                                <a href="{{ constant('ADMIN_URL') }}{{ object.item }}/edit/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-warning" data-bs-toggle="tooltip" data-bs-title="{{ constant('EDIT') }}" data-delay="500"><span class="{{ constant('ICON_EDIT') }} icon-md"></span></a>
                                {% endif %}
                                {% if object.can_create == true %}
                                <a href="{{ constant('ADMIN_URL') }}{{ object.item }}/delete/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-danger" data-bs-toggle="tooltip" data-bs-title="{{ constant('DELETE_CONST') }}" data-delay="500"><span class="{{ constant('ICON_DELETE') }} icon-md"></span></a>
                                {% endif %}
                            </div>
                        </td>
                        {% if object.can_create == true %}
                        <td>
                            <div class="form-check ps-0 pt-1 d-flex mb-0">
                                <input type="checkbox" id="bulk-check-{{ object.pk_url_params[loop.index0] }}" name="bulk-check-{{ object.pk_url_params[loop.index0] }}" class="form-check-input bulk-check" data-id="{{ object.pk_url_params[loop.index0] }}">
                                <label for="bulk-check-{{ object.pk_url_params[loop.index0] }}" class="form-check-label me-0"></label>
                            </div>
                        </td>
                        {% endif %}
                            {% endif %}
                    </tr>
                    {% endfor %}
                </tbody>
                {% if object.can_create == true %}
                <tfoot>
                    <tr>
                        {% set delete_btn_class = '' %}
                        {% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'right' %}
                        {% set delete_btn_class = 'text-end' %}
                        {% endif %}
                        <td colspan="7" class="{{ delete_btn_class }}">
                            <button type="button" id="bulk-delete-btn" class="btn btn-danger"><span class="{{ constant('ICON_DELETE') }} icon-md prepend"></span> {{ constant('DELETE_SELECTED_RECORDS') }}</button>
                        </td>
                    </tr>
                </tfoot>
                {% endif %}
                </table>
        </div> <!-- END table-responsive -->

        {% else %}
        <p class="text-semibold">
            {{ alert(constant('NO_RECORD_FOUND'), 'alert-info has-icon')|raw }}
        </p>
        {% endif %}

        <div id="pagination-wrapper" class="d-flex justify-content-between p-4">
            {{ object.pagination_html|raw }}
        </div>
    </div> <!-- END {{ object.item }}-list -->

    {% endblock object_list %}
    {# END Partial block - rendered alone on the research results #}

</div> <!-- END card -->
{% if object.records_count > 0 and object.can_create == true %}
<!-- Bulk delete modal -->
<div id="bulk-delete-modal" class="modal" tabindex="-1" aria-hidden="true">
    <div class="modal-content">
        <div class="modal-header text-bg-primary">
            <h6 class="modal-title mb-0">{{ constant('DELETE_SELECTED_RECORDS') }}</h6>
        </div>

        <div class="modal-body">
            <p>{{ constant('DELETE_SELECTED_RECORDS') }}? (<span id="records-count"></span> {{ constant('RECORDS') }})</p>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-light modal-close"><i class="{{ constant('ICON_CANCEL') }} prepend"></i> {{ constant('CANCEL') }}</button>
            <button type="button" id="bulk-delete-confirm-btn" class="btn btn-primary">{{ constant('YES') }} <i class="{{ constant('ICON_CHECKMARK') }} append"></i></button>
        </div>
    </div>
</div>
{% endif %}
    

Modulo di aggiornamento della tabella - Form PHP

Il form generato per modificare i record dalla tabella indicata.

Il form è costruito con PHP Form Builder

Tutte le operazioni vengono eseguite nello stesso file:

  • Protetto dal modulo di autenticazione degli utenti e gestione dei diritti
  • Recupero dei record per precompilare il form
  • Creazione e visualizzazione del form, inclusi tutti i plugin (menu a discesa, selettori, uploader, ...)
  • Validazione PHP
  • Aggiornamento dei record del database o visualizzazione degli errori se vengono inviati valori errati
<?php

use phpformbuilder\Form;
use phpformbuilder\Validator\Validator;
use Migliori\PowerLitePdo\Db;
use common\Utils;
use secure\Secure;

include_once ADMIN_DIR . 'secure/class/secure/Secure.php';

$debug_content = '';

/* =============================================
    validation if posted
============================================= */

if ($_SERVER["REQUEST_METHOD"] == "POST" && Form::testToken('form-edit-actor') === true) {
    $validator = Form::validate('form-edit-actor', FORMVALIDATION_PHP_LANG);
    $validator->required()->validate('first_name');
    $validator->maxLength(45)->validate('first_name');
    $validator->required()->validate('last_name');
    $validator->maxLength(45)->validate('last_name');
    if (isset($_POST['last_update_submit'])) {
        $validator->date()->validate('last_update_submit');
    } else {
        $validator->date()->validate('last_update');
    }
    $validator->required()->validate('last_update');

    // check for errors
    if ($validator->hasErrors()) {
        $_SESSION['phpfb']['errors']['form-edit-actor'] = $validator->getAllErrors();
    } else {
        // PowerLitePDO: the container is defined in conf.php
        $db = POWERLITEPDO_CONTAINER->get(Db::class);
        if (DEBUG_DB_QUERIES) {
            $db->setDebug('silent');
        }
        $values = array();
        $values['first_name'] = $_POST['first_name'];
        $values['last_name'] = $_POST['last_name'];
        $value_date = $_POST['last_update'];
        $value_time = $_POST['last_update-time'];
        if (isset($_POST['last_update_submit'])) {
            $value_date = $_POST['last_update_submit'];
        }
        if (isset($_POST['last_update-time_submit'])) {
            $value_time = $_POST['last_update-time_submit'];
        }
        if (trim($value_date . ' ' . $value_time) == '') {
            $values['last_update'] = null;
        } else {
            $values['last_update'] = $value_date . ' ' . $value_time;
        }
        $where = $_SESSION['actor_editable_primary_keys'];

        // begin transaction
        $db->transactionBegin();

        try {
            // update actor
            if (DEMO !== true && $db->update('actor', $values, $where, DEBUG_DB_QUERIES ? 'silent' : false) === false) {
                $error = DEBUG_DB_QUERIES ? $db->getDebug()->get() : DB_ERROR;
                throw new \Exception($error);
            } else {
                if (DEMO !== true && DEBUG_DB_QUERIES) {
                    $debug_content .= $db->getDebug()->get();
                }
                // get records from film_actor
                $film_actor_current_records   = array();

                // Array with film.film_id
                $film_actor_records_to_add    = array();

                // Array with film_actor.actor_id
                $film_actor_records_to_delete = array();

                $from = 'film_actor';
                $columns = array('film_id');
                $where = array('actor_id' => $_SESSION['actor_editable_primary_keys']['actor.actor_id']);

                $db->select($from, $columns, $where, array(), DEBUG_DB_QUERIES ? 'silent' : false);

                if (DEBUG_DB_QUERIES) {
                    $debug_content .= $db->getDebug()->get();
                }

                $db_count = $db->numRows();
                if (!empty($db_count)) {
                    while ($row = $db->fetch()) {
                        $film_actor_current_records[] = $row->film_id;
                    }
                }

                foreach ($_POST['ext_film'] as $film_value) {
                    if (!in_array($film_value, $film_actor_current_records)) {
                        $film_actor_records_to_add[] = $film_value;
                    }
                }

                foreach ($film_actor_current_records as $film_value) {
                    if (!in_array($film_value, $_POST['ext_film'])) {
                        $film_actor_records_to_delete[] = $film_value;
                    }
                }

                // insert records in film_actor
                foreach ($film_actor_records_to_add as $value) {
                    $values = array();
                    $values['actor_id'] = $_SESSION['actor_editable_primary_keys']['actor.actor_id'];
                    $values['film_id'] = $value;
                    if (DEMO !== true && $db->insert('film_actor', $values, DEBUG_DB_QUERIES ? 'silent' : false) === false) {
                        $error = DEBUG_DB_QUERIES ? $db->getDebug()->get() : DB_ERROR;
                        throw new \Exception($error);
                    }
                }

                // delete records from film_actor
                foreach ($film_actor_records_to_delete as $film_id_value) {
                    $where = array();
                    $where['actor_id'] = $_SESSION['actor_editable_primary_keys']['actor.actor_id'];
                    $where['film_id'] = $film_id_value;
                    if (DEMO !== true && $db->delete('film_actor', $where, DEBUG_DB_QUERIES ? 'silent' : false) === false) {
                        $error = DEBUG_DB_QUERIES ? $db->getDebug()->get() : DB_ERROR;
                        throw new \Exception($error);
                    }
                }

                // ALL OK
                if (!DEBUG_DB_QUERIES) {
                    $db->transactionCommit();

                    $_SESSION['msg'] = Utils::alert(UPDATE_SUCCESS_MESSAGE, 'alert-success has-icon');

                    // reset form values
                    Form::clear('form-edit-actor');

                    // redirect to list page
                    if (isset($_SESSION['active_list_url'])) {
                        header('Location:' . $_SESSION['active_list_url']);
                    } else {
                        header('Location:' . ADMIN_URL . 'actor');
                    }

                    // if we don't exit here, $_SESSION['msg'] will be unset
                    exit();
                } else {
                    $db->transactionRollback();

                    $_SESSION['msg'] = Utils::alert(UPDATE_SUCCESS_MESSAGE . '<br>(' . DEBUG_DB_QUERIES_ENABLED . ')', 'alert-success has-icon');
                }
            }
        } catch (\Exception $e) {
            $db->transactionRollback();
            $msg_content = DB_ERROR;
            if (DEBUG) {
                $msg_content .= '<br>' . $e->getMessage();
            }
            $_SESSION['msg'] = Utils::alert($msg_content, 'alert-danger has-icon');
        }
    } // END else
} // END if POST

// register editable primary keys, which are NOT posted and will be the query update filter
// $params come from data-forms.php
// replace 'fieldname' with 'table.fieldname' to avoid ambigous query
$where_params = array_combine(
    array_map(function ($k) {
        return 'actor.' . $k;
    }, array_keys($params)),
    $params
);
$_SESSION['actor_editable_primary_keys'] = $where_params;

if (!isset($_SESSION['phpfb']['errors']['form-edit-actor']) || empty($_SESSION['phpfb']['errors']['form-edit-actor'])) { // If no error registered
    $from = 'actor';
    $columns = '*';

    $where = $_SESSION['actor_editable_primary_keys'];

    // if restricted rights
    if (ADMIN_LOCKED === true && Secure::canUpdateRestricted('actor')) {
        $where = array_merge($where, Secure::getRestrictionQuery('actor'));
    }

    $db = POWERLITEPDO_CONTAINER->get(Db::class);

    $db->select($from, $columns, $where, array(), DEBUG_DB_QUERIES ? 'silent' : false);
    if ($db->numRows() < 1) {
        if (DEBUG) {
            exit('No Record Found');
        } else {
            exit('No Record Found');
        }
    }
    if (DEBUG_DB_QUERIES) {
        $debug_content .= $db->getDebug()->get();
    }
    $row = $db->fetch();
    $_SESSION['phpfb']['form-edit-actor']['actor_id'] = $row->actor_id;
    $_SESSION['phpfb']['form-edit-actor']['first_name'] = $row->first_name;
    $_SESSION['phpfb']['form-edit-actor']['last_name'] = $row->last_name;
    $last_update_ts = null;
    if (!is_null($row->last_update)) {
        $last_update_ts = strtotime($row->last_update);
    }
    // if timestamp is valid and > '1970-01-01'
    if (!is_null($last_update_ts) && Utils::isValidTimeStamp($last_update_ts) && $last_update_ts > -62169984000) {
        $_SESSION['phpfb']['form-edit-actor']['last_update'] = date('Y-m-d', $last_update_ts);
        $_SESSION['phpfb']['form-edit-actor']['last_update-time'] = date('H:i', $last_update_ts);
    } else {
        $_SESSION['phpfb']['form-edit-actor']['last_update'] = null;
        $_SESSION['phpfb']['form-edit-actor']['last_update-time'] = null;
    }
}

$_SESSION['phpfb']['form-edit-actor']['ext_film'] = array();

$from = 'film_actor';
$columns = array('film_id');
$where = array('actor_id' => $_SESSION['actor_editable_primary_keys']['actor.actor_id']);

$db = POWERLITEPDO_CONTAINER->get(Db::class);
$db->select($from, $columns, $where, array(), DEBUG_DB_QUERIES ? 'silent' : false);

if (DEBUG_DB_QUERIES) {
    $debug_content .= $db->getDebug()->get();
}

$db_count = $db->numRows();
if (!empty($db_count)) {
    while ($row = $db->fetch()) {
        $_SESSION['phpfb']['form-edit-actor']['ext_film'][] = $row->film_id;
    }
}

// $params come from data-forms.php
$pk_url_params = http_build_query($params, '', '/');

$form = new Form('form-edit-actor', 'horizontal', 'novalidate');
$form->setAction(ADMIN_URL . 'actor/edit/' . $pk_url_params);
$form->startFieldset();

// actor_id --

$form->setCols(2, 10);
$form->addInput('hidden', 'actor_id', '');

// first_name --

$form->setCols(2, 10);
$form->addInput('text', 'first_name', '', 'First Name', 'required');

// last_name --
$form->addInput('text', 'last_name', '', 'Last Name', 'required');

// last_update --
$form->groupElements('last_update', 'last_update-time');
$form->addPlugin('pickadate', '#last_update'); // date field
$form->addPlugin('pickadate', '#last_update-time', 'pickatime'); // time field

$form->setCols(2, 6);
$form->addInput('text', 'last_update', '', 'Last Update', 'required, data-format=dd mmmm yyyy, data-format-submit=yyyy-mm-dd, data-set-default-date=true');
$form->setCols(0, 4);
if (DATETIMEPICKERS_STYLE === 'material') {
    $form->addInput('text', 'last_update-time', '', '', 'required, data-format=hh:i A, data-format-submit=HH:i, data-twelve-hour=false, data-interval=15, placeholder=Time');
} else {
    $form->addInput('text', 'last_update-time', '', '', 'required, data-format=H:i a, data-format-submit=HH:i, data-interval=15, placeholder=Time');
}
$form->setCols(2, 10);

// external relation: actor => film_actor => film;
$from = 'film';
$columns = 'title, film_id';
$where = false;
$extras = array(
    'selectDistinct' => true
);

$db = POWERLITEPDO_CONTAINER->get(Db::class);
$db->select($from, $columns, $where, $extras, DEBUG_DB_QUERIES ? 'silent' : false);

if (DEBUG_DB_QUERIES) {
    $debug_content .= $db->getDebug()->get();
}

$db_count = $db->numRows();
if (!empty($db_count)) {
    $values = array();
    $display_values = array();
    while ($row = $db->fetch()) {
        $values[] = $row->film_id;
        $display_values[] = $row->title;
    }
    for ($i = 0; $i < $db_count; $i++) {
        $form->addOption('ext_film[]', $values[$i], $display_values[$i]);
    }
    $form->addSelect('ext_film[]', 'Film', 'data-slimselect=true, multiple, data-close-on-select=false');
}
$form->addBtn('button', 'cancel', 0, '<i class="' . ICON_BACK . ' prepend"></i>' . CANCEL, 'class=btn btn-warning, data-ladda-button=true, data-style=zoom-in, onclick=history.go(-1)', 'btn-group');
$form->addBtn('submit', 'submit-btn', 1, SUBMIT . '<i class="' . ICON_CHECKMARK . ' append"></i>', 'class=btn btn-success, data-ladda-button=true, data-style=zoom-in', 'btn-group');
$form->setCols(0, 12);
$form->centerContent();
$form->printBtnGroup('btn-group');
$form->endFieldset();
$form->addPlugin('pretty-checkbox', '#form-edit-actor');
$form->addPlugin('formvalidation', '#form-edit-actor', 'default', array('language' => FORMVALIDATION_JAVASCRIPT_LANG));

Personalizzazione per utenti avanzati

Se la struttura del tuo database cambia nel corso del tempo, PHPCG è in grado di ricostruire i dati e ti permette di rigenerare le pagine CRUD corrispondenti.

Durante la generazione delle pagine del pannello di amministrazione, PHPCRUD conserva automaticamente un backup della versione precedente.

I strumento di confronto file integrato con il generatore ti permette di confrontare affiancate la versione attuale e quella precedente e di unirle scegliendo i blocchi di codice da mantenere.

Le personalizzazioni dell'amministrazione possono così essere conservate durante le modifiche di versione/struttura.

Istruzioni di aggiornamento

Gli aggiornamenti sono automatici.

Quando viene rilasciata una nuova versione, vedrai il messaggio "New PHP CRUD GENERATOR version is available" in /generator/generator.php e dovrai semplicemente cliccare sul pulsante "Install".

Il numero della tua versione è disponibile in /conf/conf.php (VERSION)


Aggiornamento dalla versione 1.x alla 2.x

La versione 2 è un aggiornamento importante. Non è quindi possibile effettuare l'aggiornamento dalla versione 1.

La soluzione è quindi installare la versione 2, per poi riconfigurare da lì la tua dashboard di amministrazione.

Lingue/Traduzione (I18n)

PHP CRUD Generator e il pannello di amministrazione Bootstrap generato sono entrambi completamente multilingua.

Per tradurre nella tua lingua:

  1. Duplica admin/i18n/en.php e rinominalo con la tua lingua.
  2. Effettua le traduzioni all'interno del file che hai creato (admin/i18n/[your-language].php)
  3. Apri la scheda Configuration del CRUD Generator e imposta la lingua con il nome del file utilizzato in precedenza (oppure sostituisci "lang": "en" con il nome del tuo file in conf/user-conf.).
  4. Verifica class/phpformbuilder/plugins/select2/js/i18n/[your-language].js e crealo se non esiste.
  5. Saremo lieti se ci invierai la tua traduzione. Sarà utile per altri utenti.

PHP Form Builder

PHP Form Builder è incluso nel pacchetto e puoi utilizzarlo senza restrizioni sullo stesso dominio del tuo CRUD.

Ciò significa che puoi creare qualsiasi modulo desideri sul tuo sito web/progetto e utilizzare i plugin e le funzionalità integrate.

Per utilizzare PHP Form Builder nel tuo progetto, crea un file PHP dove desideri aggiungere un modulo oppure apri un qualsiasi file php esistente, quindi aggiungi questo codice all'inizio dello stesso:

use phpformbuilder\Form;

session_start();
include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/conf/conf.php';
include_once CLASS_DIR . 'phpformbuilder/Form.php';

A questo punto puoi creare i tuoi moduli. La documentazione è disponibile sul sito ufficiale: https://www.phpformbuilder.pro

Drag & drop Form Builder e Template

Il Drag & drop Form Builder e i template dei moduli non sono inclusi nel pacchetto di PHP CRUD Generator. Non si tratta di una restrizione, ma semplicemente del fatto che sono disponibili online e la maggior parte degli utenti non ne ha bisogno, riducendo così il peso del pacchetto PHPCG.

Se desideri scaricarli, sono disponibili qui:

Scarica il
Drag and drop tool e i template dei moduli di PHP Form Builder (zip - ~ 2,33 Mo)

Il file ZIP contiene due directory: drag-n-drop-form-builder e templates

Drag & drop Form Builder

  • Inserisci la directory drag-n-drop-form-builder all'interno della cartella class , proprio accanto alla cartella phpformbuilder .
    Puoi quindi aprire /class/drag-n-drop-form-builder/index.html nel tuo browser e iniziare a creare i tuoi moduli.
  • Quando ottieni i codici dei moduli generati dallo strumento drag & drop, non dimenticare di aggiungere sempre manualmente il codice specifico del CRUD Generator (come spiegato sopra):
    use phpformbuilder\Form;
    
    session_start();
    include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/conf/conf.php';
    include_once CLASS_DIR . 'phpformbuilder/Form.php';

Modelli

  • Inserisci la directory drag-n-drop-form-builder all'interno della cartella class , proprio accanto alla cartella phpformbuilder .
    Puoi quindi aprire /class/drag-n-drop-form-builder/index.html nel tuo browser e iniziare a creare i tuoi moduli.
  • I templates la directory può trovarsi in qualsiasi punto del tuo server, indipendentemente dalla cartella in cui si trova, i modelli funzioneranno correttamente.

Fonti e Crediti

Molte grazie agli autori per il loro ottimo lavoro

Changelog

Dopo qualsiasi aggiornamento, chiudi e riapri il browser per cancellare la SESSIONE PHP

versione 3.0.0 (10/2026)


    New Features:
        - Polar one-time-purchase license replaces the purchase code system (self-service activation, customer portal management)
        - new pricing page with the Polar checkout
        - reworked install wizard: step 1 combines the Polar license activation and the server prerequisites check
        - server-aware database connections: db-connect.php stores up to 2 per-server connection settings (localhost + remote), selected by server fingerprint and synchronizable between environments
        - new db-connection-recovery screen guides the user to the installer when no stored connection matches the current server
        - generator "Reinstall" button with optional backup ZIP before uninstall
        - add Danish translation (Generator, Admin panel and PHP CRUD Generator's website)
    Improvements:
        - PHP 8.1 required (installer check updated accordingly)
        - replace the legacy diff/merge ajax layer by the visual-diff-merge package
        - multilingual support of the installer and the admin templates
        - new DEBUG constant (configurable from the generator settings) replaces the ENVIRONMENT constant
        - automatic aria-labels on generated form fields and admin search controls (accessibility)
    Bug Fix:
        - remove unused PHPCG_USERDATA_TABLE definition (user_data table option no longer available)
    

versione 2.3.12 (02/2025)


    New Features:
    Improvements:
        - add a "refresh" button to the auto-updater to clear the cached versions
        - auto-updater now displays a message for the user if the PHP ZIP extension is missing
    Bug Fix:
        - fix 'time' fields session values in the generator's create form
    

versione 2.3.11 (01/2025)


    New Features:
    Improvements:
        - manage the cases where the database connection fails or the database is empty and display a proper error message
        - replace silent errors (@) with try/catch blocks
    Bug Fix:
        - fix database INSERT error with tables that have multiple indirect foreign keys
        - fix a problem with external fields in forms that didn't show
        - fix saving edited images in the image uploader when the image is preloaded from the database
        - fix custom time formats storage in the generator READ lists
    

versione 2.3.10 (11/2024)


    Bug Fix:
        - fix external fields indexing issue in the generator's generate create/edit form
        - fix custom datetime formats storage in the generator READ lists
        - fix the image uploader's editor to save files & thumbnails after editing
        - rewrite the image uploader's resizing code to avoid exceeding max width & height when both are set
        - fix wrong values in export data when external tables have the same fieldnames
        - fix php warning in generator forms with image fields when thumbs, crop or editor are not set
        - publish Db class with the latest changes for zero / null values in select queries
        - fix php 8.3 types errors
    

versione 2.3.9 (09/2024)


    Bug Fix:
        - fix a php8 json_decode error in the edit forms with select multiple or checkboxes
        - fix a php7.7 compatibility issue with the FormExtended class
    

versione 2.3.8 (09/2024)


    New Features:
        - Ability to filter data in lists by empty, null, and zero values.
    Bug Fix:
        - fix installer error when the default logo file doesn't exist on the server
    

versione 2.3.7 (09/2024)


    Improvements:
        - upgrade PHP Form Builder to the latest version (5.3.0)
    Bug Fix:
        - fix generator diff-files form error for installations in a subfolder
        - fix the admin filters that look for array values
        - fix the "Enable the ability to change styles from the admin dashboard" option in the generator configuration form
    

versione 2.3.6 (01/2024)


    New Features:
        - add a PHP Error Handler and Monitoring system with automatic email sending
        - add the PHP Error Handler and Monitoring configuration to the Generator's configuration tab
        - add the German translation
    Bug Fix:
        - fix the Material Datepicker plugin bug in admin forms
        - fix pickadate time picker reported bug: https://github.com/amsul/pickadate.js/issues/1243
        - fix file uploader image resizing ratios (previously not working properly in some specific cases)
    

versione 2.3.5 (12/2023)


    Improvements:
        - improve Spanish translations
    Bug Fix:
        - fix "|raw" apprearing in the list's tables headers"
        - fix quotes escaping in the forms help texts
    

versione 2.3.4 (11/2023)


    Bug Fix:
        - fix a weird error with the error_log function call in DB class
        - fix error with the Spanish translation
    

versione 2.3.3 (11/2023)


    New Features:
        - Add PHP Errors Monitoring with email sending. Available in the generator's configuration tab.
    Improvements:
        - lint code with SonarLint + PHP 8.2, remove all php deprecated and warning messages
    Bug Fix:
        - fix a bug with "update" queries using the same fieldname in both values and where clause
    

versione 2.3.2 (10/2023)


    Improvements:
        - add SQL group_by clause in DB->select() '$extras' argument
        - ability to use HTML code for field titles
    Bug Fix:
        - the custom fieldnames are now properly displayed in the single records views
        - fix image field addons display in the generator forms
        - fix admin infinite loading bug in Firefox due to an internal Pace loader bug (https://github.com/CodeByZach/pace/issues/510)
    

versione 2.3.1 (04/2023)


    Bug Fix:
        - fix the file comparison tab not showing the tool
        - fix the broken date pickers translations
    

versione 2.3 (03/2023)


    Improvements:
        - fix wrong links & images in the documentation
        - database insert now returns the last insert id if supported by the db driver
    Bug Fix:
        - fix plugins_path in class/Form.php (PHP Form Builder) when the plugins folder URL is set with $form->setPluginsUrl()
        - repair the database getLastInsertId() function
        - remove PHP warning with Secure class when passing NULL to the constraint query
        - fix floating values that were converted to int with input[type="number"]
        - fix query error with empty filters
        - fix a warning in admin forms with some special restriction queries
        - fix error when sorting fields from relational tables
        - fix Deprecated error in class.fileuploader.php
    

versione 2.2 (02/2023)


    Improvements:
        - remove the search box in the Edit in place's boolean selects
    Bug Fix:
        - fix non-working Generator lock
        - fix error on cascade delete - please regenerate your delete forms if they use cascade deletion to get them working properly.
    

versione 2.1 (01/2023)


    Improvements:
        - authentication module installer will keep the multiselect opened when choosing the admin tables
        - update the wordcharcount plugin to set the default maxWords to -1 (= infinity)
    Bug Fix:
        - fix a wrong query in create/update forms on external tables
        - fix tinymce theme in class/phpformbuilder/plugins-config-custom/tinymce.xml
    

versione 2.0.1 (01/2023)


    Improvements:
        - enable of the auto-update system for the package's version 2
    Bug Fix:
        - fix filters inappropriate error message when the filter data contains null values
    

versione 2.0 (01/2023)


    New Features:
        - switch from Mysqli to PDO with prepared queries
        - Oracle database support
        - PostgreSQL database support
        - Firebird database support
        - upgrade to Bootstrap 5
        - upgrade Bootswatch themes
        - add the SCSS source files to the package
        - rewrite the color palette and make use of the Bootstrap 5 color contrast utilities (.text-bg-xxx)
        - replace PHP Form Builder by the latest version
        - add 'Display the database errors' and 'Simulate and debug' options to the generator's general settings for easy database debugging.
        - add an option to the generator's general settings to display the data tables in the viewport with or without a vertical scrollbar.
        - highly improve the debugging system, which now can show all the queries (including Ajax requests), PDO parameters and performances using the 'Simulate and debug' option.
        - add the ability to set a custom CSS class for the filtered columns in the admin READ
    Improvements:
        - auto-highlight filtered columns in the admin READ lists and remove the "Column number" setting in the generator "advanced filters" settings
        - the generator's advanced filters test tool now analyzes the queries and display an explicit error message when a field are missing from the query.
        - optimisation of the CRUD Generator forms and tools for more efficient loading
        - complete redesign of the generator and admin dashboard User Interface (UI)
    

versione 1.29 (08/2022)


    Improvements:
        - add an error message with a link to the documentation when a user opens a READ lists in the admin with the authentication module enabled and the table not registered inside it.
    Bug Fix:
        - fix an error with external fields multiple checkboxes
    

versione 1.28 (07/2022)


    New Features:
        - Display of values from secondary relationships.
        E.g: address.city_id -> city.country_id -> country.name
        PHPCG now can show the country name straight from the address READ list and forms.
        - Add capability to load the select options dynamically in Ajax from the database in the admin forms
    Improvements:
        - add 'json' in database fields types
        - update and improve the file comparison tool
        - test Apache FollowSymLinks + admin 404 errors in the installer and return the appropriate help messages
    

versione 1.27 (06/2022)


    Improvements:
        - the installer will now show a clear message if the database connection is successful but no table is found, instead of showing a connection failure message.
    Bug Fix:
        - fix a missing translation in Italian
        - fix a missing parenthesis in generator/generator-templates/form-edit-template.php
    

versione 1.26 (05/2022)


    Bug Fix:
        - fix a missing parenthesis in generator/generator-templates/form-create-template.php
    

versione 1.25 (05/2022)


    Improvements:
        - PHPCG will now preselect the current values in READ lists live-edit's select dropdowns
        - the Live edit in admin READ lists will now show the values of the relational table instead after editing
        - fix PHP warning with mysqli_free_result, boolean and null values & PHP 8.1
        - add a loading indicator when loading Live Edit forms from the READ lists
    Bug Fix:
        - set mysqli_report to MYSQLI_REPORT_OFF during the installation to make sure that mysqli_query will not throw a warning when a query fails (which is normal when we test if a table exist for instance, the query returns false);
        - fix all the errors in the generator with PHP8 and the count() function when some fields have been deleted from the database
        - fix broken queries due to a regex that didn't include table/field names with a number in admin/class/crud/ElementFilters
        - fix PHP Warning with Ajax filters in the admin dashboard
        - escape JSON values in Live edit select dropdowns
    

versione 1.24 (02/2022)


    Improvements:
        - add a warning to the installer if the install folder is not at the root of the project
        - add the same warning to the Quick Start Guide
    

versione 1.23 (11/2021)


    Improvements:
        - update the TWIG engine to 3.3.4
        - add a "Select" type in the READ list generator to prevent the CREATE/UPDATE form from reverting to "text" when rebuilding the READ list
        - add a message in the installer to warn users if their url has uppercase characters (uppercase are not valid and cause problems).
    Bug Fix:
        - replace a php arrow function call in ElementsFilters.php for php <7.4 compatibility
    

versione 1.22 (10/2021)


    Improvements:
        - load the Codecanyon package images in documentation/index.html from local assets instead of Cloudinary CDN, which was not authorized for external hostnames
    Bug Fix:
        - fix a sql error caused by Secure users rights (Secure::getRestrictionQuery() returning a single space instead of an empty value)
        - the Date Range filters now remove the NULL values to detect the minimum / maximum available dates for filter
        - fix filter error with invalid JSON values in database in latest MySQL versions
        - fix missing images in the documentation on users localhost.
        - fix the admin search engine for relational fields with 2 values
    

versione 1.21 (08/2021)


    Bug Fix:
        - the PHP integer validator will now accept null values
        - In the generator - custom validation: removing a validator will now work as expected instead of always removing the last validation rule.
    

versione 1.20 (07/2021)


    New Features:
        - Add a new option in the generator that allows to choose the target (intermediate or final table) of the add/edit/delete buttons for relational tables
    Bug Fix:
        - fix error in Material Datepicker months (error coming from the original plugin)
        - fix missing ACTION header in the admin lists when the action buttons are on the right and bulk check is disabled
    

versione 1.19 (04/2021)


    Improvements:
        - update the admin css to align the nested tables vertically on top
    Bug Fix:
        - fix broken boolean filters in the admin panel
        - fix php warnings in the generator with validation auto + INT fields + MySQL v8
        - restore the "add new" button for nested tables (external relations) in the admin dashboard READ lists
        - fix paginated search results urls in the admin dashboard
        - fix wrong links from READ lists nested tables to their edit/delete form if the nested table name contains underscores
    

versione 1.18 (03/2021)


    New Features:
        - PHPCG now accepts PHP 8
    Improvements:
        - choice of the name of the license table during the installation process
        - improve php version checking during the installation process
        - update the Tinymce responsive filemanager plugin to the latest version - only in the Codecanyon package, not in the auto-update to avoid breaking customized code from users.
        - improve code standards for PHP 8 compatibility
    Bug Fix:
        - fix issues with boolean values storage in the generator
        - remove PHP warning with Ajax filters loading
        - remove PHP warnings in the generator about missing relations
        - fix weird field types returned by MySQL, e.g., "smallint unsigned" instead of "smallint", which is the official valid field type
    

versione 1.17 (03/2021)


        - quickly unreleased because of unexpected bugs
    

versione 1.16 (02/2021)


    New Features:
    Improvements:
    Bug Fix:
        - fix wrong behavior of the admin delete forms when no option or "no" is selected due to a previous update
        - solve assets urls issues in the main index.html and the documentation
    

versione 1.15 (12/2020)


    New Features:
        - add a new 'html' field type in the generator to show the HTML content in the admin lists instead of HTML code when the fields contain HTML
        - auto enable textarea + tinyMce in the generator for HTML fields
    Improvements:
        - add $mail->Sender in Form.php for PHPMailer to improve email deliverability
        - edit the Fileuploader PHP image upload script to crop the images AFTER resizing
        - (the original behavior that center-crops the original image is still available in the file code comments)
        - add a default empty value in the admin forms select, radio & checkbox when the field is not required
    Bug Fix:
        - validator now validates integers with leading zeros (PHP :: Bug #43372)
        - fix wrong ajax POST url in the admin search with paginated results
        - fix textarea custom heights in CREATE forms
    

versione 1.14 (11/2020)


    New Features:
        - add field height option for textarea in the generator
    Improvements:
        - Accept NULL date / time instead of registering the default '1970-01-01 00:00' timestamp in database
        - sanitize directory separator in class/Form.php to avoid wrong plugins url detection on server with inconsistent $_SERVER['SCRIPT_NAME'] and $_SERVER['SCRIPT_FILENAME'] values
        - show tinymce and word char count in the generator only for textarea
    Bug Fix:
        - remove php warning when posting a delete form without choosing yes/no
    

versione 1.13.3 (11/2020)


    Improvements:
        - improve scrolling behavior in admin nested tables show / hide
    Bug Fix:
        - fix non-working nested tables show / hide due to the new OverlayScrollbars plugin
    

versione 1.13.2 (11/2020)


    Bug Fix:
        - replace the deprecated admin table scrollbar plugin broken by the latest jQuery with the great new OverlayScrollbars plugin
    

versione 1.13.1 (11/2020)


    New Features:
        - new tutorial to customize the admin Home page: https://www.phpcrudgenerator.com/tutorials/customize-the-bootstrap-admin-homepage
        - add documentation to update the Authentication Module with a simple SQL query instead of reinstalling from scratch:
        https://www.phpcrudgenerator.com/documentation/index#admin-user-authentication-module
    Bug Fix:
        - fix a bug in the General Settings Form due to the previous update
    

versione 1.13 (11/2020)


    Bug Fix:
        - update jQuery to 3.5.1 due to a recent browser bug that prevented the generator forms to submit (nothing happened after clicking the submit button)
    

versione 1.12 (11/2020)


    Bug Fix:
        - prefill the generator create/update form properly with TinyMce and character counter options & values
        - remove php warning when installing the authentication module
        - move the generator scripts to the <head> part to avoid jQuery not loaded error in some special circumstances
        - change the target table in READ lists nested tables EDIT buttons to the end relationnal table instead of intermediate
        - edit class/Utils/isValidTimeStamp function to return true with number entry as well as string
    

versione 1.11 (09/2020)


    Improvements:
        - trim $url in CrudTwigExtension::ifRemoteFileExists($url) - vendor/twig/twig/src/Extension/CrudTwigExtension.php
        - replace "url" property in object classes with "item_url" to avoid conflicts with database fields named "url"
    Bug Fix:
        - fix php Notice when building single record READ lists
        - add empty default value in create  / update forms for fields that get their values from a table when no record exist
        - fix the filtered columns overlay colored by colorColumns in the admin READ lists
        - fix wrong default dates / times in UPDATE forms with the pickadate & material date/time pickers hidden fields
        - fix date value with date pickers when a form is posted with errors
        - fix the index of the colored columns in READ lists when some filters are active with bulk delete enabled and admin action buttons are on the left
    

versione 1.10 (06/2020)


    Improvements:
        - add "open url button" link to the documentation in the generator
        - better date & time formats management with the material datepicker plugin
        (rebuild your create/update forms if you want to benefit from these changes)
    Bug Fix:
        - fix date and time custom formats with translations in the create / edit forms
        - add missing session_start() in ajax bulk delete forms
    

versione 1.9 (06/2020)


    New Features:
        - add Bulk Delete capabilities to the admin dashboard's data lists
        - add date range picker filter to the generator filters options + the admin dashboard's data lists
        - add "Default field for search" option to the generator
    Improvements:
        - improve the generator design consistency
        - improve root path detection for servers with inconsistent directory separators
        - collapse admin inactive sidebar categories on categorie click
    Bug Fix:
        - fix Ajax filter results when the result options use 2 field names
    

versione 1.8 (05/2020)


    Improvements:
        - add timezone to the generator general settings
        - update PHP Form Builder to the latest version (4.4)
        - upgrade Twig to Twig 3.0 and others vendor libraries for PHP 7.4.x compatibility
        - add php DOM extension test in the installer's server capabilities tests
        - add a clear error message with a link to the help center on root path detection failure
        - add a loading indicator to the auto-updater
    Bug Fix:
        - fix wrong urls in admin forms when moving the admin files from localhost to the production server
        - fix the missing relational values in the exported data
        - fix admin login failure after reinstalling the authentication module with changing the user table name
        - replace the double quotes with single quotes in the generator delete form template main query
    

versione 1.7.7 (04/2020)


    Bug Fix:
        - fix stupid ROOT path error with subfolder installations due to the previous update
    

versione 1.7.6 (04/2020)


    Improvements:
        - add a server test file in the install folder to debug paths & urls
        - auto-apply ORDER BY changes from the generator to the admin panel without clearing PHP session
        - update ElementFilters to allow simple quotes in advanced filters
    Bug Fix:
        - fix ROOT path with server alias
    

versione 1.7.5 (04/2020)


    New Features:
        - add an "Ajax loading" option in the generator READ Lists filters (default: false)
            Hint: Enable Ajax loading on all the tables that contain a lot of records
            This new option allows to load the filters options on demand and will GREATLY improve the loading speed
        - add ORDER BY in the generator READ List main settings
        - add website search to https://www.phpcrudgenerator.com documentation, tutorials & help center
        - add default skin loader for each Bootstrap admin theme CSS in the general settings form
        - add the item name in the admin header h1
        - add a footer template for admin READ lists (admin/templates/footer.html)
    Improvements:
        - cleaner generator design
        - add instructions to solve 404 errors on some servers (lightspeed) in the help center + admin/.htaccess
        - various minor optimizations
    Bug Fix:
        - fix Tinymce's Responsive file manager url
        - edit the cUrl test file in install/
    

versione 1.7.4 (12/2019)


    New Features:
        - new setting available to choose to show search results in all on the same page or in a paginated list
        IMPORTANT: regenerate your READ lists from the generator if you want the paginated search results
                    or your paginated results will lead to 404 NOT FOUND
    Bug Fix:
        - fix nested table records in READ lists with only the primary key displayed
        - fix the "add new" button link (previously to 404) in READ lists nested tables with page > 1
        - the generator delete form now sets the correct stored options for external tables records
    

versione 1.7.3 (12/2019)


    New Features:
        - add an "Advanced" section in the tutorials with a new "Date and Time formats management logic tutorial
    Bug Fix:
        - fix wrong date / time formats in admin READ lists for servers without PHP intl extension in some random cases depending on the chosen format
        - fix date / time format dropdown helpers in the generator
    

versione 1.7.2 (11/2019)


    Improvements:
        - add Czech translation
        - improve documentation
    Bug Fix:
        - fix PHP warnings with forms & array values
        - fix error in general settings form when no logo is registered
        - fix filters query with number values & MySQL 5.7+
        - fix error in the Italian translation
        - fix PHP warning caused by primary keys aliases in the admin READ lists external relations
    

versione 1.7.1 (08/2019)


    Bug Fix:
        - Fix the Admin Dropdown Search field cross-browser compatibility
        (rebuild your lists to apply)
    

versione 1.7 (08/2019)


    New Features:
        - New live search with Ajax Autocomplete for Bootstrap Admin Panel READ lists
        (rebuild your lists to apply)
    Improvements:
        - Update Material Pickers for compatibility
    

versione 1.6.1 (07/2019)


    New Features:
        - Admin filters now can deal with JSON array values (select multiple, checkboxes)
        - New PHP CRUD Generator Tutorials channel on Youtube
    Improvements:
        - Array values from database now displayed as comma-separated values instead of raw JSON
        - improve the online Documentation & Tutorials
    Bug Fix:
        - Rewrite code to limit users rights to their own records
        (rebuild your lists / forms to apply)
    

versione 1.6 (06/2019)


    New Features:
        - 20+ new Bootstrap themes are now available
        - Choose your preferred Bootstrap theme from the General Settings form
        - Customize all the main layout Bootstrap CSS classes from the General Settings form
        - Compile the SASS files with Gulp using the new PHP CRUD Generator Gulp Github repository
        - New tutorial for Admin Theming & CSS: https://www.phpcrudgenerator.com/tutorials/customize-the-bootstrap-admin-panel-css
    Bug Fix:
        - Great, no known bug!
    

versione 1.5.6 (06/2019)


    Improvements:
        - The General Settings form in the generator now allows to change the Bootstrap admin main body class
    Bug Fix:
        - the installer was broken by the previous changes. Solved now.
        - Edit in place is no more available in Admin READ lists for users with insufficient rights
        - the broken "enable/disable" authentication module in the Generator now works again
    

versione 1.5.5 (06/2019)


    New Features:
        - The date & Time pickers languages can now be defined in the General Settings form
        - You can now choose the style of the Bootstrap admin date & Time pickers
        (default | Material Design)
        - New Italian translation - Many thanks to Alberto
    

versione 1.5.4 (06/2019)


    New Features:
        - New General Settings form available in the Generator
        - The action buttons of the Bootstrap Admin panel can now be on the left or right of the table
        - The filters of the Bootstrap Admin panel can now be triggered automatically when selected
        - You can change the site title and admin logo using the General Settings form
        - You can change the admin language using the General Settings form
        - You can change the admin skin using the General Settings form
    Improvements:
        - Show custom table names in Admin READ lists nested tables
    Bug Fix:
        - The Validation button in the Generator should now never overlap the forms
    

versione 1.5.3 (06/2019)


    New Features:
        - Action buttons in the admin panel can now be displayed in the
        1st column of the admin READ lists
    Improvements:
        - Responsive & others in admin CSS
    Bug Fix:
        - datepicker plugin
        - files & images upload
        - tooltips
        (these bugs were due to the previous update with latest PHP Form Builder)
    

versione 1.5.2 (05/2019)


    Bug Fix:
        - fix sorting buttons in admin panel READ lists
    

versione 1.5.1 (05/2019)


    Bug Fix:
        - fix export to excel/csv in admin panel
    

versione 1.5 (05/2019)


    New Features:
        - replace PHP Form Builder with the latest version 4.2.1
    Improvements:
        - Admin Panel Fast Loading optimization with the new LoadJS features
        - PHP CRUD Fast Loading optimization with the new LoadJS features
        - rewrite queries for admin restricted users rights
        - upgrade Bootstrap to the latest version 4.3.1
        - minor various others improvements
    

versione 1.4.9 (05/2019)


    New Features:
        - add new Export features (print - current view - all records) in admin READ lists
    

versione 1.4.8 (02/2019)


    New Features:
    Improvements:
        - add (very) strong protection for fileuploader plugin uploads
    Bug Fix:
        - remove some PHP warnings
        - solved admin sidebar duplicate items issue
    

versione 1.4.7 (02/2019)


    Bug Fix:
        - fix navbar issue with empty icons
    

versione 1.4.6 (02/2019)


    New Features:
        - New "array" field type in generator for checkboxes & select multiple values
        will show JSON decoded values in the READ lists
    Improvements:
        - better admin navbar content management ("Organize Navbar")
        - improve array values management in the generator
    Bug Fix:
        - fix non-working select multiple with "set" & "enum" field types
        - fix changelog url in auto-update success message
    

versione 1.4.5 (02/2019)


    New Features:
        - License system now accepts domain with multiple extensions
        e.g., domain.com, domain.eu, domain.co.uk are all valid with the same license.
        - New button in the Generator to reload fresh database structure
        (When you add or remove tables)
    Improvements:
    Bug Fix:
        - admin filters now accept zero values
        - fix queries in admin lists on external tables with direct relation (no intermediate table)
    

versione 1.4.4 (02/2019)


    New Features:
        - external records from relational tables can now be managed
        from the READ LISTS & the CREATE/UPDATE forms (!)
        - add self-referential foreign keys management
        - tables can now be removed/re-enabled from the admin navbar
        - add Spanish admin translation (Thanks to Sergio)
    Improvements:
        - export buttons (csv/xls[x]) now export the exact filtered list items
        - align single fields on the left in admin panels

    Bug Fix:
        - remove phone validation in auth. module installer
        - logout from generator/generator.php now does its job as intended
        - upgrade PHPMailer to latest 6.0.6 to fix PHP 7.3 warnings
    

versione 1.4.3 (12/2018)


    Bug Fix:
        - fix inverted label & value in form CREATE/EDIT templates
        - protect relation tables SELECT queries in form CREATE/EDIT templates
    

versione 1.4.2 (10/2018)


    New Features:
        - new "Add New" button in admin READ lists on external nested tables even if no record
    Improvements:
        - ADMIN panel: register URL query parameters in $_GET (Altorouter ROUTES doesn't deal with these).
        - the ADMIN ADD & UPDATE forms now redirect to the correct list if we come from a nested table (external relation)
        - move date_default_timezone_set from conf/conf.php to conf/user-conf.php
        - add Help & instructions for Microsoft IIS & NGINX servers
    Bug Fix:
        - "Add New" button in admin READ lists now always targets the right CREATE form
        even if there's several external nested tables in the list.
        - Fix several warnings & minor issues
    

versione 1.4.1 (10/2018)


    New Features:
        - add "Add New", "Edit" & "Delete" buttons in READ Lists nested tables for external tables records
    Improvements:
        - add compatibility for date & time without PHP intl extension
    Bug Fix:
        - definitely fix the Apache mod_security error on the install process with some misconfigured servers
    

versione 1.4 (10/2018)

Attenzione: se i tuoi elenchi READ di amministrazione contengono campi data o datetime, apri i modelli corrispondenti in /admin/templates, trova le funzioni toDate(...) e sostituisci il formato data PHP con il corrispondente formato data ICU.

nuovo online Tutorial PHP CRUD


    New Features:
        - PHPCG includes now the complete latest PHP Form Builder version with all its features & plugins.
        - Add the online knowledge base with numerous tutorials & videos
    Improvements:
        - improve date & time translations management - https://www.phpcrudgenerator.com/tutorials/translate-dates-times-in-admin-panel
        - add full date & time translation in admin lists & forms
        - change admin form action from absolute url to root relative url
        - add install/curl-test.php to help with CURL debbuging
    Bug Fix:
        - the generator now retrieves the correct stored values to be displayed in READ lists for the external fields
        - get the correct time value in admin edit forms with datetime fields
        - solve plugins URL detection with paths containing uppercase letters
    

versione 1.3.2 (08/2018)


    Improvements:
        - dates edit in place now get the current field value
        - image now crop from the center
    Bug Fix:
        - fix missing fields in update forms due to previous update error
        - fix admin lists bug with fields having uppercase characters
        - fix admin edit in place with dates & uppercase table name
    

versione 1.3.1 (08/2018)


    Improvements:
    Bug Fix:
        - fix Generator form create profiles
    

versione 1.3 (08/2018)


    Notes:
            - After this update you may have to reinstall the user authentication module from the Generator page.
    Improvements:
        - update server-side validation functions to accept empty values,
                except for the validators whose internal logic make values required.
                Details available here: https://www.phpformbuilder.pro/documentation/class-doc.php#php-validation-methods
        - the User Authentication Module now keeps the users & users profiles tables and records when uninstalling.
        - the User Authentication Module can now be reinstalled even if the users & users profiles table exist
        - improve user profiles management and rights limitations
        - the users rights changes now take effect without clearing the session
        - the admin sidebar doesn't show empty categories anymore
        - the only required fields in users table are now name, firstname, profile ID, email, pass & active
        (takes effect on new User Authentication Module installs only)
        - add simulate property to Generator.php to simulate when we reset a table structure from generator
        - remove several warnings & improve various feedback messages
    Bug Fix:
        - solve problem with updates & SSL errors on misconfigured servers
    

versione 1.2.4 (07/2018)


    Notes:
            - After this update you may have to reinstall the user authentication module from the Generator page.
    Improvements:
            - set default empty value for passwords in UPDATE FORMS
    Bug Fix:
            - solve CREATE/UPDATE forms generation with custom validation
            - solve READ LISTS generation with advanced filders
            - solve image path in admin when the field thumbs are not enabled
            - remove password validation in UPDATE FORMS if posted value is empty
            - correct select values count in generator CREATE/UPDATE forms with custom values
            - solve error 500 when adding new users
    

versione 1.2.3 (07/2018)


    New Features:
            - add an uninstallation process
            - add a login module for the generator on the production server
            - primary key management in admin forms
    Improvements:
            - remove the "select database" form in generator & auto select the correct database
            - add warnings for non-standard tables & field names (hyphenated)
            - improve password fields management in CREATE/UPDATE forms:
            better password encryption with Secure class
            password are now automatically optional on update forms with an helper text: "Leave blank to keep the current password"
            - turn fileuploader debug on for CREATE/UPDATE forms
            - improve documentation
            - improve auto-validation detection according to forms & database field types
    Bug Fix:
            - revert Twig template engine to version 1.35.4 to preserve PHP < 7.0 compatibility
            - regenerate css & js combined plugin files for CREATE/UPDATE forms when the forms are edited with the generator
            - fix generator which failed to validate when custom validators were selected while generating the CREATE/UPDATE forms
            - fix password encryption when changes are made in CREATE/UPDATE users table
    

versione 1.2.2 (07/2018)


    Improvements:
            - add user-conf file to avoid breaking user custom settings with updates
            - move the install folder outside the generator folder.
            - improve the updater script
            - improve url & path management
    Bug Fix:
            - fix server issues in some special configurations
    

versione 1.2.1 (07/2018)

Attenzione: se il tuo modulo di autenticazione non è abilitato, dopo l'aggiornamento apri php-crud-generator/conf/admin-lock.php e imposta ADMIN_LOCKED a false.


    Improvements:
            - move ADMIN_LOCKED and ADMIN_LOGO to separate files for easier updates
    Bug Fix:
            - fix several minor bugs
    

versione 1.2 (06/2018)


    Bug Fix:
            - fix authentication module installation (wrong users filters)
    

versione 1.1 (06/2018)


    New Features:
            - add File uploader to Generator + Admin panel
            - add version check & auto-updater
    Improvements:
            - update dependencies & move to vendor with Composer
            - improve ROOT path analysis
    Bug Fix:
            - correct date & time validation
            - correct value/display inversion with live-edit custom select
    

versione 1.0 (06/2018)


    First Release