Skip to content

Client and server side library of functions in PHP, JQUERY UI and Bootstrap for a CRUD application.

License

Notifications You must be signed in to change notification settings

coyote333666/pje

Repository files navigation

pje - PHP Jquery UI Editor

Client and server side library of simple functions in JQUERY UI and PHP for editing rows of dynamic data tables (datagrid) generated by a Postgresql database. The library includes all functions of a CRUD application (create, retrieve, update, delete). The library also includes functions for pagination, column sorting, number of lines per page, export to file. Bootstrap is used for the front end. You can export the result in an excel table, csv or text with a Jquery module.

The editing functions are inspired by the blog PHP Ajax Crud using JQuery UI Dialog from Weblesson

Capture d’écran du 2023-10-03 10-46-41 Capture d’écran du 2023-10-03 14-51-14 Capture d’écran du 2023-10-03 14-51-30 Capture d’écran du 2023-10-03 10-47-55

Requirements

  • PHP 7.2.9 or higher;
  • pdo_pgsql PHP extension enabled in php.ini;
  • Postgresql standalone OR Docker-compose

Installation

Verify that you have installed, depending on your environment, docker-compose OR postgresql, npm, yarn, nodejs and git.

Verify that you have PHP installed : sudo apt-get install php on linux or, for windows, use php already included in xampp. If you have Windows, do not forget to indicate in the environment variable PATH, the path to access php.exe (for example, C:\xampp\php).

run these linux commands (password : test):

sudo su postgres
psql
CREATE DATABASE test
    WITH 
    OWNER = postgres
    ENCODING = 'UTF8'
    CONNECTION LIMIT = -1;
CREATE USER test WITH
  LOGIN
  NOSUPERUSER
  INHERIT
  NOCREATEDB
  NOCREATEROLE
  NOREPLICATION;
ALTER ROLE test with password 'test';
ALTER USER test with password 'test';
REVOKE ALL ON DATABASE test FROM public;
GRANT ALL ON DATABASE test TO test;        
exit
cd /var/www/html
sudo git clone https://github.com/coyote333666/pje pje
cd pje
psql -f script.sql -U test

Install dependencies:

cd /var/www/html
sudo yarn add jquery-ui
sudo yarn add tableexport
sudo yarn add font-awesome
sudo yarn add bootstrap

Then access the application in your browser at the given URL (localhost/pje).