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

📄 modi.asp

📁 树型ASP论坛下载
💻 ASP
字号:
<%'url="writebbs.asp"%>
<% if session("level")="" then%>
  <script language="javascript"> 
  alert("超时了,请重新登录!");
  document.location.href="index.asp"
  //history.go(-1);
  </script> 
<%end if%>
<% if session("level")<>"3" then%>
  <script language="javascript"> 
  alert("你不是管理员,请退出去!");
  document.location.href="/index.asp"
  //history.go(-1);
  </script> 
<%end if%>
<html>
<head>
<title></title>
<link rel="stylesheet" href="file:///E|/&#32593;&#31449;&#25991;&#20214;/cenda.css" type="text/css">
<script>
<!--
function validata_form() {
validity=true;

 if (!check_empty(document.form1.subject.value))
{ validity=false;
 alert('填上标题吧');
document.form1.subject.focus();
 return validity; } 
 
 if (!check_empty(document.form1.content.value))
{ validity=false;
 alert('填上你要写的内容吧');
document.form1.content.focus();
 return validity; }

function check_empty(text) {
return (text.length > 0); // returns false if empty
}
}

//-->
</script>

<script language="Javascript">
function showpage(url){
window.open(url,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=350,height=400,left=50,top=20');
return false;
branch.focus();
}
</script>
<script>
function smilieopen() {var MainWindow = window.open ('smilies.htm',"_blank","toolbar=no,location=no,menubar=no,scrollbars=yes,width=400,height=400,resizeable=yes,status=no");}
function viewubb() {msg=window.open("ubbcode.htm","","height=500,width=500,left=5,top=5,scrollbars=yes,toolbar=no,directories=no,status=no,menubar=no,resizable=yes");}
function afp() {msg=window.open("afp.htm","","height=310,width=420,left=5,top=5,scrollbars=no,toolbar=no,directories=no,status=no,menubar=no,resizable=yes");}
helpstat = false;
stprompt = true;
basic = false;
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.form1.content.value+=NewCode
}
function yemail() {
if (helpstat) {
alert("Email标签\n将一个Email地址转换成Email链接。\n用法一:[email]someone@anywhere.com[/email]\n用法二:[email=someone@anywhere.com]Email链接信息[/email]");
} else if (basic) {
AddTxt="[email][/email]";
AddText(AddTxt);
} else { 
txt2=prompt("输入在Email链接中想要显示的信息,如:David的Email\n您若希望直接显示Email地址,就空着不要填写,然后点确定按钮!",""); 
if (txt2!=null) {
txt=prompt("请输入Email地址.","name@domain.com");
if (txt!=null) {
if (txt2=="") {
AddTxt="[email]"+txt+"[/email]";
} else {
AddTxt="[email="+txt+"]"+txt2;
AddText(AddTxt);
AddTxt="[/email]";
} 
AddText(AddTxt);
}
}
}
}
function ybold() {
if (helpstat) {
alert("粗体标签\n将文本字体加粗显示\n用法: [b]需要加粗显示的文本[/b]");
} else if (basic) {
AddTxt="[b][/b]";
AddText(AddTxt);
} else {
txt=prompt("加粗显示","输入想要加粗显示的文本");
if (txt!=null) {
AddTxt="[b]"+txt;
AddText(AddTxt);
AddTxt="[/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;
AddText(AddTxt);
AddTxt="[/i]";
AddText(AddTxt);
}
}
}
function hyperlink() {
if (helpstat) {
alert("超级链接标签\n将网址转换为超级链接。\n用法一: [url]http://www.www.com[/url]\n用法二: [url=http://www.anywhere.com]超级链接信息[/url]");
} else if (basic) {
AddTxt="[url][/url]";
AddText(AddTxt);
} else {
txt2=prompt("需显示的超级链接信息。\n您若希望直接显示网址,就空着不要填写,然后按确定按钮!",""); 
if (txt2!=null) {
txt=prompt("请输入超级链接的网址.","输入HTTP或者FTP地址");
if (txt!=null) {
if (txt2=="") {
AddTxt="[url]"+txt+"[/url]";
AddText(AddTxt);
} else {
AddTxt="[url="+txt+"]"+txt2;
AddText(AddTxt);
AddTxt="[/url]";
AddText(AddTxt);
}
}
}
}
}
function image() {
if (helpstat){
alert("图片标签\n在帖子中插入一个图片。\n用法: [img]http:\www.www.com\image.gif[/img]");
} else if (basic) {
AddTxt="[img][/img]";
AddText(AddTxt);
} else {
txt=prompt("请输入图片链接的网址","http://");    
if(txt!=null) {
AddTxt="\r[img]"+txt;
AddText(AddTxt);
AddTxt="[/img]";
AddText(AddTxt);
}
}
}
function setfly() {
if (helpstat){
alert("飞翔标记\n使文字飞行.\n用法:  [FLY]飞翔文字[/FLY]");
} else if (basic) {
AddTxt="[FLY][/fly]";
AddText(AddTxt);
} else {
txt=prompt("飞翔文字","请在这里输入你要的飞翔文字");
if (txt!=null) {
AddTxt="\r[fly]"+txt;
AddText(AddTxt);
AddTxt="[/fly]";
AddText(AddTxt);
}
}
}
function move() {
if (helpstat){
alert("飞翔标记\n使文字飞行.\n用法:  [MOVE]移动文字[/MOVE]");
} else if (basic) {
AddTxt="[move][/move]";
AddText(AddTxt);
} else {
txt=prompt("移动文字","请在这里输入你要的移动文字");
if (txt!=null) {
AddTxt="\r[move]"+txt;
AddText(AddTxt);
AddTxt="[/move]";
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;
AddText(AddTxt);
AddTxt="[/u]";
AddText(AddTxt);
}
}
}
function ytext() {
var txt  = prompt("设置文字的背景色和颜色.用法: [SPAN=背景色, 颜色]要产生效果的文字[/SPAN]\n输入要设置的文字", "效果文字");
var bcol   = prompt("设置文字的背景色和颜色.用法: [SPAN=背景色, 颜色]要产生效果的文字[/SPAN]\n请先设置背景色", "Yellow");
var col   = prompt("设置文字的背景色和颜色.用法: [SPAN=背景色, 颜色]要产生效果的文字[/SPAN]\n请再设置文字的颜色", "red");
AddTxt = "[span="+bcol+","+col+"]"+txt
AddText(AddTxt);
AddTxt="[/span]";
AddText(AddTxt);
}
function yglow() {
var FoundErrors = '';
var enterURL   = prompt("使文字产生光晕效果.用法: [GLOW=宽度, 颜色, 边界]要产生光晕效果的文字[/GLOW]", "光晕文字");
var enterCOL   = prompt("使文字产生光晕效果.用法: [GLOW=宽度, 颜色, 边界]要产生光晕效果的文字[/GLOW]", "100,red,2");
if (!enterURL||!enterCOL)    {
FoundErrors += "\n" + "您必须输入各项参数!";
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
AddTxt = "[glow="+enterCOL+"]"+enterURL
AddText(AddTxt);
AddTxt="[/glow]";
AddText(AddTxt);
}

</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center"> 
  <table width="778" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td align="center">&nbsp;</td>
    </tr>
    <tr>
      <td>
        <!--#include file="opendb.asp" -->
        <%sql="select * from yfindex where indexid="&Request("indexid")&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3%>
        <form method="post" action="modi_write1.asp" name="form1" onSubmit="return validata_form()">
          <table width="75%" border="0" align="center">
            <tr bgcolor="#D0F0C8"> 
              <td class="px14" bgcolor="#BCDFFE" align="center" height="18">修改论坛内容</td>
            </tr>
            <tr bgcolor="#D0F0C8"> 
              <td align="center" bgcolor="#E1EFFF"><span class="10t">标 题: 
                <input name="subject" type="text" class="input" value="<%=rs("title")%>" size="60">
                <font color="#FF0000">* </font></span></td>
            </tr>
            <tr> 
              <td bgcolor="#E1EFFF"> <p align="center"><font color="#CCFFFF">
                  <INPUT name="button" type=button class=input title="背景色和颜色" onclick=ytext() value=" A ">
                  <INPUT name="button" type=button class=input title="加粗" onclick=ybold() value=" B ">
                  <INPUT name="button" type=button class=input title="倾斜" onclick=italicize() value=" I ">
                  <INPUT name="button" type=button class=input title="下划线" onclick=underline() value=" U ">
                  <INPUT name="button" type=button class=input title="超链接" onclick=hyperlink() value="链接">
                  <INPUT name="button" type=button class=input title="EMAIL" onclick=yemail() value="邮箱">
                  <INPUT name="button" type=button class=input title="插入图片" onclick=image() value="贴图">
                  <INPUT name="button" type=button class=input title="飞翔文字" onclick=setfly() value="左右飞">
                  <INPUT name="button" type=button class=input title="移动文字" onclick=move() value="向左飞">
                  <INPUT name="button" type=button class=input title="光晕文字" onclick=yglow() value="光晕">
                  <br>
                  <textarea name="content" rows="20" cols="80" class="input"><%=rs("content")%></textarea>
                  </font></p>
                <p align="center"> 
                  <input type="hidden" name="indexid" value="<%=Request("indexid")%>">
                  <input type="hidden" name="page_code" value="<%=Request("page_code")%>">
				  <input type="hidden" name="board" value="<%=Request("board")%>">
				  <input type="hidden" name="suboard" value="<%=Request("suboard")%>">
                  <input type="submit" name="Submit2" value="修改" class="input">
                    
                  <input type="reset" name="Reset" value="恢复" class="input">
                    
                  <input type="button" name="Submit22" value="返回" class="input" onClick="history.go(-1)">
                </p></td>
            </tr>
          </table>
        </form> </td>
    </tr>
  </table>
  
</div>
</body>
</html>

⌨️ 快捷键说明

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