include ("../include/show_page_title.php");
include ("../include/before.php");
include ("../include/classes/cfaq.php");
include ("../include/form_utils.php");
//member information
$auth->member_id = $_SESSION['ss_member_id'];
$auth->member_type = $_SESSION['ss_member_type'];
$member_id = $auth->member_id;
//end
//error managemet
switch($_SESSION['err_id'])
{
case 1:
$err_msg = "You must enter a valid email address";
break;
}
$_SESSION['err_id']='';
//prepopulating the form
if ($_SESSION['is_post_back']==1)
{
$username = loadAndClearSavedField("username", "contactForm");
$contact_name = loadAndClearSavedField("contact_name", "contactForm");
//$email = loadAndClearSavedField("email", "contactForm");
$title = loadAndClearSavedField("title", "contactForm");
$body = loadAndClearSavedField("body", "contactForm");
$_SESSION['is_post_back']='';
}
elseif ($member_id!='')//user is logged in
{
$query = "SELECT * FROM members WHERE id = ".$member_id;
$rs = $conn->query($query);
$row = $conn->fetch_array($rs);
$username = $row['username'];
$contact_name = $row['first_name'].' '.$row['last_name'];
$email = $row['email'];
}
$faq=new CFaq("faq",$conn);
show_page_title("Contact");
?>
Please read our FAQ before you use our contact form. |
$faq->display_questions()?> |