📄 boardmodify.asp
字号:
<!--#include file=conn.asp --><!--#include file="char.inc"-->
<!--#include file=../include/config.asp --><!--#include file="chkuser.asp" -->
<%
IF request.cookies("KEY")<>"super" THEN
response.redirect "index_face.asp"
response.end
else
usernamecookie=CheckStr(request.cookies("UserName"))
passwdcookie=replace(trim(Request.cookies("passwd")),"'","''")
KEYcookie=replace(trim(request.cookies("KEY")),"'","''")
if usernamecookie="" or passwdcookie="" then
response.redirect "login.asp"
response.end
else
'判断用户的合法性
set rs=server.createobject("adodb.recordset")
sql="select * from admin where username='"&usernamecookie&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.redirect "login.asp"
response.end
end if
IF passwdcookie<>rs("passwd") THEN
response.redirect "login.asp"
response.end
END IF
'下面判断用户级别实际在有用户级别是都应该判断
if KEYcookie<>rs("OSKEY") then
response.redirect "index_face.asp"
response.end
end if
rs.close
set rs=nothing
END IF
END IF
%>
<%
set rs1=server.createobject("adodb.recordset")
sql1="select * from board where id="&request("id")
rs1.open sql1,conn,1,1
%>
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="edit.js" type="text/javascript"></script>
<LINK href=site.css rel=stylesheet>
<title><%=copyright%><%=version%> <%=ver%> - 修改公告</title>
<script language="javascript">
<!--
function checkdata()
{
if (document.form1.title.value=="")
{
alert("对不起,请输入公告标题!")
document.form1.title.focus()
return false
}
if (document.form1.content.value.length==0)
{
alert("对不起,请输入公告内容!")
document.form1.content.focus()
return false
}
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to format text in the text box
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function to add image
function AddImage(){
imagePath = prompt('请输入图片地址', 'http://');
if ((imagePath != null) && (imagePath != "")){
frames.message.document.execCommand('InsertImage', false, imagePath);
frames.message.focus();
}
frames.message.focus();
}
//Function to clear form
function ResetForm(){
if (window.confirm('确认要清空对话框内容?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
//Function to open pop up window
function openWin(theURL,winName,features) {
window.open(theURL,winName,features);
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
} else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
// -->
</script>
</head>
<body onload="loadform();" topmargin="0"><!--#include file=top.asp-->
<form method="POST" action="boardmodsave.asp?id=<%=request("id")%>" OnSubmit="return checkdata()" onReset="return ResetForm();" name="form1">
<div align="center"><center>
<table border="0" cellspacing="0" width="750" cellpadding="0">
<tr align="center">
<td width="100%">
<table border="1" width="100%" bordercolor="<%=border%>" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr align="center">
<td colspan="2" height="30" class="unnamed2" valign="middle" bgcolor="<%=m_top%>" width="760"><b class="unnamed2">
修 改 公 告</b></td>
</tr>
<tr>
<td width="74" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">
公告标题:</td>
<td width="685" bgcolor="#FFFFFF">
<input name="title" value="<%=rs1("title")%>" id=me type="TEXT" size=60 maxlength=20 style="background-color:ffffff;color:000000;border: 1 double" onMouseOver="window.status='在这里输入要添加的公告标题,必填';return true;" onMouseOut="window.status='';return true;" title='在这里输入要添加的公告标题,必填'> <font color="#FF0000">*</font>最多20个中文或20个英文</td>
</tr>
<tr>
<td width="74" align="right" valign="top" class="unnamed2" bgcolor="#FFFFFF">
公告内容:<br><font color="#FF0000">*</font> </td>
<td width="685" bgcolor="#FFFFFF"> <select name="selectFont" onChange="FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);document.form1.selectFont.options[0].selected = true;" style="font-family: 宋体; font-size: 9pt" onMouseOver="window.status='选择选定文字的字体。';return true;" onMouseOut="window.status='';return true;">
<option selected>选择字体</option>
<option value="宋体">宋体</option>
<option value="楷体_GB2312">楷体</option>
<option value="新宋体">新宋体</option>
<option value="黑体">黑体</option>
<option value="隶书">隶书</option>
<option value="幼圆">幼圆</option>
<OPTION value="Andale Mono">Andale Mono</OPTION>
<OPTION value=Arial>Arial</OPTION>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -