<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加支付商品</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="<?php echo base_url();?>public/js/bootstrap/bootstrap.min.css" >

</head>
<body>
<div id="msg-tip">

</div>
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>添加支付商品</header>
                    <hr/>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <input type="hidden" value="<?php echo $url;?>" id="uploadUrl"/>
                                    <input type="hidden" value="<?php echo $baseUrl;?>" id="baseUrl"/>
                                    <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data"  id="uploadForm" action="#">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"></label>
                                            <div class="col-sm-3" >
                                                <img src="" width="90px;" height="90px;" id="imgDisplay" class="hide"/>
                                            </div>
                                        </div>
                                        <div class="form-group hide">
                                            <label class="col-sm-3 control-label">商品图片*:</label>
                                            <div class="col-sm-3">
                                                    <input type="file" name="giftfile" id="giftfile" />
                                            </div>

                                        </div>
<!--                                        <button type="submit" class="btn btn-default">Submit</button>-->
                                    </form>

                                    <form class="form-horizontal" role="form" method="post" action="#" enctype="multipart/form-data" id="addForm">
                                        <input type="hidden" value="" id="uploadedFile" name="uploadedFile"/>
                                        <div class="modal-body">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">产品ID*: </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="产品ID" name="gpid" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">价格(美元): </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="价格(美元)" name="gprice" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">价格(泰币): </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="价格(泰币)" name="gpriceThb" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">商品名称*: </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="商品名称" name="gname" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">商品描述: </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="商品描述" name="gdesc" value="">
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">商品类型: </label>
                                                <div class="col-sm-3">
                                                    <?php foreach ($goodsType as $v => $n) {?>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="gtype"  <?php if($v == 1) echo 'checked'; ?> value="<?php echo $v;?>"  > <?php echo $n;?>
                                                        </label>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">内容: </label>
                                                <div class="col-sm-3">
                                                    <?php foreach ($rewardType as $key => $keyName) {?>
                                                            <input type="text" class="form-control" name="rewardList[<?php echo $key;?>]"  placeholder="<?php echo $keyName; ?>"  >
                                                    <?php } ?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">增加的概率: </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="增加的概率" name="gaddPro" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">活动奖励: </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="活动奖励" name="gactivityReward" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">商品折扣: </label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="商品折扣" name="gdiscount" value="">
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">商品渠道*:</label>
                                                <div class="col-sm-3">
                                                    <?php foreach ($gchannelName as $v => $n) {?>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="gchannel"  <?php if($v == 1) echo 'checked'; ?> value="<?php echo $v;?>"  > <?php echo $n;?>
                                                        </label>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">商品排序:</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="商品排序" name="gsort" value="">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">支付渠道排序:</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="支付渠道排序" name="gchannel_sort" value="">
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">状态*:</label>
                                                <div class="col-sm-3">
                                                    <?php foreach ($goodsStatusArr as $v => $n) {?>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="gstatus" <?php if($v == 1) echo 'checked'; ?>  value="<?php echo $v;?>"> <?php echo $n;?>
                                                        </label>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">属性*:</label>
                                                <div class="col-sm-3">
                                                    <?php foreach ($goodsAttributeArr as $v => $n) {?>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="gattribute" <?php if($v == 1) echo 'checked'; ?>  value="<?php echo $v;?>"> <?php echo $n;?>
                                                        </label>
                                                    <?php } ?>
                                                </div>
                                            </div>

<!--                                            <div class="form-group">-->
<!--                                                <label class="col-sm-3 control-label">礼物图片*:</label>-->
<!--                                                <div class="col-sm-9">-->
<!--                                                    <input type="file" name="giftfile" id="giftfile" />-->
<!--                                                </div>-->
<!--                                            </div>-->

                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">所属的游戏:</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="所属的游戏" name="ggameid" value="1">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">平台*:</label>
                                                <div class="col-sm-3">
                                                    <?php foreach ($goodsPlatformArr as $v => $n) {?>
                                                        <label class="radio-inline">
                                                            <input type="radio" name="gplatform" <?php if($v == 1) echo 'checked'; ?>  value="<?php echo $v;?>"> <?php echo $n;?>
                                                        </label>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-offset-3 col-sm-3">
                                                <button type="button" class="btn btn-info goback">返回</button>
                                                <button type="button" class="btn btn-primary" id="submitBtn">提交</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</body>

<script src="<?php echo base_url();?>public/plugins/validate/jquery.validate-1.15.0.min.js"></script>
<script src="<?php echo base_url();?>public/plugins/validate/jaquery.validate.messages_zh.js"></script>
<script src="<?php echo base_url();?>public/js/common.js"></script>
<script src="<?php echo base_url();?>public/js/goods/add.js"></script>
</html>
<script type="text/javascript">
    $('.goback').click(function(){
       history.go(-1);
    });



</script>