| 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)."'");
}
}
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->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->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.php?id={$document_id}&success={$success}");
}
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];
$phones = $db->get_results("SELECT p.*
FROM coaching_allocator.phone_numbers p
LEFT JOIN coaching_allocator.leads l ON l.id=p.client_id
WHERE l.synergy_client_id='".$db->clean($profile->client_id)."'");
$profile->phones = $phones;
$emails = $db->get_results("SELECT p.*
FROM coaching_allocator.emails p
LEFT JOIN coaching_allocator.leads l ON l.id=p.client_id
WHERE l.synergy_client_id='".$db->clean($profile->client_id)."'");
$profile->emails = $emails;
$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 are you looking to get the funding for?',
'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?'
);
$yes_no_questions = array(
//'partner_minority',
'owned_by_woman',
'low_income_area',
'help_nonprofit',
'is_nonprofit',
'serving_veterans',
'training_employees',
'will_research',
'is_veteran',
'is_single_parent',
'is_disabled',
'is_ethnic_minority',
'applied_before',
'awarded_grant',
);
$yes_no_subquestions = array(
//'partner_minority',
'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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<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/bootstrap.min.css" />
<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;
display:inline-block;
width: 260px;
}
.dark input, .dark select {
width:100%;
}
.dark input[type=radio], .dark input[type=checkbox] {
width: auto;
}
.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 .yes_no .subquestion {
display: none;
}
#GrantClientInfo .yes_no .subquestion label {
margin: 10px 0px 0px 97px;
display: block;
font-weight: bold;
}
#GrantClientInfo .yes_no .subquestion textarea {
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;
}
@media only screen and (max-width: 600px) {
.partner {
display:block;
width:auto;
}
.size {
width: 100%;
}
}
</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.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="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-6">
<label class="light">Name:</label>
</div>
<div class="col-sm-6 dark">
<?= stripslashes($profile->first.' '.$profile->last);?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="light">Address:</label>
</div>
<div class="col-sm-6 dark">
<?= stripslashes($profile->address1);?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="light">City, State, Zip:</label>
</div>
<div class="col-sm-6 dark">
<?= stripslashes($profile->city.', '.$profile->state.', '.$profile->zip);?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="light" for="ClientProfileAge">Age:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['ClientProfile']['age'])) ? 'error' : null; ?>">
<input id="ClientProfileAge" name="ClientProfile[age]" value="<?= $profile->age;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="light" for="ClientProfileGender">Gender:</label>
</div>
<div class="col-sm-6 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>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="light" for="ClientProfileOccupation">Occupation:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['ClientProfile']['occupation'])) ? 'error' : null; ?>">
<input id="ClientProfileOccupation" name="ClientProfile[occupation]" value="<?= $profile->occupation;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="light" for="ClientProfileIncome">Income:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['ClientProfile']['income'])) ? 'error' : null; ?>">
<input id="ClientProfileIncome" name="ClientProfile[income]" value="<?= $profile->income;?>" />
</div>
</div>
</div>
<div class="col-sm-6">
<?php $i=0; foreach($profile->phones as $phone) { $i++; ?>
<div class="row">
<div class="col-sm-6">
<label class="light">Phone <?= $i;?>:</label>
</div>
<div class="col-sm-6 dark">
<?= formatPhone($phone->phone);?>
</div>
</div>
<?php } ?>
<?php $i=0; foreach($profile->emails as $email) { $i++; ?>
<div class="row">
<div class="col-sm-6">
<label class="light">Email <?= $i;?>:</label>
</div>
<div class="col-sm-6 dark">
<?= $email->email;?>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<div id="PartnerInfo" class="roundBox all client_info" style="background-color:#eaeaea;">
<h1>Partner Information</h1>
<div class="row">
<?php
foreach($partners as $i=>$partner) {
?>
<div class="partner">
<input type="hidden" name="Partner[<?= $i;?>][id]" value="<?= $partner->id;?>" />
<div class="row">
<div class="col-sm-6 light">Partner Type:</div>
<div class="col-sm-6 dark"><?= ucwords(strtolower($partner->type));?></div>
</div>
<div class="row">
<div class="col-sm-6 light">Name:</div>
<div class="col-sm-6 dark"><?= ucwords(strtolower($partner->first.' '.$partner->last));?></div>
</div>
<div class="row">
<div class="col-sm-6 light">Phone:</div>
<div class="col-sm-6 dark"><?= formatPhone($partner->phone);?></div>
</div>
<div class="row">
<div class="col-sm-6 light">Email:</div>
<div class="col-sm-6 dark"><?= $partner->email;?></div>
</div>
<div class="row">
<div class="col-sm-6 light"><label for="Partner<?= $i;?>gender">Gender: </label></div>
<div class="col-sm-6 dark <?= (isset($errors['Partner '.($i+1)]['gender'])) ? 'error' : null; ?>">
<select name="Partner[<?= $i;?>][gender]" id="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>
</div>
</div>
<div class="row">
<div class="col-sm-6 light"><label for="Partner<?= $i;?>age">Age: </label></div>
<div class="col-sm-6 dark <?= (isset($errors['Partner '.($i+1)]['age'])) ? 'error' : null; ?>">
<input type="text" name="Partner[<?= $i;?>][age]" id="Partner<?= $i;?>age" value="<?= $partner->age;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light"><label for="Partner<?= $i;?>occupation">Occupation: </label></div>
<div class="col-sm-6 dark <?= (isset($errors['Partner '.($i+1)]['occupation'])) ? 'error' : null; ?>">
<input type="text" name="Partner[<?= $i;?>][occupation]" id="Partner<?= $i;?>occupation" value="<?= $partner->occupation;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light"><label for="Partner<?= $i;?>income">Income: </label></div>
<div class="col-sm-6 dark <?= (isset($errors['Partner '.($i+1)]['income'])) ? 'error' : null; ?>">
<input type="text" name="Partner[<?= $i;?>][income]" id="Partner<?= $i;?>income" value="<?= $partner->income;?>" />
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
<div id="CompanyInfo" class="roundBox all client_info" style="background-color:#eaeaea;">
<h1>Company Information</h1>
<div class="clear"></div>
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-6 light">
<label for="company_business_name">Business Name:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_business_name'])) ? 'error' : null; ?>">
<input type="text" name="company_business_name" id="company_business_name" value="<?= $profile->company_business_name;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_owners_name">Owner's Name:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_owners_name'])) ? 'error' : null; ?>">
<input type="text" name="company_owners_name" id="company_owners_name" value="<?= $profile->company_owners_name;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_address">Address:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_address'])) ? 'error' : null; ?>">
<input type="text" name="company_address" id="company_address" value="<?= $profile->company_address;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_city">City:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_city'])) ? 'error' : null; ?>">
<input type="text" name="company_city" id="company_city" value="<?= $profile->company_city;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_state">State:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_state'])) ? 'error' : null; ?>">
<input type="text" name="company_state" id="company_state" value="<?= $profile->company_state;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_zip">Zip:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_zip'])) ? 'error' : null; ?>">
<input type="text" name="company_zip" id="company_zip" value="<?= $profile->company_zip;?>" />
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-6 light">
<label for="company_phone_1">Phone #1:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_phone_1'])) ? 'error' : null; ?>">
<input type="text" name="company_phone_1" id="company_phone_1" value="<?= $profile->company_phone_1;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_phone_2">Phone #2:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_phone_2'])) ? 'error' : null; ?>">
<input type="text" name="company_phone_2" id="company_phone_2" value="<?= $profile->company_phone_2;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_phone_3">Phone #3:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_phone_3'])) ? 'error' : null; ?>">
<input type="text" name="company_phone_3" id="company_phone_3" value="<?= $profile->company_phone_3;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_fax">Fax:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_fax'])) ? 'error' : null; ?>">
<input type="text" name="company_fax" id="company_fax" value="<?= $profile->company_fax;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_email">Email:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_email'])) ? 'error' : null; ?>">
<input type="text" name="company_email" id="company_email" value="<?= $profile->company_email;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_website">Website:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_website'])) ? 'error' : null; ?>">
<input type="text" name="company_website" id="company_website" value="<?= $profile->company_website;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_logo">Company Logo:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_logo'])) ? 'error' : null; ?>">
<input type="text" name="company_logo" id="company_logo" value="<?= $profile->company_logo;?>" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="CompanyLegalInfo" class="roundBox all client_info" style="background-color:#eaeaea;">
<h1>Company Legal Information</h1>
<div class="clear"></div>
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6 light">
Are you looking for funding for a business or nonprofit?
</div>
<div class="col-sm-6 dark">
<div class="row">
<div class="col-sm-4">
<label><input type="radio" name="company_legal_business_nonprofit" value="Business" <?= ($profile->company_legal_business_nonprofit=='Business') ? 'checked' : '';?> /> Business</label>
</div>
<div class="col-sm-8">
<label><input type="radio" name="company_legal_business_nonprofit" value="Nonprofit (501c3)" <?= ($profile->company_legal_business_nonprofit=='Nonprofit') ? 'checked' : '';?> /> Nonprofit (501c3)</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
Which best describes your entity?
</div>
<div class="col-sm-6 dark">
<div class="row">
<div class="col-sm-4">
<label><input type="radio" name="company_legal_is_existing_entity" value="Existing Entity" <?= ($profile->company_legal_is_existing_entity=='Existing Entity') ? 'checked' : '';?> /> Existing Entity</label>
</div>
<div class="col-sm-8">
<label><input type="radio" name="company_legal_is_existing_entity" value="New Startup" <?= ($profile->company_legal_is_existing_entity=='New Startup') ? 'checked' : '';?> /> New Startup entity I need to register</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
What is the legal structure of your entity?<br />
<div style="font-size:12px;font-style:italic;padding-left:20px;">
(If you are a new entity, what do you plan on registering your business / nonprofit as?)
</div>
</div>
<div class="col-sm-6 dark">
<div class="row">
<div class="col-sm-4">
<label><input type="radio" name="company_legal_legal_structure" value="Sole Proprietor" <?= ($profile->company_legal_legal_structure=='Sole Proprietor') ? 'checked' : '';?> /> Sole Proprietor</label>
</div>
<div class="col-sm-4">
<label><input type="radio" name="company_legal_legal_structure" value="Corporation" <?= ($profile->company_legal_legal_structure=='Corporation') ? 'checked' : '';?> /> Corporation</label>
</div>
<div class="col-sm-4">
<label><input type="radio" name="company_legal_legal_structure" value="LLC" <?= ($profile->company_legal_legal_structure=='LLC') ? 'checked' : '';?> /> LLC</label>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<label><input type="radio" name="company_legal_legal_structure" value="Nonprofit (501c3)" <?= ($profile->company_legal_legal_structure=='Nonprofit (501c3)') ? 'checked' : '';?> /> Nonprofit (501c3)</label>
</div>
<div class="col-sm-4">
<label><input type="radio" name="company_legal_legal_structure" value="Other" <?= ($profile->company_legal_legal_structure=='Other') ? 'checked' : '';?> /> Other</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_legal_state_registered">
What State did you register your entity?<br />
<div style="font-size:12px;font-style:italic;padding-left:20px;">
(If new, what State will you register your entity?)
</div>
</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_legal_state_registered'])) ? 'error' : null; ?>">
<select name="company_legal_state_registered" id="company_legal_state_registered">
<option value=""></option>
<?php $states = $db->get_results("SELECT state_short,state FROM geo.states WHERE conus='yes' ORDER BY state ASC");
foreach($states as $state) { ?>
<option value="<?= $state->state_short;?>" <?= ($state->state_short==$profile->company_legal_state_registered) ? 'selected' : '';?>><?= $state->state;?></option>
<?php } ?>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_legal_county">
What County is your entity in?
</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_legal_county'])) ? 'error' : null; ?>">
<input type="text" name="company_legal_county" id="company_legal_county" value="<?= $profile->company_legal_county;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_legal_date_registered">
Enter the date you registered your entity:<br />
<div style="font-size:12px;font-style:italic;padding-left:20px;">
(If new, when do you plan on registering it?)
</div>
</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_legal_date_registered'])) ? 'error' : null; ?>">
<input type="date" name="company_legal_date_registered" id="company_legal_date_registered" value="<?= $profile->company_legal_date_registered;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_legal_number_employees">
Number of current employees:
</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_legal_number_employees'])) ? 'error' : null; ?>">
<input type="text" name="company_legal_number_employees" id="company_legal_number_employees" value="<?= $profile->company_legal_number_employees;?>" />
</div>
</div>
</div>
</div>
</div>
<div id="CompanySocialMediaInfo" class="roundBox all client_info" style="background-color:#eaeaea;">
<h1>Company Information</h1>
<div class="clear"></div>
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-6 light">
<label for="company_business_name">Business Name:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_business_name'])) ? 'error' : null; ?>">
<input type="text" name="company_business_name" id="company_business_name" value="<?= $profile->company_business_name;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_owners_name">Owner's Name:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_owners_name'])) ? 'error' : null; ?>">
<input type="text" name="company_owners_name" id="company_owners_name" value="<?= $profile->company_owners_name;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_address">Address:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_address'])) ? 'error' : null; ?>">
<input type="text" name="company_address" id="company_address" value="<?= $profile->company_address;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_city">City:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_city'])) ? 'error' : null; ?>">
<input type="text" name="company_city" id="company_city" value="<?= $profile->company_city;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_state">State:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_state'])) ? 'error' : null; ?>">
<input type="text" name="company_state" id="company_state" value="<?= $profile->company_state;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_zip">Zip:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_zip'])) ? 'error' : null; ?>">
<input type="text" name="company_zip" id="company_zip" value="<?= $profile->company_zip;?>" />
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-6 light">
<label for="company_phone_1">Phone #1:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_phone_1'])) ? 'error' : null; ?>">
<input type="text" name="company_phone_1" id="company_phone_1" value="<?= $profile->company_phone_1;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_phone_2">Phone #2:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_phone_2'])) ? 'error' : null; ?>">
<input type="text" name="company_phone_2" id="company_phone_2" value="<?= $profile->company_phone_2;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_phone_3">Phone #3:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_phone_3'])) ? 'error' : null; ?>">
<input type="text" name="company_phone_3" id="company_phone_3" value="<?= $profile->company_phone_3;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_fax">Fax:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_fax'])) ? 'error' : null; ?>">
<input type="text" name="company_fax" id="company_fax" value="<?= $profile->company_fax;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_email">Email:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_email'])) ? 'error' : null; ?>">
<input type="text" name="company_email" id="company_email" value="<?= $profile->company_email;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_website">Website:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_website'])) ? 'error' : null; ?>">
<input type="text" name="company_website" id="company_website" value="<?= $profile->company_website;?>" />
</div>
</div>
<div class="row">
<div class="col-sm-6 light">
<label for="company_logo">Company Logo:</label>
</div>
<div class="col-sm-6 dark <?= (isset($errors['company_logo'])) ? 'error' : null; ?>">
<input type="text" name="company_logo" id="company_logo" value="<?= $profile->company_logo;?>" />
</div>
</div>
</div>
</div>
</div>
</div>
</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!</p>
<table class="info">
<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 for="ClientProfileProjectVision"><?= $labels['project_vision'];?></label></div>
<div <?= (isset($errors['ClientProfile']['project_vision'])) ? 'class="error"' : null; ?>><textarea id="ClientProfileProjectVision" name="ClientProfile[project_vision]"><?= $profile->project_vision;?></textarea></div>
</div>
<div class="question">
<div><label for="ClientProfileBeneficiaries"><?= $labels['beneficiaries'];?></label></div>
<div <?= (isset($errors['ClientProfile']['beneficiaries'])) ? 'class="error"' : null; ?>><textarea id="ClientProfileBeneficiaries" name="ClientProfile[beneficiaries]"><?= $profile->beneficiaries;?></textarea></div>
</div>
<div class="question">
<div <?= (isset($errors['ClientProfile']['how_long'])) ? 'class="error"' : null; ?>>
<label for="ClientProfileHowLong"><?= $labels['how_long'];?></label>
<input id="ClientProfileHowLong" name="ClientProfile[how_long]" value="<?= $profile->how_long;?>" />
</div>
</div>
<div class="question">
<div><label for="ClientProfileHoldups"><?= $labels['holdups'];?></label></div>
<div <?= (isset($errors['ClientProfile']['holdups'])) ? 'class="error"' : null; ?>><textarea id="ClientProfileHoldups" name="ClientProfile[holdups]"><?= $profile->holdups;?></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>
<script src="/bin/includes/contracts/jquery-3.3.1.slim.min.js"></script>
<script src="/bin/includes/contracts/popper.min.js"></script>
<script src="/bin/includes/contracts/bootstrap.min.js"></script>
</body>
</html>