<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_data_backup" %>
<%@ Register tagPrefix="Dvbbs" namespace="Dvbbs.Controls" assembly="Dvbbs.Web"%>
<%@ Register tagPrefix="bbs" tagName="AdminHeader" src="controls/admin_header.ascx"%>
<%@ Register tagPrefix="bbs" tagName="AdminFooter" src="controls/admin_footer.ascx"%>
<bbs:AdminHeader title="备份数据库" runat="server" ID="Adminheader1" />
<script language="javascript">
function chkPost()
{
	var f = document.forms[0];
	if (f.backupname.value.replace(/(^[\s　]*)|([\s　]*$)/g, '') == '')
	{
		alert('请输入备份文件名，不包括后缀名');
		f.backupname.focus();
		return false;
	}
	return true;
}
</script>
<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0">
	<tr>
		<th colspan="6">
			数据库备份列表
		</th>
	</tr>
	<tr>
		<td class="nf2" colspan="6">
			<div class="underline">功能说明：</div>
			<span>1. 该列表按时间倒序排列，请适当地删除过旧的备份，删除记录的同时会删除备份的文件。</span><br />
			<span>2. 使用<font color="#0000ff">.resx</font>作为扩展名是为了防止被直接下载。<font color="#0000ff">SqlServer</font>的备份可直接用它还原；<font color="#0000ff">Access</font>备份可更改扩展名以便使用或查看。</span>
		</td>
	</tr>
	<tr align="center">
		<td>操作</td>
		<td>以前的数据库备份 (点击下载到本地)</td>
		<td width="75">大小</td>
		<td width="75">备份类型</td>
		<td width="125">备份者</td>
		<td width="130">备份时间
			<span class="t2">↓</span></td>
	</tr>
	<asp:Repeater id="list" enableViewState="false" runat="server">
		<ItemTemplate>
			<tr>
				<td><Dvbbs:Anchor id="remove" text="删除" onclick="return confirm('确定要删除该备份文件和记录吗？')" runat="server" /></td>
				<td nowrap="nowrap"><Dvbbs:Anchor id="filename" target="_blank" runat="server" /></td>
				<td><Dvbbs:Span id="filesize" runat="server" /></td>
				<td><Dvbbs:Span id="usingdb" runat="server" /></td>
				<td><Dvbbs:Span id="username" runat="server" /></td>
				<td><Dvbbs:Span id="backuptime" runat="server" /></td>
			</tr>
		</ItemTemplate>
	</asp:Repeater>
</table>
<br />
<form runat="server" ID="Form1">
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0">
		<tr>
			<th colspan="2">
				增加数据库备份</th>
		</tr>
		<tr>
			<td class="nf2" colspan="2">
				<div class="underline">功能说明：</div>
				<span>备份文件是数据库的复制品，将被保存在databackup目录中。若使用Access并且体积过大时备份可能会出现错误。</span>
			</td>
		</tr>
		<tr>
			<td width="30%" class="left">将数据库备份为</td>
			<td class="right"><asp:TextBox id="backupname" style="width:250px" maxlength="35" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" /><br />
				<span>输入备份文件的文件名，不包括扩展名(后缀名)</span></td>
		</tr>
		<tr>
			<td colspan="2" align="center" class="bottom">
				<input type="submit" id="save" class="button" value="备 份" onclick="return chkPost()" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<span>提醒：最好将最新的数据库备份下载到本地。</span></td>
		</tr>
	</table>
</form>
<bbs:AdminFooter runat="server" ID="Adminfooter1" />
