PHP Car RentalUser Manual Visit PHP Car Rental →
Customizing & Technical

Combining with other scripts

The script is built on the same small framework as the other products of the family. That makes combining two products into one website or one admin panel much easier than usual.

What is shared

  • DatabasePDO, PageController, PageModel and TemplateEngine keep the same names and public methods.
  • The admin panel uses the same template, AdminUI, AdminRouter and AdminUser classes and the same admin tables (users, groups, permissions, settings, pages, languages).
  • Every table has a configurable prefix, so two scripts can live in one database.
  • Language files are arrays of keys and values in the same format.

Typical steps

  1. Install both scripts with different table prefixes, or merge into one prefix.
  2. Copy the ADMIN/<category> folders of one script into the other and merge the arrays in pages_structure.php.
  3. Copy the extension files of the second script to extensions/ and attach them to pages (Pages and menu).
  4. Merge the permission rows so that groups can open the new pages (Administrators, groups and permissions).
  5. Copy ADMIN/include/admin_helpers.php and ADMIN/assets/admin-extra.css if you use pages that depend on them.

The car pages of the admin use CSS classes starting with ax- from admin-extra.css, so merged panels do not need inline styles.

Last updated