<!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>修改商品 {#$LA_poweredby#} -  Powered by GV32.COM</title>
<link rel="stylesheet" type="text/css" href="{#$base_weburl#}/templates/adminsys/css/list.css" />
<script language="javascript" src="{#$base_weburl#}/js/pinyin.js"></script>
<script language="javascript">
var webroot_url = '{#$base_weburl#}';
function submitFun()
{
		var idpro_name 			= document.getElementById('pro_name');
		var idprs_id 			= document.getElementById('prs_id');
		var idpro_sellprice 	= document.getElementById('pro_sellprice');
		
		var content				= CKEDITOR.instances.pro_content.getData()
		var idsuggestionInfo 	= document.getElementById('suggestionInfo');

		if(idpro_name.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：商品标题不能为空！请输入！';
			idpro_name.focus();
			return false;
		}else if(idprs_id.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：商品分类不能为空！请选择！';
			idprs_id.focus();
			return false;
		}else if(idpro_sellprice.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：商品销售价格不能为空请输入！';
			idpro_sellprice.focus();
			return false;
		}else if(content=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：商品内容不能为空请输入！';
			CKEDITOR.instances.pro_content.focus();
			return false;
		}

		document.formSub.action='{#$employee_weburl#}/index.php?load=product&act=editinfo';
		document.formSub.target="_self"
		document.formSub.submit();

}


	function upLoadFile( strkey )
	{
		if(strkey >0 ){
			document.formSub.target="hidden_frame["+strkey+"]"; //index.php?load=uploadfile&act=upload&upLoadName=upfile&getUrl=pro_img
			document.formSub.action='{#$employee_weburl#}/index.php?load=uploadfile&act=upload&upLoadName=upfile&getUrl=pro_img['+strkey+']&strkey='+strkey+'&lodingDiv=lodingdiv['+strkey+']';
			document.formSub.submit(); 
			document.getElementById("lodingdiv["+strkey+"]").style.display="";
			document.getElementById("lodingdiv["+strkey+"]").innerHTML="<img src=\"{#$base_weburl#}/uploads/sys/loading2.gif\" />文件正上传，请稍候...";
		}else{
			document.formSub.target="hidden_frame"
			document.formSub.action='{#$employee_weburl#}/index.php?load=uploadfile&act=upload&upLoadName=upfile&getUrl=pro_img';
			document.formSub.submit(); 
			document.getElementById("lodingdiv").style.display="";
			document.getElementById("lodingdiv").innerHTML="<img src=\"{#$base_weburl#}/uploads/sys/loading2.gif\" />文件正上传，请稍候...";
		}

	}
	
	
	function hiddenLoding(strkey)
	{
		if(strkey >0 ){
			document.getElementById("lodingdiv["+strkey+"]").style.display="none";
			document.getElementById("lodingdiv["+strkey+"]").innerHTML="";
			document.getElementById("pro_img["+strkey+"]").value="";
			document.getElementById("upfile["+strkey+"]").value="";
			alert(strkey);
		}else{
			document.getElementById("lodingdiv").style.display="none";
			document.getElementById("lodingdiv").innerHTML="";
			document.getElementById("pro_img").value="";
			document.getElementById("upfile").value="";
		}
	}

	
	function codechange()
	{
		if(document.getElementById("pro_pinyin").value=='')
		{
			getPinYinValue('pro_name','pro_pinyin');
		}
	}
</script>
</head>
<body>

<table  cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr><td><table cellpadding="0" cellspacing="0" border="0" style="width:100%; color:#000000; font-weight:normal; background-color:#3EC3EF;"  >
  <tr>
    <td>&nbsp;<a href="{#$employee_weburl#}/index.php?load=product&act=infolist" ><img src="{#$base_weburl#}/uploads/sys/h.gif"  width="15" border="0">商品列表</a> | 商品修改</td>
    <td>&nbsp;</td>
    <td align="right"><a href="http://help.gv32.com/type_product-edit.html" target="_blank" title="点击-在线帮助"><img src="{#$base_weburl#}/images/sys/adminhelp.png"  width="21" border="0" alt="点击-在线帮助"></a>&nbsp;&nbsp;</td>
  </tr>
</table>
</td></tr>

<tr><td>

<form action="{#$employee_weburl#}/index.php?load=product&act=editinfo" method="post"   enctype="multipart/form-data" name="formSub" id="formSub" >
<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
<tr>
<th colspan="2">修改商品</th>
</tr>
<input name="pro_id" id="pro_id" value="{#$info.pro_id#}" type="hidden"  >
<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td" align="right"><strong>商品标题：</strong></td>
<td class="tdd"><input name="pro_name" id="pro_name" value="{#$info.pro_name#}" type="text"  style="width:300px;" onblur="codechange()" ></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>拼音：</strong></td>
<td class="tdd"><input name="pro_pinyin" id="pro_pinyin" value="{#$info.pro_pinyin#}" type="text"  style="width:300px;" > <a href="#" onclick="getPinYinValue('pro_name','pro_pinyin')" >重置</a></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>商品分类：</strong></td>
<td class="tdd">
<select   name="prs_id" id="prs_id"  style="width:250px;" >
<option value="">请选择上级分类</option>
{#foreach key=key item=item from=$psInfo#}
<option value="{#$item.prs_id#}" {#if $item.prs_id eq $info.prs_id#} selected="selected" {#/if#}  >{#$item.prs_name#}</option>
	{#foreach item=spitem from=$item.array#}
	<option value="{#$spitem.prs_id#}"   {#if $spitem.prs_id eq $info.prs_id#} selected="selected" {#/if#}   >|__{#$spitem.prs_name#}</option>
	{#/foreach#}
{#/foreach#}
</select>
		</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>条码：</strong></td>
<td class="tdd"><input name="pro_barcode" id="pro_barcode" value="{#$info.pro_barcode#}" type="text"  style="width:300px;" ></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>规格：</strong></td>
<td class="tdd"><input name="pro_spec" id="pro_spec" value="{#$info.pro_spec#}" type="text" style="width:300px;"> </td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>数量：</strong></td>
<td class="tdd"><input name="pro_num" id="pro_num" value="{#$info.pro_num#}" type="text"  style="width:300px;" ></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>单位：</strong></td>
<td class="tdd"><input name="pro_unit" id="pro_unit" value="{#$info.pro_unit#}" type="text"  style="width:300px;" ></td>
</tr>





<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>上传主图：</strong></td>
<td class="tdd">      
<input type="file" id="upfile[1]" name="upfile[1]" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(1)">
<iframe name="hidden_frame[1]" id="hidden_frame[1]" style="border:none; background-color:#00CCCC;" scrolling="no"  width="0" height="0" ></iframe>
{#if $info.pro_imgval.1 eq ''#}
<div id="lodingdiv[1]" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/uploads/sys/loading2.gif" />文件正上传中，请稍候...</div>{#else#}<div id="lodingdiv[1]" style="width:380px;" >{#$info.pro_imgval.1#}<img src="{#$base_weburl#}/uploads/sys/cancel.png" width="16" onclick="hiddenLoding(1)"></div>{#/if#}
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>图片地址：</strong></td>
<td class="tdd"><input type="text"  name="pro_img[1]" id="pro_img[1]" value="{#$info.pro_imgval.1#}"  style="width:300px;"/></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>上传副图：</strong></td>
<td class="tdd">      
<input type="file" id="upfile[2]" name="upfile[2]" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(2)">
<iframe name='hidden_frame[2]' id="hidden_frame[2]" style="border:none; background-color:#00CCCC;" scrolling="no"  width="0" height="0" ></iframe>
{#if $info.pro_imgval.2 eq ''#}
<div id="lodingdiv[2]" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/uploads/sys/loading2.gif" />文件正上传中，请稍候...</div>{#else#}<div id="lodingdiv[2]" style="width:380px;" >{#$info.pro_imgval.2#}<img src="{#$base_weburl#}/uploads/sys/cancel.png" width="16" onclick="hiddenLoding(2)"></div>{#/if#}
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>图片地址：</strong></td>
<td class="tdd"><input type="text"  name="pro_img[2]" id="pro_img[2]" value="{#$info.pro_imgval.2#}"  style="width:300px;"/></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>上传副图：</strong></td>
<td class="tdd">      
<input type="file" id="upfile[3]" name="upfile[3]" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(3)">
<iframe name='hidden_frame[3]' id="hidden_frame[3]" style="border:none; background-color:#00CCCC;" scrolling="no"  width="0" height="0" ></iframe>
{#if $info.pro_imgval.3 eq ''#}
<div id="lodingdiv[3]" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/uploads/sys/loading2.gif" />文件正上传中，请稍候...</div>{#else#}<div id="lodingdiv[3]" style="width:380px;" >{#$info.pro_imgval.3#}<img src="{#$base_weburl#}/uploads/sys/cancel.png" width="16" onclick="hiddenLoding(3)"></div>{#/if#}
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>图片地址：</strong></td>
<td class="tdd"><input type="text"  name="pro_img[3]" id="pro_img[3]" value="{#$info.pro_imgval.3#}"  style="width:300px;"/></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>上传副图：</strong></td>
<td class="tdd">      
<input type="file" id="upfile[4]" name="upfile[4]" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(4)">
<iframe name='hidden_frame[4]' id="hidden_frame[4]" style="border:none; background-color:#00CCCC;" scrolling="no"  width="0" height="0" ></iframe>
{#if $info.pro_imgval.4 eq ''#}
<div id="lodingdiv[4]" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/uploads/sys/loading2.gif" />文件正上传中，请稍候...</div>{#else#}<div id="lodingdiv[4]" style="width:380px;" >{#$info.pro_imgval.4#}<img src="{#$base_weburl#}/uploads/sys/cancel.png" width="16" onclick="hiddenLoding(4)"></div>{#/if#}
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>图片地址：</strong></td>
<td class="tdd"><input type="text"  name="pro_img[4]" id="pro_img[4]" value="{#$info.pro_imgval.4#}"  style="width:300px;"/></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>上传副图：</strong></td>
<td class="tdd">      
<input type="file" id="upfile[5]" name="upfile[5]" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(5)">
<iframe name='hidden_frame[5]' id="hidden_frame[5]" style="border:none; background-color:#00CCCC;" scrolling="no"  width="0" height="0" ></iframe>
{#if $info.pro_imgval.5 eq ''#}
<div id="lodingdiv[5]" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/uploads/sys/loading2.gif" />文件正上传中，请稍候...</div>{#else#}<div id="lodingdiv[5]" style="width:380px;" >{#$info.pro_imgval.5#}<img src="{#$base_weburl#}/uploads/sys/cancel.png" width="16" onclick="hiddenLoding(5)"></div>{#/if#}
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>图片地址：</strong></td>
<td class="tdd"><input type="text"  name="pro_img[5]" id="pro_img[5]" value="{#$info.pro_imgval.5#}"  style="width:300px;"/></td>
</tr>







<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>产地：</strong></td>
<td class="tdd"><input name="pro_production" id="pro_production" value="{#$info.pro_production#}" type="text"  style="width:300px;" ></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>销售价：</strong></td>
<td class="tdd"><input name="pro_sellprice" id="pro_sellprice" value="{#$info.pro_sellprice#}" type="text"  style="width:300px;" ></td>
</tr>



<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>市场价：</strong></td>
<td class="tdd"><input name="pro_marketprice" id="pro_marketprice" value="{#$info.pro_marketprice#}" type="text"  style="width:300px;" ></td>
</tr>
<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>最低售价：</strong></td>
<td class="tdd"><input name="pro_lowestprice" id="pro_lowestprice" value="{#$info.pro_lowestprice#}" type="text"  style="width:300px;" ></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>进货价：</strong></td>
<td class="tdd"><input name="pro_buyprice" id="pro_buyprice" value="{#$info.pro_buyprice#}" type="text"  style="width:300px;" ></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>商品内容：</strong></td>
<td class="tdd">
{#$ckeditorLoad#}</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';">
<td class="td"><strong>显示：</strong></td>
<td class="tdd">{#foreach key=ek item=ei from=$_LANG.bd_enabledArray#}
{#$ei#}<input type="radio"   name="pro_enabled" id="pro_enabled[{#$ek#}]"  value="{#$ek#}" {#if $ek eq 1#} checked="checked" {#/if#}>
{#/foreach#}
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td colspan="2"  class="tdcenter"><div id="suggestionInfo">&nbsp;</div></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td colspan="2"  class="tdcenter"> <input name="buttsubmit" id="buttsubmit" type="button" value="修 改"  onclick="submitFun(this)"  ></td>
</tr>
</table>
</form>

</td></tr>
<tr><td></td></tr>
</table>


</body>
</html>