https://www.concatofilippo.com/companymanagementsystem/
This repository contains the code for an Employee Management System (EMS) that supports operations on employees and departments. The system allows you to view, update, create, and delete employee and department data. Users can opt to store the data either in a database (db
) or as a file.csv (file
), making it versatile and adaptable to various storage preferences.
-
Dynamic Data Persistence: Easily switch between database storage and file storage through the
PERSISTENCY
configuration. -
CRUD Operations:
- Employee: View all employees, view employees by department, update employee details, create new employees, and delete employees.
- Department: View all departments, update department details, create new departments, and delete departments.
-
Autoload Classes: The system utilizes PHP's
spl_autoload_register
function to automatically include classes as needed.
-
config.php: Contains configuration settings.
-
classes/: Directory containing the classes needed for the EMS system.
-
views/: Directory that houses the view templates.
- PHP 8.0+.
- Configured database if using the
db
option forPERSISTENCY
. - Write permissions on the server if using the
file
option forPERSISTENCY
.
- Clone this repository:
git clone https://github.com/fppcnc/company
- Navigate to the project directory:
cd company
-
Configure the
config.php
file as per your requirements. -
If using the
db
option, ensure that your database is set up and the connection credentials are updated inconfig.php
.4a. You can create and populate a db for this application running the code-example inside the folder
sql
. -
If using the
file
option, ensure that the server has necessary permissions to read/write files.
Simply access the main PHP file in your web browser and use the frontend interface to perform CRUD operations on employees and departments.
Pull requests are welcome. Please ensure your code follows the existing code style.
For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.