linuxfront-v2-logistics/index.php

Overview

This is the entry point for the Tech Logistics public website. It handles session initialization, user login processing, and renders the rich homepage layout including a hero carousel, service sections, statistics, and company information.

PHP Initialization and Authentication

  • Cache & IP filter comments are present but disabled to allow broad access.
  • Includes global configuration and utility functions via inc/config.php.
  • If a valid Customer_ID exists in session, the user is redirected to welcome.php.
  • Flash messages are retrieved with getFlashData() and formatted by displayMsg().
  • On form submission ($_POST['action']), credentials are hashed and passed to loginCustomer_v2().
    • Successful logins redirect to welcome.php.
    • Failures capture an error message and trigger a customer alert via sendCustomerAlert().

Dependencies and Includes

  • inc/config.php: Database connections, helper functions, session management.
  • CSS (preloaded):
    • css/bootstrap.min.css
    • css/general.css
    • css/home.css
  • Google Font: Rubik (loaded via <link>).
  • Favicons & manifest: Touch icons and site webmanifest.
  • Meta templates: TEMPLATE_DIR . "inc/template_meta.php".
  • Panels:
    • Header: inc/panels/header-home.php
    • Contact team: inc/panels/contact_our_team.php
    • Footer: inc/panels/footer-home.php

Login Handling Functions

  • loginCustomer_v2($email, $pwd, $auto=false, $website="", $plain_pass="")
    • Authenticates against customers and customers_detail tables, applies portal-specific access, and populates session data (e.g. Customer_ID, itools, dashboard).
  • sendCustomerAlert($alertObject)
    • Logs login attempts (success & failure) for customer support.
  • getFlashData() & displayMsg($msg, $type='info')
    • Retrieve and render transient user messages (e.g. “Login failed”).

Frontend Content Structure

  • 🎬 Hero Carousel: Autoplaying video slide + four image-based slides with calls-to-action.
  • 🚀 Our Approach: Consultation methodology and optimization process.
  • 🤝 Client Consultation & Carrier Negotiations: Service highlights with image/text blocks.
  • 🔗 TMS Integration & Invoice Processing: Features of the complimentary TMS and AI-driven audit.
  • 💳 Manifesting & Payment, Monthly Reporting: Financial reporting services and custom GL coding.
  • 📦 Our Services Include: Icon grid linking to detailed service pages.
  • 📊 Stats Arrow Diagram: Animated counters showcasing company milestones.
  • 📈 Freight Study: Case study section with dynamic routing example.
  • 🏢 About Tech Logistics: Tabbed panel for “Our Story”, “Mission”, “Vision”, “Core Values”.

CSS Styling

  • Overrides and custom theming via an inline <style> block:
    • Bootstrap CSS variable settings and utility classes.
    • Section-specific styles (e.g. .our-approach-text-box, .services-box-container, .stats-big-arrow-container).
    • Responsive media queries for mobile adaptability.

JavaScript & Interactivity

  • Bootstrap Carousel: Data attributes control slide timing and fade transitions.
  • Bounce Animation: CSS keyframes for the down-arrow “scroll to next” indicator.
  • Cookie Consent: js/cookies.js manages user consent banner behavior.

Page Lifecycle

  1. Initialization: PHP includes, session check, and potential login processing.
  2. Head Assembly: CSS, fonts, meta tags, and preloads.
  3. Header Panel: Site navigation and potential login dropdown.
  4. Main Content: Hero carousel, service sections, stats, case study, about panels.
  5. Contact & Footer Panels: Team contact info and site footer.
  6. Scripts Execution: Cookie consent, carousel, and any additional frontend logic.

Conclusion

index.php serves as both the public homepage and the login handler for Tech Logistics customers. It stitches together configuration, authentication logic, and a modular template system to deliver a feature-rich, responsive user experience.