| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/usa_sites/newusafunding.com/layout/ |
Upload File : |
<?
/**
* /layout/body.php
*
* This body file will echo the output buffer data within a HTML standard body
*
* @copyright 2016-2021 Synergy Pro Marketing
* @author Aaron Campbell <aaron@synergymentoring.com>
* @license None, All Rights Reserved
* @package Layout
* @filesource
*/
$body = ob_get_clean();
include($_SERVER['DOCUMENT_ROOT']."/layout/functions/login.php");
if(!empty($siteCode))
{
/*
* -- Versioning Variable Declaration --
* Page version Types:
* - landing
* - content
* - post
* - media
* - social
* - form
* - members
*
* */
// set when it hasn't been declared by another function or page
if(empty($pageType))
{
$pageType = "landing";
}
$pageType = clean($pageType);
if(empty($pageVersion))
{
$pageVersion = "1.0.0.0";
}
$siteSettings = array();
$siteHeaderData = $db->query("
SELECT
*
FROM lc2systems.headers
WHERE
site_code = '$siteCode'
AND
status = 'active'
AND
page_type = '$pageType'
AND
version = '$pageVersion'
ORDER BY version DESC
LIMIT 1
");
foreach($siteHeaderData[0] as $headerKey => $headerValue)
{
if($headerKey == 'header' && $headerValue > 0)
{
$header = $headerValue;
$header = ($header * 1);
}
if($headerKey == 'footer' && $headerValue > 0)
{
$footer = $headerValue;
$footer = ($footer * 1);
}
if($headerKey == 'categories')
{
$headerMenuCategories = explode(",", $headerValue);
for($i=0; $i<count($headerMenuCategories); $i++)
{
$categoryData = $db->query("
SELECT
short_name AS label,
slug
FROM grdb.grd_categories
WHERE
categories_id = '".$headerMenuCategories[$i]."'
");
$categorySlug = preg_replace("/_/", " ", $categoryData[0]['slug']);
$categorySlug = ucwords(strtolower($categorySlug));
$categorySlug = preg_replace("/ /", "", $categorySlug);
$categoryData[0]['id'] = "headerCategory".$categorySlug;
$siteSettings['header'][$headerKey][] = $categoryData[0];
}
}
else
{
if($headerValue == "0" || $headerValue == "1")
{
$headerValue = ($headerValue * 1);
}
$siteSettings['header'][$headerKey] = $headerValue;
}
if($headerKey == 'footer' && $footer > 0)
{
$sitesFooter = $db->query("
SELECT
*
FROM lc2systems.footers
WHERE
footer = '$footer'
LIMIT 1
");
if($sitesFooter[0]['header'] > 0)
{
$assignedHeader = $sitesFooter[0]['header'];
$assignedHeader = ($assignedHeader * 1);
$assignedHeaderData = $db->query("
SELECT
*
FROM lc2systems.headers
WHERE
header = '$assignedHeader'
LIMIT 1
");
$footer = $assignedHeaderData[0]['footer'];
$sitesFooter = $db->query("
SELECT
*
FROM lc2systems.footers
WHERE
footer = '$footer'
LIMIT 1
");
}
$menuData = $db->query("
SELECT
menu,
title,
class,
description
FROM lc2systems.menus
WHERE
footer = '$footer'
");
for($x=0; $x<count($menuData); $x++)
{
$sitesFooter[0]['menu'][$menuData[$x]['menu']]['data'] = $menuData[$x];
$footerMenuItems = $db->query("
SELECT
mi.*,
m.title AS menu_title
FROM lc2systems.menu_items AS mi
LEFT JOIN lc2systems.menus AS m
ON mi.menu = m.menu
WHERE
mi.menu = '".($menuData[$x]['menu'] * 1)."'
AND
mi.status = 'active'
ORDER BY priority ASC
");
$sitesFooter[0]['menu'][$menuData[$x]['menu']]['items'] = $footerMenuItems;
}
$siteSettings['footer'] = $sitesFooter[0];
}
}
include($_SERVER['DOCUMENT_ROOT']."/layout/functions/getFlexboxData.php");
$siteSettings['header']["flexbox"] = $flexboxes;
$header = 0;
include($_SERVER['DOCUMENT_ROOT']."/layout/functions/getFlexboxData.php");
$siteSettings['footer']["flexbox"] = $flexboxes;
}
$_SESSION['version'] = $siteSettings['header']['version'];
if($db->is_connected())
{
$todayDayOfMonth = "";
if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/settings.json'))
{
$jsonBackup = fopen($_SERVER['DOCUMENT_ROOT'].'/settings.json', 'w');
fwrite($jsonBackup, json_encode($siteSettings));
fclose($jsonBackup);
}
else
{
$todayDayOfWeek = date("N");
$todayDayOfWeek = intval($todayDayOfMonth);
if($todayDayOfWeek == 1 || $todayDayOfWeek == 3 || $todayDayOfWeek == 5)
{
$settingsJson = json_encode($siteSettings);
$oldJsonBackup = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/settings.json');
if($settingsJson != $oldJsonBackup)
{
$jsonBackup = file_put_contents($_SERVER['DOCUMENT_ROOT'].'/settings.json', $settingsJson);
}
}
}
}
else
{
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/settings.json'))
{
$siteSettings = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/settings.json');
$siteSettings = json_decode($siteSettings, TRUE);
}
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<?
if($phone || $tablet)
{
?>
<!-- ================================================================================================ -->
<!-- DEVICE VIEWPORT TAG -->
<meta name="viewport" content="initial-scale=<?=$scale?>, minimum-scale=<?=$scale?>, maximum-scale=<?=$scale?>" />
<?
}
?>
<!-- ================================================================================================ -->
<!-- PAGE TITLE -->
<title>
<?=$title?>
</title>
<meta name="description" content="<?=$description?>" />
<!-- ================================================================================================ -->
<!-- STYLE SHEETS -->
<link rel="stylesheet" type="text/css" href="/vx_/css/noramlize.css" />
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<?
//<link rel="stylesheet" type="text/css" href="/vx/layout/style/font-awesome/css/font-awesome.min.css">
?>
<link rel="stylesheet" type="text/css" href="/vx_/css/common.css" />
<link rel="stylesheet" type="text/css" href="/vx_/css/app.css" />
<?
if(!empty($siteSettings['header']['custom_css']))
{
?>
<link rel="stylesheet" type="text/css" href="/vx_/css/<?=$siteSettings['header']['custom_css']?>.css" />
<?
}
if(file_exists($_SERVER['DOCUMENT_ROOT']."/vx_/css/$pageVersion/app.css"))
{
?>
<link rel="stylesheet" type="text/css" href="/vx_/css/<?=$pageVersion?>/app.css" />
<?
}
?>
<!-- ================================================================================================ -->
<!-- APPLICATION ICONS -->
<link rel="manifest" href="/vx_/images/icons/manifest.json" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-TileImage" content="/vx_/images/icons/ms-icon-144x144.png" />
<meta name="theme-color" content="#ffffff" />
<link rel="shortcut icon" href="favicon.ico" />
<!-- ================================================================================================ -->
<!-- JAVASCRIPT/ANGULARJS -->
<script language="javascript" type="text/javascript" src="/layout/js/jquery/jquery-1.9.1.js"></script>
<script src="/layout/js/angular.min.js"></script>
<script src="/layout/js/angular-payment.js"></script>
<script type="application/javascript">
var debug = <?=(!$debug) ? 'false' : 'true'?>;
var app = angular.module('NewFunds', ['angularPayments']);
app.run(function($rootScope, $http, $interval, $timeout, $window, $document) {
$rootScope.site = {};
$rootScope.site.settings = <?=(!empty($siteSettings) ? str_replace("'", "\'", json_encode($siteSettings)) : '{}')?>;
$rootScope.icons = <?=(!empty($icons) ? str_replace("'", "\'", json_encode($icons)) : '[]')?>;
JSON.parse(angular.toJson($rootScope.site.settings));
$rootScope.header = $rootScope.site.settings.header;
$rootScope.footer = $rootScope.site.settings.footer;
$rootScope.debug = debug;
$rootScope.phone = <?=(!$phone) ? 'false' : 'true'?>;
$rootScope.trackingData = <?=(!empty($trackingData) ? str_replace("'", "\'", json_encode($trackingData)) : '{}')?>;
$rootScope.versionPath = "<?=$versionPath?>";
$rootScope.yearList = [];
for(var i = 0; i < 10; i++)
{
$rootScope.yearList.push((2017-i));
}
$rootScope.deviceStatus = function() {
$rootScope.navigator = window.navigator;
try {
var connection = $rootScope.navigator.connection || $rootScope.navigator.mozConnection || $rootScope.navigator.webkitConnection;
var type = connection.type;
$rootScope.network = type;
function updateConnectionStatus()
{
$rootScope.network = connection.type;
}
connection.addEventListener('typechange', updateConnectionStatus);
}
catch(e) {
$rootScope.network = "wifi";
}
$rootScope.online = $rootScope.navigator.onLine;
$rootScope.cookieEnabled = $rootScope.navigator.cookieEnabled;
$rootScope.trackingData.network_type = $rootScope.network;
};
$rootScope.deviceStatus();
<?
if($user > 0)
{
/**
*
* The user has logged in
*
* */
?>
$rootScope.sessionData = <?=(!empty($sessionData) ? str_replace("'", "\'", json_encode($sessionData)) : '[]')?>;
$rootScope.userData = <?=(!empty($userData) ? str_replace("'", "\'", json_encode($userData)) : '[]')?>;
$rootScope.lastLogin = '<?=$lastLogin['signindate']?>';
$rootScope.teleSeminars = <?=($teleSeminarSubscription ? 'true' : 'false')?>;
$rootScope.userPreferences = <?=(!empty($userPreferences) ? str_replace("'", "\'", json_encode($userPreferences)) : '[]')?>;
<?
}
else if($user <= 0 && $lead > 0)
{
/**
*
* The user has not logged in but has filled out the application
* and we have a lead ID for their application
*
* */
?>
$rootScope.sessionData = <?=(!empty($sessionData) ? str_replace("'", "\'", json_encode($sessionData)) : '[]')?>;
$rootScope.userData = <?=(!empty($userData) ? str_replace("'", "\'", json_encode($userData)) : '[]')?>;
$rootScope.sameAsShipping = false;
var sa = angular.equals($rootScope.userData.street, $rootScope.userData.billing);
if (sa)
{
$rootScope.sameAsShipping = true;
}
$rootScope.needsAddress = false;
if($rootScope.userData.street)
{
if(!$rootScope.userData.street.zip || $rootScope.userData.street.zip == '')
{
$rootScope.needsAddress = true;
}
}
<?
}
?>
$rootScope.onOrder = "<?=$onOrder?>";
$rootScope.onComplete = "<?=$onComplete?>";
$rootScope.onUpsell = "<?=$onUpsell?>";
$rootScope.orderSequence = <?=(!empty($orderSequence) ? str_replace("'", "\'", json_encode($orderSequence)) : '[]')?>;
$rootScope.siteDomain = "<?=$siteDomain?>";
$rootScope.siteName = "<?=$siteName?>";
$rootScope.sitePhone = "<?=$sitePhone?>";
$rootScope.siteAddress = "<?=$siteAddress?>";
$rootScope.siteCCDescriptor = "<?=(isset($_SESSION['siteCCDescriptor']) ? $_SESSION['siteCCDescriptor'] : '')?>";
$rootScope.siteFee = "<?=$siteFee?>";
$rootScope.monthlyFee = "<?=$monthlyFee?>";
$rootScope.teleseminarFee = "<?=$teleseminarFee?>";
$rootScope.categories = <?=(!empty($categories) ? str_replace("'", "\'", json_encode($categories)) : '[]')?>;
$rootScope.categoriesData = <?=(!empty($categoriesData) ? str_replace("'", "\'", json_encode($categoriesData)) : '[]')?>;
<?
if(!empty($_SESSION['signUp']['category']))
{
?>
$rootScope.signUp = <?=(!empty($_SESSION['signUp']) ? str_replace("'", "\'", json_encode($_SESSION['signUp'])) : '[]')?>;
<?
}
else
{
?>
$rootScope.signUp = {};
$rootScope.signUp.category = [];
$rootScope.signUp.category[2] = 'no';
$rootScope.signUp.category[8] = 'no';
$rootScope.signUp.category[10] = 'no';
$rootScope.signUp.category[11] = 'no';
$rootScope.signUp.category[12] = 'no';
$rootScope.signUp.category[13] = 'no';
$rootScope.signUp.category[14] = 'no';
$rootScope.signUp.category[15] = 'no';
$rootScope.signUp.category[17] = 'no';
$rootScope.signUp.category[18] = 'no';
<?
}
?>
$rootScope.signUp.subcategories = [];
$rootScope.signUp.tax_years = <?=(!empty($_SESSION['signUp']['tax_years']) ? str_replace("'", "\'", json_encode($_SESSION['signUp']['tax_years'])) : '[]')?>;
$rootScope.setMenu = function() {
if($rootScope.bodyMenu == "bodyMenuClosed" || $rootScope.bodyMenu == "")
{
$rootScope.bodyMenu = "bodyMenuOpen";
$rootScope.bodyMenuOverlay = true;
}
else
{
$rootScope.bodyMenu = "bodyMenuClosed";
$rootScope.bodyMenuOverlay = false;
}
console.log($rootScope.bodyMenu);
};
$rootScope.getMenuClass = function() {
return $rootScope.bodyMenu;
}
$rootScope.toggleSelect = function(item, list)
{
if($.isNumeric(item))
{
item = (item * 1);
}
var idx = list.indexOf(item);
if(idx > -1)
{
list.splice(idx, 1);
}
else
{
list.push(item);
}
};
$rootScope.setLogo = function(slug) {
if(slug)
{
return '/vx_/images/'+slug+'.png';
}
else
{
return '/vx_/images/LogoA.png';
}
}
<?
/**
* Include the run file that will be specific to this site
* ----------------------------------------------------------------
*
* */
include($_SERVER['DOCUMENT_ROOT']."/vx_/js/run.php");
/**
* ----------------------------------------------------------------
* */
?>
console.log($rootScope.siteName+" Started");
});
</script>
<script src="/layout/js/directives.js"></script>
<script src="/layout/js/filters.js"></script>
<script src="/vx_/js/site_controllers.js"></script>
<script src="/layout/js/controllers.js"></script>
<script src="/layout/js/start.js"></script>
<script src="/vx_/js/vx.js"></script>
</head>
<body ng-app="NewFunds" ng-controller="SiteContent">
<div class="rb <?=$pageType?> <?=$onHome ? 'home' : ''?>" ng-controller="Content" ng-cloak>
<?php
include($_SERVER['DOCUMENT_ROOT']."/layout/inc/header.php");
echo $body;
?>
<div class="fixed full layer-top bodyMenuClosed"
id="bodyMenu" ng-class="getMenuClass()"
style="overflow:hidden;">
<div class="aib full anchor" ng-click="setMenu()"></div>
<?
include($_SERVER['DOCUMENT_ROOT']."/layout/inc/feMenu.php");
?>
</div>
<?php
include($_SERVER['DOCUMENT_ROOT']."/layout/inc/footer.php");
?>
</div>
<?
include($_SERVER['DOCUMENT_ROOT']."/vx_/tracking.php");
?>
</body>
</html>