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

📄 admin_guestbook.asp

📁 这是作的一个网站,修改很方便,可以做网站设计.管理登陆:admin.asp 帐号和密码:admin/admin
💻 ASP
📖 第 1 页 / 共 2 页
字号:
    set rs=nothing
    End Sub 
    Sub Edit_web()
    if Request.Form("submit")="修改" then
    Set Rs = Server.CreateObject("ADODB.RecordSet")
    Sql="Select * From Gaobei_Set"
    Rs.Open Sql,Conn,2,3
    rs("title")=Request.Form("webtitle")
    rs("gl")=Request.Form("webggg")
    rs("gbyn")=cint(Request.Form("webyn"))
    rs("webname")=Request.Form("webname")
    rs.update
    rs.close
    set rs=nothing
    response.redirect indexfilename &"?action=Edit_web"
    response.end
    end if
    webyn2=""
    if webyn=1 then
    webyn2="checked"
    end if
%>
<table width="600" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC" >
<form name="reply" method="post" action="<%=indexfilename%>">    
<tr> 
<td height="23" colspan="2" align="center" bgcolor="#EAEAEA"> 编辑留言板属性</td>
    </tr>
<tr align="center" bgcolor="#FFFFFF"> 
<td align="right">词语过滤:</td>
<td align="left"> 
<input name="webggg" type="text" id="webggg" value="<%=webgl%>" size="45">
      </td>
    </tr>
<tr align="center" bgcolor="#FFFFFF"> 
<td align="right">经过审批才显示留言:</td>
<td align="left">
<input name="webyn" type="checkbox" id="webyn" value="<%=webyn2%>"  style="border:0px">
      是</td>
    </tr>
<tr align="center"> 
<td height="23" colspan="2" bgcolor="#EAEAEA"> 
<input type="hidden" name="action_e" value="Edit_web">
        <input type="submit" name="Submit" value="修改" id="Submit" class="input1">
  <a href="<%=indexfilename%>?action=View_Words">返回</a></td>
    </tr>
  </form>
</table>
<% End Sub %>
<% sub ubb_jd100()%>
<script language="JavaScript">
    //UBB
    function Cbold() {
    fontbegin="[B]";
    fontend="[/B]";
    fontchuli();
    }
    function Citalic() {
    fontbegin="[I]";
    fontend="[/I]";
    fontchuli();
    }
    function Cunder() {
    fontbegin="[U]";
    fontend="[/U]";
    fontchuli();
    }
    function Ccenter() {
    fontbegin="[center]";
    fontend="[/center]";
    fontchuli();
    }
    function showsize(size){
    fontbegin="[size="+size+"]";
    fontend="[/size]";
    fontchuli();
    }
    function showcolor(color){
    fontbegin="[color="+color+"]";
    fontend="[/color]";
    fontchuli();
    }
    function fontchuli(){
    if ((document.selection)&&(document.selection.type == "Text")) {
    var range = document.selection.createRange();
    var ch_text=range.text;
    range.text = fontbegin + ch_text + fontend;
    } 
    else {
    document.form1.words.value=fontbegin+document.form1.words.value+fontend;
    document.form1.words.focus();
    }
    }
</script>

	  <img onclick=Cbold() src="Images/UBB/BOLD.GIF" width="23" height="22" alt="粗体" border="0"> 
	  <img onclick=Citalic() src="Images/UBB/italicize.gif" width="23" height="22" alt="斜体" border="0"> 
	  <img onclick=Cunder() src="Images/UBB/underline.gif" width="23" height="22" alt="下划线" border="0"> 
	  <img onclick=Ccenter() src="Images/UBB/CENTER.GIF" width="23" height="22" alt="居中" border="0">	
	 
