| 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
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/php_header.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/phpCrypto.php');
$document_id = (isset($_REQUEST['id']) && preg_match('/^[0-9]+$/',trim($_REQUEST['id']))) ? trim($_REQUEST['id']) : 0;
if(!empty($_POST)) {
$profile_id = $_POST['profile_id'];
if(!empty($_POST['ClientProfile'])) {
$update = 'date_entered=NOW()';
foreach($_POST['ClientProfile'] as $k=>$v) {
if(!empty($v) && $v!='0.00') {
$update .= ($update=='') ? $k."='".$db->clean($v)."'" : ",".$k."='".$db->clean($v)."'";
}
}
if($update!='') {
$db->query("UPDATE lc2synment_lc.client_profile SET {$update} WHERE id='".$db->clean($profile_id)."'");
//$db->debug();
}
}
if(!empty($_POST['Partner'])) {
foreach($_POST['Partner'] as $partner=>$data) {
$update = '';
foreach($data as $k=>$v) {
if($k=='id') { continue; }
if(!empty($v) && $v!='0.00') {
$update .= ($update=='') ? $k."='".$db->clean($v)."'" : ",".$k."='".$db->clean($v)."'";
}
}
if($update!='') {
$db->query("UPDATE lc2synment_lc.partners SET {$update} WHERE id='".$db->clean($data['id'])."'");
//$db->debug();
}
}
}
$db->query("DELETE FROM lc2synment_lc.client_profile_others WHERE cp_id='".$db->clean($profile_id)."'");
if(!empty($_POST['others'])) {
$update = '';
foreach($_POST['others'] as $k=>$v) {
$update .= ($update=='') ? "('".$db->clean($profile_id)."','".$db->clean($k)."','".$db->clean($v)."')" : ",('".$db->clean($profile_id)."','".$db->clean($k)."','".$db->clean($v)."')";
}
if($update!='') {
$db->query("INSERT INTO lc2synment_lc.client_profile_others (cp_id,type,value) VALUES {$update}");
//$db->debug();
}
}
$db->query("DELETE FROM lc2synment_lc.client_profile_categories WHERE cp_id='".$db->clean($profile_id)."'");
$db->query("DELETE FROM lc2synment_lc.client_profile_subcategories WHERE cp_id='".$db->clean($profile_id)."'");
$db->query("DELETE FROM lc2synment_lc.client_profile_minorities WHERE cp_id='".$db->clean($profile_id)."'");
$db->query("DELETE FROM lc2synment_lc.client_profile_industries WHERE cp_id='".$db->clean($profile_id)."'");
if(!empty($_POST['ProfileCategory'])) {
foreach($_POST['ProfileCategory'] as $type=>$data) {
$update = '';
foreach($data as $k=>$v) {
$update .= ($update=='') ? "('".$db->clean($profile_id)."','".$db->clean($v)."')" : ",('".$db->clean($profile_id)."','".$db->clean($v)."')";
}
if($update != '') {
$db->query("INSERT INTO lc2synment_lc.client_profile_".$type." VALUES {$update}");
}
}
}
$mysql_error = $db->error();
$success = (empty($mysql_error)) ? 1 : 0;
header("Location: view-profile-edu.php?id={$document_id}&success={$success}");
//$_GET['success'] = 1;
}
if(isset($_GET['success'])) {
if($_GET['success']==1) {
$message = array('Your profile was saved successfully.','success');
} else {
$message = array('Your profile was NOT saved successfully. Please try again, or contact customer support for help.','failure');
}
}
$profile = array();
$res = $db->get_results("SELECT p.*,r.first,r.last,r.phone_1,r.address1,r.city,r.state,r.zip,r.email,ca.leaddb,ca.leadid FROM lc2synment_lc.client_profile p LEFT JOIN lc2synment_lc.lc_reseller r ON r.id=p.client_id LEFT JOIN coaching_allocator.leads ca ON ca.synergy_client_id=r.id WHERE p.id='{$document_id}'");
$profile = $res[0];
$profile_arr = get_object_vars($profile);
$cp_id = $profile->id;
$partners = $db->get_results("SELECT * FROM lc2synment_lc.partners WHERE client_id='{$profile->client_id}'");
if(empty($partners)) {
$partners = array();
}
$categories = array();
$categories['categories'] = $db->get_results("SELECT categories_id as id,name FROM grdb.grd_categories WHERE name<>'ALL' ORDER BY priority,categories_id");
$categories['subcategories'] = $db->get_results("SELECT subcategories_id as id,name FROM grdb.grd_subcategories WHERE name<>'ALL' ORDER BY priority,subcategories_id");
$categories['minorities'] = $db->get_results("SELECT minorities_id as id,name FROM grdb.grd_minorities WHERE name<>'All' ORDER BY priority,minorities_id");
$categories['industries'] = $db->get_results("SELECT industries_id as id,name FROM grdb.grd_industries WHERE name<>'ALL' ORDER BY priority,industries_id");
$client_cats = array();
$foo = $db->get_results("SELECT cat_id FROM lc2synment_lc.client_profile_categories WHERE cp_id='{$cp_id}'");
if(!empty($foo)) {
foreach($foo as $bar) {
$client_cats['categories'][$bar->cat_id] = '1';
}
} else {
$client_cats['categories'] = array();
}
$foo = $db->get_results("SELECT subcat_id as cat_id FROM lc2synment_lc.client_profile_subcategories WHERE cp_id='{$cp_id}'");
if(!empty($foo)) {
foreach($foo as $bar) {
$client_cats['subcategories'][$bar->cat_id] = '1';
}
} else {
$client_cats['subcategories'] = array();
}
$foo = $db->get_results("SELECT min_id as cat_id FROM lc2synment_lc.client_profile_minorities WHERE cp_id='{$cp_id}'");
if(!empty($foo)) {
foreach($foo as $bar) {
$client_cats['minorities'][$bar->cat_id] = '1';
}
} else {
$client_cats['minorities'] = array();
}
$foo = $db->get_results("SELECT ind_id as cat_id FROM lc2synment_lc.client_profile_industries WHERE cp_id='{$cp_id}'");
if(!empty($foo)) {
foreach($foo as $bar) {
$client_cats['industries'][$bar->cat_id] = '1';
}
} else {
$client_cats['industries'] = array();
}
$foo = $db->get_results("SELECT type,value FROM lc2synment_lc.client_profile_others WHERE cp_id='{$cp_id}'");
if(!empty($foo)) {
foreach($foo as $bar) {
$client_cats['others'][$bar->type] = $bar->value;
}
} else {
$client_cats['others'] = array();
}
$labels = array(
'age' => 'Age:',
'gender' => 'Gender:',
'occupation' => 'Occupation:',
'income' => 'Income:',
'applied' => 'Have you applied for funding in the past?',
'funding_purpose' => 'What types of things will you use this money for? (tuition, housing, books, etc.)',
'amount_desired' => 'How much money do you need?',
'beneficiaries' => 'Who will benefit, and how will they benefit?',
'goal_solve' => 'Does your project solve a need or a problem?',
'project_vision' => 'What is the vision behind your project?',
'business_plan' => 'Do you have a business plan for this project?',
'written_plan' => 'Have you ever written a business plan before?',
'holdups' => 'What has held you back from applying for funding in the past?',
'how_long' => 'How long have you been thinking about this?',
'etc' => 'Is there anything you want your coach to know about you?',
'special_considerations' => 'Are there any other special considerations that we need to consider when doing our research?',
'owned_by_woman' =>'Is the business owned by a woman?',
'low_income_area' =>'Is your business located in a low-income area, or an area sanctioned by a community for revitalization?',
'help_nonprofit' =>'Will the business be serving or helping a non-profit organization?',
'is_nonprofit' =>'Are you set up as a non-profit organization 501(c)(3)?',
'serving_veterans' =>'Will your business be serving or hiring veterans?',
'training_employees' =>'Will your business be training new/existing employees?',
'will_research' =>'Will your business participate in any research in your field?',
'applied_before' =>'Have you applied for funding in the past?',
'awarded_grant' =>'Have you ever been awarded a grant?',
'is_veteran' =>'Are you a Veteran?',
'is_single_parent' =>'Are You a Single Parent?',
'is_disabled' =>'Are you Disabled?',
'is_ethnic_minority' =>'Are you part of an Ethnic Minority',
'applied_before_more_info' =>'If yes, to what organization did you apply to?',
'awarded_grant_more_info' =>'If yes, by whom and for what amount?',
'is_veteran_more_info' =>'If so, please explain.',
'is_disabled_more_info' =>'If so, please explain.',
'is_ethnic_minority_more_info' =>'If so, which one?',
'ethnicity' => 'What is your race/ethnicity?',
'high_school_graduate' => 'Are you a high school graduate?',
'which_high_school_graduate' => 'If yes, which high school did you graduate from?',
'high_school_gpa' => 'What is your high school GPA?',
'enrolled_in_college' => 'Are you currently enrolled in a college or university?',
'which_college' => 'If yes, which one?',
'how_long_college' => 'If yes, how long have you been enrolled?',
'college_gpa' => 'If yes, what is your current GPA?',
'which_college_want_to_go' => 'If no, what college / university are you looking at applying to?',
'college_major' => 'What is your major? (If your are returning to school, what do you plan to major in?',
'have_volunteered'=>'Have you ever been involved in a significant volunteer/community based activity lasting more than 6 months?',
'have_volunteered_more_info'=>'If so, describe.',
'have_been_jail'=>'Have you ever been in jail?',
'have_been_jail_more_info'=>'Please describe. (Some grants are specific to offender re-entry.)',
'have_special_skills'=>'Do you have any special skills or talents?',
'have_special_skills_more_info'=>'If so, describe.',
'have_financial_hardships'=>'Are there any financial hardships you would like us to be aware of? <i><small>(Financial hardship is something that might not be reflected on a tax return - for example, paying off a significant amount of debt, paying bills for an ill parent, etc.)</small></i>',
'have_financial_hardships_more_info'=>'If so, describe.'
);
$yes_no_questions = array(
//'partner_minority',
'have_volunteered',
'have_been_jail',
'have_special_skills',
'have_financial_hardships',
'is_veteran',
'is_single_parent',
'is_disabled',
'is_ethnic_minority',
'applied_before',
'awarded_grant',
);
$yes_no_subquestions = array(
//'partner_minority',
'have_volunteered'=>'have_volunteered_more_info',
'have_been_jail'=>'have_been_jail_more_info',
'have_special_skills'=>'have_special_skills_more_info',
'have_financial_hardships'=>'have_financial_hardships_more_info',
'is_veteran'=>'is_veteran_more_info',
'is_disabled'=>'is_disabled_more_info',
'is_ethnic_minority'=>'is_ethnic_minority_more_info',
'applied_before'=>'applied_before_more_info',
'awarded_grant'=>'awarded_grant_more_info',
);
?>
<!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>
<title>Client Profile - <?= $profile->first.' '.$profile->last;?></title>
<meta content="Content-Type" content="text/html; charse=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="/bin/includes/contracts/contracts_v2.css" />
<style type="text/css">
#GrantClientInfo label {
font-family: 'SegoeUI', Verdana, san-serif;
color:#989898;
padding-right: 5px;
}
#GrantClientInfo textarea {
margin: 10px 0px 0px 50px;
width: 775px;
height: 65px;
}
.info {
padding-left: 20px;
}
.partner {
margin: 0px 20px 0px 0px;
display:inline-block;
}
.question {
padding: 10px 0px;
}
.submit {
margin-top: 20px;
text-align: center;
}
.required label:after {
content:" *";
color: red;
}
.success {
border: 2px solid #04A00A;
color: #04A00A;
}
.failure, .validation_errors {
border: 2px solid #A00A04;
color: #A00A04;
}
.error {
border: 2px solid #A00A04;
}
#GrantClientInfo .two_column div {
width: 49%;
margin: 0px;
padding: 0px;
display: inline-block;
font-weight: normal;
}
#GrantClientInfo .two_column div label {
font-weight: normal;
}
#GrantClientInfo .three_column div {
width: 32%;
margin: 0px;
padding: 0px;
display: inline-block;
font-weight: normal;
}
#GrantClientInfo .three_column div label {
font-weight: normal;
}
#GrantClientInfo .yes_no div {
color: black;
font-weight: bold;
}
#GrantClientInfo div .yes_no label {
font-weight: normal;
font-family: 'SegoeUI', Verdana, san-serif;
color: black;
}
#GrantClientInfo .subquestion {
display: none;
}
#GrantClientInfo .subquestion label {
margin: 10px 0px 0px 97px;
display: block;
font-weight: bold;
}
#GrantClientInfo .subquestion textarea, #GrantClientInfo .subquestion input {
margin: 10px 0px 0px 97px;
width: 453px;
}
#GrantClientInfo .yes_no_question div {
display:inline-block;
vertical-align: middle;
padding: 5px 0px;
}
#GrantClientInfo .yes_no_question .yes_no_label {
display:inline-block;
width: 453px;
vertical-align: middle;
font-weight: normal;
font-family: 'SegoeUI', Verdana, san-serif;
color: #989898;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
<?php
foreach($yes_no_subquestions as $key=>$value) {
$temp = explode('_',$key);
foreach($temp as $k=>$t) {
$temp[$k] = ucwords($t);
}
$formatted_key = implode('',$temp);
?>
$('#ClientProfile<?= $formatted_key;?>Yes').click(function() {
$('#subquestion_<?= $key;?>').show().find('textarea').removeAttr('disabled');
});
$('#ClientProfile<?= $formatted_key;?>No').click(function() {
$('#subquestion_<?= $key;?>').hide().find('textarea').attr('disabled','disabled');
});
if($('#ClientProfile<?= $formatted_key;?>Yes').is(':checked')) {
$('#subquestion_<?= $key;?>').show().find('textarea').removeAttr('disabled');
} else {
$('#subquestion_<?= $key;?>').hide().find('textarea').attr('disabled','disabled');
}
<?php
}
?>
});
</script>
</head>
<body style="padding:10px;">
<div class="logo size center" style="height:61px;">
</div>
<div class="size center">
<form action="view-profile-edu.php?id=<?= $document_id;?>" method="post">
<div id="container">
<?= (!empty($message)) ? '<div class="'.$message[1].'">'.$message[0].'</div>' : null;?>
<?php if(!empty($errors)) {?>
<div class="validation_errors">
<p>Please fix the following errors:</p>
<?php
foreach($errors as $model => $val) {
if(!empty($val)) {
echo '<p>' . preg_replace('/extra/i','',$model) . ':</p><ul>';
foreach($val as $key => $value) {
if(isset($labels[$model][$key])) {
echo '<li>' . $labels[$model][$key] . " - " . $value . '</li>';
} else {
echo '<li>' . $key . " - " . $value . '</li>';
}
}
echo '</ul>';
}
}
?>
</div>
<?php }?>
<div id="ClientInfo" class="roundBox all client_info" style="background-color:#eaeaea">
<h1>Client Information</h1>
<div class="clear"></div>
<table cellspacing="0" cellpadding="0" class="info" style="width:100%;">
<tr>
<td class="light"><label>Name: </label></td>
<td colspan="6" class="dark"><?= stripslashes($profile->first.' '.$profile->last);?></td>
</tr>
<tr>
<td class="light"><label>Address: </label></td>
<td colspan="6" class="dark"><?= $profile->address1;?></td>
</tr>
<tr>
<td class="light"><label>City: </label></td>
<td style="width:150px;white-space:nowrap;" class="dark"><?= $profile->city;?></td>
<td style="width:50px;padding-left:10px;" class="light"><label>State: </label></td>
<td style="width:50px;" class="dark"><?= $profile->state;?></td>
<td style="width:50px;" class="light"><label>Zip: </label></td>
<td style="width:50px;" class="dark"><?= $profile->zip;?></td>
<td></td>
</tr>
<tr>
<td class="light"><label>Phone: </label></td>
<td colspan="6" class="dark"><?= formatPhone($profile->phone_1);?></td>
</tr>
<tr>
<td class="light"><label>Email: </label></td>
<td colspan="6" class="dark"><?= $profile->email;?></td>
</tr>
<tr>
<td class="light"><label for="ClientProfileAge"><?= $labels['age'];?></label></td>
<td colspan="6" class="dark <?= (isset($errors['ClientProfile']['age'])) ? 'error' : null; ?>"><input id="ClientProfileAge" name="ClientProfile[age]" value="<?= $profile->age;?>" /></td>
</tr>
<tr>
<td class="light"><label for="ClientProfileGender"><?= $labels['gender'];?></label></td>
<td colspan="6" class="dark <?= (isset($errors['ClientProfile']['gender'])) ? 'error' : null; ?>"><select id="ClientProfileGender" name="ClientProfile[gender]"><option value=""></option><option value="m" <?= ($profile->gender=='m') ? 'selected' : '';?>>Male</option><option value="f" <?= ($profile->gender=='f') ? 'selected' : '';?>>Female</option></select></td>
</tr>
<tr>
<td class="light"><label for="ClientProfileOccupation"><?= $labels['occupation'];?></label></td>
<td colspan="6" class="dark <?= (isset($errors['ClientProfile']['occupation'])) ? 'error' : null; ?>"><input id="ClientProfileOccupation" name="ClientProfile[occupation]" value="<?= $profile->occupation;?>" /></td>
</tr>
<tr>
<td class="light"><label for="ClientProfileIncome"><?= $labels['income'];?></label></td>
<td colspan="6" class="dark <?= (isset($errors['ClientProfile']['income'])) ? 'error' : null; ?>"><input id="ClientProfileIncome" name="ClientProfile[income]" value="<?= $profile->income;?>" /></td>
</tr>
</table>
</div>
<div id="PartnerInfo" class="roundBox all client_info" style="background-color:#eaeaea;">
<h1>Partner Information</h1>
<div class="clear"></div>
<?php
foreach($partners as $i=>$partner) {
?>
<div class="partner">
<input type="hidden" name="Partner[<?= $i;?>][id]" value="<?= $partner->id;?>" />
<table cellspacing="0" cellpadding="0" class="info">
<tr>
<td class="light"><label>Partner Type: </label></td>
<td class="dark"><?= ucwords(strtolower($partner->type));?></td>
</tr>
<tr>
<td class="light"><label>Name: </label></td>
<td class="dark"><?= $partner->first.' '.$partner->last;?></td>
</tr>
<tr>
<td class="light"><label>Phone: </label></td>
<td class="dark"><?= formatPhone($partner->phone);?></td>
</tr>
<tr>
<td class="light"><label>Email: </label></td>
<td class="dark"><?= $partner->email;?></td>
</tr>
<tr>
<td class="light"><label>Gender: </label></td>
<td class="dark <?= (isset($errors['Partner '.($i+1)]['gender'])) ? 'error' : null; ?>"><select name="Partner[<?= $i;?>][gender]"><option value=""></option><option value="m" <?= ($partner->gender=='m') ? 'selected' : '';?>>Male</option><option value="f" <?= ($partner->gender=='f') ? 'selected' : '';?>>Female</option></select></td>
</tr>
<tr>
<td class="light"><label>Age: </label></td>
<td class="dark <?= (isset($errors['Partner '.($i+1)]['age'])) ? 'error' : null; ?>"><input type="text" name="Partner[<?= $i;?>][age]" style="width:35px;" value="<?= $partner->age;?>" /></td>
</tr>
<tr>
<td class="light"><label>Occupation: </label></td>
<td class="dark <?= (isset($errors['Partner '.($i+1)]['occupation'])) ? 'error' : null; ?>"><input type="text" name="Partner[<?= $i;?>][occupation]" style="width:125px;" value="<?= $partner->occupation;?>" /></td>
</tr>
<tr>
<td class="light"><label>Income: </label></td>
<td class="dark <?= (isset($errors['Partner '.($i+1)]['income'])) ? 'error' : null; ?>"><input type="text" name="Partner[<?= $i;?>][income]" style="width:85px;" value="<?= $partner->income;?>" /></td>
</tr>
</table>
</div>
<?php
}
?>
</div>
<div id="GrantClientInfo" class="roundBox all client_info" style="background-color:#eaeaea;">
<h1>Client Profile</h1>
<div class="clear"></div>
<p>Before you begin working with your coach, we would like you to take a few minutes and fill out the client profile below to help your coach get to know you. Please be as detailed as possible. The more information you provide, the more your coach can assist you in obtaining the funding you are seeking! Although many of these questions are sensitive in nature and could be misconstrued as discriminatory (ie. race, disabled status, etc.), all of the questions are designed to determine one's eligibility.</p>
<table class="info">
<?php $options = array(
'' => '',
'Black / African American' => 'Black / African American',
'White / Caucasian' => 'White / Caucasian',
'Hispanic' => 'Hispanic',
'Asian Indian' => 'Asian Indian',
'Chinese' => 'Chinese',
'Filipino' => 'Filipino',
'Japanese' => 'Japanese',
'Vietnamese' => 'Vietnamese',
'Native Hawaian' => 'Native Hawaian',
'Samoan' => 'Samoan',
);
?>
<div class="question">
<div <?= (isset($errors['ClientProfile']['ethnicity'])) ? 'class="error"' : null; ?>>
<label for="ClientProfileEthnicity"><?= $labels['ethnicity'];?></label>
<select id="ClientProfileEthnicity" name="ClientProfile[ethnicity]">
<?php foreach($options as $k=>$v) { ?>
<option value="<?= $k;?>" <?= ($profile_arr['ethnicity']==$k) ? 'selected' : '';?>><?= $v;?></option>
<?php } ?>
</select>
</div>
</div>
<div class="yes_no_question <?= (isset($errors['ClientProfile']['high_school_graduate'])) ? 'error' : null;?>">
<div>
<label>
<input type="radio" id="ClientProfile<?= $formatted_key;?>Yes" name="ClientProfile[high_school_graduate]" value="yes" <?= ($profile_arr['high_school_graduate']=='yes') ? 'checked="checked"' : '';?> onclick="$('#subquestion_which_high_school_graduate').show();" />Yes
</label>
<label>
<input type="radio" id="ClientProfile<?= $formatted_key;?>No" name="ClientProfile[high_school_graduate]" value="no" <?= ($profile_arr['high_school_graduate']=='no') ? 'checked="checked"' : '';?> onclick="$('#subquestion_which_high_school_graduate').hide();" />No
</label>
<div class="yes_no_label"><?= $labels['high_school_graduate'];?></div>
</div>
</div>
<div class="subquestion" id="subquestion_which_high_school_graduate" <?= ($profile_arr['high_school_graduate']=='yes') ? 'style="display:block;"' : '';?>>
<label for="ClientProfileWhichHighSchoolGraduate"><?= $labels['which_high_school_graduate'];?></label>
<textarea id="ClientProfileWhichHighSchoolGraduate" name="ClientProfile[which_high_school_graduate]"><?= $profile_arr['which_high_school_graduate'];?></textarea>
</div>
<div class="question">
<div <?= (isset($errors['ClientProfile']['high_school_gpa'])) ? 'class="error"' : null; ?>>
<label for="ClientProfileHighSchoolGpa"><?= $labels['high_school_gpa'];?></label>
<input id="ClientProfileHighSchoolGpa" name="ClientProfile[high_school_gpa]" value="<?= $profile->high_school_gpa;?>" />
</div>
</div>
<div class="yes_no_question <?= (isset($errors['ClientProfile']['enrolled_in_college'])) ? 'error' : null;?>">
<div>
<label>
<input type="radio" id="ClientProfileEnrolledCollegeYes" name="ClientProfile[enrolled_in_college]" value="yes" <?= ($profile_arr['enrolled_in_college']=='yes') ? 'checked="checked"' : '';?> onclick="$('.subquestion_enrolled_college_yes').show(); $('.subquestion_enrolled_college_no').hide();" />Yes
</label>
<label>
<input type="radio" id="ClientProfileEnrolledCollegeNo" name="ClientProfile[enrolled_in_college]" value="no" <?= ($profile_arr['enrolled_in_college']=='no') ? 'checked="checked"' : '';?> onclick="$('.subquestion_enrolled_college_no').show(); $('.subquestion_enrolled_college_yes').hide();" />No
</label>
<div class="yes_no_label"><?= $labels['enrolled_in_college'];?></div>
</div>
</div>
<div class="subquestion subquestion_enrolled_college_yes" id="subquestion_which_college" <?= ($profile_arr['enrolled_in_college']=='yes') ? 'style="display:block;"' : '';?>>
<label for="ClientProfileWhichCollege"><?= $labels['which_college'];?></label>
<input id="ClientProfileWhichCollege" name="ClientProfile[which_college]" value="<?= $profile->which_college;?>" />
</div>
<div class="subquestion subquestion_enrolled_college_yes" id="subquestion_how_long_college" <?= ($profile_arr['enrolled_in_college']=='yes') ? 'style="display:block;"' : '';?>>
<label for="ClientProfileHowLongCollege"><?= $labels['how_long_college'];?></label>
<input id="ClientProfileHowLongCollege" name="ClientProfile[how_long_college]" value="<?= $profile->how_long_college;?>" />
</div>
<div class="subquestion subquestion_enrolled_college_yes" id="subquestion_college_gpa" <?= ($profile_arr['enrolled_in_college']=='yes') ? 'style="display:block;"' : '';?>>
<label for="ClientProfileCollegeGpa"><?= $labels['college_gpa'];?></label>
<input id="ClientProfileCollegeGpa" name="ClientProfile[college_gpa]" value="<?= $profile->college_gpa;?>" />
</div>
<div class="subquestion subquestion_enrolled_college_no" id="subquestion_which_college_want_to_go" <?= ($profile_arr['enrolled_in_college']=='no') ? 'style="display:block;"' : '';?>>
<label for="ClientProfileWhichCollegeWantToGo"><?= $labels['which_college_want_to_go'];?></label>
<input id="ClientProfileWhichCollegeWantToGo" name="ClientProfile[which_college_want_to_go]" value="<?= $profile->which_college_want_to_go;?>" />
</div>
<div class="question">
<div <?= (isset($errors['ClientProfile']['college_major'])) ? 'class="error"' : null; ?>>
<label for="ClientProfileCollegeMajor"><?= $labels['college_major'];?></label>
<input id="ClientProfileCollegeMajor" name="ClientProfile[college_major]" value="<?= $profile->college_major;?>" />
</div>
</div>
<div class="question">
<div <?= (isset($errors['ClientProfile']['amount_desired'])) ? 'class="error"' : null; ?>>
<label for="ClientProfileAmountDesired"><?= $labels['amount_desired'];?></label>
<input id="ClientProfileAmountDesired" name="ClientProfile[amount_desired]" value="<?= $profile->amount_desired;?>" />
</div>
</div>
<div class="question">
<div><label for="ClientProfileFundingPurpose"><?= $labels['funding_purpose'];?></label></div>
<div <?= (isset($errors['ClientProfile']['funding_purpose'])) ? 'class="error"' : null; ?>><textarea id="ClientProfileFundingPurpose" name="ClientProfile[funding_purpose]" value="" ><?= $profile->funding_purpose;?></textarea></div>
</div>
<div class="question">
<div><label>Grant Category <span class="italic">(Check all that apply)</span></label></div>
<div class="two_column"><?php
foreach($categories['categories'] as $cat) { ?>
<div class="cat">
<label>
<input type="checkbox" name="ProfileCategory[categories][]" value="<?= $cat->id;?>" <?= ($client_cats['categories'][$cat->id]=='1') ? 'checked="checked"' : '';?> />
<?= $cat->name;?>
</label>
</div>
<?php } ?>
<div class="cat">
<label>
Other
<input type="text" name="others[category]" style="margin-right: 5px;" value="<?= $client_cats['others']['category'];?>" />
</label>
</div>
</div>
</div>
<div class="question">
<div><label>Sub-Categories <span class="italic">(Check all that apply)</span></label></div>
<div class="three_column"><?php
foreach($categories['subcategories'] as $cat) { ?>
<div class="cat">
<label>
<input type="checkbox" name="ProfileCategory[subcategories][]" value="<?= $cat->id;?>" <?= ($client_cats['subcategories'][$cat->id]=='1') ? 'checked="checked"' : '';?> />
<?= $cat->name;?>
</label>
</div>
<?php } ?>
<div class="cat">
<label>
Other
<input type="text" name="others[subcategory]" style="margin-right: 5px;" value="<?= $client_cats['others']['subcategory'];?>" />
</label>
</div>
</div>
</div>
<div class="question">
<div><label>Minorities <span class="italic">(Check all that apply)</span></label></div>
<div class="three_column"><?php
foreach($categories['minorities'] as $cat) { ?>
<div class="cat">
<label>
<input type="checkbox" name="ProfileCategory[minorities][]" value="<?= $cat->id;?>" <?= ($client_cats['minorities'][$cat->id]=='1') ? 'checked="checked"' : '';?> />
<?= $cat->name;?>
</label>
</div>
<?php } ?>
<div class="cat">
<label>
Other
<input type="text" name="others[minority]" style="margin-right: 5px;" value="<?= $client_cats['others']['minority'];?>" />
</label>
</div>
</div>
</div>
<div class="question">
<div><label>Industry <span class="italic">(Please select the industry that applies you)</span></label></div>
<div class="three_column"><?php
foreach($categories['industries'] as $cat) { ?>
<div class="cat">
<label>
<input type="checkbox" name="ProfileCategory[industries][]" value="<?= $cat->id;?>" <?= ($client_cats['industries'][$cat->id]=='1') ? 'checked="checked"' : '';?> />
<?= $cat->name;?>
</label>
</div>
<?php } ?>
<div class="cat">
<label>
Other
<input type="text" name="others[industry]" style="margin-right: 5px;" value="<?= $client_cats['others']['industry'];?>" />
</label>
</div>
</div>
</div>
<div class="yes_no">
<?php
foreach($yes_no_questions as $question) {
$temp = explode('_',$question);
foreach($temp as $k=>$t) {
$temp[$k] = ucwords($t);
}
$formatted_key = implode('',$temp);
?><div class="yes_no_question <?= (isset($errors['ClientProfile'][$question])) ? 'error' : null;?>">
<div>
<label>
<input type="radio" id="ClientProfile<?= $formatted_key;?>Yes" name="ClientProfile[<?= $question;?>]" value="yes" <?= ($profile_arr[$question]=='yes') ? 'checked="checked"' : '';?> />Yes
</label>
<label>
<input type="radio" id="ClientProfile<?= $formatted_key;?>No" name="ClientProfile[<?= $question;?>]" value="no" <?= ($profile_arr[$question]=='no') ? 'checked="checked"' : '';?> />No
</label>
<div class="yes_no_label"><?= $labels[$question];?></div>
</div>
</div><?php
if(isset($yes_no_subquestions[$question])) {
$temp = explode('_',$yes_no_subquestions[$question]);
foreach($temp as $k=>$t) {
$temp[$k] = ucwords($t);
}
$formatted_key = implode('',$temp);
?>
<div class="subquestion" id="subquestion_<?= $question;?>">
<label for="ClientProfile<?= $formatted_key;?>"><?= $labels[$yes_no_subquestions[$question]];?></label>
<textarea id="ClientProfile<?= $formatted_key;?>" name="ClientProfile[<?= $yes_no_subquestions[$question];?>]"><?= $profile_arr[$yes_no_subquestions[$question]];?></textarea>
</div>
<?php
}
}
?>
</div>
<div class="question">
<div><label for="ClientProfileEtc"><?= $labels['etc'];?></label></div>
<div <?= (isset($errors['ClientProfile']['etc'])) ? 'class="error"' : null; ?>><textarea id="ClientProfileEtc" name="ClientProfile[etc]" ><?= $profile->etc;?></textarea></div>
</div>
<div class="question">
<div><label for="ClientProfileSpecialConsiderations"><?= $labels['special_considerations'];?></label></div>
<div <?= (isset($errors['ClientProfile']['special_considerations'])) ? 'class="error"' : null; ?>><textarea id="ClientProfileSpecialConsiderations" name="ClientProfile[special_considerations]" ><?= $profile->special_considerations;?></textarea></div>
</div>
</div>
<div class="submit">
<input type="hidden" name="profile_id" value="<?= $document_id;?>" />
<input name="submit" type="submit" value="Submit" />
</div>
</div>
</div>
</form>
</div>
</body>
</html>