| 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/governmentgrants.us/vx/usa/layout/ |
Upload File : |
<?
/**
* /usa/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 Business
* @filesource
*/
$body = ob_get_clean();
header("X-Robots-Tag: noindex, nofollow", true);
/*
--------------------------------------------------------------------------------
-------------------------------- MEMBER LOGIN ---------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
*/
include_once($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/functions/login.php");
/*
--------------------------------------------------------------------------------
*/
/*$featured = $db->query("
SELECT
gg.grants_id,
gg.name,
gg.amount,
gg.url,
gt.name AS type,
gg.who,
gg.deadline,
gusg.id AS favorite,
gg.featured
FROM grdb.grd_grants AS gg
LEFT JOIN grdb.grd_usa_saved_grants AS gusg
ON
gusg.grants_id = gg.grants_id
AND
gusg.client_id = '$user'
AND
gusg.site_code = '$siteCode'
LEFT JOIN grdb.grd_types AS gt
ON gg.types_id = gt.types_id
WHERE
gg.featured = 'yes'
AND
(
(
gg.deadline > NOW()
OR
gg.deadline = '0000-00-00'
)
)
GROUP BY gg.grants_id
ORDER BY gg.amount LIMIT 3
");
$featuredList = $featuredGrants;
*/
$featuredList = array();
if((!empty($guest) || empty($user)) && empty($onHome))
{
$title = "Please Log In | ".ucwords(basename($_SERVER['REQUEST_URI']));
}
?>
<!doctype html>
<html>
<!--
COPYRIGHT 2016-2018
ALL RIGHTS RESERVED
NO USE | ALL SOFTWARE IS PROTECTED
-->
<head>
<meta charset="utf-8">
<?
if(!empty($phone) || !empty($tablet))
{
?>
<!-- ================================================================================================ -->
<!-- DEVICE VIEWPORT TAG -->
<meta name="viewport" content="initial-scale=<?=$scale?>, minimum-scale=<?=$scale?>, maximum-scale=<?=$scale?>">
<?
}
?>
<!-- ================================================================================================ -->
<!-- PAGE TITLE -->
<title><?=$title?></title>
<!-- ================================================================================================ -->
<!-- STYLE SHEETS -->
<link rel="stylesheet" type="text/css" href="/vx/layout/style/bootstrap/css/bootstrap.min.css">
<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/layout/style/glyphicons/css/glyphicons.css">
<link rel="stylesheet" type="text/css" href="/vx_/css/theme.css">
<link rel="stylesheet" type="text/css" href="/vx_/css/common.css">
<link rel="stylesheet" type="text/css" href="/vx_/css/members.css" />
<link rel="stylesheet" type="text/css" href="/vx_/css/responsive.css">
<link rel="stylesheet" type="text/css" href="/vx/layout/style/default.css">
<!-- ================================================================================================ -->
<!-- APPLICATION ICONS -->
<link rel="apple-touch-icon" sizes="57x57" href="/vx_/images/icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/vx_/images/icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/vx_/images/icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/vx_/images/icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/vx_/images/icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/vx_/images/icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/vx_/images/icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/vx_/images/icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/vx_/images/icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/vx_/images/icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/vx_/images/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/vx_/images/icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/vx_/images/icons/favicon-16x16.png">
<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="icon" type="image/x-icon" href="/vx_/images/favicon.ico" />
<!-- ================================================================================================ -->
<!-- ROBOT CONTROLS -->
<meta name="robots" content="index, follow" />
<!-- ================================================================================================ -->
<!-- SEO INFORMATION -->
<?
if(!empty($metaKeywords))
{
?>
<meta name="keywords" content="<?=$metaKeywords?>">
<?
}
if(!empty($metaDescription))
{
?>
<meta name="description" content="<?=$metaDescription?>">
<?
}
?>
<!-- ================================================================================================ -->
<!-- SOCIAL MEDIA -->
<meta name="twitter:card" content="Grant Research" />
<meta name="twitter:title" content="Grant researching">
<meta name="twitter:site" content="@lordsofcode" />
<meta name="twitter:creator" content="@lordsofcode" />
<meta name="twitter:image" content="http://<?= (!empty($host)) ? $host : '';?>/vx_/images/og/logo.png">
<meta property="og:url" content="<?= (!empty($host)) ? $host : '';?>" />
<meta property="og:title" content="<?= (!empty($title)) ? $title : '';?>" />
<meta property="og:type" content="website" />
<meta property="og:description" content="<?= (!empty($metaDescription)) ? $metaDescription : '';?>" />
<meta property="og:image" content="http://<?= (!empty($host)) ? $host : '';?>/vx_/images/og/logo.png" />
<meta property="fb:app_id" content="344394825919378" />
<!-- ================================================================================================ -->
<!-- JAVASCRIPT/ANGULARJS -->
<script language="javascript" type="text/javascript" src="/vx/js/jquery/jquery-1.9.1.js"></script>
<script src="/vx/js/angular.js"></script>
<script src="/vx/js/angular.touch.js"></script>
<script src="/vx/js/jquery.formatter.min.js"></script>
<?
if(!empty($onRegistration))
{
?>
<script src="/vx/js/angular-payment.js"></script>
<?
}
?>
<script type="application/javascript">
<?
// Set $debug in /lib/inc.php
?>
var debug = <?=(empty($debug)) ? 'false' : 'true'?>;
var site = angular.module('FundingOpportunities', [<?= (!empty($onRegistration)) ? "'angularPayments'," : ''?>'ngTouch']);
</script>
<script src="/vx/usa/js/utilities.js"></script>
<script type="application/javascript">
site.run(function($rootScope, $http, $interval, $timeout, $window, preloader, $document, $sce) {
$rootScope.debug = debug;
$rootScope.phone = <?=(empty($phone)) ? 'false' : 'true'?>;
$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.deviceStatus();
$rootScope.menuDisplay = 'hideMenu';
$rootScope.categoryDisplay = 'hideCategory';
$rootScope.isLogin = false;
$rootScope.timeCheck = 0;
$rootScope.newest_apps_only = <?= (!empty($newest_apps_only)) ? '1' : '0'; ?>;
$rootScope.lockAlerts = <?= (empty($_SESSION['subscriptions']['2'])) ? '1' : '0';?>;
$rootScope.siteDomain = "<?= (!empty($site)) ? $site : '';?>";
$rootScope.siteName = "<?= (!empty($siteName)) ? $siteName : '';?>";
$rootScope.sitePhone = "<?= (!empty($sitePhone)) ? $sitePhone : '';?>";
$rootScope.siteAddress = "<?= (!empty($siteAddress)) ? $siteAddress : '';?>";
$rootScope.siteCode = "<?= (!empty($siteCode)) ? $siteCode : '';?>";
$rootScope.siteFee = "<?= (!empty($siteFee)) ? $siteFee : '';?>";
$rootScope.siteEmail = "<?= (!empty($siteEmail)) ? $siteEmail : '';?>";
$rootScope.monthlyFee = "<?= (!empty($monthlyFee)) ? $monthlyFee : '29.95';?>";
$rootScope.teleseminarFee = "<?= (!empty($teleseminarFee)) ? $teleseminarFee : '4.95';?>";
$rootScope.currentPage = '<?= (!empty($currentPage)) ? $currentPage : '1';?>';
$rootScope.selectedCategory = "<?= (!empty($_SESSION['selectedCategory'])) ? $_SESSION['selectedCategory'] : '';?>";
$rootScope.selectedIcon = "<?= (!empty($_SESSION['selectedIcon'])) ? $_SESSION['selectedIcon'] : '';?>";
$rootScope.selectedName = "<?= (!empty($_SESSION['selectedName'])) ? $_SESSION['selectedName'] : '';?>";
$rootScope.loginErrors = "<?= (!empty($loginErrors)) ? $loginErrors : '';?>";
$rootScope.feedback = {};
$rootScope.feedback.file = '<?=$_SERVER['REQUEST_URI']?><?=(!empty($_POST)) ? '?'.http_build_query($_POST) : ''?>';
$rootScope.feedback.screen_width = $(window).width();
$rootScope.feedback.screen_height = $(window).height();
$rootScope.feedback.device = '<?= (!empty($device)) ? $device : '';?>';
$rootScope.feedback.browser = '<?= (!empty($browser)) ? $browser : '';?>';
$rootScope.feedback.operating_system = '<?= (!empty($operatingSystem)) ? $operatingSystem : '';?>';
$rootScope.feedback.network = $rootScope.network;
$rootScope.feedbackTree = <?=(!empty($feedback)) ? str_replace("'", "\'", json_encode($feedback)) : '[]'?>;
$rootScope.broken = [];
$rootScope.broken.notSubmitted = false;
$rootScope.showOverlayMessage = false;
$rootScope.overlayMessageTitle = "Loading";
$rootScope.overlayMessageSubtitle = "Please Wait...";
$rootScope.parentCategories = <?=(!empty($parentCategories)) ? str_replace("'", "\'", json_encode($parentCategories)) : '[]'?>;
$rootScope.pixelsScrolled = 0;
$rootScope.icons = <?=(!empty($icons)) ? str_replace("'", "\'", json_encode($icons)) : '[]'?>;
$rootScope.states = <?=(!empty($states)) ? str_replace("'", "\'", json_encode($states)) : '[]'?>;
$rootScope.noResults = false;
$rootScope.didSearch = false;
<?
if(!empty($user))
{
?>
$rootScope.sessionData = <?=(!empty($sessionData)) ? str_replace("'", "\'", json_encode($sessionData)) : '[]'?>;
$rootScope.userData = <?=(!empty($userData)) ? str_replace("'", "\'", json_encode($userData)) : '[]'?>;
$rootScope.lastLogin = '<?= (!empty($lastLogin['signindate'])) ? $lastLogin['signindate'] : '';?>';
$rootScope.feedback.email = $rootScope.userData.email;
<?
/*
$rootScope.teleSeminars = <?=($teleSeminarSubscription ? 'true' : 'false')?>;
*/
?>
$rootScope.teleSeminars = true;
$rootScope.userPreferences = <?=(!empty($userPreferences)) ? str_replace("'", "\'", json_encode($userPreferences)) : '[]'?>;
$rootScope.userPreferences.monthlySubscription = true;
$rootScope.difference = ($rootScope.userPreferences.funding_goal - $rootScope.userPreferences.grants_applied_total);
$rootScope.showDetails = [];
$rootScope.wasFavorited = false;
$rootScope.grantAppliedAmount = [];
<?
if(!empty($onDashboard) || !empty($onHomePage))
{
?>
$rootScope.tutorialStep = '<?=(!empty($tutorialStep)) ? $tutorialStep : '';?>';
$rootScope.myGrant = {};
$rootScope.myGrant.did_apply = '';
$rootScope.categoryBoard = <?=(!empty($categoryBoard)) ? str_replace("'", "\'", json_encode($categoryBoard)) : '[]'?>;
<?
}
if(!empty($onGrantSearch))
{
?>
$rootScope.subCategories = <?=(!empty($subCategories)) ? str_replace("'", "\'", json_encode($subCategories)) : '[]'?>;
$rootScope.keyword = '<?=(!empty($keyword)) ? $keyword : '';?>';
$rootScope.grantPageStart = $rootScope.userPreferences.search_results;
$rootScope.searchPageStart = $rootScope.userPreferences.search_results;
$rootScope.grantPageLength = $rootScope.userPreferences.search_results;
$rootScope.searchList = [];
$rootScope.searchExamples = <?=!$searchHelp ? 'true' : 'false'?>;
<?
}
if(!empty($onAlerts))
{
?>
$rootScope.alertCategories = <?=(!empty($alertCategories)) ? str_replace("'", "\'", json_encode($alertCategories)) : '[]'?>;
<?
}
if(!empty($grantDetails))
{
?>
$rootScope.thisgrant = <?=(!empty($grantDetails)) ? str_replace("'", "\'", json_encode($grantDetails)) : '[]'?>;
$rootScope.grantDetails = '';
<?
}
if(!empty($onLearning))
{
?>
$rootScope.courseSections = <?=(!empty($courseSections)) ? str_replace("'", "\'", json_encode($courseSections)) : '[]'?>;
$rootScope.coursesStats = <?=(!empty($coursesStats)) ? str_replace("'", "\'", json_encode($coursesStats)) : '{}'?>;
$rootScope.courseTotal = '<?=(!empty($courseCount[0]['count'])) ? $courseCount[0]['count'] : '';?>';
$rootScope.coursesComplete = '<?=(!empty($courseCompleteCount[0]['count'])) ? $courseCompleteCount[0]['count'] : '';?>';
$rootScope.course = '<?=(!empty($courseName)) ? $courseName : '';?>';
$rootScope.courseSection = '<?=(!empty($courseName) ? '/vx/usa/course/'.$courseName.'/sections/'.$courseName.'.php' : '')?>';
$rootScope.courseSectionDefault = '<?=(!empty($courseName) ? '/vx/usa/course/'.$courseName.'/sections/'.$courseName.'.php' : '')?>';
$rootScope.courseCompleted = 0;
$rootScope.trainingPercent = 0;
$rootScope.trainingAngle = 0;
$rootScope.selectedCourse = ($rootScope.userPreferences.selected_course ? $rootScope.userPreferences.selected_course : "business");
$rootScope.courseSlug = $rootScope.selectedCourse;
$rootScope.courseTitle = ($rootScope.userPreferences.course_title ? $rootScope.userPreferences.course_title : "Business");
$rootScope.courseIcon = ($rootScope.userPreferences.course_icon ? $rootScope.userPreferences.course_icon : "glyphicons-mixed-buildings");
<?
}
if(!empty($onDashboard) || !empty($onGrantSearch))
{
?>
$rootScope.featuredGrants = <?=(!empty($featuredGrants)) ? str_replace("'", "\'", json_encode($featuredGrants)) : '[]'?>;
$rootScope.grantLength = $rootScope.featuredGrants.length;
<?
}
if(!empty($onDashboard) || !empty($onGrantSearch) || !empty($onApplied) || !empty($onFavorites) || !empty($onCoronavirus))
{
?>
$rootScope.grantList = <?=(!empty($grantList)) ? str_replace("'", "\'", json_encode($grantList)) : '[]'?>;
<?
}
if(!empty($onDashboard) || !empty($onGrantSearch) || !empty($onAlerts))
{
?>
$rootScope.myAlerts = <?=(!empty($myAlerts)) ? str_replace("'", "\'", json_encode($myAlerts)) : '[]'?>;
<?
}
?>
$rootScope.randomRange = function (small, big) {
if(small && big)
{
kip = Math.floor((Math.random() * big) + small);
}
else
{
kip = Math.floor((Math.random() * 10) + 1);
}
return kip;
};
$rootScope.reportBroken = function(grant) {
$('#reportBroken').fadeIn(300);
$rootScope.broken.grant = grant;
$rootScope.broken.notSubmitted = false;
};
$rootScope.submitReportBroken = function(broken) {
$http({
method : 'POST',
url : '/vx/usa/functions/reportBroken.php',
data : "comment="+broken.comment+"&grant="+broken.grant.grants_id+"&"+$.param($rootScope.feedback),
dataType : "json",
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
broken.comment = '';
broken.notSubmitted = true;
});
};
$rootScope.setLoginStats = function(feedback) {
$http({
method : 'POST',
url : '/vx/usa/functions/setLogin.php',
data : $.param(feedback),
dataType : "json",
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
});
}
$rootScope.viewGrantDetails = function(id) {
if($rootScope.grantDetails == id)
{
$rootScope.grantDetails = '';
}
else
{
$rootScope.grantDetails = id;
}
};
<?
if(!empty($_SESSION['first_login']))
{
?>
$rootScope.setLoginStats($rootScope.feedback);
<?
}
if(!empty($onLearning))
{
?>
var promise;
$rootScope.animateTrainingStats = function(percentage, angle, duration) {
$interval.cancel(promise);
var counter = $rootScope.courseCompleted;
var moveAngle = $rootScope.trainingAngle;
var direction = "";
var moveByAngle = (180/100);
var multipler = 1;
if(duration <= 0)
{
duration = 1;
}
if(angle == null)
{
multipler = 0.1;
}
else
{
multipler = 1;
}
promise = $interval(function(){
if($rootScope.courseCompleted < percentage)
{
counter = counter + multipler;
direction = "down";
}
if($rootScope.courseCompleted > percentage)
{
counter = counter - multipler;
direction = "up";
}
if($rootScope.trainingAngle < angle)
{
moveAngle += (moveByAngle * multipler);
}
if($rootScope.trainingAngle > angle)
{
moveAngle -= (moveByAngle * multipler);
}
if(counter > 99)
{
counter = 100;
}
$rootScope.trainingPercent = (counter);
$rootScope.trainingAngle = Math.round(moveAngle);
$rootScope.courseCompleted = (counter);
if($rootScope.courseCompleted > 0 && $rootScope.courseCompleted < 100)
{
$rootScope.gaugeLargeClass = "GaugeArchProgressLarge";
}
else if($rootScope.courseCompleted >= 100)
{
$rootScope.gaugeLargeClass = "GaugeArchCompleteLarge";
$rootScope.trainingAngle = 180;
}
else
{
$rootScope.gaugeLargeClass = "GaugeArchStartLarge";
$rootScope.trainingAngle = 0;
}
if(direction == "up")
{
if(Math.round(counter) <= percentage || (Math.round(moveAngle) <= angle && angle > 0))
{
$interval.cancel(promise);
}
}
else
{
if(Math.round(counter) >= percentage || (Math.round(moveAngle) >= angle && angle > 0))
{
$interval.cancel(promise);
}
}
}, duration, 0);
};
$rootScope.selectCourseStats = function(course) {
$rootScope.courseTitle = course.display_name;
$rootScope.selectedCourse = course.slug;
$rootScope.courseSlug = course.slug;
$rootScope.courseIcon = course.icon;
$rootScope.animateTrainingStats(course.percentage, course.angle, 10);
$http({
method : 'POST',
url : '/vx/usa/functions/setPreferences.php',
data : "selectedCourse="+course.slug,
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
});
};
var coursePercentage = Math.round((100/$rootScope.courseTotal) * $rootScope.coursesComplete);
if(coursePercentage < 100)
{
$rootScope.showPercentFlag = true;
}
else
{
$rootScope.showPercentFlag = false;
}
$rootScope.animateTrainingStats(coursePercentage, null, 1);
var coursePercentage = Math.round((100/$rootScope.courseTotal) * $rootScope.coursesComplete);
var courseAngle = Math.round((180/100) * coursePercentage);
$rootScope.animateTrainingStats(coursePercentage, courseAngle, 10);
<?
}
if(!empty($onDashboard) || !empty($onGrantSearch) || !empty($onApplied) || !empty($onFavorites) || !empty($onCoronavirus))
{
?>
$rootScope.toggleGrant = function(grant, list) {
$("#"+list+"Description"+grant).toggleClass('grantDetailOpen').toggleClass('grantDetailClosed');
$("#grant"+grant).find('.chevron').toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
$("#grant"+grant).find('.fme').toggle();
if($("#"+list+"Description"+grant).attr('class').indexOf('Closed') > 0)
{
$("#"+list+"Description"+grant).find('.grantDesc').css('overflow-y', 'hidden');
}
else
{
$("#"+list+"Description"+grant).find('.grantDesc').css('overflow-y', 'auto');
}
};
<?
}
?>
$rootScope.favorite = function(grant) {
$http({
method : 'POST',
url : '/vx/usa/functions/favorite.php',
data : "grant="+grant.grants_id,
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
var result = response.data;
$rootScope.wasFavorited = true;
if(result.type == "added")
{
grant.favorite = true;
//$('.favorite'+grant).addClass('favoriteSelected').removeClass('favorite');
}
else
{
grant.favorite = false;
//$('.favorite'+grant).removeClass('favoriteSelected').addClass('favorite');
<?
if(!empty($onFavorites))
{
?>
$('#grant'+grant).slideUp(300, function(){
$('#grant'+grant).remove();
});
<?
}
?>
}
},
function errorCallback(response)
{
});
};
$rootScope.applying = function(grant) {
if((grant.grants_id * 1) > 0)
{
$http({
method : 'POST',
url : '/vx/usa/functions/applying.php',
data : "grant="+grant.grants_id,
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
grant.did_apply = 'no';
});
}
};
$rootScope.trending = function(grant) {
$http({
method : 'POST',
url : '/vx/usa/functions/trending.php',
data : "grant="+grant.grants_id,
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
});
};
$rootScope.amountAppliedFor = function(grant) {
if((grant.how_much_applied_for * 1) > 0)
{
$('#amountApplied'+grant.grants_id).find('.saving').fadeIn(100, function(){
$http({
method : 'POST',
url : '/vx/usa/functions/appliedAmount.php',
data : "grant="+grant.grants_id+"&amount="+grant.how_much_applied_for,
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
$rootScope.userPreferences.grants_applied_total = response.data.newTotal;
$rootScope.difference = ($rootScope.userPreferences.funding_goal - $rootScope.userPreferences.grants_applied_total);
$('#amountApplied'+grant.grants_id).find('.saving').fadeOut(1000);
});
});
}
else
{
alert("Please enter a valid grant amount");
}
};
$rootScope.didYouApply = function(grant, type) {
if(type == "yes")
{
grant.did_apply = "yes";
}
else
{
grant.did_apply = "no";
grant.how_much_applied_for = "";
}
$http({
method : 'POST',
url : '/vx/usa/functions/applied.php',
data : "grant="+grant.grants_id+"&type="+type,
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
$rootScope.userPreferences.grants_applied_total = response.data.newTotal;
$rootScope.difference = ($rootScope.userPreferences.funding_goal - $rootScope.userPreferences.grants_applied_total);
});
};
$rootScope.highlight = function(haystack, needle) {
if(!needle)
{
return $sce.trustAsHtml(haystack);
}
return $sce.trustAsHtml(haystack.replace(new RegExp(needle, "gi"), function(match) {
return '<span class="highlighted">' + match + '</span>';
}));
};
$rootScope.desktopLogos = ["/vx_/images/Logo.png",
"/vx_/images/categories/education.jpg",
"/vx_/images/categories/for-sale.jpg",
"/vx_/images/categories/home.jpg",
"/vx_/images/categories/park.jpg",
"/vx_/images/categories/shop.jpg"];
preloader.preloadImages( $rootScope.desktopLogos ).then(
function handleResolve( imageLocations ) {
},
function handleReject( imageLocation ) {
},
function handleNotify( event ) {
}
);
<?
if(!empty($onDashboard))
{
?>
var focused = false;
window.onfocus = function() {
if(!focused)
{
<?
if(!empty($currentPage) && $currentPage == "Applied")
{
?>
$http({
method : 'GET',
url : '/vx/usa/functions/appliedGrantUpdate.php',
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
focused = true;
$rootScope.grantList = response.data.grant_list;
});
<?
}
if(!empty($currentPage) && $currentPage == "Favorites")
{
?>
$http({
method : 'GET',
url : '/vx/usa/functions/favoriteGrantUpdate.php',
dataType: 'json',
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function successCallback(response) {
focused = true;
$rootScope.grantList = response.data.grant_list;
});
<?
}
?>
}
};
window.onblur = function() {
if(focused)
{
focused = false;
}
};
<?
}
if(empty($phone) && !empty($onDashboard))
{
?>
<?
}
}
?>
$rootScope.numberOfColumns = [1, 1, 1, 1, 1];
$rootScope.searchFields = {};
angular.element($window).bind('load', function() {
$timeout(function(){
$('#siteLoader').fadeOut(500);
$rootScope.windowWidth = $window.outerWidth;
var w = $rootScope.windowWidth;
if(w > 1540)
{
$rootScope.numberOfColumns = [1, 1, 1, 1, 1];
}
else if(w < 1540 && w > 1300)
{
$rootScope.numberOfColumns = [1, 1, 1, 1, 0];
}
else if(w < 1300 && w > 1080)
{
$rootScope.numberOfColumns = [1, 1, 1, 0, 0];
}
else if(w < 1080 && w > 500)
{
$rootScope.numberOfColumns = [1, 1, 0, 0, 0];
}
else if(w < 500)
{
$rootScope.numberOfColumns = [1, 0, 0, 0, 0];
}
}, 500);
});
});
</script>
<script src="/vx/usa/js/directives.js?d=<?=date("YmdHis")?>"></script>
<script src="/vx/usa/js/filters.js?d=<?=date("YmdHis")?>"></script>
<script src="/vx/usa/js/controllers.js?d=<?=date("YmdHis")?>"></script>
<?
if(!empty($user))
{
?>
<script src="/vx/usa/js/members_controllers.js?d=<?=date("YmdHis")?>"></script>
<?
}
?>
<script src="/vx/usa/js/start.js"></script>
<script src="/vx_/js/vx.js"></script>
</head>
<body ng-app="FundingOpportunities" ng-cloak>
<div id="ContentController" class="rb" ng-controller="Content">
<div class="rb" style="height:99px; z-index:0;"></div>
<?
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/header.php");
?>
<div class="rb" style="z-index:0;">
<table id="bodyTable" style="width:100%; height:100%;">
<tr>
<?
if(!empty($user) && !empty($onMembers) && empty($phone))
{
?>
<td class="top" style="min-width:280px; max-width:320px; border-right:1px solid rgba(0,0,0,0.2);">
<div class="rb">
<?
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/inc/navigation.php");
//include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/inc/funding.php");
//include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/inc/trending.php");
//include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/inc/favorites.php");
?>
</div>
</td>
<?
}
if(!empty($onCourse) && !empty($user) && empty($phone))
{
?>
<td class="top" style="min-width:280px; max-width:320px;">
<div class="rb">
<?
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/inc/courses.php");
?>
</div>
</td>
<?
}
?>
<td id="bodyContainer" class="top" style="width:100%;">
<div id="additionalLoader" class="rb p20" style="display:none;"></div>
<?
if(!empty($onMembers))
{
if(!empty($user))
{
echo $body;
}
else
{
?>
<div class="rb center-center">
<ng-include src="'/vx/layout/body_login.php'" onload="testLogin()"
class="rib" style="width:<?=(!empty($phone)) ? '100%' : '990px'?>; min-height:780px;"></ng-include>
</div>
<?
}
}
else
{
echo $body;
}
?>
</td>
</tr>
</table>
</div>
<?
$footerHight = 250;
?>
<div id="footer" class="footer"
style=" height:auto; position:relative;
z-index:-1; padding-top:20px;">
<?
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/footer.php");
?>
</div>
</div>
<?
if(empty($phone))
{
?>
<div class="fixed block cc pointer layer-top" ng-cloak
style="height:40px; width:40px; bottom:100px; background: rgba(0,0,0,0.6);"
onclick="$('html, body').animate({ scrollTop: 0 }, 'slow');" ng-class="pixelsScrolled < 600 ? 'scrollButtonShow' : 'scrollButtonHide'">
<div class="cd">
<i class="rib fa fa fa-chevron-up f24 light-gray" style="top:-1px; left:1px;"></i>
</div>
<div class="cdl"></div>
</div>
<?
}
else
{
?>
<div class="fixed block cc pointer layer-top" ng-cloak
style="height:40px; width:43px; margin-left:0px; left:0px; background: rgba(0,0,0,0.6);"
onclick="$('html, body').animate({ scrollTop: 0 }, 'slow');" ng-class="pixelsScrolled < 1200 ? 'scrollPhoneButtonShow' : 'scrollPhoneButtonHide'">
<div class="cd">
<i class="rib fa fa fa-chevron-up f24 light-gray"></i>
</div>
<div class="cdl"></div>
</div>
<?
}
if(empty($user))
{
/*
?>
<div id="Authentication" ng-controller="Authentication" ng-cloak
class="fixed block layer-top" style="width:100%; height:100%; top:0px; left:0px;"
ng-class="isLogin ? 'showLogin' : 'hideLogin'">
<div class="ab" style="width:100%; height:100%; top:0px; left:0px;"
ng-click="setLogin()"></div>
<table width="100%" height="100%">
<tr>
<td style="width:33%; height:<?=$phone ? 1 : 10?>%;"></td>
<td style="width:33%; height:<?=$phone ? 1 : 10?>%;"></td>
<td style="width:33%; height:<?=$phone ? 1 : 10?>%;"></td>
</tr>
<tr>
<td style="width:33%"></td>
<td style="">
<ng-include src="'/vx/layout/login.php'" onload="testLogin()"></ng-include>
</td>
<td style="width:33%"></td>
</tr>
<tr>
<td style="width:33%; height:<?=$phone ? 99 : 90?>%;"></td>
<td style="width:33%; height:<?=$phone ? 99 : 90?>%;"></td>
<td style="width:33%; height:<?=$phone ? 99 : 90?>%;"></td>
</tr>
</table>
</div>
<?
*/
}
if(!empty($debug))
{
?>
<div class="fixed block dark-gray-bg f12 white center layer-top" style="width:180px; bottom:0px; right:0px;">
<div class="responsive p10 yellow center">
</div>
</div>
<?
}
?>
<div id="feedback" ng-controller="Feedback" class="fixed block cc layer-top"
style="top:0px; left:0px; width:100vw; height:100vh; display:none; <?=$phone ? 'overflow-y:auto;' : ''?>">
<div class="ab" style="top:0px; left:0px; width:100%; height:100%; background:rgba(0,0,0,0.6);"
onclick="$('#feedback').hide();"
ng-click=" feedbackSent = false;
feedback.questions = '';
feedback.question = '';
feedback.message = '';
feedback.q = [];
paymentLowered = false;
membershipCancelled = false;">
</div>
<div class="<?=(!empty($phone)) ? 'rb' : 'cd'?>" style="">
<?
if($phone)
{
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/feedback/inc/m.form.php");
}
else
{
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/feedback/inc/form.php");
}
?>
</div>
<?
if(empty($phone))
{
?>
<div class="cdl">
</div>
<?
}
?>
</div>
<div id="showOverlayMessage" class="fixed full anchor layer-top cc"
style="display:none;">
<div class="ab full anchor" style="background:rgba(0,0,0,0.07)"></div>
<div class="rb cc" style="width:100vw; height:100vh;">
<table border="0" style="width:100%; height:100%;">
<tr>
<td style="width:33%; height:33%;"></td>
<td style="width:33%; height:33%;"></td>
<td style="width:33%; height:33%;"></td>
</tr>
<tr>
<td style="width:33%; height:33%;"></td>
<td class="cc white-bg dropshadow-light"
style="min-width:300px; max-width:512px; min-height:300px; max-height:512px;">
<div class="rib cc blue p20">
<div class="rb cc pb10">
<i class="fa fa-spinner fa-pulse fa-3x fa-fw f40 gray"></i>
</div>
<div class="rb cc">
<span id="overlayMessageTitle" class="title f18 bold">
{{overlayMessageTitle | ucwords}}
</span>
</div>
<div class="rb cc">
<span id="overlayMessageSubtitle" class="subTitle f14 bold gray">
{{overlayMessageSubtitle}}
</span>
</div>
</div>
</td>
<td style="width:33%; height:33%;"></td>
</tr>
<tr>
<td style="width:33%; height:33%;"></td>
<td style="width:33%; height:33%;"></td>
<td style="width:33%; height:33%;"></td>
</tr>
</table>
</div>
</div>
<div class="fixed block white-bg cc layer-top" ng-show="network == 'none'" ng-cloak style="top:0px; left:0px; width:100%; height:100%;">
<div class="cd lred bold">
<i class="fa fa-wifi f40" aria-hidden="true"></i>
<i class="fa fa-times f20 dark-gray" style="margin-top:32px; margin-left:-20px;"></i>
<br>
NETWORK CONNECTION
<br>
CANNOT BE FOUND
<br>
OR
<br>
HAS BEEN LOST
</div>
<div class="cdl"></div>
</div>
<?
if(!empty($onMembers) && !empty($user) && !empty($phone))
{
?>
<div id="mobileFunding" class="fixed block cc layer-top"
style="top:0px; left:0px; width:100%; height:100%; display:none;">
<div class="ab" style="top:0px; left:0px; width:100%; height:100%; background:rgba(0,0,0,0.6);"
onclick="$('#mobileFunding').fadeOut(300);"></div>
<div class="cd">
<?
include($_SERVER['DOCUMENT_ROOT']."/vx/usa/layout/inc/m.funding.php");
?>
</div>
<div class="cdl">
</div>
</div>
<?
}
?>
<div id="reportBroken" class="fixed full anchor tblack cc layer-top" style="display:none;">
<div class="aib full anchor" onclick="$('#reportBroken').fadeOut(300)"></div>
<div class="cd">
<div class="rb white-bg p10 dropshadow-light" style="max-width:280px;">
<form ng-submit="submitReportBroken(broken)" method="post" enctype="multipart/form-data">
<div class="rib" ng-show="!broken.notSubmitted">
<div>
Please provide some details
<div class="rib pl10 xremove" onclick="$('#reportBroken').fadeOut(300)">
<i class="fa fa-times f16" aria-hidden="true"></i>
</div>
<hr />
<textarea ng-model="broken.comment" name="comment" class="" style=""></textarea>
<div class="rb" style="height:10px;"></div>
<div class="rb right">
<button type="submit" class="btn btn-primary">
Submit
</button>
</div>
</div>
</div>
<div class="rib left" ng-show="broken.notSubmitted">
<div class="rb f18 bold">
Thank you!
</div>
<div class="rb f14 p6">
We are always striving to keep our database up-to-date and as accurate as possible. A member of
our grant research team will be looking into the problem as soon as possible.
</div>
<div class="rb f14 p10 cc">
<button type="button" class="btn btn-info" onclick="$('#reportBroken').fadeOut(300)">
Close
</button>
</div>
</div>
</form>
</div>
</div>
<div class="cdl"></div>
</div>
<?
if(!empty($onDashboard) && !empty($user))
{
?>
<div id="siteLoader" class="fixed full white-bg dark-gray cc layer-top" style="top:0px; left:0px;">
<div class="cd">
<img src="/vx_/images/Logo.png" style="width:150px;margin-left:50px;">
<br>
<br>
<i class="fa fa-spinner fa-pulse fa-3x fa-fw f32"></i>
</div>
<div class="cdl"></div>
</div>
<?
}
/**
* @file /vx_/tracking.php Google Tracking
* */
include($_SERVER['DOCUMENT_ROOT']."/vx_/tracking.php");
/**
* @file /lib/tracking.php VX and Surf Tracking
* */
require_once($_SERVER['DOCUMENT_ROOT'] . "/lib/tracking.php");
?>
</body>
</html>