<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="/css/information-system3.css?v=201508112" type="text/css" />
    <script type="text/javascript" src="/min/?f=/js/information-system3.min.js,/js/common.js,/js/trippest/trippest.js&v=20190128"></script>
    <style>
        .box {
            background: #f5f5f5;
            margin-bottom: 20px;
        }

        .box .item {
            padding-bottom: 10px;
        }
    </style>
</head>

<body>
    <?php
    foreach ($list as $Item) {
        $ibd_id = $Item->ibd_id;
        $ibd_ic_id = $Item->ibd_ic_id;
        $ibd_parentId = $Item->ibd_parentId;
        $ibd_ItemName = $Item->ibd_ItemName;
        $ibd_ItemValue = $Item->ibd_Itemvalue;
        $ibd_ItemType = $Item->ibd_ItemType;
        $ibd_ItemDescription = $Item->ibd_ItemDescription;
        if ($ibd_ItemName == "included" || $ibd_ItemName == "excluded" || $ibd_ItemName == "requirements" || $ibd_ItemName == "attention" || $ibd_ItemName == "ticketMsg" || $ibd_ItemName == "noPickupMsg") {


    ?>
            <div class="col-sm=20 box">
                <div class="item">
                    <label>
                        <?php echo $ibd_ItemName ?>
                        <a href="javascript:void(0);" onclick="tpmeta('delete', '<?php echo $ibd_id ?>')"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
                        <a href="javascript:void(0);" onclick="tpmeta('save', '<?php echo $ibd_id ?>', $('#<?php echo $ibd_id ?>').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
                        <a href="javascript:void(0);" title="管理bokun附加属性内容."><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
                    </label>
                    <textarea class="form-control" id="<?php echo $ibd_id ?>" name="<?php echo $ibd_id ?>" rows="3"><?php echo $ibd_ItemValue ?></textarea>
                </div>
            </div>
        <?php } elseif (stripos($ibd_ItemName, "Photo")) { ?>
            <div class="col-sm=20 box">
                <div class="item">
                    <label>
                        <?php echo $ibd_ItemName ?>
                        <a href="javascript:void(0);" onclick="tpmeta('delete', '<?php echo $ibd_id ?>')"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
                        <a href="javascript:void(0);" onclick="tpmeta('save', '<?php echo $ibd_id ?>', $('#<?php echo $ibd_id ?>').val(),$('#<?php echo $ibd_id . '_type' ?>').val(),$('#<?php echo $ibd_id . '_dsc' ?>').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
                        <a href="javascript:void(0);" title="图片管理，其中有路径，大小(originalUrl:原图;large（600X600);preview,thumbnail(40X40).大小就这4种)，及说明文字."><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
                    </label>
                    <input name="<?php echo $ibd_id ?>" id="<?php echo $ibd_id ?>" type="text" class="form-control" value="<?php echo $ibd_ItemValue ?>">
                    <p></p>
                    <div class="row">
                        <div class="col-sm-8"><input name="<?php echo $ibd_id . '_type' ?>" id="<?php echo $ibd_id . '_type' ?>" type="text" class="form-control" value="<?php echo $ibd_ItemType ?>" placeholder="phototype"></div>
                        <div class="col-sm-16"><input name="<?php echo $ibd_id . '_dsc' ?>" id="<?php echo $ibd_id . '_dsc' ?>" type="text" class="form-control" value="<?php echo $ibd_ItemDescription ?>" placeholder="description"></div>
                    </div>
                </div>
            </div>
        <?php   } elseif ($ibd_ItemName == "ActivityID") { //产品ActivityID不允许修改，然后加上添加操作
        ?>
            <div class="col-sm=20 box">
                <div class="item">
                    <label>ActivityID:<?php echo $ibd_ItemValue ?>(不能修改，bokun的产品ID,为0是CH产品。)</label>&nbsp;&nbsp;
                    <label>如果需要增加属性，请点击 <a href="javascript:;" id=“js_AddBokun” onclick="CheckAddBox()">添 加</a></label>
                    <a href="javascript:void(0);" title="特别注意bokun属性名称是根据接口数据固定的几个，比如keyPhoto是产品主要图片。ProductPhoto是产品其它图片. 图片的Type属性类型只能是 originalUrl，large，preview，thumbnail这四种类型。"><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
                </div>
                <div class="item" id="js_AddBokunBox" style="display:none;">
                    <div class="row">
                        <div class="col-sm-6">
                            <select name="ibd_ItemName" id="ibd_ItemName" class="form-control">
                                <option value="">属性名称(必填)</option>
                                <option value="AdultMsg">成人年龄信息</option>
                                <option value="ChildMsg">儿童年龄信息</option>
                                <option value="InfantMsg">婴儿年龄信息</option>
                                <option value="Other_Msg">Other年龄信息</option>
                                <option value="country">country</option>
                                <option value="city">city</option>
                                <option value="durationText">durationText</option>
                                <option value="ticketMsg">ticketMsg</option>
                                <option value="noPickupMsg">noPickupMsg</option>
                                <option value="keyPhoto">keyPhoto</option>
                                <option value="ProductPhoto">ProductPhoto</option>
                            </select>
                        </div>
                        <div class="col-sm-6"><input name="ibd_ItemType" id="ibd_ItemType" type="text" class="form-control" value="" placeholder="Type属性类型">
                    </div>
                        <div class="col-sm-6"><input name="ibd_ItemDescription" id="ibd_ItemDescription" type="text" class="form-control" value="" placeholder="description描述"></div>
                        <div class="col-sm-6">
                            <a href="javascript:;" class="btn btn-primary" onclick="addmeta($('#ibd_ic_id').val(),$('#ibd_parentId').val(),$('#ibd_ItemName').val(),$('#ibd_Itemvalue').val(),$('#ibd_ItemType').val(),$('#ibd_ItemDescription').val())">保 存</a>
                            <input type="hidden" name="ibd_ic_id" id="ibd_ic_id" value="<?php echo $ibd_ic_id ?>" />
                            <input type="hidden" name="ibd_parentId" id="ibd_parentId" value="<?php echo $ibd_id ?>" />
                    </div>
                    </div>
                    <p></p>
                    <input name="ibd_Itemvalue" id="ibd_Itemvalue" type="text" class="form-control" value="" placeholder="属性值,对应属性名称。(必填)">


                </div>
            </div>
        <?php } else { ?>
            <div class="col-sm=20 box">
                <div class="item">
                    <label>
                        <?php echo $ibd_ItemName ?>
                        <a href="javascript:void(0);" onclick="tpmeta('delete', '<?php echo $ibd_id ?>')"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
                        <a href="javascript:void(0);" onclick="tpmeta('save', '<?php echo $ibd_id ?>', $('#<?php echo $ibd_id ?>').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-hdd"></i></a>
                        <a href="javascript:void(0);" title="管理bokun附加属性内容."><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
                    </label>
                    <input name="<?php echo $ibd_id ?>" id="<?php echo $ibd_id ?>" type="text" class="form-control" value="<?php echo $ibd_ItemValue ?>">
                </div>
            </div>
    <?php }
    } ?>
</body>

</html>