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

📄 send.asp

📁 完整的九洲问吧。优秀的问答网站。由ASP+Access开发。
💻 ASP
📖 第 1 页 / 共 3 页
字号:
		if (txt!=null) {             
			AddTxt="\r[RM=380,330]"+txt;
			AddText(AddTxt);
			AddTxt="[/RM]";
			AddText(AddTxt);
		}        
	}  
}

function Cmov() {
 	if (basic) {
		AddTxt="\r[QT=380,330][/QT]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("Quick Time 文件的地址","http://");
		if (txt!=null) {             
			AddTxt="\r[QT=380,330]"+txt;
			AddText(AddTxt);
			AddTxt="[/QT]";
			AddText(AddTxt);
		}        
	}  
}

function Code() {
	if (basic) {
		AddTxt="\r[CODE][/CODE]";
		AddText(AddTxt);
	} else {   
		txt=prompt("插入标记的代码","文本");     
		if (txt!=null) {          
			AddTxt="\r[CODE]"+txt;
			AddText(AddTxt);
			AddTxt="[/CODE]";
			AddText(AddTxt);
		}	       
	}
}

function Quote() {
	if (basic) {
		AddTxt="\r[QUOTE][/QUOTE]";
		AddText(AddTxt);
	} else {   
		txt=prompt("插入引用文本","文本");     
		if(txt!=null) {          
			AddTxt="\r[QUOTE]"+txt;
			AddText(AddTxt);
			AddTxt="[/QUOTE]";
			AddText(AddTxt);
		}	        
	}
}

function Sound() {
 	if (basic) {
		AddTxt="\r[SOUND][/SOUND]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("sound 背景音乐文件的地址","http://");
		if (txt!=null) {             
			AddTxt="\r[SOUND]"+txt;
			AddText(AddTxt);
			AddTxt="[/SOUND]";
			AddText(AddTxt);
		}        
	}  
}

</script>
</head>
<body class="bgbdy" topmargin="0">
<center>

<script language=javascript>
 function checkform(obj)
{
gcv();
 if(obj.BoardNlass.value=="" || obj.BoardClass.value==0)
  {
    alert("请选择问题分类");return false;
	}
 if(obj.title.value =="" || obj.title.value.length ==0)
 {
  	alert("请输入问题标题");obj.title.focus();return false;
 }
   var leftChars = getLeftChars(obj.title,50);
   
    if ( leftChars < 0) 
	{   
	  ls_str = "问题字数限定在50个汉字以内,请缩短提问字数";
      alert(ls_str);
      obj.title.focus();
      return false;    
    }
   if(leftChars>92)
   {
	 ls_str = "问题标题不详细,请重新输入";
      alert(ls_str);
      obj.title.focus();
      return false;    
   }
   var content_length = obj.content.value.length;
	 if ( content_length >3000) 
	{   
	  ls_str = "问题补充说明字数限定在3000字节以内,请缩短字数";
      alert(ls_str);
      obj.content.focus();
      return false;    
    }
}
function getLeftChars(varField,limit_len) {
    var i = 0;
    var counter = 0;
    var cap = limit_len*2;    
    var j=0;
   var runtime = (varField.value.length>cap)?(cap+1):varField.value.length;
    for (i = 0; i< runtime; i++) {     
     if (varField.value.charCodeAt(i) > 127 || varField.value.charCodeAt(i) == 94) {
        j=j+2;  
        } 
     else {
        j=j+1
     }   
    }  //结束FOR循环
    //var leftchars = cap - varField.value.length;    
    var leftchars = cap - j;    
    return (leftchars);
}
function  gcv()  
{  
   var  aa  =  document.getElementsByName("ra");  
   for  (var  i=0;  i<aa.length;  i++)  
   {  
         if(aa[i].checked)
         document.ftiwen.cid.value = aa[i].value;
   }  
}  
</script>
<!--#include file=top.asp-->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="25" nowrap><a href="<%=weburl%>"><%=webname%></a> &gt; 提问</td>                                                                                        
  </tr>
</table>
<div id="cDiv"> 
<table border="0" align="right" cellpadding="0" cellspacing="0">
  <tr><td width="220" valign="top" class="padL12">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" >
        <tr> 
          <td nowrap class="bgtle">相关问题</td>
        </tr>
        <tr><td class="bgcntLn"><table width="100%" border="0" cellspacing="0" cellpadding="0" class=zhtable>
<%
if HTMLcode(request("content"))<>"" then
content=HTMLcode(request("content"))
rs.open"select top 10 * from question where title like '%"&content&"%' or content like '%"&content&"%'",conn,1,1
if rs.eof then
else
while not rs.eof
i=i+1
%>
<tr><td width="25" align=center class="ln28pl4"><%=i%>.</td>
<td width="25" align=center class="ln28pl4"><%if rs("jie")=0 then %><img src=img/icn_time.gif  alt=待解决问题><%elseif rs("jie")=1 or rs("jie")=3 then%><img src=img/icn_ok.gif  alt =已解决问题><%elseif rs("jie")=2 then%><img src=img/icn_cancel.gif  alt =问题已关闭><%elseif rs("jie")=4 then%><img src=img/icn_vote.gif  alt =投票中问题><%end if%></td>
<td class="ln28pl4"><a href="showquestion.asp?id=<%=rs("id")%>" target=_blank><%=HTMLcode(rs("title"))%></a></td></tr>
<%
rs.movenext
	  wend
