show_question.asp

来自「类似于baidu的百度知道」· ASP 代码 · 共 1,647 行 · 第 1/5 页

ASP
1,647
字号
				if (txt2=="") {
					AddTxt="\r[URL]"+txt;
					AddText(AddTxt);
					AddTxt="[/URL]";
					AddText(AddTxt);
				} else {
					AddTxt="[URL="+txt+"]"+txt2;
					AddText(AddTxt);
					AddTxt="[/URL]";
					AddText(AddTxt);
				}         
			} 
		}
	}
}

function Mail() {
	if (basic) {
		AddTxt="\r[EMAIL][/EMAIL]";
		AddText(AddTxt);
	} else { 
		txt2=prompt("显示链接的文本.\n如果为空,那么将只显示你的 Email 地址",""); 
		if (txt2!=null) {
			txt=prompt("email 电子邮件地址","xxx@domain.com");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="\r[EMAIL]"+txt+"[/EMAIL]";
				} else {
					AddTxt="[EMAIL="+txt+"]"+txt2;
					AddText(AddTxt);
					AddTxt="[/EMAIL]";
				} 
				AddText(AddTxt);	        
			}
		}
	}
}

function Image() {
	if (basic) {
		AddTxt="\r[IMG][/IMG]";
		AddText(AddTxt);
	} else {  
		txt=prompt("外部图片地址","http://");    
		if(txt!=null) {            
			AddTxt="\r[IMG]"+txt;
			AddText(AddTxt);
			AddTxt="[/IMG]";
			AddText(AddTxt);
		}	
	}
}

function Flash() {
 	if (basic) {
		AddTxt="\r[FLASH=380,330][/FLASH]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("flash 动画文件的地址","http://");
		if (txt!=null) {             
			AddTxt="\r[FLASH=380,330]"+txt;
			AddText(AddTxt);
			AddTxt="[/FLASH]";
			AddText(AddTxt);
		}        
	}  
}

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

