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

📄 edit.asp

📁 一个bbs的代码
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="conn.asp" -->
<%
if session("a")<>"1" then
response.redirect "erro.asp?erro=2"
response.end
end if
%>
<!--#INCLUDE FILE="copyright.asp" -->

<%
Set rs2 = Server.CreateObject("ADODB.Recordset")
sql2 ="SELECT * From config Order By id DESC"
RS2.open sql2,Conn,3,3
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql ="SELECT * From book where id="&request("id")
RS.open sql,Conn,1,1
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>

helpstat = false;
stprompt = false;
basic = true;

function thelp(swtch){
	if (swtch == 1){
		basic = false;
		stprompt = false;
		helpstat = true;
	} else if (swtch == 0) {
		helpstat = false;
		stprompt = false;
		basic = true;
	} else if (swtch == 2) {
		helpstat = false;
		basic = false;
		stprompt = true;
	}
}

function AddText(NewCode) {
document.note.note.value+=NewCode
}

function email() {
	if (helpstat) {
		alert("email标签将把一个email地址转换为一个超级链接。\n\n用法1:[url]windstudio\@etang.com[/url] \n用法2:[url=\"windstudio\@etang.com\"]写邮件给我[/url]");
		}
	else if (basic) {
		AddTxt="[url][/url]";
		AddText(AddTxt);
		}
	else { 
		txt2=prompt("链接所显示的文字:(如果你想直接显示链接地址请留空)",""); 
		if (txt2!=null) {
			txt=prompt("链接的地址:","mailto:");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="[url]"+txt+"[/url]";
					AddText(AddTxt);
				} else {
					AddTxt="[url=\""+txt+"\"]"+txt2+"[/url]";
					AddText(AddTxt);
				}         
			} 
		}
	}
}

function bold() {
	if (helpstat) {
		alert("这个是粗体文字的标签。\n\n用法:[b]这里是粗体文字[/b]");
	} else if (basic) {
		AddTxt="[b][/b]";
		AddText(AddTxt);
	} else {  
		txt=prompt("请输入变成粗体的文字:","文字");     
		if (txt!=null) {           
			AddTxt="[b]"+txt+"[/b]";
			AddText(AddTxt);
		}       
	}
}

function italicize() {
	if (helpstat) {
		alert("写体标签可以设置斜体文字。\n\n用法:[i]这是斜体的文字[/i]");
	} else if (basic) {
		AddTxt="[i][/i]";
		AddText(AddTxt);
	} else {   
		txt=prompt("请输入要变成斜体的文字:","文字");     
		if (txt!=null) {           
			AddTxt="[i]"+txt+"[/i]";
			AddText(AddTxt);
		}	        
	}
}

function showcolor(color) {
	if (helpstat) {
		alert("设置文本的颜色,所有的颜色名称都可以使用。\n\n用法:["+color+"]这是"+color+"色的文字[/"+color+"]");
	} else if (basic) {
		AddTxt="["+color+"][/"+color+"]";
		AddText(AddTxt);
	} else {  
     	txt=prompt("文字颜色:"+color,"文字");
		if(txt!=null) {
			AddTxt="["+color+"]"+txt+"[/"+color+"]";
			AddText(AddTxt);        
		} 
	}
}

function hyperlink() {
	if (helpstat) {
		alert("超级链接:把一个网址变成超级链接。\n\n用法1:[url]http://www.windstudio.net[/url]\n\n用法2:[url=http://www.windstudio.net]欢迎访问我的网站[/url]");
	} else if (basic) {
		AddTxt="[url][/url]";
		AddText(AddTxt);
	} else { 
		txt2=prompt("链接所显示的文字:(如果你想直接显示链接请不要填写任何文字)",""); 
		if (txt2!=null) {
			txt=prompt("链接的地址:","http://");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="[url]"+txt+"[/url]";
					AddText(AddTxt);
				} else {
					AddTxt="[url=\""+txt+"\"]"+txt2+"[/url]";
					AddText(AddTxt);
				}         
			} 
		}
	}
}

function image() {
	if (helpstat){
		alert("在帖子里面加入一个图片。\n\n用法:[img]http://www.windstudio.net/bbs//images/logo.gif[/img]");
	} else if (basic) {
		AddTxt="[img][/img]";
		AddText(AddTxt);
	} else {  
		txt=prompt("图片的地址:","http://");    
		if(txt!=null) {            
			AddTxt="[img]"+txt+"[/img]";
			AddText(AddTxt);
		}	
	}
}

function showcode() {
	if (helpstat) {
		alert("你可以把代码按照原来的格式引用到帖子里面来,\n主要用来发表程序代码。\n\n用法:[code]这里是代码[/code]");
	} else if (basic) {
		AddTxt=" [code][/code]";
		AddText(AddTxt);
	} else {   
		txt=prompt("请输入你要插入的代码:","");     
		if (txt!=null) {          
			AddTxt="[code]"+txt+"[/code]";
			AddText(AddTxt);
		}	       
	}
}

