<?php 
	session_start(); 

	require_once('inc/conn.php');
	require_once('inc/constant.php');
	require_once('inc/admin.class.php');
	require_once('inc/ls_syscode.php');
	require_once('inc/check.php');
	$opendb=new mydb();
	require_once('inc/char_set.php');
	$id=$_GET['id'];
 	$lang =$_GET['lang'];
	if($id==0){$id=1;$lang="fr";}
	$ls_msg="修改产品，ID:".$id."，语言:".$lang;
	$changetable="ls_products";
 
	//评论 
	
	$products_sql="select * from ls_transchange where TIFd='".$changetable.$id."' and enTag='productName' ";
	$products_query=$opendb->query($products_sql);
	$products_rows=mysql_fetch_assoc($products_query);
	$productName=$products_rows[$lang];
	
	$products_sql="select * from ls_transchange where TIFd='".$changetable.$id."' and enTag='productTitle' ";
	$products_query=$opendb->query($products_sql);
	$products_rows=mysql_fetch_assoc($products_query);
	$productTitle=$products_rows[$lang];    
	
	$products_sql="select * from ls_transchange where TIFd='".$changetable.$id."' and enTag='productKeywords' ";
	$products_query=$opendb->query($products_sql);
	$products_rows=mysql_fetch_assoc($products_query);
	$productKeywords=$products_rows[$lang];
	
	$products_sql="select * from ls_transchange where TIFd='".$changetable.$id."' and enTag='productDescription' ";
	$products_query=$opendb->query($products_sql);
	$products_rows=mysql_fetch_assoc($products_query);
	$productDescription=$products_rows[$lang];
	
	$products_sql="select * from ls_transchange where TIFd='".$changetable.$id."' and enTag='productSpecification' ";
	$products_query=$opendb->query($products_sql);
	$products_rows=mysql_fetch_assoc($products_query);
	$productSpecification=$products_rows[$lang];
	

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Modify Products</title>
<link href="css/admin.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/style2.css" />

<script language="JavaScript" src="js/jquery.js"></script>
<script language="JavaScript" src="js/ls.js"></script>
<link href="ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<table width="96%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6396d6">
	<tr>
		<td height="18" background="images/admin_bg.gif"><div align="center"><font color="#ffffff"><strong>修改
		  <?=$productName?>产品
      <?=$lang?>语信息</strong></font></div></td>
	</tr>
	<tr>
		<td height="213" valign="top" bgcolor="#dee7ff"><br>
			<form name="myform" enctype="multipart/form-data" method="post" action="saveproducts_ml.php?id=<?=$id?>&lang=<?=$lang?>" onSubmit="return Checkaddproducts()">
				<input type="hidden" value="update" name="ls">
				<input type="hidden" value="<?php echo $id;?>" name="id">
			  <table border="0" width="94%" align="center">
					<tr>
						<td>提示：<font color="#FF0000"><?php echo $ls_msg; ?></font></td>
						<td align="right">&nbsp;</td>
					</tr>
				</table>
				<table width="94%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
				  <tr bgcolor="#B9DAFF">
						<td height="28" colspan="3"></td>
					</tr>
					<tr bgcolor="#f4f4f4">
						<td style="padding-left:15px;" width="8%">&nbsp;</td>
						<td width="62%" style="padding-left:3em;" ><span style="padding-left:15px;">名称： &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>						  <input name="productName" type="text" value="<?=$productName?>" size="70"></td>
						<td width="30%" style="padding-left:3em;">&nbsp;</td>
					</tr>
                    
					<tr bgcolor="#f4f4f4">
						<td rowspan="2" style="padding-left:12px;" >&nbsp;</td>
						<td colspan="2" style="padding-left:3em;" >
						<fieldset class="infofield" onMouseOver="ibov(this);" onMouseOut="ibou(this);" style="padding-left:1em; width:550px;">
						<legend>SEO参数</legend>
						<table width="531" border="0">
						  <tr>
						    <td width="131" bgcolor="#f4f4f4" >本页标题 Title</td> 
						    <td width="383"><input name="productTitle" id="productTitle" type="text" value="<?=$productTitle?>" size="70" /></td>
					      </tr>
						  <tr>
						    <td bgcolor="#f4f4f4" >本页关键字 Keywords</td>
						    <td><input name="productKeywords" id="productKeywords" type="text" value="<?=$productKeywords?>" size="70" /></td>
					      </tr>
						  <tr>
						    <td bgcolor="#f4f4f4"  >本页描述 Description</td>
						    <td><textarea name="productDescription" cols="72" rows="3" id="productDescription"  style="padding-left:10px;"><?=$productDescription?></textarea></td>
                                                
					      </tr>
					    </table>
						</fieldset>
						</td>
					</tr>
					<tr bgcolor="#f4f4f4">
					  <td colspan="2" style="padding-left:3em;" >&nbsp;</td>
				  </tr>
					<tr bgcolor="#f4f4f4">
					  <td colspan="3" style="padding-left:12px;"><div align="right">
					    <input name="submit2" type="submit" value="保存" />
				      </div></td>
				  </tr>
			      <tr bgcolor="#f4f4f4">
				      <td style="padding-left:15px;">&nbsp;</td>
				      <td colspan="2" style="padding-left:3em;padding-right:3em;"><span style="padding-left:15px;">说明</span></td>
			      </tr>
			      <tr bgcolor="#f4f4f4">
						<td style="padding-left:15px;" width="8%">&nbsp;</td>
						<td colspan="2" style="padding-left:3em;padding-right:3em;">
                        <script type="text/plain" id="myEditor" name="productSpecification"><?=$productSpecification?></script>
						<script type="text/javascript">
							//实例化编辑器
							var ue = UE.getEditor('myEditor');
							 ue.setWidth("96%");
							 ue.setHeigth("400px");
						</script></td>
					</tr>
					
					<tr bgcolor="#f4f4f4">
					  <td style="padding-left:15px;">&nbsp;</td>
					  <td colspan="2" align="center" ><div align="middle">
					    <input name="submit" type="submit" value="保存" />
				        <label>
				          <input type="reset" name="button2" id="button2" value="重置" />
			            </label>
					  </div></td>
				  </tr>
					<tr bgcolor="#B9DAFF">
						<td height="25" colspan="3" align="center">&nbsp;</td>
					</tr>
				</table>
			</form></td>
	</tr>
</table>
<?  if($_SESSION["refreshModi"]){?>
<script> document.execCommand('Refresh') ;</script>
<? 
$_SESSION["refreshModi"]=false;
}?>
</body>
</html>