| 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/alerts/ |
Upload File : |
<?php
session_start();
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/ua.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/func.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx_/site_info.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/mysql.php');
track_member_action('Page Visit','My Alerts');
$user = $_SESSION['user'];
ob_start();
if(empty($_SESSION['subscriptions']['2'])) {
$page_title = 'Grant Alerts';
$page_title_html = '
<div class="rib glyphicons glyphicons-bell va-middle v14_title_image"></div>
<div style="text-align:left;">
<h2>Grant Email Alerts for VIP Members!</h2>
<p style="text-align:left;"><strong>Grant Email Alerts</strong> gives you access to our newest grants that match your preferences! To be notified about a new application, simply click the + icon next to the type of funding applications you want to be notified about. It\'s simple! The more you select, the more potential funding sources you will be emailed about!</p>
</div>
<div style="clear:both;"></div>';
$redir_location = '/vx/usa/alerts/';
include_once($_SERVER['DOCUMENT_ROOT'].'/vx/usa/subscribe/v14.php');
}
$used_alerts = array();
$my_alerts = array();
$all_alerts = array();
$res = $db->get_results("SELECT ua.id,ua.alert_type_cat,ua.alert_type_id,c.name,c.icon
FROM grdb.grd_usa_alerts ua
LEFT JOIN grdb.grd_categories c ON c.categories_id=ua.alert_type_id
WHERE ua.site_code='".$db->clean($siteCode)."'
AND ua.client_id='".$db->clean($user)."'
AND ua.alert_type_cat='category'
UNION ALL SELECT ua.id,ua.alert_type_cat,ua.alert_type_id,c.name,c.icon
FROM grdb.grd_usa_alerts ua
LEFT JOIN grdb.grd_subcategories c ON c.subcategories_id=ua.alert_type_id
WHERE ua.site_code='".$db->clean($siteCode)."'
AND ua.client_id='".$db->clean($user)."'
AND ua.alert_type_cat='subcategory'
UNION ALL SELECT ua.id,ua.alert_type_cat,ua.alert_type_id,c.name,'' as icon
FROM grdb.grd_usa_alerts ua
LEFT JOIN grdb.grd_industries c ON c.industries_id=ua.alert_type_id
WHERE ua.site_code='".$db->clean($siteCode)."'
AND ua.client_id='".$db->clean($user)."'
AND ua.alert_type_cat='industry'
UNION ALL SELECT ua.id,ua.alert_type_cat,ua.alert_type_id,c.name,'' as icon
FROM grdb.grd_usa_alerts ua
LEFT JOIN grdb.grd_minorities c ON c.minorities_id=ua.alert_type_id
WHERE ua.site_code='".$db->clean($siteCode)."'
AND ua.client_id='".$db->clean($user)."'
AND ua.alert_type_cat='minority'");
foreach($res as $r) {
$my_alerts[] = $r;
$used_alerts[] = $r->alert_type_cat.'_'.$r->alert_type_id;
}
$res = $db->get_results("SELECT 'category' as type_cat,categories_id as type_id,name,icon
FROM grdb.grd_categories
WHERE name<>'All'
UNION ALL SELECT 'subcategory' as type_cat,subcategories_id as type_id,name,icon
FROM grdb.grd_subcategories
WHERE name<>'All'
UNION ALL SELECT 'industry' as type_cat,industries_id as type_id,name,'' as icon
FROM grdb.grd_industries
WHERE name<>'All'
UNION ALL SELECT 'minority' as type_cat,minorities_id as type_id,name,'' as icon
FROM grdb.grd_minorities
WHERE name<>'All'");
foreach($res as $r) {
$all_alerts[$r->type_cat][] = $r;
}
foreach($all_alerts as $cat=>$data) {
uasort($all_alerts[$cat],function($a,$b) {
return strcmp($a->name,$b->name);
});
}
?>
<div class="rb p20 top">
<div class="rb">
<div class="rb <?=$phone ? 'pt20' : ''?> f24 bold left">
<div class="relative iblock fa fa-bell f26"></div>
<div class="relative iblock" style="top:-1px; margin-left:7px;">
Email Alerts
</div>
</div>
</div>
<div class="container-fluid noselect" style="margin-top:32px;">
<div class="row">
<div class="col-lg-2 col-md-1 hidden-sm hidden-xs"></div>
<div class="col-lg-8 col-md-10 col-sm-12 col-xs-12">
<div class="rb">
<div class="rb p10 lred-bg left">
<div class="rb p10 f18 bold white">
My Alerts
</div>
<div class="rb cc p20 white-bg bborder" id="no_alerts_part" style="<?= (empty($my_alerts)) ? 'display:block;' : 'display:none;';?>">
<div class="rb cc missingAlerts" style="margin-top:-10px;">
<div class="rb cc f24 title bred bold">
You have no Alerts!
</div>
<div class="rib cc f18 bold" style="max-width:200px;">
<?= ($phone) ? 'Tap' : 'Click';?> on the type of funding you want from the list below
</div>
</div>
</div>
<div id="my_alerts_list">
<?php if(!empty($my_alerts)) {
foreach($my_alerts as $alert) { ?>
<div class="rb p10 pl20 white-bg bborder my_alert">
<div class="rb f16" style="max-width:300px;">
<?php if(!$phone) { ?>
<span class="glyphicons <?= $alert->icon;?>" style="margin:-4px; margin-right:4px;"></span>
<?php } ?>
<?= $alert->name;?>
</div>
<div class="ab f20" style="right:20px; top:7px;"
onclick="remove_alert(this,'<?= $alert->id;?>'); return false;">
<i class="fa fa-times-circle xremove"></i>
</div>
</div>
<?php }
} ?>
</div>
</div>
<div class="rb pl20 pr20 f16 <?=$phone ? 'justify' : 'left'?>">
<div class="rb" ng-if="userPreferences.monthlySubscription">
<hr>
To be notified about a new Funding Application when we post it to our database, simply click on
the "<i class="fa fa-plus xadd f18" style="margin:0px 4px 0px 4px"></i>" icon next to the type of funding applications you want to be notified about. You will then
receive an email each week letting you know which applications meet your criteria. Then return to
this site, and click on the Email Notifications tab above.
<hr>
<?= ($phone) ? 'Tap' : 'Click';?> on as many as you would like. The more you click on, the more potential funding sources you
will be emailed about. If you ever want to edit your settings, return to this page and remove the
types of applications you no longer wish to receive by clicking on the
"<i class="fa fa-times-circle xremove f18" style="margin:0px 4px 0px 4px"></i>" icon.
<hr>
</div>
</div>
<?php foreach($all_alerts as $cat=>$alerts) { ?>
<div class="rb p10 white-bg left">
<div class="rb p10 f18 bold bborder">
<?= ucwords($cat);?>
</div>
<?php foreach($alerts as $alert) { ?>
<div class="rb p10 pl20 myAlerts" id="<?= $alert->type_cat.'_'.$alert->type_id;?>" style="border:1px solid #ccc; border-top:0px; <?= (in_array($alert->type_cat.'_'.$alert->type_id,$used_alerts)) ? 'display:none;' : 'display:block;';?>" onclick="add_alert('<?= $alert->type_cat;?>','<?= $alert->type_id;?>'); return false;">
<div class="f16">
<?= $alert->name;?>
</div>
<div class="ab f20" style="right:20px; top:7px;">
<i class="fa fa-plus xadd"></i>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-lg-2 col-md-1 hidden-sm hidden-xs"></div>
</div>
</div>
</div>
<?php
$body = ob_get_clean();
$title = "Grant Alerts : ".$_SESSION['site_name'];
include($_SERVER['DOCUMENT_ROOT'].'/vx/usa/layout/non_angular_layout.php');
?>