index.php 8.45 KB
<?php $this->_extends('layout/admin_layout'); ?>
<?php $this->_block('main'); ?>
<ul class="nav nav-tabs">
    <li <?php echo $this->view->type == 1 ? 'class="active"' : ''; ?>>
        <a href="/admin/invitation/index/type/1">真实申请表格</a>
    </li>
    <li <?php echo $this->view->type == 2 ? 'class="active"' : ''; ?>>
        <a href="/admin/invitation/index/type/2">手动添加表格</a>
    </li>
</ul>
<table class="table">
    <caption style="text-align:left; padding-bottom:5px;">
        <button class="btn" style="float:left;" id="add_index" href="javascript:void(0)">新增数据
            <?php echo $this->view->typeDescription[$this->view->type]; ?></button>
    </caption>
    <thead>
    <td width="15%">申请类型</td>
    <td width="10%">类型</td>
    <td width="15%">名称</td>
    <td width="10%">联系人</td>
    <td width="10%">联系电话</td>
    <td width="15%">邮箱</td>
    <td width="10%">申请时间</td>
    <td width="15%">操作</td>
</thead>
<?php if (empty($this->view->data)) : ?>
    <tr><td colspan="10" style="text-align: center">无记录</td></tr>
<?php else : ?>

    <?php foreach ($this->view->data as $row) : ?>
        <tr>
            <td><?php echo $row['category'] ?></td>
            <td><?php echo $row['sub'] ?></td>
            <td><?php echo $row['name'] ?></td>
            <td><?php echo $row['contacter'] ?></td>
            <td><?php echo $row['phone'] ?></td>
            <td><?php echo $row['email'] ?></td>
            <td><?php echo date('Y-m-d H:i:s',$row['create_time']) ?></td>
            <td>
                <button status="<?php echo $row['show_in_apply'] ?>" data-id="<?php echo $row['id']; ?>" class="apply btn <?php echo $row['show_in_apply'] ? 'btn-primary' : ''?>">申请显示</button>
                <button status="<?php echo $row['show_in_pass'] ?>" data-id="<?php echo $row['id']; ?>" class="pass btn <?php echo $row['show_in_pass'] ? 'btn-primary' : ''?>">通过显示</button>
            </td>
        </tr>
    <?php endforeach; ?>
<?php endif; ?>
</table>

<div id="form_pan" admin="<?php echo $this->view->admin ?>" style="display:none">
    <input type="hidden" id="type" name="type" value="<?php echo $this->view->type ?>">
    <ul id="myTab" class="nav nav-tabs">
        <li class="active"><a href="#media" data-toggle="tab">媒体申请</a></li>
        <li><a href="#brand" data-toggle="tab">品牌厂商申请</a></li>
        <li><a href="#master" data-toggle="tab">艺人红人申请</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
        <div class="tab-pane fade in active" id="media">
            <input type='hidden' name="category" value="media"/>
            <table class="table table-bordered">
                <tbody>
                    <tr>
                        <td>媒体类型<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="radio" name="media_sub" value="1" checked="checked"/>&nbsp;电视
                            <input type="radio" name="media_sub" value="2"/>&nbsp;平面
                            <input type="radio" name="media_sub" value="3"/>&nbsp;网络
                        </td>
                    </tr>
                    <tr>
                        <td>媒体名称<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="name" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>联系人<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="contacter" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>联系电话<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="phone" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>邮箱<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="email" value=""/>
                        </td>
                    </tr>
                    <tr>
                </tbody>
            </table>
        </div>
        <div class="tab-pane fade" id="brand">
            <input type='hidden' name="category" value="brand"/>
            <table class="table table-bordered">
                <tbody>
                    <tr>
                        <td>类型<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="radio" name="brand_sub" value="4" checked="checked"/>&nbsp;品牌商
                            <input type="radio" name="brand_sub" value="5"/>&nbsp;代理商
                            <input type="radio" name="brand_sub" value="6"/>&nbsp;贸易商
                        </td>
                    </tr>
                    <tr>
                        <td>品牌名称<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="name" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>联系人<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="contacter" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>联系电话<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="phone" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>邮箱<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="email" value=""/>
                        </td>
                    </tr>
                    <tr>
                </tbody>
            </table>
        </div>
        <div class="tab-pane fade" id="master">
            <input type='hidden' name="category" value="master"/>
            <table class="table table-bordered">
                <tbody>
                    <tr>
                        <td>类型<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="radio" name="master_sub" value="7" checked="checked"/>&nbsp;艺人
                            <input type="radio" name="master_sub" value="8"/>&nbsp;经纪公司
                            <input type="radio" name="master_sub" value="9"/>&nbsp;红人
                        </td>
                    </tr>
                    <tr>
                        <td>姓名 称呼 名称<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="name" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>联系人<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="contacter" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>联系电话<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="phone" value=""/>
                        </td>
                    </tr>
                    <tr>
                        <td>邮箱<span class="text-error"> * </span></td>
                        <td colspan="3">
                            <input type="text" style="width:305px;" name="email" value=""/>
                        </td>
                    </tr>
                    <tr>
                </tbody>
            </table>
        </div>
    </div>

</div>
<?php $this->_endblock(); ?>

<?php $this->_block('js'); ?>
<?php
$this->_js('index.js', array(
    SITE_JS . '/lib/seajs.js',
));
?>
<script type="text/javascript">
    seajs.use('admin/invitation');
</script>
<?php $this->_endblock(); ?>