| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <?php
- include mymps_tpl('inc_header');
- echo '<link rel="Stylesheet" type="text/css" href="template/css/new.dialog.css" />
- <link rel="stylesheet" type="text/css" href="template/css/new.my.css" />
- <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="';
- echo $mymps_global['cfg_tpl_dir'];
- echo '">
- <div class="container">
- ';
- include mymps_tpl('inc_head');
- echo '<div id="main" class="main section-setting">
- <div class="clearfix main-inner">
- <div class="content">
- <div class="clearfix content-inner">
- <div class="content-main">
- <div class="content-main-inner">
- <div class="pwrap setting-userinfo">
- <div class="phead"><div class="phead-inner"><div class="phead-inner">
- <h3 class="ptitle"><span>';
- echo $id ? '修改' : '发布';
- echo '商品</span></h3>
- <p class="pextra"><a href="?m=goods&type=corp"><span>« 返回我发布的商品</span></a></p>
- </div></div></div>
- <div class="pbody">
-
- <div id="msg_success"></div>
- <div id="msg_error"></div>
- <div id="msg_alert"></div>
-
- <form action="?m=goods&ac=detail" enctype="multipart/form-data" method="post" name="form1" onSubmit="return check_sub();">
- ';
- if (!empty($id)) {
- echo ' <input name="id" value="';
- echo $id;
- echo '" type="hidden">
- <input name="picture_old" value="';
- echo $edit['picture'];
- echo '" type="hidden">
- <input name="pre_picture_old" value="';
- echo $edit['pre_picture'];
- echo '" type="hidden">
- ';
- }
- echo ' <div class="formgoods">
- <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="';
- echo $edit['goodsname'];
- echo '" style="width:300px">
- </div>
- </div>
-
- <div class="formrow">
- <h3 class="label">商品分类<font color="red">*</font></h3>
- <div class="form-enter">
- <select name="catid" class="input">
- <option value="">==选择商品所属的分类==</option>
- ';
- echo goods_cat_list(0, $edit[catid]);
- echo ' </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" value="';
- echo $edit['oldprice'];
- echo '" style="width:70px">
- ';
- echo $moneytype;
- echo ' </div>
- </div>
-
- <div class="formrow">
- <h3 class="label"><label>优惠价格<font color="red">*</font></label></h3>
- <div class="form-enter">
- <input name="nowprice" type="text" class="text" value="';
- echo $edit['nowprice'];
- echo '" style="width:70px">
- ';
- echo $moneytype;
- echo ' </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" ';
- if ($edit['huoyuan'] != 1) {
- echo 'checked';
- }
- echo '>缺货
- <input name="huoyuan" type="radio" class="radio" value="1" ';
- if ($edit['huoyuan'] == 1 || empty($edit)) {
- echo 'checked';
- }
- echo '>有货
-
- </div>
- </div>
-
- <div class="formrow">
- <h3 class="label"><label>商品属性</label></h3>
- <div class="form-enter">
- <input name="tuihuan" type="checkbox" class="radio" value="1" ';
- if ($edit['tuihuan'] == 1 || !$id) {
- echo 'checked';
- }
- echo '>七天退换
- <input name="jiayi" type="checkbox" class="radio" value="1" ';
- if ($edit['jiayi'] == 1 || !$id) {
- echo 'checked';
- }
- echo '>假一赔三
- <input name="weixiu" type="checkbox" class="radio" value="1" ';
- if ($edit['weixiu'] == 1) {
- echo 'checked';
- }
- echo '>30天维修
- <input name="fahuo" type="checkbox" class="radio" value="1" ';
- if ($edit['fahuo'] == 1 || !$id) {
- echo 'checked';
- }
- echo '>闪电发货
- </div>
- </div>
-
- <div class="formrow">
- <h3 class="label"><label>商品状态</label></h3>
- <div class="form-enter">
- <input name="cuxiao" type="checkbox" class="radio" value="1" ';
- if ($edit['cuxiao'] == 1) {
- echo 'checked';
- }
- echo '>促销
- <input name="baozhang" type="checkbox" class="radio" value="1" ';
- if ($edit['baozhang'] == 1 || !$id) {
- echo 'checked';
- }
- echo '>加入消费者保障计划
- </div>
- </div>
-
- <div class="formrow">
- <h3 class="label"><label>赠送礼品<font color="red">*</font></label></h3>
- <div class="form-enter">
- <input name="gift" type="text" class="text" value="';
- echo $edit['gift'] ? $edit['gift'] : '本商品无赠送礼品';
- echo '" style="width:300px">
- </div>
- </div>
-
- <div class="formrow">
- <h3 class="label"><label>客服QQ</label></h3>
- <div class="form-enter">
- <input name="oicq" type="text" class="text" value="';
- echo $edit['oicq'] ? $edit['oicq'] : $row[qq];
- echo '" style="width:100px">
- </div>
- </div>
-
- <div class="formrow">
- <h3 class="label">详细说明<font color="red">*</font></h3>
- ';
- echo $acontent;
- echo ' </div>
-
- ';
- if ($edit[pre_picture]) {
- echo ' <div class="formrow">
- <h3 class="label">原来图片</h3>
- <div class="form-enter">
- ';
- echo '<img src=' . $mymps_global[SiteUrl] . '' . $edit[pre_picture] . ' style=\'_margin-top:expression(( 180 - this.height ) / 2);\' />
- ';
- echo ' </div>
- </div>
- ';
- }
- echo '
- <div class="formrow">
- <h3 class="label">';
- echo $id ? '更新' : '上传';
- echo '主图</h3>
- <div class="form-enter">
- <input type="file" name="goods_image" size="30" id="litpic"> 为了前台显示美观,建议采用高宽为1.2:1的图片
- </div>
- </div>
-
- <div class="formrow formrow-action">
- <span class="minbtn-wrap"><span class="btn"><input type="submit" value="提交';
- echo empty($id) ? '发布' : '保存';
- echo '" class="button" name="goods_submit" /></span></span>
- </div>
-
- </div>
- </form>
-
- </div>
- <div class="pfoot"><p><b>-</b></p></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- ';
- include mymps_tpl('inc_sidebar');
- echo ' </div>
- </div>
- ';
- include mymps_tpl('inc_foot');
- echo '</div>
- </body>
- </html>';
- ?>
|