<?=$header?>
<form action="<?=$form_url?>" method="post" enctype="multipart/form-data" class="form-horizontal" role="form">
<div class="hx-margin-q10 panel panel-default">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="active"><a href="#site-basic" data-toggle="tab">基本信息
</a></li>
<li><a href="#site-content" data-toggle="tab">详细内容
</a></li>
<li><a href="#site-sys" data-toggle="tab">其它
</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content hx-margin-t10">
<div class="tab-pane active" id="site-basic">
<div class="form-group">
<label class="control-label col-sm-2" for="inpupcategory_id">商品分类
</label>
<div class="col-sm-4">
<select name="info[category_id]" class="form-control">
<?php
foreach($category_list as $v){
if($v->id == $export->category_id )
{
echo '
<option selected="selected" value="',$v->id,'">|—',str_repeat('—',$v->lev),$v->catname,'
</option>';
}
else
{
echo '
<option value="',$v->id,'">|—',str_repeat('—',$v->lev),$v->catname,'
</option>';
}
}
?>
</select>
<?=form_error('info[category_id]')?>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="control-label col-sm-4" for="inpupbrand_id">品牌
</label>
<div class="col-sm-8">
<select name="info[brand_id]" class="form-control">
<option value="0" selected="selected">请选择...
</option>';
<?php
foreach($brand_list as $v)
{
if($export->brand_id == $v->id)
{
echo '
<option selected="selected" value="'.$v->id.'">'.$v->name.'
</option>';
}
else
{
echo '
<option value="'.$v->id.'">'.$v->name.'
</option>';
}
}
?>
</select>
<?=form_error('info[brand_id]')?>
</div>
</div>
</div>
<div class="col-sm-3"> <span class="help-block">*选择对应的商品分类进行发布
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupname">商品名称
</label>
<div class="col-sm-4">
<input name="info[name]" type="text" value="<?=set_value('info[name]',$export->name)?>" class="form-control" id="inpupname">
<?=form_error('info[name]')?>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="control-label col-sm-4" for="inpuplanguage">语言
</label>
<div class="col-sm-8">
<select name="info[language]" class="form-control">
<option value="chinese">中文
</option>
<option value="english">english
</option>
</select>
<?=form_error('info[language]')?>
</div>
</div>
</div>
<div class="col-sm-3"> <span class="help-block">*目前只支持中文
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupnumber">商品编号
</label>
<div class="col-sm-4">
<input name="info[number]" value="<?=$export->number?>" type="text" class="form-control" id="inpupnumber">
<?=form_error('info[number]')?>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="control-label col-sm-4" for="inpupreorder">排序
</label>
<div class="col-sm-8">
<input name="info[reorder]" value="<?=$export->reorder?>" type="text" class="form-control" id="inpupreorder">
<?=form_error('info[reorder]')?>
</div>
</div>
</div>
<div class="col-sm-3"> <span class="help-block">*排序只能输入数字
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupmktprice">市场价格
</label>
<div class="col-sm-2">
<div class="input-group">
<input name="info[mktprice]" value="<?=$export->mktprice?>" class="form-control" type="text" placeholder="000.000">
<div class="input-group-addon">元
</div>
<?=form_error('info[mktprice]')?>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="control-label col-sm-5" for="inpupprice">销售价格
</label>
<div class="col-sm-7">
<div class="input-group">
<input name="info[price]" value="<?=$export->price?>" class="form-control" type="text" placeholder="000.000">
<div class="input-group-addon">元
</div>
<?=form_error('info[price]')?>
</div>
</div>
</div>
</div>
<div class="col-sm-2">
<label class="radio-inline">
<input name="info[marketable]" type="radio" id="marketable1" value="0" <?= $export->marketable == 0 ? 'checked="checked"' : NULL ?> /> 上架
</label>
<label class="radio-inline">
<input type="radio" name="info[marketable]" id="marketable2" value="1" <?= $export->marketable == 1 ? 'checked="checked"' : NULL ?> > 下架
</label>
</div>
<div class="col-sm-3"> <span class="help-block">*下架商品不会被销售
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupKeywords">加入推荐
</label>
<div class="col-sm-2" style="padding-right:0px; margin-right:0px;">
<?php
//推荐
switch ($export->sell) {
case 7: //推荐,精品,热销
$sell_ked1 = 'checked="checked"';//推荐
$sell_ked2 = 'checked="checked"';//精品
$sell_ked4 = 'checked="checked"';//热销
break;
case 6: //精品,热销
$sell_ked1 = NULL;//推荐
$sell_ked2 = 'checked="checked"';//精品
$sell_ked4 = 'checked="checked"';//热销
break;
case 5: //推荐,热销
$sell_ked1 = 'checked="checked"';//推荐
$sell_ked2 = NULL;//精品
$sell_ked4 = 'checked="checked"';//热销
break;
case 4://热销
$sell_ked1 = NULL;//推荐
$sell_ked2 = NULL;//精品
$sell_ked4 = 'checked="checked"';//热销
break;
case 3: // 推荐,精品
$sell_ked1 = 'checked="checked"';//推荐
$sell_ked2 = 'checked="checked"';//精品
$sell_ked4 = NULL;//热销
break;
case 2: //精品
$sell_ked1 = NULL;//推荐
$sell_ked2 = 'checked="checked"';//精品
$sell_ked4 = NULL;//热销
break;
case 1: //推荐
$sell_ked1 = 'checked="checked"';//推荐
$sell_ked2 = NULL;//精品
$sell_ked4 = NULL;//热销
break;
default:
$sell_ked1 = NULL;//推荐
$sell_ked2 = NULL;//精品
$sell_ked4 = NULL;//热销
break;
}
//支付方式
switch ($export->payment) {
case 12: //到付(1),信用卡(2), 分期(4),白条(8)
$payment_ked1 = 'checked="checked"';//到付
$payment_ked2 = 'checked="checked"';//信用卡
$payment_ked4 = 'checked="checked"';//分期
$payment_ked8 = 'checked="checked"';//白条
break;
case 11: //到付,信用卡,白条
$payment_ked1 = 'checked="checked"';//到付1
$payment_ked2 = 'checked="checked"';//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = 'checked="checked"';//白条8
break;
case 10: //信用卡,白条
$payment_ked1 = NULL;//到付1
$payment_ked2 = 'checked="checked"';//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = 'checked="checked"';//白条8
break;
case 9://到付,白条
$payment_ked1 = 'checked="checked"';//到付1
$payment_ked2 = NULL;//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = 'checked="checked"';//白条8
break;
case 8: //白条
$payment_ked1 = NULL;//到付1
$payment_ked2 = NULL;//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = 'checked="checked"';//白条8
break;
case 7: //到付,信用卡,分期
$payment_ked1 = 'checked="checked"';//到付1
$payment_ked2 = 'checked="checked"';//信用卡2
$payment_ked4 = 'checked="checked"';//分期4
$payment_ked8 = NULL;//白条8
break;
case 6: //信用卡,分期
$payment_ked1 = NULL;//到付1
$payment_ked2 = 'checked="checked"';//信用卡2
$payment_ked4 = 'checked="checked"';//分期4
$payment_ked8 = NULL;//白条8
break;
case 5: //到付,分期
$payment_ked1 = 'checked="checked"';//到付1
$payment_ked2 = NULL;//信用卡2
$payment_ked4 = 'checked="checked"';//分期4
$payment_ked8 = NULL;//白条8
break;
case 4: //分期
$payment_ked1 = NULL;//到付1
$payment_ked2 = NULL;//信用卡2
$payment_ked4 = 'checked="checked"';//分期4
$payment_ked8 = NULL;//白条8
break;
case 3: //到付,信用卡
$payment_ked1 = 'checked="checked"';//到付1
$payment_ked2 = 'checked="checked"';//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = NULL;//白条8
break;
case 2: //信用卡
$payment_ked1 = NULL;//到付1
$payment_ked2 = 'checked="checked"';//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = NULL;//白条8
break;
case 1: //到付,信用卡
$payment_ked1 = 'checked="checked"';//到付1
$payment_ked2 = NULL;//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = NULL;//白条8
break;
default:
$payment_ked1 = NULL;//到付1
$payment_ked2 = NULL;//信用卡2
$payment_ked4 = NULL;//分期4
$payment_ked8 = NULL;//白条8
break;
}
?>
<label class="checkbox-inline">
<input name="info[sell][]" type="checkbox" id="sell1" value="1" <?=$sell_ked1?>> 推荐
</label>
<label class="checkbox-inline">
<input name="info[sell][]" type="checkbox" id="sell2" value="2" <?=$sell_ked2?>> 精品
</label>
<label class="checkbox-inline">
<input name="info[sell][]" type="checkbox" id="sell3" value="4" <?=$sell_ked4?>> 热销
</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="control-label col-sm-5" for="inpupweight">商品重量
</label>
<div class="col-sm-7">
<div class="input-group">
<input name="info[weight]" value="<?=$export->weight?>" class="form-control" type="text" placeholder="000.000">
<div class="input-group-addon">KG
</div>
<?=form_error('info[weight]')?>
</div>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label class="control-label col-sm-5" for="inpupinventory">库存
</label>
<div class="col-sm-7">
<input name="info[inventory]" value="<?=$export->inventory?>" type="text" class="form-control" id="inpupinventory">
<?=form_error('info[inventory]')?>
</div>
</div>
</div>
<div class="col-sm-3"> <span class="help-block">*库存必须输入
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpuppromoteprice">促销价
</label>
<div class="col-sm-2">
<div class="input-group">
<input name="info[promoteprice]" value="<?=$export->promoteprice?>" class="form-control" type="text" placeholder="000.000">
<div class="input-group-addon">元
</div>
<?=form_error('info[promoteprice]')?>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label col-sm-3" for="inpuppromotedate">促销时间
</label>
<div class="col-sm-9">
<input name="info[promotedate_start]" style="width:45%;" value="<?=set_value('info[promotedate_start]')?>" class="form-control pull-left" type="text" placeholder="2014-08-12 12:38">
<span style="width:10%" class="pull-left text-center">至
</span>
<input name="info[promotedate_stop]" value="<?=date('Y-m-d H:i',$export->promotedate_start)?>" style="width:45%;" class="form-control pull-right" type="text" placeholder="2014-08-12 12:38">
<span class="left"><?=form_error('info[promotedate_start]')?></span> <span class="right"><?=date('Y-m-d H:i',$export->promotedate_stop)?>
</span>
</div>
</div>
</div>
<div class="col-sm-3"> <span class="help-block">*不需要促销就保持默认值即可
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupseller_id">服务商
</label>
<div class="col-sm-3">
<select name="info[seller_id]" class="form-control">
<?php
foreach($seller_list as $v)
{
switch ($v->type)
{
case 1: //供货商
$type = '供货商';
break;
case 2://第三方
$type = '第三方';
break;
case 4://品牌自营店
$type = '品牌自营店';
break;
default:
$type = '无此数据联系管理员';
break;
}
if($v->id == $export->seller_id)
{
echo '
<option selected="selected" value="'.$v->id.'">'.$v->name.'/'.$type.'
</option>';
}
else
{
echo '
<option value="'.$v->id.'">'.$v->name.'/'.$type.'
</option>';
}
}
?>
</select>
<?=form_error('info[seller_id]')?>
</div>
<div class="col-sm-4">
<label class="control-label col-sm-2" for="inpuppayment">支持
</label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input name="info[payment][]" type="checkbox" id="payment1" value="1" <?=$payment_ked1?>> 到付
</label>
<label class="checkbox-inline">
<input name="info[payment][]" type="checkbox" id="payment2" value="2" <?=$payment_ked2?> > 信用卡
</label>
<label class="checkbox-inline">
<input name="info[payment][]" type="checkbox" id="payment3" value="4" <?=$payment_ked4?> > 分期
</label>
<label class="checkbox-inline">
<input name="info[payment][]" type="checkbox" id="payment4" value="8" <?=$payment_ked8?> > 白条
</label>
</div>
</div>
<div class="col-sm-3"> <span class="help-block">*白条及分期方式,功能未开放
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupthumbnail">缩略图
</label>
<div class="col-sm-7">
<div class="input-group">
<input id="inpupthumbnail" name="info[thumbnail]" value="<?=$export->thumbnail?>" type="text" class="form-control" placeholder="只能通过上传来获取URL地址" readonly="readonly">
<a data-toggle="modal" data-target="#myUpload" class="input-group-addon glyphicon glyphicon-open" href="<?=site_url('system/upload?type=inpupthumbnail&multi=false')?>">
</a>
</div>
<?=form_error('info[thumbnail]')?>
</div>
<div class="col-sm-3"> <span class="help-block">*只能上传一张图片
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupsmallpic">小图片
</label>
<div class="col-sm-7">
<div class="input-group">
<input id="inpupsmallpic" class="form-control" value="<?=$export->smallpic?>" name="info[smallpic]" type="text" placeholder="小图片" readonly="readonly">
<a data-toggle="modal" data-target="#myUpload" class="input-group-addon glyphicon glyphicon-open" href="<?=site_url('system/upload?type=inpupsmallpic')?>">
</a>
</div>
<?=form_error('info[smallpic]')?>
</div>
<div class="col-sm-3"> <span class="help-block">*大/小图片上传的张数最好相对应
</span></div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupbigpic">大图片
</label>
<div class="col-sm-7">
<div class="input-group">
<input id="inpupbigpic" class="form-control" value="<?=$export->bigpic?>" name="info[bigpic]" type="text" placeholder="大图片" readonly="readonly">
<a data-toggle="modal" data-target="#myUpload" class="input-group-addon glyphicon glyphicon-open" href="<?=site_url('system/upload?type=inpupbigpic')?>">
</a>
</div>
<?=form_error('info[bigpic]')?>
</div>
<div class="col-sm-3"> <span class="help-block">*大/小图片上传的张数最好相对应
</span></div>
</div>
</div>
<!--内容-->
<div class="tab-pane" id="site-content">
<!--详细内容-->
<div class="form-group">
<label class="control-label col-sm-2" for="inpupcontent">详细内容
</label>
<div class="col-sm-10">
<script id="editor" name="info[content]" type="text/plain "><?=$export->content?>
</script>
<script type="text/javascript">
var editor = UE.getEditor('editor');
</script>
</div>
<?=form_error('info[content]')?>
</div>
</div>
<!--其它-->
<div class="tab-pane" id="site-sys">
<div class="form-group">
<label class="control-label col-sm-2" for="inpupseo">SEO设置
</label>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpuptitle">title
</label>
<div class="col-sm-6">
<input name="info[title]" value="<?=$export->title?>" type="text" class="form-control" placeholder="SEO标题">
<?=form_error('info[title]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*根据数据情况设置
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupkeywords">keywords
</label>
<div class="col-sm-6">
<input name="info[keywords]" value="<?=$export->keywords?>" type="text" class="form-control" placeholder="关健字">
<?=form_error('info[keywords]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*关健字
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupdescription">description
</label>
<div class="col-sm-6">
<input name="info[description]" value="<?=$export->description?>" type="text" class="form-control" placeholder="描述">
<?=form_error('info[description]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*描述
</span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupDescription">模板设置
</label>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpuphead">head
</label>
<div class="col-sm-6">
<input name="info[views][head]" value="<?=$export->views['head']?>" type="text" class="form-control" placeholder="留空即调用默认模板">
<?=form_error('info[views][head]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*留空即调用默认模板
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupindex">index
</label>
<div class="col-sm-6">
<input name="info[views][content]" value="<?=$export->views['content']?>" type="text" class="form-control" placeholder="留空即调用默认模板">
<?=form_error('info[views][content]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*留空即调用默认模板
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupfooter">footer
</label>
<div class="col-sm-6">
<input name="info[views][footer]" value="<?=$export->views['footer']?>" type="text" class="form-control" placeholder="留空即调用默认模板">
<?=form_error('info[views][footer]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*留空即调用默认模板
</span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupDescription">URL地址
</label>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupDynamic">动态URL
</label>
<div class="col-sm-6">
<input name="info[url][dynamic]" value="<?=$export->url['dynamic']?>" type="text" class="form-control" placeholder="留空即调用默认地址">
<?=form_error('info[url][dynamic]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*留空即调用默认地址
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupHtml">静态URL
</label>
<div class="col-sm-6">
<input name="info[url][html]" value="<?=$export->url['html']?>" type="text" class="form-control" placeholder="自定义静态文件URL">
<?=form_error('info[url][html]')?>
</div>
<div class="col-sm-4">
<span class="help-block">*自定义静态文件URL(生成静态时有效)
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupSkip">跳转URL
</label>
<div class="col-sm-6">
<input name="info[url][skip]" value="<?=$export->url['skip']?>" type="text" class="form-control" placeholder="跳转地址">
</div>
<div class="col-sm-4">
<span class="help-block">* 直接跳转到此地址
</span>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="inpupDescription">文件名称
</label>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupFilenameDynamic">动态文件名
</label>
<div class="col-sm-6">
<input name="info[filename][dynamic]" value="<?=$export->filename['dynamic']?>" type="text" class="form-control" placeholder="动态文件名称">
</div>
<div class="col-sm-4">
<span class="help-block">*动态文件名称
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2 hx-font-weight-normal" for="inpupFilenameHtml">静态文件名
</label>
<div class="col-sm-6">
<input name="info[filename][html]" value="<?=$export->filename['html']?>" type="text" class="form-control" placeholder="静态文件名">
</div>
<div class="col-sm-4">
<span class="help-block">*只在生成静态文件时有效
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer text-right">
<button onclick="submit()" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> 保
存
</button>
<button onClick="javascript:history.go(-1);" type="button" class="btn btn-warning"><span class="glyphicon glyphicon glyphicon-share-alt"></span> 返
回
</button>
</div>
</div>
</form>
<!-- myUpload -->
<div class="modal fade" id="myUpload" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.myUpload -->
<script>
//重新加载upload页面
$("#myUpload").on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
});
</script>
<?=$footer?>