字体大小
<select name="size" onChange="showsize(this.options[this.selectedIndex].value)">
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected>3</option>
<option value="4">4</option>
</select>                    &nbsp;<font face="宋体" color=#333333>颜色:</font> 
                    <SELECT onchange=showcolor(this.options[this.selectedIndex].value) name=color>
                      <option style="background-color:#000000;color: #000000" value="#000000">#000000</option>
                      <option style="background-color:#FFEBCD;color: #FFEBCD" value="#FFEBCD">#FFEBCD</option>
                      <option style="background-color:#0000FF;color: #0000FF" value="#0000FF">#0000FF</option>
                      <option style="background-color:#8A2BE2;color: #8A2BE2" value="#8A2BE2">#8A2BE2</option>
                      <option style="background-color:#A52A2A;color: #A52A2A" value="#A52A2A">#A52A2A</option>
                      <option style="background-color:#DEB887;color: #DEB887" value="#DEB887">#DEB887</option>
                      <option style="background-color:#5F9EA0;color: #5F9EA0" value="#5F9EA0">#5F9EA0</option>
                      <option style="background-color:#7FFF00;color: #7FFF00" value="#7FFF00">#7FFF00</option>
                      <option style="background-color:#D2691E;color: #D2691E" value="#D2691E">#D2691E</option>
                      <option style="background-color:#FF7F50;color: #FF7F50" value="#FF7F50">#FF7F50</option>
                      <option style="background-color:#6495ED;color: #6495ED" value="#6495ED" selected>#6495ED</option>
                      <option style="background-color:#FFF8DC;color: #FFF8DC" value="#FFF8DC">#FFF8DC</option>
                      <option style="background-color:#DC143C;color: #DC143C" value="#DC143C">#DC143C</option>
                      <option style="background-color:#00FFFF;color: #00FFFF" value="#00FFFF">#00FFFF</option>
                      <option style="background-color:#00008B;color: #00008B" value="#00008B">#00008B</option>
                      <option style="background-color:#008B8B;color: #008B8B" value="#008B8B">#008B8B</option>
                      <option style="background-color:#B8860B;color: #B8860B" value="#B8860B">#B8860B</option>
                      <option style="background-color:#A9A9A9;color: #A9A9A9" value="#A9A9A9">#A9A9A9</option>
                      <option style="background-color:#006400;color: #006400" value="#006400">#006400</option>
</SELECT>
<% end sub %>
<%
    '删除数据
    Sub Delete()
    Conn.Execute("Delete * From words Where id="&Request.QueryString("id"))
    End Sub
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '回复留言添加到数据库
    Sub Reply_Execute()
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	Sql="Select reply From words Where id="&Request.Form("id")
	Rs.Open Sql,Conn,2,3
	Rs("reply") = Server.HTMLEncode(Request.Form("reply"))
	Rs.Update
	Rs.Close
	Set Rs=Nothing
    End Sub
    Sub Edit_Execute()
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	Sql="Select * From words Where id="&Request.Form("id")
	Rs.Open Sql,Conn,2,3
    if cint(Request.Form("replyedit"))=1 then
	Rs("words") = Server.HTMLEncode(Request.Form("reply"))
	end if
	Rs("reply") = Server.HTMLEncode(Request.Form("words"))
	if cint(Request.Form("view"))=1 then
	Rs("view")=1
	else
	Rs("view")=0
	end if
	Rs.Update
	Rs.Close
	Set Rs=Nothing
    End Sub
    Conn.Close
    Set Conn = Nothing
