<table border="0" align="center" cellpadding="0" cellspacing="0" ms-controller="DatabaseBackup" id="mian">
    <tbody>
        <tr>
            <!--leftNav-->
            <td width="198" height="450" valign="top" id="tdleft">
                <div id="left"> 
                    <ul>
                        <li class="selected"><a href="javascript:void(0);">数据库备份</a></li>
                    </ul>
                </div>

                <!--End leftNav-->
            </td>
            <!--leftNav end-->


            <!--rightNav-->
            <td valign="top" id="right" class="addrightbg">
                <div class="boxtip" id="boxtip">
                    <h1 ms-html="lang.DataBaseBackup"></h1>
                    <p ms-html="lang.DataBaseBackupInfo"></p>
                    <a href="javascript:history.go(-1)" class="btn_back"></a>
                </div>
                <table width="96%" border="0" cellspacing="0" cellpadding="0" class="titbox">
                    <tbody>
                        <tr>
                            <td width="150" class="tit">
                                1.手动执行备份：
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td width="150" height="60" style="border:none;">
                                <input type="button" ms-click="backup" name="btnBackup" value="立即备份" id="btnBackup" class="btn btn-primary" />
                            </td>
                        </tr>
                        <tr>
                            <td width="150" class="tit">
                                <div style="height:10px;"></div>
                                2.系统定时备份：
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border:none;">
                                <div style="height:5px;"></div>
                                <label>
                                <input type="checkbox" ms-duplex-radio="config.auto" style="float:none;">开启自动备份</label>
                                <div style="height:5px;"></div>
                                <div ms-if="config.auto">
                                开始备份时间：
                                <select ms-duplex-text="config.type" style="width:80px;">
                                    <option ms-repeat-r="types" ms-value="r.value">{{r.dsc}}</option>
                                </select>
                                <select ms-duplex-text="config.week" ms-if="config.type=='w'" style="width:80px;">
                                    <option ms-repeat-r="weeks" ms-value="r.value">{{r.dsc}}</option>
                                </select>
                                <input type="text" ms-duplex="config.hour"  style="width:30px;text-align:center;" /> 点
                                <input type="text" ms-duplex="config.minute"  style="width:30px;text-align:center;" /> 分
                                </div>
                                <div style="padding:5px;" class="tipContent">
                                    目前自动备份{{config.auto?"已":"未"}}开启 
                                    <span ms-if="config.auto">下次自动备份时间：{{nextTime=="0001-01-01 00:00"?"未保存到服务器，请先保存配置！":nextTime}}</span>
                                </div>
                                <input type="button" ms-click="saveConfig" name="btnSaveConfig" value="保存配置" id="btnSaveConfig" class="btn btn-primary" />
                                <div style="height:10px;"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
                    <tbody>
                        <tr>
                            <td>
                                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="top10">
                    <tbody>
                        <tr>
                            <td width="356" valign="top">
                                <div class="boxTitlenob">
                                    <h2>备份历史记录
                                        <!--<span class="rseachbox">
                                            <input id="appendedInput" type="text" style="margin-bottom:0px;">
                                            <button class="inputbt" id="qSearch"></button>
                                        </span>-->
                                    </h2>
                                </div>
                                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                    <thead>
                                        <tr class="head">
                                            <th style="width: 40%;">备份文件名</th>
                                            <th style="width: 20%;">备份时间</th>
                                            <th style="width: 20%;">操作人</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody ms-each-item="rows">
                                        <tr class="dobody">
                                            <td>{{item.BackupPath}}</td>
                                            <td>{{item.LastTime}}</td>
                                            <td>
                                                <span ms-if="item.AddBy.Id==0">{{item.AddBy.FullName}}</span>
                                                <a ms-if="item.AddBy.Id>0" href="javascript:void(0)" ms-click="getUser" ms-value="item.AddBy.Id" ms-widget='userCard' ms-data-userid="item.AddBy.Id">{{item.AddBy.FullName}}</a>

                                            </td>
                                            <td>
                                                <a href="javascript:void(0)" ms-if="IsSuperAdmin" ms-click="del" ms-value="item.Id" class="dodel" title="删除"></a>
                                                <a href="javascript:void(0)" ms-if="!IsSuperAdmin" title="非常抱歉，您没有删除的权限" class="nodelete"></a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>
<!--查看模板-->
<noscript type="text/avalon" id="detailTemplate">
    <table width="800" border="0" cellspacing="0" cellpadding="0" class="titbox" style="margin-bottom: 10px; height: 30px;">
        <tr>
            <td width="68" height="30" class="tit">用户信息</td>
            <td>&nbsp;</td>
        </tr>
    </table>
    <table width="800" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
        <tbody>
            <tr>
                <td>姓名：</td>
                <td>{{userEntity.FullName}}</td>
                <td>默认角色：</td>
                <td>{{userEntity.Role.Name}}</td>
            </tr>
            <tr>
                <td width="80">部门：</td>
                <td>{{userEntity.Group.Name}}</td>
                <td width="80">职位：</td>
                <td>{{userEntity.PositionId|getpost}}</td>
            </tr>
            <tr>
                <td>状态：</td>
                <td>{{userEntity.IsAvailable ? '启用' : '禁用'}}</td>
                <td>性别：</td>
                <td>{{userEntity.Sex == 0 ? '男' : '女'}}</td>
            </tr>
            <tr>
                <td>电子邮箱：</td>
                <td>{{userEntity.Email}}</td>
                <td>手机：</td>
                <td>{{userEntity.Phone}}</td>
            </tr>
            <!--
            <tr>
                <td>录入人：</td>
                <td>{{userEntity.AddBy.FullName}}</td>
                <td>录入时间：</td>
                <td>{{userEntity.AddTime}}</td>
            </tr>-->
        </tbody>
    </table>
</noscript>