How nirmalfdo183/web_project-moviebook works
1. This is a monolithic Core PHP application for online movie booking, with a split between the public customer site and a separate admin back office. The main entry points are top-level PHP pages, not a framework-based app.
2. The public UI is page-oriented: index.php, allmovie.php, movie_details.php, seatbooking.php, payment.php, my_bookings.php, contact.php, feedback.php, and account pages like login.php, register.php, forget.php, reset_password.php, and edit_profile.php. Shared layout is assembled through header.php, footer.php, breadcrumb.php, and CSS/JS assets under css/ and js/.
3. The booking flow is the core runtime path: users browse movies, open a movie detail page, choose show/seat selection in seatbooking.php, then proceed to payment-related pages (payment_form.php, payment.php). After booking, tickets can be viewed, downloaded, or printed through my_bookings.php, download_ticket.php, temp_ticket_show.php, and ticket-related scripts.
4. The app has a clear ticketing/output subsystem. It bundles tcpdf/ for PDF generation and qr-code-main/ for QR code generation, which strongly suggests tickets are produced as downloadable PDFs with embedded QR codes for validation at the theater.
5. Authentication and profile management are handled entirely in PHP with dedicated endpoints for signup, login, logout, password recovery, and validation. check_username.php, forgot_password_request.php, forget_password.php, reset_password.php, and logout.php indicate a self-managed user account flow rather than an external identity provider.
6. The admin area is isolated under admin/ and has its own login, layout templates, scripts, and styles. Key admin screens include admin/index.php, admin/Add-movie.php, admin/Theater_and_show.php, admin/customers.php, admin/users.php, and admin/feedback.php, with reusable admin chrome in admin/templates/.
7. Admin responsibilities center on content and operational management: adding movies, configuring theaters/showtimes, viewing customers/users, reviewing feedback, and handling data insertion/search. admin/search_tmdb.php indicates the admin can enrich movie data from the TMDb API, making the system partially dependent on an external movie metadata service.
8. Persistence is relational and file-backed by a SQL dump. moviebook.sql is the database schema/bootstrap, while database_connection.php, Database.php, and admin/Database.php are the connection layers used by the public and admin sides. The architecture implies a shared database accessed directly from PHP pages.
9. Server-side processing is mostly request/response with some AJAX support. Files like allmovie_fetch.php, feedback_action.php, check_username.php, and admin/ajaxValidation.js show that certain UI actions are asynchronously validated or populated without full page reloads.
10. The application is styled as a traditional server-rendered site. Most interaction is driven by static assets in css/, js/, img/, fonts/, and admin/css/admin/js, with Bootstrap and custom theme files handling page composition, forms, and booking UI.
11. The repo includes a large amount of vendored third-party code rather than depending only on Composer packages. tcpdf/ and qr-code-main/ are embedded libraries, and vendor/ suggests additional Composer-managed dependencies. This matters architecturally because ticket generation and output formatting are implemented locally, not outsourced.
12. If you are drawing the architecture, the main boundaries are: public customer UI, admin back office, shared database layer, ticket/PDF+QR generation, and external movie-metadata integration. Data primarily flows from browser forms to PHP handlers to MySQL, then back to rendered HTML/PDF ticket artifacts.
Main entry points: header.php Shared layout · database_connection.php DB access · Add-movie.php Content ops · download_ticket.php Tickets
Components 20
Public site
Customer-facing pages and shared layout for browsing, booking, and account management.
- Home · Landing page for the customer site.
index.php - Browse movies · Movie listing and discovery page.
allmovie.php - Movie details · Detail page for a selected movie and show context.
movie_details.php - Seat booking · Core seat and show selection step in the booking flow.
seatbooking.php - Payment form · Collects payment details before final booking.
payment_form.php - Payment · Final payment processing and booking confirmation step.
payment.php - My bookings · User booking history and ticket access hub.
my_bookings.php - Auth & profile · Login, registration, password recovery, logout, and profile editing.
login.php
Admin back office
Separate administrative UI for content, show, and user operations.
- Admin home · Entry point for the back-office admin experience.
admin/index.php - Content ops · Admin pages for adding movies, theater/show setup, insertion, and search enrichment.
admin/Add-movie.php - Users & feedback · Admin views for customers, users, and feedback moderation.
admin/customers.php - Admin chrome · Reusable navigation, sidebar, top bar, and footer templates for the admin area.
admin/templates/navbar.php
Shared runtime
Common database, assets, and utility layers used by both sides.
- Shared layout · Common page chrome and navigation used across the public site.
header.php - Assets · Shared CSS, JavaScript, images, and fonts for the rendered site.
css - DB access · Shared connection and helper classes for direct MySQL access.
database_connection.php - Schema dump · Database schema and seed data for the movie booking application.
moviebook.sql
Ticket output
PDF and QR code generation used for downloadable tickets.
- Tickets · Ticket viewing, download, temporary render, and cancellation-related handling.
download_ticket.php - PDF engine · Embedded TCPDF library used to generate downloadable PDF tickets.
tcpdf/tcpdf.php - QR engine · Embedded QR code library used to embed validation codes in tickets.
qr-code-main/src/QrCode.php
External services
Third-party or external dependencies integrated by the app.
- TMDb API · External movie metadata source used by admin enrichment.
Connections 25
- Home → Shared layout: renders with · Public landing page uses the shared site chrome.
- Browse movies → Shared layout: renders with · Movie browsing page is assembled with shared header/footer.
- Movie details → Shared layout: renders with · Details page shares the same site shell.
- Seat booking → Shared layout: renders with · Booking page uses common layout and styling.
- Payment form → Shared layout: renders with · Checkout form is presented in the shared public shell.
- Payment → Shared layout: renders with · Payment step uses shared site templates.
- My bookings → Shared layout: renders with · Booking history page uses the shared layout.
- Auth & profile → Shared layout: renders with · Account pages are rendered through shared templates.
- Shared layout → Assets: loads · Shared templates depend on CSS and JavaScript assets.
- Home → DB access: reads data · Public pages query the shared database layer for listings and content.
- Browse movies → DB access: reads data · Movie list is populated from the database.
- Movie details → DB access: reads data · Movie and show details are fetched from the shared database.
- Seat booking → DB access: writes booking · Seat selection and reservation state are persisted through the DB layer.
- Payment → DB access: confirms booking · Successful checkout updates booking records in the database.
- My bookings → Tickets: opens tickets · Booking history links to viewing, downloading, and printing tickets.
- Tickets → PDF engine: generates PDF · Ticket download output is produced with TCPDF.
- Tickets → QR engine: embeds QR · Tickets include QR codes for validation.
- Admin home → Admin chrome: renders with · Admin dashboard uses its own reusable layout templates.
- Content ops → Admin chrome: renders with · Content management screens use admin chrome.
- Users & feedback → Admin chrome: renders with · User and feedback screens share the admin shell.
- Admin home → DB access: manages data · Admin area reads and writes directly through the shared database layer.
- Content ops → DB access: manages data · Movie, theater, and show administration persists to the database.
- Users & feedback → DB access: manages data · Customer, user, and feedback management uses the shared database.
- Content ops → TMDb API: enriches metadata · Admin can pull movie metadata from TMDb.
- Schema dump → DB access: bootstraps · SQL schema defines the data model used by the PHP connection layer.