end if
rs.close
end if
%>
</table></td>
        </tr></table>
</td>  </tr></table>
<%if request("send")="提交问题" then
        if session("person")="" then
        response.write"<script>alert('用户超时,请重新登录!');history.back();</script>"
        end if
    if (request.form("nm")="1" ) then
	nmfen=mdf
	niming=1
	else
	nmfen=0
	niming=0
	end if
	if request("shang")="" then
	shang=0
	else
	shang=cINT(request("shang"))
	end if
	rs3.open"select * from person where name='"&session("person")&"'",conn,1,1
	shang1=rs3("jifen")
	rs3.close
	if shang >= shang1 then
	response.write"<script>alert('您的积分不够!');history.back();</script>"
	response.end
	end if
	if request("BoardNlass")="" then
	response.write"<script>alert('一级分类不能为空!');history.back();</script>"
	response.end
	elseif request("BoardClass")="" then
	response.write"<script>alert('二级分类不能为空!');history.back();</script>"
	response.end
	elseif request("title")="" then
	response.write"<script>alert('标题不能为空!');history.back();</script>"
	response.end
	elseif request("content")="" then
	response.write"<script>alert('补充说明不能为空!');history.back();</script>"
	response.end
	rs3.open"select * from person where name='"&session("person")&"' and jie=3",conn,1,1
	if not rs3.eof then
	response.write"<script>alert('您还有过期问题没有处理,请处理后再发表新问题!');history.back();</script>"
	response.end
	end if
	rs3.close
	else
	rs3.open"select * from assort where id="&request("BoardClass")&"",conn,1,1
	topic=rs3("topic")
	rs3.close
	title=request("title")
	content=request("content")
	rs.open"select * from question",conn,1,3
	rs.addnew
	rs("topic")=topic
	rs("title")=title
	rs("content")=content
	rs("sender")=session("person")
	rs("sendtime")=now
	rs("overtime")=now+15
	rs("shuxing")=request("BoardNlass")
	rs("fenleiid")=request("BoardClass")
	rs("shang")=shang
	rs("niming")=niming
	rs.update
	rs.close
	rs3.open"select * from person where name='"&session("person")&"'",conn,1,3
		  rs3("asknum")=rs3("asknum")+1
		  rs3("qtfa")=rs3("qtfa")+twf+nmfen
		  rs3("jifen")=rs3("jifen")-twf-shang-nmfen
		  if rs3("jifen")-twf-shang-nmfen<fen1 then
		  rs3("touxian")=""&ji1&" 一级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen1 and rs3("jifen")-twf-shang-nmfen<fen2 then
		  rs3("touxian")=""&ji1&" 一级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen2 and rs3("jifen")-twf-shang-nmfen<fen3 then
		  rs3("touxian")=""&ji2&" 二级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen3 and rs3("jifen")-twf-shang-nmfen<fen4 then
		  rs3("touxian")=""&ji3&" 三级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen4 and rs3("jifen")-twf-shang-nmfen<fen5 then
		  rs3("touxian")=""&ji4&" 四级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen5 and rs3("jifen")-twf-shang-nmfen<fen6 then
		  rs3("touxian")=""&ji5&" 五级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen6 and rs3("jifen")-twf-shang-nmfen<fen7 then
		  rs3("touxian")=""&ji6&" 六级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen7 and rs3("jifen")-twf-shang-nmfen<fen8 then
		  rs3("touxian")=""&ji7&" 七级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen8 and rs3("jifen")-twf-shang-nmfen<fen9 then
		  rs3("touxian")=""&ji8&" 八级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen9 and rs3("jifen")-twf-shang-nmfen<fen10 then
		  rs3("touxian")=""&ji9&" 九级"
		  elseif rs3("jifen")-twf-shang-nmfen>=fen10 then
		  rs3("touxian")=""&ji10&" 十级"
		  end if
		  rs3.update
		  rs3.close
	response.write"<script>alert('发表问题成功!');window.navigate('index.asp');</script>"
	end if
	end if
	%>
<table width="538" border="0" cellpadding="0" cellspacing="0">
   <form name="ftiwen" method="post" action="send.asp" onSubmit="return checkform(this);">
 <tr> <td nowrap class="bgtle">提问</td></tr>
<tr><td class="bgcntLn">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" >
              <tr valign="top"> 
                <td width="22%" class="f14" nowrap>您的提问:</td>
                <td width="78%"> <input name="title" type="text" value="<%=HTMLcode(request("content"))%>" size="48" class=formfont>
                  <br>
                  您可以参考其他用户提问过的相关问题→</td>
              </tr>
            </table>
            <br>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="zhtable" >
              <tr valign="top"> 
                <td width="22%" class="f14" nowrap>问题补充说明:</td>
                <td width="78%">
                  <table border="0" width="100%" cellspacing="0" cellpadding="0">
                    <TR>
                <TD class=INDEX_XMALL width="90%" height="25">
                  <select class=input1 name="FONT" onChange="Font(this.options[this.selectedIndex].value)">
                  <option value="宋体" selected>宋体</option>
                  <option value="楷体_GB2312">楷体_GB2312</option>

⌨️ 快捷键说明

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