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

$IDProduct = $_POST['IDProduct'];
$productid = $_POST['productid'];
$zc = $_POST['zc'];
$dl = $_POST['dl'];
$ProductName = $_POST['ProductName'];
$wjmm = $_POST['wjmm'];
$sjb =  $_POST['sjb'];
$jrsc = $_POST['jrsc'];
$jg = $_POST['jg'];
$ckxq = $_POST['ckxq'];
$AutoDo = $_POST['AutoDo'];
$ProductIntro = $_POST['ProductIntro'];
$rmb = $_POST['rmb'];
$yuan = $_POST['yuan'];
$sjtime = $_POST['sjtime'];
$zz = $_POST['zz'];
$OldIDProduct = $_POST['OldIDProduct'];

$sl= $_POST['sl'];
$cpjs= $_POST['cpjs'];
$cply= $_POST['cply'];
$dqwz= $_POST['dqwz'];
$syindex= $_POST['syindex'];
$gl= $_POST['gl'];
$logout= $_POST['logout'];
$welcome= $_POST['welcome'];


$soshuo= $_POST['soshuo'];
$cpsoshuo= $_POST['cpsoshuo'];
$wzsoshuo= $_POST['wzsoshuo'];
$tjwt= $_POST['tjwt'];
$wtlx= $_POST['wtlx'];
$cp= $_POST['cp'];
$jf= $_POST['jf'];
$cg= $_POST['cg'];
$sb= $_POST['sb'];
$dg= $_POST['dg'];
$lxr= $_POST['lxr'];
$dzyj= $_POST['dzyj'];
$lybt= $_POST['lybt'];
$lylr= $_POST['lylr'];
$yzm= $_POST['yzm'];

$wtlb= $_POST['wtlb'];
$gong= $_POST['gong'];
$gong1= $_POST['gong1'];
$gong2= $_POST['gong2'];
$gong3= $_POST['gong3'];


$oprice= $_POST['oprice'];
$nprice= $_POST['nprice'];
$lb= $_POST['lb'];
$ljgm= $_POST['ljgm'];
$cz= $_POST['cz'];


$zhjy= $_POST['zhjy'];
$mmcw= $_POST['mmcw'];
$srkz= $_POST['srkz'];
$ybzy= $_POST['ybzy'];
$yhbz= $_POST['yhbz'];
$qhmm= $_POST['qhmm'];
$more= $_POST['more'];
$fh= $_POST['fh'];
$wdl= $_POST['wdl'];
$ydl= $_POST['ydl'];
$yhm= $_POST['yhm'];

$mm= $_POST['mm'];
$sj= $_POST['sj'];
$lxrz= $_POST['lxrz'];
$gsmz= $_POST['gsmz'];
$qrmm= $_POST['qrmm'];
$lxry= $_POST['lxry'];
$gsmy= $_POST['gsmy'];
$gj= $_POST['gj'];
$sf= $_POST['sf'];
$cs= $_POST['cs'];
$yzmzq= $_POST['yzmzq'];
$yzmcw= $_POST['yzmcw'];

$txdzz= $_POST['txdzz'];
$txdzy= $_POST['txdzy'];
$yb= $_POST['yb'];
$czh= $_POST['czh'];
$email= $_POST['email'];

if($product_new_name)
{
	foreach($product_new_name as $key => $info)
	{
		$new_info = trim($info);
		if($new_info != null)
		{
			$new_arr[$new_info] = iconv("GBK", "UTF-8", trim($product_new_info[$key]));
		}
	}
}

$product_info = addslashes(json_encode($new_arr));


?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />

<!--[if IE 6]>
<script type="text/javascript" src="../static/h-ui.admin/js/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>增加产品类别</title>
<LINK href="../share/style.css" rel="stylesheet">
<script src="../share/global.js"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 资讯管理 <span class="c-gray en">&gt;</span> 修改结果 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>

<? include "../share/top.php"?>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
  <tr>
    <td><? include "news_nav.inc.php"?></td>
  </tr>
  <tr>
    <td height="3" bgcolor="#555555"></td>
  </tr>
  <tr>
    <td height="300" valign="top" align="center">
	<?php
	
	


 

	if($OldIDProduct>=1) $sql = "update ch_lang set ";


	else
	
	

	$sql = "insert into ch_lang set ";

        $sql .= "zc='$zc',dl='$dl',productid='$productid',wjmm='$wjmm',";
	$sql .= "ProductName='$ProductName',sjb='$sjb',jrsc='$jrsc',jg='$jg',ckxq='$ckxq',";
	$sql .= "rmb='$rmb',ProductIntro='$ProductIntro',yuan='$yuan',AutoDo='$AutoDo', ";
	$sql .= "sjtime='$sjtime',zz='$zz',sl='$sl',cpjs='$cpjs',cply='$cply',dqwz='$dqwz',syindex='$syindex', ";
$sql .= "soshuo='$soshuo',cpsoshuo='$cpsoshuo',wzsoshuo='$wzsoshuo',tjwt='$tjwt',wtlx='$wtlx',lxr='$lxr',dzyj='$dzyj',";
$sql .= "lybt='$lybt',lylr='$lylr',yzm='$yzm',wtlb='$wtlb', cg='$cg',sb='$sb',cp='$cp',dg='$dg',jf='$jf',gong='$gong',gong1='$gong1',gong2='$gong2',gong3='$gong3',oprice='$oprice',yzmcw='$yzmcw',yzmzq='$yzmzq',gl='$gl',logout='$logout',welcome='$welcome',";
$sql .= "nprice='$nprice',lb='$lb',ljgm='$ljgm',cz='$cz', more='$more',fh='$fh',wdl='$wdl',ydl='$ydl',yhm='$yhm',";	
$sql .= "mm='$mm',sj='$sj',qrmm='$qrmm',lxrz='$lxrz', lxry='$lxry',gsmz='$gsmz',gsmy='$gsmy',gj='$gj',sf='$sf',";
	$sql .= "cs='$cs',txdzz='$txdzz',txdzy='$txdzy',yb='$yb',czh='$czh',email='$email',zhjy='$zhjy',mmcw='$mmcw',srkz='$srkz',ybzy='$ybzy',qhmm='$qhmm',yhbz='$yhbz'";



if($OldIDProduct>=1) $sql .= "  where IDProduct='$OldIDProduct'";
	$DB->query($sql);
	//删除序列缓存文件,以便前台访问时重新设置序列缓存文件
	$sfile = "../../serialize/products.cache";
	@unlink($sfile);
	echo "<br><br><br>产品 $ProductName 保存成功";
	echo "<br><br><br>您必须 <a href='../settings/cache.php?action=clear&actionname=清空缓存'>[清空网站缓存]</a>才能令您刚作的修改生效,请点击这里<a href='../settings/cache.php?action=clear&actionname=清空缓存'>[清空网站缓存]</a>";
	echo "<br><br><br><a href='pro_class.php'>[返回列表]</a>";
	?>
    </td>
  </tr>
</table>
<? 
$DB->close();
include "../share/bottom.php"?>
</body>
</html>
