<?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 home2">
    <?php if ($item_edit_flag) { ?>
        <h3>模型版块布局D</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[title]" value="<?php echo $item_data['title']; ?>">
        <?php } else { ?>
            <span><?php echo $item_data['title']; ?></span>
        <?php } ?>
    </div>
    <div class="content">
        <?php if ($item_edit_flag) { ?>
            <h5>内容：</h5>
        <?php } ?>
        <div class="home2_2">
            <div class="home2_2_1">
                <div nctype="item_image" class="item"><img nctype="image"
                                                           src="<?php echo getMbSpecialImageUrl($item_data['rectangle1_image']); ?>"
                                                           alt="">
                    <?php if ($item_edit_flag) { ?>
                        <input nctype="image_name" name="item_data[rectangle1_image]" type="hidden" value="<?php echo $item_data['rectangle1_image']; ?>">
                        <input nctype="image_show_type" name="item_data[rectangle1_show_type]" type="hidden" value="<?php echo $item_data['rectangle1_show_type']; ?>">
                        <input nctype="image_show_data" name="item_data[rectangle1_show_data]" type="hidden" value="<?php echo $item_data['rectangle1_show_data']; ?>">
                        <input nctype="image_type" name="item_data[rectangle1_type]" type="hidden" value="<?php echo $item_data['rectangle1_type']; ?>">
                        <input nctype="image_data" name="item_data[rectangle1_data]" type="hidden" value="<?php echo $item_data['rectangle1_data']; ?>">
                        <input nctype="image_title" name="item_data[rectangle1_title]" type="hidden" value="<?php echo $item_data['rectangle1_title']; ?>">
                        <div style="color: red;float: left;">
                            <?php
                            $ret = @getimagesize(getMbSpecialImageUrl($item_data['rectangle1_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="320*130" href="javascript:;"><i class="icon-edit"></i>编辑</a>
                    <?php } ?>
                </div>
                <div class="home2_2_2">
                    <div nctype="item_image" class="item"><img nctype="image"
                                                               src="<?php echo getMbSpecialImageUrl($item_data['rectangle2_image']); ?>"
                                                               alt="">
                        <?php if ($item_edit_flag) { ?>
                            <input nctype="image_name" name="item_data[rectangle2_image]" type="hidden" value="<?php echo $item_data['rectangle2_image']; ?>">
                            <input nctype="image_show_type" name="item_data[rectangle2_show_type]" type="hidden" value="<?php echo $item_data['rectangle2_show_type']; ?>">
                            <input nctype="image_show_data" name="item_data[rectangle2_show_data]" type="hidden" value="<?php echo $item_data['rectangle2_show_data']; ?>">
                            <input nctype="image_type" name="item_data[rectangle2_type]" type="hidden" value="<?php echo $item_data['rectangle2_type']; ?>">
                            <input nctype="image_data" name="item_data[rectangle2_data]" type="hidden" value="<?php echo $item_data['rectangle2_data']; ?>">
                            <input nctype="image_title" name="item_data[rectangle2_title]" type="hidden" value="<?php echo $item_data['rectangle2_title']; ?>">
                            <div style="color: red;float: left;">
                                <?php
                                $ret = @getimagesize(getMbSpecialImageUrl($item_data['rectangle2_image']),$info);
                                if(!$ret) {
                                    echo "无法获取当前图片尺寸。";
                                    return;
                                }
                                $width = doubleval($ret[0]);
                                $height= doubleval($ret[1]);
                                echo $width.'*'.$height;
                                ?>
                            </div>
                            <a nctype="btn_edit_item_image" data-desc="320*130" href="javascript:;"><i class="icon-edit"></i>编辑</a>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="home2_1">
            <div nctype="item_image" class="item"><img nctype="image"
                                                       src="<?php echo getMbSpecialImageUrl($item_data['square_image']); ?>"
                                                       alt="">
                <?php if ($item_edit_flag) { ?>
                    <input nctype="image_name" name="item_data[square_image]" type="hidden" value="<?php echo $item_data['square_image']; ?>">
                    <input nctype="image_show_type" name="item_data[square_show_type]" type="hidden" value="<?php echo $item_data['square_show_type']; ?>">
                    <input nctype="image_show_data" name="item_data[square_show_data]" type="hidden" value="<?php echo $item_data['square_show_data']; ?>">
                    <input nctype="image_type" name="item_data[square_type]" type="hidden" value="<?php echo $item_data['square_type']; ?>">
                    <input nctype="image_data" name="item_data[square_data]" type="hidden" value="<?php echo $item_data['square_data']; ?>">
                    <input nctype="image_title" name="item_data[square_title]" type="hidden" value="<?php echo $item_data['square_title']; ?>">
                    <div style="color: red;float: left;">
                        <?php
                        $ret = @getimagesize(getMbSpecialImageUrl($item_data['square_image']),$info);
                        if(!$ret) {
                            echo "无法获取当前图片尺寸。";
                            return;
                        }
                        $width = doubleval($ret[0]);
                        $height= doubleval($ret[1]);
                        echo $width.'*'.$height;
                        ?>
                    </div>
                    <a nctype="btn_edit_item_image" data-desc="320*260" href="javascript:;"><i class="icon-edit"></i>编辑</a>
                <?php } ?>
            </div>
        </div>
    </div>
</div>