function Crm() {
 	if (basic) {
		AddTxt="\r[RM=380,330][/RM]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("Real Player 文件的地址","http://");
		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">
<!--#include file=top.asp-->
<script>
var url = escape(location.href);

function ctlSubmit(event) {
	if (event.ctrlKey && event.keyCode == 13) {	fdf.submit()	}
}
function checkco(f,des)
{ if(f.co.value=="") {alert("请输入您的"+des); return false;}}
function limitpl(f,des)
{ if(f.co.value=="") {alert("请输入您的"+des); return false;} return limitChars(f.co,des,200);}
function checkcoAndsn(f,des)
{ if(f.co.value=="") {alert("请输入您的"+des); return false;} return limitChars(f.sn,"参考资料",60);}
function cReply(flag)
{ if (flag=="yes") {
document.getElementById('replyTB').style.display=""; }
if(flag=="no"){document.getElementById('replyTB').style.display="none"; }
location.href="#here";
}
function fixReply(flag){ setTimeout("cReply('"+flag+"')",300);}
function limitChars(obj,obj_Str,limit_len)
{
	var c = getLeftChars(obj,limit_len);
	if(c<0) 
	{
	  echo_str = obj_Str + "限定在"+limit_len+"个字以内,请缩短字数";
      alert(echo_str);
      obj.focus();
      return false;    
	}
return true;	
}
function getLeftChars(varField,limit_len) {
    var i = 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 - j;    
    return (leftchars);
}
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> 
<td height="24"><a href="<%=weburl%>"><%=webname%></a> &gt; <a href="List_Big.asp?id=<%=id0%>&topic=<%=topic0%>"><%=topic0%></a> &gt; <a href=List_Little.asp?id=<%=rs("fenleiid")%>&topic=<%=rs("topic")%>><%=rs("topic")%></a></td>                                                                                                                                                          
</tr>
</table>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top" width="200">
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr><%if request("login")="登录" then
 jiance=request("name")
if InStr(jiance,"or")<>0 or InStr(jiance,"'")<>0 or InStr(jiance,"`")<>0 or InStr(jiance,"=")<>0 or InStr(jiance,"-")<>0 or InStr(jiance,",")<>0 or InStr(jiance,"and")<>0 then 
Response.Write "<script language=JavaScript>{alert('用户名非法!');history.back();}</script>"
Response.End 
end if
		if not IsNumeric(request("verifycode")) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码必须是数字!');history.back();</script>")
		Response.end
	end if
	if (int(session("SafeCode"))<>int(request("verifycode"))) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
		Response.end
	end if
	  if request("name")="" then
	  response.write"<script>alert('用户名不能为空!');history.back();</script>"
	  elseif request("pwd")="" then
	  response.write"<script>alert('密码不能为空!');history.back();</script>"
	  else
	  name=request("name")
	  pwd=request("pwd")
	  rs2.open"select * from person where name='"&name&"' and pwd='"&md5(pwd)&"'",conn,1,1
	  if rs2.eof then
	  response.write"<script>alert('用户名或密码错误!');history.back();</script>"
	  else
	  rs3.open"select * from person where name='"&name&"'",conn,1,3
	  rs3("logintime")=now
	  rs3.update
	  rs3.close
	  session("person")=name
	  %>
	  <%end if
	  rs2.close
	  end if
	  end if%>
		<td height="36" align="center" onMouseOver="this.className='tbb'" onMouseOut="this.className='taa'" class="taa"><strong><%if session("person")<>"" then%>用户信息<%else%>用户登录<%end if%></strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table border="0" width="95%" cellspacing="0" cellpadding="0">
	<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="zhtable"><%if session("person")<>"" then%>
              <tr> 
                <td >您好:<%=session("person")%> </td>
              </tr>
              <tr> 
                <td><%rs2.open"select * from person where name='"&session("person")&"'",conn,1,1%> 
                  <a href="Help.asp#n5" target=_blank><%=rs2("touxian")%></a> ( <%=rs2("jifen")%> )</td>                                                                                            
              </tr>
      </table>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
  <tr>
    <td height=22>&#8226; <a href="user.asp?lei=mywen" target=_blank>我的提问</a></td>                                                                                            
    <td>&#8226; <a href="user.asp" target=_blank>个人中心</a></TD>                                                                                            
  </tr>
  <tr>
    <td>&#8226; <a href="user.asp?lei=myda" target=_blank>我的回答</a></td>                                                                                            
    <td>&#8226; <a href="Exit.asp">退出</a><%rs2.close%></td>                                                                                       
  </tr>
  <%end if%><%if session("person")="" then%><tr><form method=post action=Show_Question.asp?id=<%=id%>><td align="center" valign="top">
	<p>用&nbsp;&nbsp;户:<input name="name" type="text" id="name" size="12" class="ip22"><br>
	密&nbsp;&nbsp;码:<input name="pwd" type="password" id="pwd" size="12" class="ip22"><br>
	验证码:<input type="text" size=3 maxlength=4 name=verifycode class="ip22"> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT><br><input name="login" type="submit" id="login" value="登录" class="ip2">&nbsp;&nbsp;                                                                                  
    <a href="Reg.asp">注册</a>
</td></form><%end if%></tr>
</table>
</td>
	</tr>
</table>
<br></td>
	</tr>
</table>
		</td>
	</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onMouseOver="this.className='tbb'" onMouseOut="this.className='taa'" class="taa"><strong>此时公告</strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table border="0" width="95%" cellspacing="0" cellpadding="0">
	<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td><%rs2.open"select top 5 * from gonggao where flid=3 order by time desc",conn,1,1
                  if rs2.eof then%>暂时没有公告<%else
	  while not rs2.eof
	  %>☆<%=rs2("text")%><table border="0" width="100%" cellspacing="0" cellpadding="0" height="1" class="t00">
																		<tr>
																			<td></td>
																		</tr>
																		</table><br><%rs2.movenext
	  wend
	  end if
	  rs2.close%>
</td></tr></table>
</td>
	</tr>
</table>
</td>
	</tr>

⌨️ 快捷键说明

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