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

📄 char.asp

📁 此文件为一个电子同学录
💻 ASP
字号:
<%
Rem ==========&#36890;&#29992;&#20989;&#25968;&#35774;&#23450;=========
'&#39029;&#38754;&#38169;&#35823;&#25552;&#31034;&#20449;&#24687;
sub txl_error()
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
<tr> 
<td  bgcolor=<%=txl_body(10)%>><br>
<table cellpadding=3 cellspacing=1 align=center class=tableborder1 style="width:75%">
<tr>
<th width="100%" height=25 colspan=2  align=center>&#21516;&#23398;&#24405;&#38169;&#35823;&#20449;&#24687;</th>
</tr>
<tr>
<td width="100%" class=tablebody1 colspan=2><b>&#20135;&#29983;&#38169;&#35823;&#30340;&#21487;&#33021;&#21407;&#22240;&#65306;</b><br><br>
<li>&#24744;&#26159;&#21542;&#20180;&#32454;&#38405;&#35835;&#20102;<a href="help.asp">&#24110;&#21161;&#25991;&#20214;</a>&#65292;&#21487;&#33021;&#24744;&#36824;&#27809;&#26377;&#30331;&#38470;&#25110;&#32773;&#19981;&#20855;&#26377;&#20351;&#29992;&#24403;&#21069;&#21151;&#33021;&#30340;&#26435;&#38480;&#12290;
<%=errmsg%></td>
</tr>
<tr>
<td class=tablebody2 valign=middle colspan=2 align=center><a href="<%=Request.ServerVariables("HTTP_REFERER")%>"><<&#36820;&#22238;&#19978;&#19968;&#39029;</a></td>
</tr>
</table><br>
</td>
</tr>
</table>
<%
end sub

sub txl_suc()
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
<tr> 
<td  bgcolor=<%=txl_body(10)%>><br>
<table cellpadding=3 cellspacing=1 align=center class=tableborder1 style="width:75%">
<tr>
<th height=25 width="100%" align=center>&#21516;&#23398;&#24405;&#25104;&#21151;&#20449;&#24687;</th>
</tr>
<tr>
<td width="100%" class=tablebody1><b>&#25805;&#20316;&#25104;&#21151;&#65306;</b><br><br><%=sucmsg%></td>
</tr>
<tr align=center>
<td width="100%" class=tablebody2><a href="<%=Request.ServerVariables("HTTP_REFERER")%>"> << &#36820;&#22238;&#19978;&#19968;&#39029;</a></td>
</tr>
</table><br>
</td>
</tr>
</table>
<%
end sub

rem &#36807;&#28388;BadWord&#23383;&#31526;
function ChkBadWords(fString)
    dim bwords,ii
    if not(isnull(BadWords) or isnull(fString)) then
    bwords = split(BadWords, "|")
    for ii = 0 to ubound(bwords)
        fString = Replace(fString, bwords(ii), string(len(bwords(ii)),"*")) 
    next
    ChkBadWords = fString
    end if
end function

Rem &#36807;&#28388;HTML&#20195;&#30721;
function HTMLEncode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")

    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")

    fString=ChkBadWords(fString)
    HTMLEncode = fString
end if
end function

Rem &#36807;&#28388;&#34920;&#21333;&#23383;&#31526;
function HTMLcode(fString)
if not isnull(fString) then
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
    fString = Replace(fString, CHR(10), "<BR>")
    HTMLcode = fString
end if
end function

Rem &#21028;&#26029;&#26159;&#21542;&#26469;&#33258;&#22806;&#37096;
function ChkPost()
	dim server_v1,server_v2
	chkpost=false
	server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
	server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
	if mid(server_v1,8,len(server_v2))<>server_v2 then
		chkpost=false
	else
		chkpost=true
	end if
end function

Rem &#21028;&#26029;&#29992;&#25143;&#26469;&#28304;
function address(sip)
	dim str1,str2,str3,str4
	dim num
	dim country,city
	dim irs
	if isnumeric(left(sip,2)) then
	if sip="127.0.0.1" then sip="192.168.0.1"
	str1=left(sip,instr(sip,".")-1)
	sip=mid(sip,instr(sip,".")+1)
	str2=left(sip,instr(sip,".")-1)
	sip=mid(sip,instr(sip,".")+1)
	str3=left(sip,instr(sip,".")-1)
	str4=mid(sip,instr(sip,".")+1)
	if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then

	else
		num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
		sql="select Top 1 country,city from address where ip1 <="&num&" and ip2 >="&num&""
		set irs=server.createobject("adodb.recordset")
		irs.open sql,conn,1,1
		if irs.eof and irs.bof then 
		country="&#20122;&#27954;"
		city=""
		else
		country=irs(0)
		city=irs(1)
		end if
		irs.close
		set irs=nothing
	end if
	address=country&city
	else
	address="&#26410;&#30693;"
	end if
end function

function iif(expression,returntrue,returnfalse)
	if expression=0 then
		iif=returnfalse
	else
		iif=returntrue
	end if
end function

function iiif(express,expression,returntrue,returnfalse)
	if express>expression then
		iiif=returnfalse
	else
		iiif=returntrue
	end if
end function

function iimg(expression,returnfalse,returntrue)
	if expression="" or isnull(expression) then
		iimg=returnfalse
	else
		iimg=returntrue
	end if
end function

