<?
session_start();
require_once("../common/init.php");
require_once("security.inc.php");

$Company_GB = $_POST['Company_GB'];
$Company_EN = $_POST['Company_EN'];
$Contact_GB = $_POST['Contact_GB'];
$Contact_EN = $_POST['Contact_EN'];
$Country = $_POST['Country'];
$Province_GB = $_POST['Province_GB'];
$City_GB = $_POST['City_GB'];
$Addr_GB = $_POST['Addr_GB'];
$Addr_EN = $_POST['Addr_EN'];
$PostCode = $_POST['PostCode'];
$Email = $_POST['Email'];
$Tel = $_POST['Tel'];
$Fax = $_POST['Fax'];

$register_globals = @ini_get('register_globals');
$magic_quotes_gpc = @get_magic_quotes_gpc();
if(!$magic_quotes_gpc){
    foreach($_POST as $key => $val){
	    ${$key} = addslashes($val);
	}
}
//更新用户资料
$sql="update users set Company_GB='$Company_GB',Company_EN='$Company_EN',Contact_GB='$Contact_GB',Contact_EN='$Contact_EN',".
     "Country='$Country',Province_GB='$Province_GB',City_GB='$City_GB',Addr_GB='$Addr_GB',Addr_EN='$Addr_EN',".
	 "PostCode='$PostCode',Email='$Email',Tel='$Tel',Fax='$Fax' where UserName='".$_SESSION['User_S']."'";
$db->query($sql);
$message = "更新用户资料成功";
//end of 更新用户资料


$smarty->assign("message",$message);
$smarty->display('user_modify_submit.html');
$db->close();
?>