| 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/usa_sites/usafundingapplications.ai/membersonly/ |
Upload File : |
<?php
require_once('includes/header.php');
?>
<?php
//die(phpinfo());
?>
<?php ob_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<title>USA Grant Applications.org - Site Survey</title>
<? include('header.php'); ?>
<? include('nav.php'); ?>
<?
if($_POST)
{
$_POST = sanitize($_POST); //clean input data
$required_fields = array('name'=>'Name',
'email'=>'Email Address',
'overall'=>'Rate: Overall Website',
'ease'=>'Rate: Ease of Use',
'content'=>'Rate: Content',
'layout'=>'Rate: Layout & Design'
);
$first = true;
foreach($required_fields as $field=>$name) {
if(!isset($_POST[$field]) || empty($_POST[$field]) || (!is_array($_POST) && $_POST[$field] == "")) { //check if they are blank
if(!isset($errors)) {
$errors = array();
$errors['required_fields'] = "The following fields are required: ";
}
$errors['required_fields'] .= ($first) ? $name : ", ".$name;
$first = false;
}
}
if(!validEmail($_POST['email'])) {
if(!isset($errors)) {
$errors = array();
}
$errors['invalid_email'] = "An invalid email was submitted: ";
$errors['invalid_email'] .= ($_POST['email'] == "") ? "BLANK" : $_POST['email'];
}
if(!isset($errors)) {
$attn = "Site Survey for: ".$_SERVER['SERVER_NAME']." ";
$subject = $attn.date('Y-m-d H:i:s');
$_POST['likes'] = htmlentities(stripcslashes($_POST['likes']));
$_POST['improvements'] = htmlentities(stripcslashes($_POST['improvements']));
$_POST['references'] = htmlentities(stripcslashes($_POST['references']));
$message = $_POST['name']." (".$_POST['email'].") has just submitted some feedback for ".$_SERVER['SERVER_NAME'].".
Name: ".$_POST['name']."
Email: ".$_POST['email']."
Overall Website: ".$_POST['overall'][0]."
Ease of Use: ".$_POST['ease'][0]."
Content: ".$_POST['content'][0]."
Layout & Design: ".$_POST['layout'][0]."
----------------------------------------
Likes:
".$_POST['likes']."
----------------------------------------
Suggestions for Improvement
".$_POST['improvements']."
----------------------------------------
Would recommend ".$_SERVER['SERVER_NAME']." to others:
".$_POST['references']."
-------- Additional Info: ----------
IP Address: ".$_SERVER['REMOTE_ADDR']."
Browser Info: ".$_SERVER['HTTP_USER_AGENT']."
Referer URL: ".$_SERVER['HTTP_REFERER'];
require_once('post_feedback.php');
header("Location: ./feedbacktest.php?success=true");
$success = true;
}
}
ob_end_flush();
?>
<p align="center" class="header">
Tell Us What You Think
</p>
<img src="/membersonly/images/TopDollar.png">
<?
if(isset($errors) && is_array($errors)) {
echo "<h4>We were unable to send your request do to the following errors: </h4>
<ul style='color:#B32317;'>";
foreach($errors as $error) {
echo "<li>".$error."</li>";
}
echo "</ul>";
}
else if(isset($_REQUEST['success']) && $_REQUEST['success'] == true) {
echo "<h4 style='color:#80AA70;'>Your request has been sent. Thank you.</h4>";
}
?>
<p>Give us your feedback and be automatically entered in for a chance to <strong>win $100</strong>. A winner will be selected each month.</p>
<form action="<?= $_SERVER['SCRIPT_NAME']; ?>" method="post" enctype="multipart/form-data" name="feedback">
<table width="100%" class="surveytable">
<tr>
<td width="50%">Name:
<input name="name" type="text" size="20" value="<?= ($_POST['name'] != '') ? $_POST['name'] : NULL; ?>"/></td>
<td>Email:
<input name="email" type="text" size="20" value="<?= ($_POST['email'] != '') ? $_POST['email'] : NULL; ?>"/></td>
</tr>
<tr>
<td colspan="2">Picture:
<input type="file" name="img" id="img">
<span style="font-size:10px"> (Less than 2MB please)</span></td>
</tr>
<tr>
<td colspan="2" align="center">
<table>
<tr>
<td colspan="2">How would you rate the following aspects of our site:</td>
</tr>
<tr>
<td>Overall Website?</td>
<td>(Low)
<?
$rates = range(1,5);
foreach($rates as $value) {
?><input type="radio" name="overall[]" value="<?=$value?>" <?= ($_POST['overall'][0] == $value) ? "checked" : null;?> /><?=$value?> <?
}
?>
(High)</td>
</tr>
<tr>
<td>Ease of Use?</td>
<td>(Low)
<?
foreach($rates as $value) {
?><input type="radio" name="ease[]" value="<?=$value?>" <?= ($_POST['ease'][0] == $value) ? "checked" : null;?> /><?=$value?> <?
}
?>
(High)</td>
</tr>
<tr>
<td>Content?</td>
<td>(Low)
<?
foreach($rates as $value) {
?><input type="radio" name="content[]" value="<?=$value?>" <?= ($_POST['content'][0] == $value) ? "checked" : null;?> /><?=$value?> <?
}
?>
(High)</td>
</tr>
<tr>
<td>Layout & Design?</td>
<td>(Low)
<?
foreach($rates as $value) {
?><input type="radio" name="layout[]" value="<?=$value?>" <?= ($_POST['layout'][0] == $value) ? "checked" : null;?> /><?=$value?> <?
}
?>
(High)</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">What specifically did you like about our services?<br />
<textarea name="likes" rows="3" cols="57"><?= ($_POST['likes'] != '') ? $_POST['likes'] : NULL; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2">How can we improve our services?<br />
<textarea name="improvements" rows="3" cols="57"><?= ($_POST['improvements'] != '') ? $_POST['improvements'] : NULL; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2">If you were to recommend our services, what would you say?<br />
<textarea name="references" rows="3" cols="57"><?= ($_POST['references'] != '') ? $_POST['references'] : NULL; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<p class="survey_terms">**You agree by submitting this form that we can use your feedback<br />to improve our site and for marketing purposes.</p>
<div style="margin:10px 0px;"><a href="javascript:void(1);" onClick="javascript:document.feedback.submit();"><img src="/membersonly/images/submit_yellow_1.png" alt="Submit" border="0" /></a></div>
</td>
</tr>
</table>
</form>
<? include("footer.php"); ?>
<?php
print_r($_POST);
?>