📄 adminedit.asp
字号:
<tr><td width=90 align=right>排版模式:</td>
<td><input type=radio name=rr1 value="0" <%if flag=0 then Response.Write ("checked")%>>简单模式 <input type=radio name=rr1 value="1" <%if flag=1 then Response.Write ("checked")%>>图文混排 </td>
</tr>
<%end if%>
<%if pid=7 or pid=5 then%>
<tr><td width=90 align=right>地址:</td>
<td><input type="text" value="<%=address%>" name=address maxlength=60 size=55></td></tr>
<tr><td width=90 align=right>电话:</td>
<td><input type="text" value="<%=tel%>" name=tel maxlength=60 size=25></td></tr>
<%end if%>
<%if pid=5 then%>
<tr><td width=90 align=right>传真:</td>
<td><input type="text" value="<%=fax%>" name=fax maxlength=60 size=25></td></tr>
<tr><td width=90 align=right>E_mail:</td>
<td><input type="text" value="<%=email%>" name=email maxlength=60 size=35></td></tr>
<%end if%>
<%if pid=6 then%>
<tr><td width=90 align=right valign=top>生产企业:</td>
<td> <%
if englishflag=0 then
sqltext="select id,name from danwei where enable=1 and pid=5 order by pl"
else
sqltext="select id,name from edanwei where enable=1 and pid=5 order by pl"
end if
rs1.Open sqltext,cn,1,1
i=0
do while not rs1.EOF %>
<%if i mod 3 =0 and i<>0 then Response.Write ("<br>")%>
<input type=radio name=rr99 value=<%=rs1("id")%> <%if rs1("id")=fileflag then Response.Write (" checked")%>><%=trim(rs1("name"))%>
<%rs1.MoveNext
i=i+1
loop
rs1.Close %>
</td></tr>
<%end if%>
<%if pid<>2 and pid<>6 and pid<>7 and pid<>16 then%>
<%if pid<>4 then%>
<tr><td width=90 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:80px" 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>
<%if pid<>3 and pid<>17 then%>
<tr><td align=right>
插入图片:</td><td>
<select name=pic style="width:180px">
<%sqltext="select id,name,picname from "+tabnamepic+" where picflag=1 and enable=1 and pid="&id&" and ppid="&pid&" and pppid="&ppid&" order by pl desc"
Response.Write sqltext
rs1.Open sqltext,cn,1,1%>
<option value="0">
<%do while not rs1.EOF%>
<option value="<%=rs1("picname")%>"><%=rs1("name")%>
<%rs1.MoveNext
loop
rs1.Close
%>
</select>
<select name=picwz style="width:80px" onchange="formatpic(document.editform.picwz.options[document.editform.picwz.selectedIndex].value,document.editform.pic.options[document.editform.pic.selectedIndex].value)">
<option value="">
<option value="left">居左
<option value="center">居中
<option value="right">居右
</select>
</td></tr>
<%end if%>
<tr><td width=90 align=right><%=txtname1%>:</td>
<td><textarea rows=15 cols=70 name=content style="font-family:宋体"><%=body%></textarea></td>
</tr>
<%if pid=5 then%>
<tr><td width=90 align=right>领导简介:</td>
<td><textarea rows=15 cols=70 name=content1 style="font-family:宋体"><%=body1%></textarea></td>
</tr>
<%end if%>
<%else%>
<tr><td width=90 align=right>窗口尺寸:</td>
<td><input type="text" value="<%=yhj%>" name=yhj maxlength=20 size=10>像素(长)<input type="text" value="<%=thj%>" name=thj maxlength=20 size=10>像素(宽)</td>
</tr>
<%end if
end if
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td width=200></td><td height=10></td></tr>
<tr>
<td width=200></td>
<td align=left>
<input type="button" name="button1" value="确认提交" onclick="check1()">
<%if pid<>2 and pid<>4 and pid<>6 and pid<>7 and pid<>16 then%>
<input type=button value='内容预览' name=Button onclick=gopreview() style="">
<%end if%>
</td></tr>
<tr><td width=200></td><td height=10></td></tr>
</table>
</form>
<form name=preview method=post action="<%=linkbodyview%>" target=winview>
<input type=hidden name=viewtitle value=""><input type=hidden name=viewbody value="">
</form>
<form name=instpic method=post action="ow.asp" target=mywin>
<input type=hidden name=instbody value="">
</form>
<form name=instpic method=post action="ow.asp" target=mywin>
<input type=hidden name=picwz value="left">
</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 formatpic(dl,newvalue)
{
if(dl!="")
{
if(newvalue!=0)
{
if(dl=="center")
{begintxt="<table width=100% border=0 cellspacing=0 cellpadding=0 align=center><tr><td align=center><img src=<%=url%>"+newvalue+"></td></tr></table>"}
else
{begintxt="<img src=<%=url%>"+newvalue+" align="+dl+">"}
endtxt="";
dealcontent()
}
else
{alert("你没有选择要插入的图片,不能插入!");}
}
}
function formaturl(newvalue)
{
var urladd=window.prompt ("请在输入链接地址!","http://")
begintxt="<a href="+urladd+">"
endtxt="</a>";
dealcontent()
}
function formatfont(newvalue)
{
begintxt="<font face="+newvalue+">"
endtxt="</font>";
dealcontent()
}
function formatsize(newvalue)
{
begintxt="<font size="+newvalue+">"
endtxt="</font>";
dealcontent()
}
function dealcontent()
{
//alert(document.editform.content.select);
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('<%=linkbodyview%>', 'winview', 'scrollbars=yes,width=500,height=400');
document.preview.submit()
}
function editimage(keyno,pic)
{
var str
str="upload.asp";
str=str+"?id="+keyno+"&tablename=<%=tabname%>"+"&pic="+pic
window.open(str,"mywin","toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,scrollbars=auto,width=420,height=400,left=120,top=70")
}
</script>
<script language=vbscript>
sub check1()
dim form1
set form1=document.editform
if form1("title").value="" then
alert("<%=txtname%>不能为空!")
form1.title.focus
else
form1.submit
end if
end sub
</script>
<%
function checkstring(str)
if str<>"" then
a=instr(str,"http://")
if a<>1 then
checkstring="http://"&str
else
checkstring=str
end if
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -