<?php
require_once '../../library/config.php';
require_once '../library/functions.php';
require_once '../library/logged.php';
require_once '../../library/validation.php';

if (isset($_POST['field'])){
	$field = txt_only($_POST['field']);
	$val = $_POST['val'];
	
	mysql_query("UPDATE `contact_setting` SET `$field` = '$val' WHERE `id` = 1", $connePaper);
	mysql_close($connePaper);
}
?>
<b style="color:red;" id="this_info">更新成功!!</b>
<script type="text/javascript">
	setTimeout(function(){$('#this_info').fadeOut(500)}, 2000);
</script>