<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_executesql" %>
<%@ 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"/>
<script language="javascript">
function chkPost()
{
	var s = document.forms[0].sql.value.trim().toLowerCase();
	if (s == '')
	{
		alert('必须输入要执行的sql语句');
		return false;
	}
	else if (s.substring(0, 7) != 'insert ' && s.substring(0, 7) != 'update ' && s.substring(0, 7) != 'delete ')
	{
		//alert('只能执行insert、update、delete语句');
		//return false;
	}
	else
	{
		return confirm('本操作不可恢复，确定要执行吗？');
	}

}
</script>
<form runat="server">
<table cellpadding="0" cellspacing="1" class="maintable" border="0">
<tr>
<th colspan="2">执行SQL语句</th>
</tr>
<tr>
<td class="left" width="30%">输入密码</td>
<td class="right" width="70%"><input type="password"  onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" id="password" maxlength="16" style="width:100px" runat="server"/></td>
</tr>
<tr>
<td class="left">输入sql语句</td>
<td class="right"><textarea id="sql"  onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" style="width:360px" rows="8" runat="server">
</textarea></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit"  onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" class="button" value="执 行" onclick="return chkPost()" />
&nbsp; <span>本操作可能造成重大破坏并且不可恢复，请务必谨慎，最好先备份数据库</span>
</td>
</td>
</tr>
</table>
</form>
<bbs:AdminFooter runat="server"/>
