| 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/ |
Upload File : |
<?php
session_start();
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/phpCrypto.php');
$crypto = new phpCrypto();
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/dbconfig.php');
//echo $crypto->encrypt('1960|||16952');
//echo bWNjaXYzak12dFZtc2hSeDBaKzduQT09
//die();
if(empty($_SESSION['client_id']) && !empty($_GET['uid'])) {
$id = $crypto->decrypt($_GET['uid']);
$arr = explode('|||',$id);
$_SESSION['client_id'] = $arr[0];
$_SESSION['order_id'] = $arr[1];
$db->query("INSERT INTO lc2admin.usa_testimonials_impressions
(
site_code
,client_id
,ts
) VALUES (
'usbfs'
,'".$db->clean($_SESSION['client_id'])."'
,NOW()
)");
}
if(empty($_SESSION['client_id'])) {
header("Location: /");
exit(0);
}
$coach_res = $db->get_results("SELECT bpc.first,o.coaching_coach,o.research_coach
FROM lc2synment_lc.orders o
LEFT JOIN lc2synment_lc.bp_coaches bpc ON bpc.id=o.businessplan_coach
WHERE o.id='".$db->clean($_SESSION['order_id'])."'");
$coach = 'your coach';
if(!empty($coach_res)) {
if(!empty($coach_res[0]->first)) {
$coach = $coach_res[0]->first;
} elseif(!empty($coach_res[0]->coaching_coach)) {
$coach = ucwords($coach_res[0]->coaching_coach);
} elseif(!empty($coach_res[0]->research_coach)) {
$coach = ucwords($coach_res[0]->research_coach);
}
}
require_once('_header.php');
?>
<script type="text/javascript">
function update_feedback_star(stars) {
stars = stars*1;
$('#stars_input').val(stars);
$('.stars').find('img').attr('src','/images/empty_star_icon.png');
if(stars>=1) {
$('#star_container_1').find('img').attr('src','/images/gold_star_icon.png');
}
if(stars>=2) {
$('#star_container_2').find('img').attr('src','/images/gold_star_icon.png');
}
if(stars>=3) {
$('#star_container_3').find('img').attr('src','/images/gold_star_icon.png');
}
if(stars>=4) {
$('#star_container_4').find('img').attr('src','/images/gold_star_icon.png');
}
if(stars>=5) {
$('#star_container_5').find('img').attr('src','/images/gold_star_icon.png');
}
}
function toggle_testimonial_terms() {
$('#testimonial_terms').toggle();
}
function submit_testimonial_step_one(frm) {
var errors = '';
if($('#stars_input').val()=='0') {
errors += (errors=='') ? '' : "\n";
errors += 'Please click on a star to rate the site.';
}
if(errors!='') {
alert(errors);
} else {
var str = 'action=step_one';
$(frm).find('input,select,textarea').each(function() {
str += '&' + encodeURIComponent(this.name) + '=' + encodeURIComponent($(this).val());
});
$('#actual_feedback_form').html('<center><img src="/images/loading_icon.gif" /><br />Saving</center>');
$.ajax({
cache: false,
type: "POST",
url: "/member/ajax/submit_testimonial_step_one_new.php",
data: str,
success: function(result) {
$('#actual_feedback_form').html(result);
}
});
}
}
</script>
<style>
.stars {
display:inline-block;
}
.stars img {
width:50px;
cursor:pointer;
}
</style>
<div class="content white stacked">
<div class="text-column" style="width:100%;">
<center id="actual_feedback_form">
<?php //check if they already submitted a review
$res = $db->get_results("SELECT gift_card_id,ts FROM lc2admin.usa_testimonials
WHERE site_code='usbfs'
AND client_id='".$db->clean($_SESSION['client_id'])."'");
if(!empty($res)) {
?>
<p>You already submitted a review on <?= date('M d, Y',strtotime($res[0]->ts));?></p>
<?php if(!empty($res[0]->gift_card_id)) {
$res2 = $db->get_results("SELECT gift_code FROM amazon_incentives.gift_cards WHERE id='".$db->clean($res[0]->gift_card_id)."'");
if(!empty($res2)) {
$gift_code = $res2[0]->gift_code;
?>
<div>You Amazon gift card code is: <?= $gift_code;?></div>
<div><a href="https://www.amazon.com/gc/redeem" target="_blank"><u><i>Click to Redeem the Gift Card</i></u></a></div>
<?php }
}
} else { ?>
<h1>Your Insights Matter!</h1>
<form method="post" action="#" onsubmit="submit_testimonial_step_one(this); return false;">
<input type="hidden" name="action" value="survey_step_1" />
<p>How would you <strong>rate your experience</strong> thus far with <?= $coach;?>?</p>
<div>
<input type="hidden" name="stars" id="stars_input" value="0" />
<div id="star_container_1" class="stars" onclick="update_feedback_star('1'); return false;">
<img src="/images/empty_star_icon.png" />
</div>
<div id="star_container_2" class="stars" onclick="update_feedback_star('2'); return false;">
<img src="/images/empty_star_icon.png" />
</div>
<div id="star_container_3" class="stars" onclick="update_feedback_star('3'); return false;">
<img src="/images/empty_star_icon.png" />
</div>
<div id="star_container_4" class="stars" onclick="update_feedback_star('4'); return false;">
<img src="/images/empty_star_icon.png" />
</div>
<div id="star_container_5" class="stars" onclick="update_feedback_star('5'); return false;">
<img src="/images/empty_star_icon.png" />
</div>
</div>
<p>Please explain your rating.</p>
<div><textarea name="how_can_we_improve" style="width:410px;height:100px;max-width:90%;"></textarea></div>
<div><input type="submit" name="submit" value="SUBMIT" /></div>
<div>
<center><i style="font-size:10px;">By submitting this form, I agree to the <a href="#terms" onclick="toggle_testimonial_terms(); return false;" style="font-size:10px;color:blue;">terms</a> of this form.</i></center>
<div id="testimonial_terms" style="display:none;"><i>By submitting this form, you agree to give USBusinessFundingSolutions.com authorization to use your feedback and review for marketing purposes.</i></div>
</div>
</form>
<?php } ?>
</center>
</div>
</div>
<?php require_once('_footer.php'); ?>