Rem &#36807;&#28388;SQL&#38750;&#27861;&#23383;&#31526;
function checkStr(str)
	if isnull(str) then
		checkStr = ""
		exit function 
	end if
	checkStr=replace(str,"'","''")
end function

Rem &#29992;&#25143;&#22312;&#32447;


sub foot()
endtime=timer()
%>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
  <tr> 
    <td width="<%=txl_body(0)%>" height="32" background="<%=txl_info(7)%>bj.gif">&nbsp;</td>
  </tr>
  <tr> 
    <td width="<%=txl_body(0)%>" bgcolor="<%=txl_body(9)%>"><%=txl_body(24)%></td>
  </tr>
  <tr>
    <td width="<%=txl_body(0)%>" height="50" align=center bgcolor="<%=txl_body(10)%>"><%=Version%><br><%=Copyright%>
  </tr>
</table>
</body>
</html>
<%
	CloseDatabase
end sub

sub head()
%>
<html>
<head>
<META http-equiv=Content-Type content=text/html; charset=gb2312>
<meta name=keywords content="&#32418;&#38632;&#21516;&#23398;&#24405;,mathren.com">
<title><%=txl_info(0)%>--<%=htmlencode(stats)%></title>
<!--#include file="txl_css.asp"-->
<!--#include file="txl_js.asp"-->
</head>

<body topmargin=0 onmousemove="HideMenu()">
<div id=menuDiv style='Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8'></div>
<table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
  <tr> 
    <td width="<%=txl_body(0)%>"><%=txl_body(22)%></td>
  </tr>
  <tr> 
    <td width="<%=txl_body(0)%>" height="9" background=<%=txl_info(6)&txl_skinpic(0)%>></td>
  </tr>
  <tr> 
    <td width="780" height="22" background=<%=txl_info(6)&txl_skinpic(1)%>>&nbsp;&nbsp;
<%if not founduser then%>
<a href="login.asp">&#30331;&#38470;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> 
<a href="register.asp">&#27880;&#20876;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> 
<%end if%>
<a href="index.asp">&#29677;&#32423;&#39318;&#39029;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
   href="g_index.asp" onMouseOver='ShowMenu(gbooklist,80)'>&#29677;&#32423;&#30041;&#35328;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
   href="b_index.asp" onMouseOver='ShowMenu(bbslist,80)'>&#29677;&#32423;&#35770;&#22363;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
   href="p_index.asp" onMouseOver='ShowMenu(photolist,80)'>&#29677;&#32423;&#30456;&#20876;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
   href="c_index.asp" onMouseOver='ShowMenu(cardlist,80)'>&#29677;&#32423;&#21517;&#29255;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
   href="u_index.asp" onMouseOver='ShowMenu(userlist,80)'>&#20010;&#20154;&#33756;&#21333;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
   href="s_index.asp" onMouseOver='ShowMenu(shequlist,80)'>&#29677;&#32423;&#31038;&#21306;</a> <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a
<a href="help.asp">&#22312;&#32447;&#24110;&#21161;</a> 
<%if supermaster then%>
 <img src=<%=txl_info(7)%>spacer.gif align=absmiddle> <a href="admin_index.asp">&#31649;&#29702;</a>
<%end if%>
<%if founduser then%>
 <img src=<%=txl_info(7)%>spacer.gif align=absmiddle>  <a href="logout.asp">&#36864;&#20986;</a> </td>
<%end if%>
  </tr>
</table>

<%
if Cint(GroupSetting(0))=1 and (instr(scriptname,"register.asp")=0 and instr(scriptname,"login.asp")=0) then
	Errmsg=Errmsg+"<br>"+"<li>&#24744;&#27809;&#26377;&#27983;&#35272;&#26412;&#21516;&#23398;&#24405;&#30340;&#26435;&#38480;&#65292;&#35831;<a href=login.asp>&#30331;&#38470;</a>&#21518;&#27983;&#35272;&#25110;&#32773;&#21516;&#31649;&#29702;&#21592;&#32852;&#31995;&#12290;"
	call head_var("&#38169;&#35823;&#20449;&#24687;","")
	call txl_error()
	call foot()
	response.end
end if

end sub

sub head_var(GetTitle,GetUrl)
%>
<table width="<%=txl_body(0)%>" cellpadding=3 cellspacing=0 align=center style="border:1px <%=txl_body(9)%> solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;"> 
<tr>
<td height=30 valign=middle bgcolor=<%=txl_body(10)%>> <img src=<%=txl_info(7)%>dot01.gif border=0> <a href=index.asp>&#29677;&#32423;&#39318;&#39029;</a> &#8594; <a href=<%=GetUrl%>><%=GetTitle%></a> &#8594; <%=HTMLEncode(stats)%></td>
</tr>
</table>
<%
end sub

'&#32479;&#35745;&#30701;&#20449;
function newincept()
rs=conn.execute("Select Count(id) From Message Where flag=0 and issend=1 and delR=0 And incept='"& membername &"'")
    newincept=rs(0)
	set rs=nothing
	if isnull(newincept) then newincept=0
end function
function inceptid(stype)
	set rs=conn.execute("Select top 1 id,sender From Message Where flag=0 and issend=1 and delR=0 And incept='"& membername &"'")
	if stype=1 then
	inceptid=rs(0)
	else
	inceptid=rs(1)
	end if
	set rs=nothing
end function

Rem &#21028;&#26029;&#25968;&#23383;&#26159;&#21542;&#25972;&#24418;
function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
end function
%>

⌨️ 快捷键说明

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