⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminedit2.asp

📁 一个不错的企业网站源代码!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
				<%else%>
					<input type="checkbox" name="c2">
		<%end if%>
		<%if ppid=6 then%>
		         新品推荐
		     <%else%>   
				 在前台显示该时间
	    <%end if%>			 
		<%end if%>	
		<%end if%>
			)</td>
		</td></tr>
	<tr><td width=80 align=right>序号:</td><td><input type="text" value="<%=pl%>" name="t1" maxlength=60 size=10></td></tr>
	<tr><td width=80 align=right><%=txtname%>:</td>
		<td><input type="text" value="<%=title%>" name=title maxlength=60 size=35><font color=red>*</font></td></tr>
<%if ppid<>5 then%>	
	<%if modeflag=1 and ppid<>6 then%>
	<tr><td width=80 align=right>副标题:</td>
		<td><input type="text" value="<%=name2%>" name=name2 maxlength=60 size=45></td></tr>
	<%end if%>	
	<%if ppid=6 then%>
	<tr><td width=80 align=right>搜索关键字:</td>
		<td><input type="text" value="<%=keyword%>" name=keyword maxlength=60 size=25></td></tr>
	<%end if%>
	<tr><td width=80 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 modeflag=1 and ppid<>6 then%>
		<tr><td align=right>		
		插入图片:</td><td>		
		<select name=pic style="width:180px">
			<%
			if englishflag=0 then
					sqltext="select id,name,picname from danweipic where picflag=1 and enable=1 and pid="&id&" and ppid="&pid&" and pppid="&ppid&" order by pl desc"
				else	
					sqltext="select id,name,picname from edanweipic where picflag=1 and enable=1 and pid="&id&" and ppid="&pid&" and pppid="&ppid&" order by pl desc"
			end if					
			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%>	
	<%if ppid=6 then
	         ro=4
	      else
	         ro=15
	  end if%>
	<tr><td width=80 align=right><%=txtname1%>:</td>
		<td><textarea rows=<%=ro%> cols=70 name=content style="font-family:宋体" ><%=body%></textarea></td>
	</tr>
	<%if ppid=6 then%>
	<tr><td width=80 align=right><%=txtname2%>:</td>
		<td><textarea rows=15 cols=70 name=content1 style="font-family:宋体" ><%=body1%></textarea></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="submit" name="button1" value="确认提交">&nbsp;&nbsp;&nbsp;&nbsp;
		<%if ppid<>5 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>
</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="&nbsp;";
				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=../upfile/"+newvalue+"></td></tr></table>"}
			else
				{begintxt="<img src=../upfile/"+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>
<%
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 + -