%>
<%
    function unHtml(content)
    unHtml=content
    if content <> "" then
    'unHtml=replace(unHtml,"&","&amp;")
    unHtml=replace(unHtml,"<","&lt;")
    unHtml=replace(unHtml,">","&gt;")
    unHtml=replace(unHtml,chr(34),"&quot;")
    unHtml=replace(unHtml,chr(13),"<br>")
    unHtml=replace(unHtml,chr(32),"&nbsp;") 
    unhtmlgl=split(webgl,"|")
    if IsArray(unhtmlgl) then
    for i=0 to UBound(unhtmlgl)
    unhtml=replace(unhtml,unhtmlgl(i),"***")
    next
    end if
    'unHtml=ubb(unHtml)
    end if
    end function
    function ubb(content)
    ubb=content
    nowtime=now()
    UBB=Convert(ubb,"code")
    UBB=Convert(ubb,"html")
    UBB=Convert(ubb,"url")
    UBB=Convert(ubb,"color")
    UBB=Convert(ubb,"font")
    UBB=Convert(ubb,"size")
    UBB=Convert(ubb,"quote")
    UBB=Convert(ubb,"email")
    UBB=Convert(ubb,"img")
    UBB=Convert(ubb,"swf")
    ubb=convert(ubb,"cen")
    ubb=convert(ubb,"rig")
    ubb=convert(ubb,"lef")
    ubb=convert(ubb,"center")
    UBB=AutoURL(ubb)
    ubb=replace(ubb,"[b]","<b>",1,-1,1)
    ubb=replace(ubb,"[/b]","</b>",1,-1,1)
    ubb=replace(ubb,"[i]","<i>",1,-1,1)
    ubb=replace(ubb,"[/i]","</i>",1,-1,1)
    ubb=replace(ubb,"[u]","<u>",1,-1,1)
    ubb=replace(ubb,"[/u]","</u>",1,-1,1)
    ubb=replace(ubb,"[blue]","<font color='#000099'>",1,-1,1)
    ubb=replace(ubb,"[/blue]","</font>",1,-1,1)
    ubb=replace(ubb,"[red]","<font color='#990000'>",1,-1,1)
    ubb=replace(ubb,"[/red]","</font>",1,-1,1)
    for i=1 to 28
    ubb=replace(ubb,"{:em"&i&"}","<IMG SRC=emot/emotface/em"&i&".gif ></img>",1,6,1)
    ubb=replace(ubb,"{:em"&i&"}","",1,-1,1)
    next
    ubb=replace(ubb,"["&chr(176),"[",1,-1,1)
    ubb=replace(ubb,chr(176)&"]","]",1,-1,1)
    ubb=replace(ubb,"/"&chr(176),"/",1,-1,1)
    'ubb=replace(ubb,"{;em","{:em",1,-1,1)
    end function
    function Convert(ubb,CovT)
    cText=ubb
    startubb=1
    do while Covt="url" or Covt="color" or Covt="font" or Covt="size"
    startubb=instr(startubb,cText,"["&CovT&"=",1)
    if startubb=0 then exit do
    endubb=instr(startubb,cText,"]",1)
    if endubb=0 then exit do
    Lcovt=Covt
    startubb=startubb+len(lCovT)+2
    text=mid(cText,startubb,endubb-startubb)
    codetext=replace(text,"[","["&chr(176),1,-1,1)
    codetext=replace(codetext,"]",chr(176)&"]",1,-1,1)
    'codetext=replace(codetext,"{:em","{;em",1,-1,1)
    codetext=replace(codetext,"/","/"&chr(176),1,-1,1)
    select case CovT
    case "color"
    cText=replace(cText,"[color="&text&"]","<font color='"&text&"'>",1,1,1)
    cText=replace(cText,"[/color]","</font>",1,1,1)
    case "font"
    cText=replace(cText,"[font="&text&"]","<font face='"&text&"'>",1,1,1)
    cText=replace(cText,"[/font]","</font>",1,1,1)
    case "size"
	if IsNumeric(text) then
	if text>6 then text=6
	if text<1 then text=1
	cText=replace(cText,"[size="&text&"]","<font size='"&text&"'>",1,1,1)
	cText=replace(cText,"[/size]","</font>",1,1,1)
	end if
    case "url"
	cText=replace(cText,"[url="&text&"]","<a href='"&codetext&"' target=_blank>",1,1,1)
	cText=replace(cText,"[/url]","</a>",1,1,1)
    case "email"
	cText=replace(cText,"["&CovT&"="&text&"]","<a href=mailto:"&text&">",1,1,1)
	cText=replace(cText,"[/"&CovT&"]","</a>",1,1,1)
    end select
    loop
    startubb=1
    do
    startubb=instr(startubb,cText,"["&CovT&"]",1)
    if startubb=0 then exit do
    endubb=instr(startubb,cText,"[/"&CovT&"]",1)
    if endubb=0 then exit do
    Lcovt=Covt
    startubb=startubb+len(lCovT)+2
    text=mid(cText,startubb,endubb-startubb)
    codetext=replace(text,"[","["&chr(176),1,-1,1)
    codetext=replace(codetext,"]",chr(176)&"]",1,-1,1)
    'codetext=replace(codetext,"{:em","{;em",1,-1,1)
    codetext=replace(codetext,"/","/"&chr(176),1,-1,1)
    select case CovT
    case "center"
    cText=replace(cText,"[center]","<div align='center'>",1,1,1)
    cText=replace(cText,"[/center]","</div>",1,1,1)
    case "url"
    cText=replace(cText,"["&CovT&"]"&text,"<a href='"&codetext&"' target=_blank>"&codetext,1,1,1)
    cText=replace(cText,"<a href='"&codetext&"' target=_blank>"&codetext&"[/"&CovT&"]","<a href="&codetext&" target=_blank>"&codetext&"</a>",1,1,1)
    case "email"
	cText=replace(cText,"["&CovT&"]","<a href=mailto:"&text&">",1,1,1)
	cText=replace(cText,"[/"&CovT&"]","</a>",1,1,1)
    case "html"
	codetext=replace(codetext,"<br>",chr(13),1,-1,1)
	codetext=replace(codetext,"&nbsp;",chr(32),1,-1,1)
	Randomize
	rid="temp"&Int(100000 * Rnd)
	cText=replace(cText,"[html]"&text,"代码片断如下:<TEXTAREA id="&rid&" rows=15 style='width:100%' class='bk'>"&codetext,1,1,1)
	cText=replace(cText,"代码片断如下:<TEXTAREA id="&rid&" rows=15 style='width:100%' class='bk'>"&codetext&"[/html]","代码片断如下:<TEXTAREA id="&rid&" rows=15 style='width:100%' class='bk'>"&codetext&"</TEXTAREA><INPUT onclick=runEx('"&rid&"') type=button value=运行此段代码 name=Button1 class='Tips_bo'> <INPUT onclick=JM_cc('"&rid&"') type=button value=复制到我的剪贴板 name=Button2 class='Tips_bo'>",1,1,1)
    case "img" '一般显示的图片
	cText=replace(cText,"[img]"&text,"<a href="&chr(34)&"about:<img src="&codetext&" border=0>"&chr(34)&" target=_blank><img src="&codetext ,1,1,1 )
	cText=replace(cText,"[/img]"," vspace=2 hspace=2 border=0 alt=::点击图片在新窗口中打开:: onload='javascript:if(this.width>580)this.width=580'></a>",1,1,1)
    
	case "cen" '图片居中
	cText=replace(cText,"[cen]"&text,"<table border='0' align='center' cellpadding='0' cellspacing='0'><tr><td > <a href="&chr(34)&"about:<img src="&codetext&" border=0>"&chr(34)&" target=_blank><img src="&codetext ,1,1,1 )

	cText=replace(cText,"[/cen]"," vspace=2 hspace=2 border=0 alt=::点击图片在新窗口中打开:: onload='javascript:if(this.width>580)this.width=580'></a></td></tr></table>",1,1,1)
	
	case "rig" '图片居右,文字绕排
	cText=replace(cText,"[rig]"&text,"<a href="&chr(34)&"about:<img src="&codetext&" border=0>"&chr(34)&" target=_blank><img src="&codetext ,1,1,1 )
	cText=replace(cText,"[/rig]"," vspace=2 hspace=2 border=0 align='right' alt=::点击图片在新窗口中打开:: onload='javascript:if(this.width>580)this.width=580'></a>",1,1,1)
   
    case "lef" '图片居左,文字绕排
	cText=replace(cText,"[lef]"&text,"<a href="&chr(34)&"about:<img src="&codetext&" border=0>"&chr(34)&" target=_blank><img src="&codetext ,1,1,1 )
	cText=replace(cText,"[/lef]"," vspace=2 hspace=2 border=0 align='left' alt=::点击图片在新窗口中打开:: onload='javascript:if(this.width>580)this.width=580'></a>",1,1,1)

	case "code"
	cText=replace(cText,"[code]"&text,"以下内容为程序代码<hr noshade>"&codetext,1,1,1)
	cText=replace(cText,"以下内容为程序代码<hr noshade>"&codetext&"[/code]","以下内容为程序代码<hr noshade>"&codetext&"<hr noshade>",1,1,1)
    case "quote"
    atext=replace(text,"[cen]","",1,-1,1)
	atext=replace(text,"[/cen]","",1,-1,1)

	atext=replace(text,"[img]","",1,-1,1)
	atext=replace(atext,"[/img]","",1,-1,1)
	atext=replace(atext,"[swf]","",1,-1,1)
	atext=replace(atext,"[/swf]","",1,-1,1)
	atext=replace(atext,"[html]","",1,-1,1)
	atext=replace(atext,"[/html]","",1,-1,1)
        'atext=replace(atext,"{:em","{;em",1,-1,1)
	atext=SplitWords(atext,350)
	atext=replace(atext,chr(32),"&nbsp;",1,-1,1)
	cText=replace(cText,"[quote]"&text,"<blockquote><hr noshade>"&atext,1,1,1)
	cText=replace(cText,"<blockquote><hr noshade>"&atext&"[/quote]","<blockquote><hr noshade>"&atext&"<hr noshade></blockquote>",1,1,1)
    end select
    loop
    Convert=cText
    end function
    function AutoURL(ubb)
    cText=ubb
    startubb=1
    do
    startubb=1
    endubb_a=0
    endubb_b=0
    endubb=0
    startubb=instr(startubb,cText,"http://",1)
    if startubb=0 then exit do
    endubb_b=instr(startubb,cText,"<",1)
    endubb_a=instr(startubb,cText,"&nbsp;",1)
    endubb=endubb_a
    if endubb=0 then
    endubb=endubb_b
    end if
    if endubb_b<endubb and endubb_b>0 then
    endubb=endubb_b
    end if
    if endubb=0 then
    lenc=ctext
    endubb=len(lenc)+1
    end if
    'response.write startubb&","&endubb
    if startubb>endubb then exit do
    text=mid(cText,startubb,endubb-startubb)
    'response.write text
    'codetext=replace(text,"/","/"&chr(176),1,-1,1)
    codetext=text
    'response.write text&","
    urllink="<a href='"&codetext&"' target=_blank>"&codetext&"</a> "
    'response.write urllink
    urllink=replace(urllink,"/","/"&chr(176),1,-1,1)
    cText=replace(cText,text,urllink,1,1,1)
    loop
    AutoURL=cText
    end function
%>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</BODY></HTML>

⌨️ 快捷键说明

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