- Colection of 65 PHP scripts for $4.29 each
How we code in PHP
For all PHPJabbers scripts, we use our own in-house built framework that's really easy to understand and work with. Our PHP scripts are based on the Model View Controller (MVC) programming model, which you can read more about here.
Take a look below for an example of the file structure of our PHP scripts.
Script root folder
app - this is the folder where all important script files are stored
core - this is the folder where framework files are and as per our license agreement you cannot modify them as they are obfuscated. Even without access to the framework code you can do any change to our scripts - change layout, add/edit/delete fields, add/edit/delete features, and so on. Upon request we can provide documentation for the framework so you can study how it works.
index.php file is the master file. Based on the parameters passed, it loads the correct page. For example, if you go to the options page of the script you will notice that the URL in your web browser is this
index.php?controller=pjAdminOptions
This means that the layout files are placed in views/pjAdminOptions and the controller file is
pjAdminOptions.controller.php
More about Controllers and Views below.
app folder
config - configuration file, database structure files, functions file
controller - these are all the files where PHP functions are defined for each script component. For example all PHP functions for managing script options are defined in AdminOptions.controller.php
models - here are all the files where the MySQL tables and the data structure are defined for each script component. For example, in Booking.model.php file you will see all the data fields used for storing booking details
plugins - we use different plugins for the most popular functionalities. For example a PayPal payment plugin which is the same for all our products.
views - these are the layout files for the backend and front end
web - this is the folder where all images, JavaScript code and CSS are stored
app/views folder
These are the layout files for backend and front end. They are organized in sub-folders where the folder name is the section of the script and its files are the actual pages.
For example in the subfolder pjAdminOptions, you will find the files for the script layout related to the admin page where script options are managed.
app/controllers folder
In each of these files you will find the PHP functions used to manipulate all the data. For example, if you open pjAdminReservations.controller.php, which is available in most of our booking scripts, you will see functions to manage booking details:
function pjActionCreate() - to add a new reservation
function pjActionDeleteReservation() - to delete a reservation
function pjActionExportReservation() - to export reservations details
function pjActionCalcPrice() - to calculate reservation price
function pjActionGetReservation() - to get reservation details
function pjActionIndex() - to list all reservations
function pjActionUpdate() - to update a reservation
We also have most of the code that's used multiple times taken out from the different files and gathered in one place (/components/), so if you need to modify the code, you only need to edit it in one place.