<?php defined('InShopNC') or exit('Access Invalid!'); ?>
<?php if ($item_edit_flag) { ?>
    <table class="table tb-type2" id="prompt">
        <tbody>
        <tr class="space odd">
            <th colspan="12" class="nobg">
                <div class="title nomargin">
                    <h5><?php echo $lang['nc_prompts']; ?></h5>
                    <span class="arrow"></span>
                </div>
            </th>
        </tr>
        <tr>
            <td>
                <ul>
                    <li>鼠标移动到内容上出现编辑按钮可以对内容进行修改</li>
                    <li>操作完成后点击保存编辑按钮进行保存</li>
                </ul>
            </td>
        </tr>
        </tbody>
    </table>
<?php } ?>

<div class="index_block home1">
    <?php if ($item_edit_flag) { ?>
        <h3>模型版块布局A</h3>
        <h5>属性: </h5><br/>
        <div nctype="item_property" class="content">
            <img nctype="bg_image" src="<?php echo getMbSpecialImageUrl($output['item_info']['bg_image']); ?>" alt="">
            <?php
            $ret = @getimagesize(getMbSpecialImageUrl($output['item_info']['bg_image']),$info);
            if(!$ret) {
                echo "无法获取当前图片尺寸。";
            } else {
                $width = doubleval($ret[0]);
                $height= doubleval($ret[1]);
                echo $width.'*'.$height;
            }
            ?>
            <br/>
            <a nctype="btn_edit_block_bg" class="btn-edit" data-desc="640*240" href="javascript:;">设置背景属性</a>
            <input nctype="bg_image_name" name="bg_image_name" type="hidden" value="<?php echo $output['item_info']['bg_image']; ?>">
            <input nctype="bg_type" name="bg_type" type="hidden" value="<?php echo $output['item_info']['bg_type']; ?>">
            <input nctype="bg_data" name="bg_data" type="hidden" value="<?php echo $output['item_info']['bg_data']; ?>">
            <input nctype="has_margin" name="has_margin" type="hidden" value="<?php echo $output['item_info']['has_margin']; ?>">
        </div>
    <?php } ?>
    <div class="title">
        <?php if ($item_edit_flag) { ?>
            <h5>标题：</h5>
            <input id="home1_title" type="text" class="txt w200" name="item_data[home1_title]" value="<?php
            echo $item_data['home1_title'];
            ?>">
        <?php } else { ?>
            <span><?php echo $item_data['home1_title']; ?></span>
        <?php } ?>
    </div>
    <div nctype="item_content" class="content">
        <?php if ($item_edit_flag) { ?>
            <h5>内容：</h5>
        <?php } ?>
        <div nctype="item_image" class="item"><img nctype="image"
                                                   src="<?php echo getMbSpecialImageUrl($item_data['image']); ?>"
                                                   alt="">
            <?php if ($item_edit_flag) { ?>
                <input nctype="image_name" name="item_data[image]" type="hidden" value="<?php echo $item_data['image']; ?>">
                <input nctype="image_show_type" name="item_data[show_type]" type="hidden" value="<?php echo $item_data['show_type']; ?>">
                <input nctype="image_show_data" name="item_data[show_data]" type="hidden" value="<?php echo $item_data['show_data']; ?>">
                <input nctype="image_type" name="item_data[type]" type="hidden" value="<?php echo $item_data['type']; ?>">
                <input nctype="image_data" name="item_data[data]" type="hidden" value="<?php echo $item_data['data']; ?>">
                <input nctype="image_title" name="item_data[title]" type="hidden" value="<?php echo $item_data['title']; ?>">
                <input nctype="image_reserved" name="item_data[reserved]" type="hidden" value="<?php echo $item_data['reserved']; ?>">

                <div style="color: red;float: left;">
                    <?php
                    $ret = @getimagesize(getMbSpecialImageUrl($item_data['image']),$info);
                    if(!$ret) {
                        echo "无法获取当前图片尺寸。";
                    } else {
                        $width = doubleval($ret[0]);
                        $height= doubleval($ret[1]);
                        echo $width.'*'.$height;
                    }
                    ?>
                </div>
                <a nctype="btn_edit_item_image" data-desc="640*260" href="javascript:;"><i class="icon-edit"></i>编辑</a>
                <a nctype="btn_del_item_image" href="javascript:;" class="a1"><i class="icon-trash"></i>删除</a>
            <?php } ?>
        </div>
    </div>
    <?php if ($item_edit_flag) { ?>
        <a nctype="btn_add_item_image" class="btn-add" data-desc="640*240" href="javascript:;">添加新的图片</a>
    <?php } ?>
</div>

<?php if ($item_edit_flag) { ?>
    <div class="search-goods" style="position: absolute;left: 500px;top: 220px;">
        <h3>选择商品添加</h3>
        <h5>商品关键字：</h5>
        <label>
            类型：
            <select name="search_type" id="search_type">
                <option value="keyword">关键字</option>
            </select>
        </label>
        <input id="txt_goods_name" type="text" class="txt w200" name="">
        <a id="btn_mb_special_goods_search" class="btn-search" href="javascript:;" style="vertical-align: top; margin-left: 5px;" title="搜索"></a>
        <div id="mb_special_goods_list"></div>
    </div>
<?php } ?>
