| 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');
$title = 'Support';
$body_id = 'supp';
$clients = $db->get_results("
SELECT id, first, last, address1, city, state, zip, country, phone_1, phone_2, phone_3, fax, email
FROM lc_reseller
WHERE id = '".$db->clean($_SESSION['Client']['id'])."' LIMIT 1
");
$client = $clients[0];
$first = $client->first;
$last = $client->last;
$address = $client->address1;
$city = $client->city;
$state = $client->state;
$zip = $client->zip;
$phone = $client->phone_1;
$email = $client->email;
if(!empty($_POST)) {
$message = '';
$body = '';
if(empty($_POST['comments']) || $_POST['comments']=='Type your question..') {
$message = 'Please type your question.';
} else {
foreach($_POST as $k=>$v) {
$body .= ($body=='') ? $k.': '.$v : "\n".$k.': '.$v;
}
$profiles = $db->get_results("
SELECT id,date_entered
FROM client_profile
WHERE client_id = '".$db->clean($_SESSION['Client']['id'])."'
LIMIT 1;
");
$research_coach = '';
if(!empty($profiles)) {
$profile = $profiles[0];
$profile_id = $profile->id;
$grdb_profile_id_arr = $db->get_results("SELECT assigned_agent,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';
}
$coach_username_res = $db->get_results("SELECT username FROM surfcrm.employees WHERE agent_id='".$db->clean($grdb_profile_id_arr[0]->assigned_agent)."'");
$coach_username = $coach_username_res[0]->username;
}
if(!empty($research_coach)) {
$db->query("INSERT INTO lc2synment_lc.coach_email_inboxes
(
client_id
,coach_username
,ts
,username
,result
,subject
,body
,sender_name
,has_seen
,from_email
,to_header
) VALUES (
'".$db->clean($_SESSION['Client']['id'])."'
,'".$db->clean($coach_username)."'
,NOW()
,'".$db->clean($clients[0]->first.' '.$clients[0]->last)."'
,'INBOX'
,'USBusinessFundingSolutions Contact Form - Member Contact'
,'".$db->clean(nl2br($body))."'
,'".$db->clean($clients[0]->first.' '.$clients[0]->last)."'
,0
,'".$db->clean($clients[0]->email)."'
,'".$db->clean($to)."'
)");
} else {
$to = 'support@usbusinessfundingsolutions.com';
$from = 'NoReply@usbusinessfundingsolutions.com';
$subject = 'USBusinessFundingSolutions Contact';
$message = nl2br($body);
$tag = 'Contact Form';
$cc = '';
$bcc = '';
$site_code = 'synment';
$client_id = $_SESSION['Client']['id'];
$attachments = array();
include_once($_SERVER['DOCUMENT_ROOT'].'/member/php/mailgun.php');
mailgun_send_message($to,$from,$subject,$message,1,$tag,$cc,$bcc,$site_code,$client_id,$attachments,$_POST['email'],1);
}
$message = 'Your question was sent successfully. We will get back to you shortly.';
/*if(mail('support@usbusinessfundingsolutions.com,frontoffice@personalgranthelp.com','usbfs contact',$body,"From:{$email}\r\n")) {
$message = 'Your question was sent successfully. We will get back to you shortly.';
} else {
$message = 'There was a problem sending your question, please try again later.';
}*/
}
}
require_once('header_new_2021_06_29.php');
$NUM_NEWS = 1;
?>
<div id="content" class="size">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
<td class="borderBot">
<a name="contact"></a>
<h1>Coaching Support Form</h1>
<form name="theForm" id="theForm" action="<?=$PHP_SELF?>" method="post" onSubmit="return FV_ValidateForm(this);">
<table cellpadding="0" cellspacing="3" border="0" align="left" width="100%">
<tr>
<td style="font:8pt/120% verdana;padding-left:20px">
<div style="font:7.5pt/100% verdana;float:right;margin-top:-1px"></div>
<?=$first?> <?=$last?><br />
<?=$address?><br />
<?=$city?> <?=$state?>, <?=$zip?><br />
<?=formatPhone($phone)?><br />
<?=$email?>
<input type="hidden" name="first" value="<?=$first?>" />
<input type="hidden" name="address" value="<?=$address?>" />
<input type="hidden" name="city" value="<?=$city?>" />
<input type="hidden" name="state" value="<?=$state?>" />
<input type="hidden" name="zip" value="<?=$zip?>" />
<input type="hidden" name="phone" value="<?=$phone?>" />
<input type="hidden" name="email" value="<?=$email?>" />
</td>
<td width="450px"> </td>
</tr>
<tr>
<td align="right"><span id="vis" style="display:none"><input class="input text italic" value="Type Subject.." type="text" name="subject_other" size="30" onFocus="if(this.value=='Type Subject..')this.value='';this.className='input text normal'" onBlur="if(this.value=='') {this.value='Type Subject..';this.className='input text italic'} else {this.className='input text normal'}" /></span></td>
<td></td>
</tr>
<tr>
<td align="center" colspan="2"><textarea style="border:1px solid black;padding:5px;width:100%;font:9pt/120% verdana" class="input text italic full_width" rows="6" wrap="soft" name="comments" required="true" validator="minlen(2)" onFocus="if(this.value=='Type your question..')this.value='';this.className='input text normal full_width'" onBlur="if(this.value=='') {this.value='Type your question..';this.className='input text italic full_width'} else {this.className='input text normal full_width'}">Type your question..</textarea></td>
</tr>
<tr>
<td colspan="2" align="center"><br /><br /><input type="submit" class="submit" value="Submit Question" /><br /></td>
</tr>
</table>
</form>
<?= $message;?>
</td>
</tr>
</table>
</div>
<?php
require_once('footer.php');
?>