📄 xyadminedit.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=false
Response.Expires=0
%>
<!-- #include file="../links.asp" -->
<!-- #include file="./s.asp" -->
<!-- #include file="../dsn.asp" -->
<%
pid=Request.QueryString("pid")
ppid=Request.QueryString("ppid")
htmlname=linkxy&"?pid="&pid&"&ppid="&ppid
backhtml=linkadmin&"?pid="&pid&"&ppid="&ppid
creadate=now()
set cn=Server.CreateObject("ADODB.Connection")
set rs1=Server.CreateObject("ADODB.Recordset")
cn.Open mycnstr
%>
<%
tabname="bbs_p_classes"
if Request.ServerVariables("REQUEST_METHOD")="POST" then
body=Request.Form("content")
sqltext2="select * from bbs_p_classes where id="&pid
rs1.Open sqltext2,cn,1,2
rs1("body")=body
rs1("creatdate")=creadate
rs1.Update
rs1.Close
editok=1
end if
if pid=-1 then
pic=1
else
pic=0
end if
sqltext="select * from bbs_p_scool where id="&ppid
rs1.Open sqltext,cn,1,1
bbs_p_scoolname=rs1("title")
rs1.Close
sqltext1="select * from bbs_p_classes where id="&pid
rs1.Open sqltext1,cn,1,1
classname=rs1("title")
creadate=rs1("creatdate")
body=rs1("body")
if pic=1 then
picflag=rs1("picflag1")
picname=rs1("picname1")
else
picflag=rs1("picflag")
picname=rs1("picname")
end if
rs1.Close
if pid=11 or pid=12 then
readme=classname&"将不允许用户注册包含以下字符的内容,请您将要过滤的字符串添入<br>如果有多个字符串,请用“|”分隔开,例如:quest,发轮功"
end if
%>
<html>
<head>
<title>基本资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size: 12px; color: #000000; font-family: 宋体}
td {font-size: 12px; color: #000000; font-family: 宋体;}
.t1 {font:12px 宋体;color=000000}
.t2 {font:12px 宋体;color:ffffff}
.t5 {font:12px 宋体;color:ff6600}
.bt1 {font:14px 宋体;color=000000}
.bt2 {font:14px 宋体;color:ffffff}
A:link {color: #000066}
A:visited {color: #000066}
A:hover {color: #ff0000}
A.r1:link {font-size:12px;text-decoration:underline;color:#000000;}
A.r1:visited {font-size:12px;text-decoration:underline;color:#000000;}
A.r1:hover {font-size:12px;text-decoration:underline;color:#ff6600;}
A.r2:link {font-size:12px;text-decoration:underline;color:#ffffff;}
A.r2:visited {font-size:12px;text-decoration:underline;color:#ffffff;}
A.r2:hover {font-size:12px;text-decoration:underline;color:#ff6600;}
-->
</style>
</head>
<body bgcolor=#ffffff topmargin=10>
<form action="<%=htmlname%>" method=post name=editform>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td>
<font class=t5>当前位置:<%=bbs_p_scoolname%>→ <%=classname%></font>
</td>
</td></tr>
<tr><td><hr size=1></td></tr>
<tr bgcolor="666690"><td height=20><font class=t2>具体内容<%if editok=1 then Response.Write (" <font color=ffff99>(提交成功)</font>")%></font><br>
</td></tr>
<tr><td height=5></td></tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr><td width=70 align=right> 更新时间:</td><td align=left><font color=000000><%=creadate%></font></td></tr>
<tr><td> </td></tr>
<tr><td width=70 align=right></td>
<td>
<img src="images\bold.gif" onclick="format('bold')" style="cursor:hand;" title="粗体">
<img src="images\italicize.gif" onclick="format('italic')" style="cursor:hand;" title="斜体">
<img src="images\underline.gif" onclick="format('underline')" style="cursor:hand;" title="下划线">
<img src="images\center.gif" onclick="format('center')" style="cursor:hand;" title="居中">
<img src="images\space.gif" onclick="format('space')" style="cursor:hand;" title="空格">
<img src="images\url1.gif" onclick="formaturl('url')" style="cursor:hand;" title="超级链接">
<select name=font style="width:120px" onchange="formatfont(this.options[this.selectedIndex].value)">
<option value="宋体" selected>宋体
<option value="楷体_gb2312">楷体GB2312
<option value="黑体">黑体
<option value="隶书">隶书
<option value="Arial">Arial
<option value="Arial Black">Arial Black
<option value="Impact">Impact
<option value="Tahoma">Tahoma
<option value="Times New Roman">Times New Roman
<option value="Verdana">Verdana
</select>
<select name=fontsize style="width:50px" onchange="formatsize(this.options[this.selectedIndex].value)">
<option value="6" >一号
<option value="5">二号
<option value="4">三号
<option value="3">四号
<option value="2"selected>五号
</select>
<select name=color style="width:70px" onchange="formatcolor(this.options[this.selectedIndex].value)">
<option style="background-color:black;color=black" value="black">黑色
<option style="background-color:red;color=red" value="red">红色
<option style="background-color:blue;color=blue" value="blue">蓝色
<option style="background-color:green;color=green" value="green">绿色
<option style="background-color:aqua;color=aqua" value="aqua">浅绿色
<option style="background-color:fuchsia;color=fuchsia" value="fuchsia">紫红色
<option style="background-color:gray;color=gray" value="gray" selected>灰色
<option style="background-color:maroon;color=maroon" value="maroon">粟色
<option style="background-color:navy;color=navy" value="navy">深蓝色
<option style="background-color:olive;color=olive" value="olive">橄榄色
<option style="background-color:purple;color=purple" value="purple">紫色
<option style="background-color:teal;color=teal" value="teal">茶色
<option style="background-color:yellow;color=yellow" value="yellow">黄色
</select>
</td></tr>
<tr>
<tr>
<table>
<td width=70 align=right>内容</td>
<td><textarea rows=15 cols=60 name=content style="font-family:宋体" ><%=body%></textarea></td>
<td width=20> </td>
<td valign=top>
<%if pid=-1 then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td width=60></td><td height=10></td></tr>
<tr>
<td width=60></td>
<td align=center>
<%if picflag=1 then%>
<img src="../upfile/<%=picname%>" border="0"><br><br>
<a href="Javascript:editfile('<%=pid%>','<%=pic%>','bbs_p_classes')">上传图片</a>
<%else%>
<a href="Javascript:editfile('<%=pid%>','<%=pic%>','bbs_p_classes')">点击此处上传图片</a>
<%end if%>
</td>
</tr>
</table>
<%end if%>
</table>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td width=80></td><td height=10></td></tr>
<tr>
<td></td>
<td align=left>
<input type="submit" name="submit" value="确认提交">
</td></tr>
</table>
<%if readme<>"" then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr HEIGHT=10><td width=80></td><td> </td></tr>
<tr><td> </td><td><font color=red>注:<%=readme%></td>
</tr>
</table>
<%end if%>
</form>
<form name=preview method=post action="content_view.asp" target=winview>
<input type=hidden name=viewtitle value=""><input type=hidden name=viewbody value="">
</form>
</body>
</html>
<script language=Javascript>
function format(flag)
{
switch(flag){
case "bold":
begintxt="<b>";
endtxt="</b>";
break;
case "italic":
begintxt="<i>";
endtxt="</i>";
break;
case "underline":
begintxt="<u>";
endtxt="</u>";
break;
case "center":
begintxt="<center>";
endtxt="</center>";
break;
case "space":
begintxt=" ";
endtxt="";
break;
}
dealcontent()
}
function formatcolor(newvalue)
{
begintxt="<font color="+newvalue+">"
endtxt="</font>";
dealcontent()
}
function formatfont(newvalue)
{
begintxt="<font face="+newvalue+">"
endtxt="</font>";
dealcontent()
}
function formatsize(newvalue)
{
begintxt="<font size="+newvalue+">"
endtxt="</font>";
dealcontent()
}
function formaturl(newvalue)
{
var urladd=window.prompt ("请在输入链接地址!","http://")
begintxt="<a href="+urladd+">"
endtxt="</a>";
dealcontent()
}
function dealcontent()
{
if ((document.selection)&&(document.selection.type == "Text"))
{
var range = document.selection.createRange();
var ch_text=range.text;
range.text = begintxt + ch_text + endtxt;
}
else
{
document.editform.content.value=begintxt+document.editform.content.value+endtxt;
document.editform.content.focus();
}
}
function gopreview()
{
document.preview.viewtitle.value=document.editform.title.value;
document.preview.viewbody.value=document.editform.content.value;
window.open('content_view.asp', 'winview', 'scrollbars=yes,width=500,height=400');
document.preview.submit()
}
function editfile(keyno,pic,tablename)
{
var str
str="../admin/file_upload.asp?" ;
str=str+"keyno="+keyno+"&pic="+pic+"&tablename="+tablename
window.open(str,"mywin","toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,scrollbars=yes,width=550,height=400,left=120,top=70")
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -