<?php
define('IN_SYS',TRUE);
header("Content-Type: text/html;charset=utf-8");
require '../../config.php';
require '../../setup.php';
require '../../lib/system_SqlIn.php';

	if(instr($ReturnUrl,'/')==0){
		OutErrorBack("请不要尝试非网页正常提交形式提交数据!");
	}
	$f_Name = addslashes($_POST["f_Name"]);
	$f_MobTel = addslashes($_POST["f_MobTel"]);
	//$f_Mail = addslashes($_POST["f_Mail"]);
	$f_Content = addslashes($_POST["f_Content"]);
	$f_Reply = "0";
	$addDate = now();
	$reTime = now();
	$okReply = 0;
	$okDisplay = 0;
	$go = $_GET['go'];
	if(addslashes($_POST["f_Name"])=="")
	{
		OutErrorBack("留言人不能为空!");
	}	
	if($f_MobTel =="")
	{
		OutErrorBack("联系电话不能为空!");
	}
	if($f_Content =="")
	{
		OutErrorBack("留言内容(建站需求)不能为空!");
	}

	$conn = new dbo();
	$sql = "INSERT INTO ".DB_TablePre."feedback (f_Name,f_MobTel,f_Content,f_Reply,addDate,reTime,okReply,okDisplay) VALUES ('$f_Name','$f_MobTel','$f_Content','$f_Reply','$addDate','$reTime','$okReply','$okDisplay')";
	$conn->query($sql);
	if($go=='wap'){
		OutErrorGo("提交留言成功！","/wap/feedback.php");
	}else{
		OutErrorGo("提交留言成功！","/");
	}