function underline() {
  	if (helpstat) {
		alert("给文字添加下划线。\n\n用法:[u]这是带下划线的文字[/u]");
	} else if (basic) {
		AddTxt="[u][/u]";
		AddText(AddTxt);
	} else {  
		txt=prompt("请输入需要加下划线的文字:","文字");     
		if (txt!=null) {           
			AddTxt="[u]"+txt+"[/u]";
			AddText(AddTxt);
		}	        
	}
}

function OpenPreview()
{
	var curCookie = "strnotePreview=" + escape(document.note.note.value);
	    curCookie.key2 = document.note.note.value
	document.cookie = curCookie;
	popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=750,height=450')	
}

function setsmiley(what) 
{ 
document.note.note.value = document.note.note.value+""+what; 
document.note.note.focus(); 
} 
//-->
</SCRIPT>

<title><%=rs2("title")%>-修改贴子</title>
</head>
<%top%>
<br>
<body>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="93">
  <tr>
    <td width="100%" height="93">
    <form method="POST" action="saveedit.asp?id=<%=request("id")%>" name="note">
      <div align="center">
        <center>
      <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="70%" id="AutoNumber2" height="121">
        <tr>
          <td width="12%" height="15" bgcolor="#F6F6F6" align="center">标题:</td>
          <td width="88%" height="15" colspan="3">
          <input type="text" name="subject" size="54" style="border:1px solid #99CC00; " value="<%=rs("subject")%>"> </td>
        </tr>
        <tr>
          <td width="12%" height="17" bgcolor="#F6F6F6" align="center">姓名:</td>
          <td width="36%" height="17">
          <input type="text" name="name" size="20" style="border:1px solid #99CC00;" value="<%=rs("n")%>"> </td>
          <td width="9%" height="17" bgcolor="#F6F6F6">
          <p align="center">来自:</td>
          <td width="43%" height="17">
          <input type="text" name="from" size="20" style="border:1px solid #99CC00; " value="<%=rs("f")%>"></td>
        </tr>
        <tr>
          <td width="12%" height="17" bgcolor="#F6F6F6" align="center">信箱:</td>
          <td width="36%" height="17">
          <input type="text" name="email" size="20" style="border:1px solid #99CC00; " value="<%=rs("e")%>"></td>
          <td width="9%" height="17" bgcolor="#F6F6F6">
          <p align="center">主页:</td>
          <td width="43%" height="17">
          <input type="text" name="homepage" size="20" style="border:1px solid #99CC00; " value="<%=rs("h")%>"></td>
        </tr>
        <tr>
          <td width="12%" height="16" bgcolor="#F6F6F6" align="center">OICQ:</td>
          <td width="36%" height="16">
          <input type="text" name="oicq" size="20" style="border:1px solid #99CC00; " value="<%=rs("q")%>"></td>
          <td width="52%" height="16" colspan="2">
          <p align="left"><%if rs("board")="1" then%>人气/回复:<input type="text" name="hits" size="2" value="<%=rs("hits")%>" style="border: 1px solid #99CC00">
          <input type="text" name="retimes" size="2" value="<%=rs("retimes")%>" style="border: 1px solid #99CC00"><%end if%></td>
        </tr>
        <tr>
          <td width="12%" height="27" bgcolor="#F6F6F6" align="center">头像:</td>
          <td width="88%" height="27" colspan="3">
          <input type="radio" value="b" name="sex" <%if rs("s")="b" then%>checked<%end if%>><img border="0" src="img/b.gif"><input type="radio" value="g" name="sex" <%if rs("s")="g" then%>checked<%end if%>><img border="0" src="img/g.gif" width="32" height="32"><input type="radio" value="b3" name="sex" <%if rs("s")="b3" then%>checked<%end if%>><img border="0" src="img/b3.gif"><input type="radio" value="g2" name="sex" <%if rs("s")="g2" then%>checked<%end if%>><img border="0" src="img/g2.gif"><input type="radio" value="b2" name="sex" <%if rs("s")="b2" then%>checked<%end if%>><img border="0" src="img/b2.gif"><input type="radio" value="g3" name="sex" <%if rs("s")="g3" then%>checked<%end if%>><img border="0" src="img/g3.gif"></td>
        </tr>
        <tr>
          <td width="12%" height="14" bgcolor="#F6F6F6" align="center"> </td>
          <td width="88%" height="14" colspan="3">
<%ubb%>          </td>
        </tr>
        <tr>
          <td width="12%" height="71" bgcolor="#F6F6F6" align="center">内容:</td>
          <td width="88%" height="71" colspan="3">
          <textarea rows="14" name="note" cols="65" style="border:1px solid #99CC00; "><%=rs("note")%></textarea></td>
        </tr>
        <tr>
          <td width="12%" height="15" bgcolor="#F6F6F6" align="center">Ubb:</td>
          <td width="88%" height="15" colspan="3">
          <%face%></td>
        </tr>
      </table>
      
        </center>
      </div>
      <p align="center">
      
      <input type="submit" value="修改" name="B1" style="border-style: solid; border-width: 1; background-color: #F6F6F6"> 
      <input type="reset" value="清除" name="B2" style="border-style: solid; border-width: 1; background-color: #F6F6F6">
      </p>
    </form>
    </td>
  </tr>
</table>

</body>
<br>
<%copyright%></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -