Footer Panel (linuxfront-v2-logistics/inc/panels/footer.php)
This panel renders the site footer. It displays dynamic links, branding, a modal popup for Canadian quotes, and loads third-party analytics and tracking scripts. It depends on global arrays and constants initialized in the application’s configuration.
Dynamic Footer Links 📜
This section loops through $staticPagesArray and outputs links for pages marked include_in_footer = 'Y'.
The array is populated from the static_pages table at runtime .
Excerpt from footer.php :
<div id="footer_links">
<?php foreach($staticPagesArray as $pageArray) {
if($pageArray['include_in_footer'] === 'Y') { ?>
<a href="<?= $pageArray['page_key'] ?>.php">
<?= $pageArray['page_name'] ?>
</a>
<?php } } ?>
<a href="contact_us.php">Contact Us</a>
</div>
- Iteration: Uses
foreachto traverse each static page. - Condition: Only pages with
include_in_footer == 'Y'render. - Fallback: Always includes a “Contact Us” link.
Brand & Copyright 🏷️
This block shows the company’s name, current year, and branding elements.
<p>
© 2008-<?= Date("Y") ?> Tech Logistics All Rights Reserved.
</p>
<p align="right">
Powered by:
<a target="_blank" href="https://www.techtransport.com/">
Tech Transport, Inc.
</a>
</p>
<center>
<img
src="https://www.techlogistics.com/images/Tech-Logistic.jpg"
width="200"
alt="Tech Logistics Logo"
>
</center>
- Dynamically computes the current year with
Date("Y"). - Links to Tech Transport’s main site.
- Embeds a brand image (200px wide).
Canadian Quotes Modal 📨
This panel defines a hidden <div> and attaches a jQuery click handler to elements with the .startquoteclass CSS class . It then opens a jQuery UI dialog loading an iframe to canadian_customer_popup2.php.
<div id="canadian_popup">Loading...</div>
<script type="text/javascript">
$(document).ready(function() {
$("#canadian_popup").hide();
$(".startquoteclass").live('click', function() {
var type = $(this).attr("rel");
$("#canadian_popup")
.attr("title", "Domestic Canadian / Cross Boarder, US/CN")
.html('<iframe id="modalIframeId" width="100%" height="100%" frameBorder="0" scrolling="auto"></iframe>');
$("#modalIframeId").attr("src", "<?= SITE_PATH ?>canadian_customer_popup2.php?type=" + type);
$("#canadian_popup").dialog({
modal: true,
height: 350,
width: 525,
resizable: true
});
});
});
</script>
- Selector:
.startquoteclasselements trigger the popup. - Iframe SRC: Built using the
SITE_PATHconstant (e.g.http://www.freightanywhere.com/) . - Dialog: Uses jQuery UI’s
dialog()widget to display the iframe.
Popup Flowchart
flowchart TD
A[User clicks .startquoteclass] --> B[Capture rel attribute (type)]
B --> C[Prepare #canadian_popup content]
C --> D[Set iframe src to SITE_PATH + popup2.php?type=type]
D --> E[Open jQuery UI dialog (modal)]
Analytics & Tracking 📊
The footer loads multiple third-party scripts for analytics, visitor-intelligence, and business-data enrichment:
| Library | Purpose | Source URL |
|---|---|---|
| Google Analytics (gtag.js) | Traffic analysis (GA4) | https://www.googletagmanager.com/gtag/js?id=G-J9ZXSYJ47G |
| D41 Visitor Intelligence Sync | Opt-out / sync info | //paapi307.d41.co/sync/ |
| D&B CoreTag (dnb_coretag_v6.min.js) | Corporate data enrichment | //cdn-0.d41.co/tags/dnb_coretag_v6.min.js |
D&B dnbvid.getData(...) callback |
Fetch D&B data and map variables | Inline after CoreTag script |
Note: The older
ga.jssnippet is commented out but retained for reference.
Dependencies & Related Files 🔗
inc/config.php
Defines constants likeSITE_PATHand email settings .inc/templates-config.php
Populates$staticPagesArrayfrom thestatic_pagestable .- Navigation Panel
Renders<a class="startquoteclass">links that trigger the Canadian popup . - jQuery & jQuery UI
Ensure jQuery library and UI dialog widget are loaded before this panel. - CSS
Style#footer_links,#canadian_popup, and dialog via site-wide CSS (e.g.template.css,common.css).
Usage:
Include this panel at the bottom of every front-end template to provide consistent navigation, branding, and analytics across the site.