<?php include mayi_tpl('inc_header'); ?><link rel="Stylesheet" type="text/css" href="template/css/new.dialog.css" /><link rel="stylesheet" type="text/css" href="template/css/new.my.css" /><link href='../template/global/magic-check.css' rel='stylesheet' type='text/css'><script language="javascript" src="template/jquery.172.min.js"></script><script language="javascript" src="template/javascript.js"></script><script language="javascript">
function check_sub(){
	if (document.form1.goodsname.value=="") {
		alert('请填写商品名称');
		document.form1.goodsname.focus();
		return false;
	}
	if (document.form1.catid.value=="") {
		alert('请选择商品的所属类别');
		document.form1.catid.focus();
		return false;
	}
	return true;
}
</script></head><body class="blue"><div class="container"><div id="main" class="main section-setting"><div class="clearfix main-inner"><div class="content"><div class="clearfix content-inner"><div class='location'><?=$location?></div><div class="content-main"><div class="content-main-inner"><div class="pwrap setting-userinfo"><div class="pbody"><form action="?m=goods&ac=detail" enctype="multipart/form-data" method="post" name="form1" onSubmit="return check_sub();"><?php if(!empty($id)){?><input name="id" value="<?=$id?>" type="hidden"><input name="picture_old" value="<?=$edit['picture']?>" type="hidden"><input name="pre_picture_old" value="<?=$edit['pre_picture']?>" type="hidden"><?php }?>
<div class="cleafix pagetab-wrap"><ul class="pagetab">
<?php if(ifplugin('goods')){?><li><a href="javascript:;" onClick="window.location.href='?m=goods'"<?php if($m == 'goods'){?>class="current"<?php }?>><span>店铺商品</span></a></li><?php }?>
</ul></div>
<div class="cleafix pagetab-wrap smallnav"><ul class="pagetab"><li><a href="?m=goods&ac=list"><span>已发布商品</span></a></li><li><a href="?m=goods&ac=order"><span>订单管理</span></a></li><li><a class="current addnew" href="?m=goods&ac=detail"><span>发布商品</span></a></li></ul></div><div id="msg_success"></div><div id="msg_error"></div><div id="msg_alert"></div><div class="formgroup"><div class="formrow"><h3 class="label"><label>商品名称<font color="red">*</font></label></h3><div class="form-enter"><input name="goodsname" type="text" class="text" value="<?=$edit['goodsname']?>" style="width:300px"></div></div><input name="cityid" type="hidden" value="1"><div class="formrow"><h3 class="label">商品分类<font color="red">*</font></h3><div class="form-enter"><select name="catid" class="input"><option value="">==选择商品所属的分类==</option><?=goods_cat_list(0,$edit[catid])?></select></div></div><div class="formrow"><h3 class="label"><label>市场价格<font color="red">*</font></label></h3><div class="form-enter"><input name="oldprice" type="text" class="text" placeholder="0表示面议" value="<?=$edit['oldprice']?>" style="width:70px"><?php echo $moneytype; ?></div></div><div class="formrow"><h3 class="label"><label>优惠价格<font color="red">*</font></label></h3><div class="form-enter"><input name="nowprice" placeholder="0表示面议" type="text" class="text" value="<?=$edit['nowprice']?>" style="width:70px"><?php echo $moneytype; ?></div></div><div class="formrow"><h3 class="label"><label>货源情况<font color="red">*</font></label></h3><div class="form-enter"><input name="huoyuan" type="radio" class="radio" value="2" <?php if($edit['huoyuan'] != 1) echo 'checked';?>>缺货
                                            <input name="huoyuan" type="radio" class="radio" value="1" <?php if($edit['huoyuan'] == 1 || empty($edit)) echo 'checked';?>>有货
												
                                            </div></div><div class="formrow"><h3 class="label"><label>商品属性</label></h3><div class="form-enter">
												<input name="jiayi" type="checkbox" class="radio" value="1" <?php if($edit['jiayi'] == 1 || !$id) echo 'checked';?>>假一赔三
												<input name="weixiu" type="checkbox" class="radio" value="1" <?php if($edit['weixiu'] == 1) echo 'checked';?>>30天维修
												<input name="fahuo" type="checkbox" class="radio" value="1" <?php if($edit['fahuo'] == 1 || !$id) echo 'checked';?>>闪电发货
                                            </div></div><div class="formrow"><h3 class="label"><label>商品状态</label></h3><div class="form-enter"><input name="cuxiao" type="checkbox" class="radio" value="1" <?php if($edit['cuxiao'] == 1) echo 'checked';?>>促销
												
                                            </div></div><div class="formrow"><h3 class="label"><label>客服QQ</label></h3><div class="form-enter"><input name="oicq" type="text" class="text" value="<?php echo $edit['oicq'] ? $edit['oicq'] : $row[qq]?>" style="width:100px"></div></div><div class="formrow"><h3 class="label">详细说明<font color="red">*</font></h3><?php echo $acontent; ?></div><?php if($edit[pre_picture]){?><div class="formrow"><h3 class="label">原来图片</h3><div class="form-enter"><?php
                                                echo "<img src=".$mymps_global[SiteUrl]."".$edit[pre_picture]." style='_margin-top:expression(( 180 - this.height ) / 2);' />\r\n";
                                                ?></div></div><?php }?><div class="formrow"><h3 class="label">&nbsp;</h3><div class="form-enter"><script type="text/javascript">var MagicUploadName = 'goods_image';</script><div id="ShowMagicUpload"></div><div class="clear10"></div><div class="magic-notice">
                                        为了前台显示美观，建议采用高宽为1.2：1的图片
                                        </div><script type="text/javascript" src="../template/global/magic-upload.js"></script></div></div><div class="formrow formrow-action"><h3 class="label">&nbsp;</h3><span class="minbtn-wrap"><span class="btn"><input type="submit" value="提交<?php echo empty($id) ? '发布' : '保存'; ?>" class="button" name="goods_submit" /></span></span></div></div></form></div><div class="pfoot"><p><b>-</b></p></div></div></div></div></div></div></div></div><?php include mayi_tpl('inc_foot'); ?></div></body></html>