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

📄 dll.asp

📁 学校网站源码fdfdffdfdfdfdfdfdfdf
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<%
userid=session("userid")
username=session("username")
useradmin=session("useradmin")
userlogin=session("userlogin")
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:login                   ◇
'◇功  能:用户登陆                ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub login()
if userlogin=sys then
sql="select * from [Huaihi_user] where pass=true and id="&userid&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Redirect"error.asp?action=error&text=系统无法识别您的身份!" 
response.end
else%>
<table border=1 cellpadding=0 cellspacing=0 frame=void rules=none width=100% bordercolor=<%=border%>>
<tr><td width=60 align=center style=line-height:148%>
<a href="sms.asp?action=send">发送短信</a><br>
<a href="sms.asp?action=sms">查收短信</a><br>
<a href="sms.asp?action=box">已发短信</a><br>
<a href="user_center.asp" target=_blank>控制面板</a><br>
<a href="user.asp?action=edit_data">修改资料</a><br>
<a href="user.asp?action=list">会员列表</a><br>
<a href="user.asp?action=loginout">安全退出</a><br>
<%
if useradmin="3"  then
response.write"<a href='admin.asp' target=_blank>后台管理</a>"
end if
%>
</td>
<td  style=line-height:148%>
&nbsp;<img title="会员姓名:<%=rs("user_name")%><br>
会员&nbsp;Q&nbsp;Q:<%if rs("user_qq")="" then response.write"没有QQ!" else response.write rs("user_qq") end if%><br>
会员邮箱:<%if rs("user_mail")="" then response.write"没有信箱" else response.write rs("user_mail") end if%>"   src="<%=rs("user_face")%>" border=1><br>
&nbsp;会员:<font color=red><b><%=rs("user_name")%></b></font><br>
&nbsp;权限:<%if rs("user_admin")=1 then 
response.write "普通会员" 
elseif rs("user_admin")=2 then
response.write "<font color=#ff6600>VIP 会员</font>"
elseif rs("user_admin")=3 then
response.write "<font color=#ff0000>管理人员</font>"
else
response.write "非法用户"
end if%><br>
&nbsp;点数:<%=rs("user_money")%> 点<br>
&nbsp;登陆:<%=rs("user_login_time")%> 次<br>
<%
set message=conn.execute("Select count(*) as jinzhe From Huaihi_sms where to_user='"&username&"' and ok=0") 
if message("jinzhe")="0" then
Response.Write "&nbsp;<a href=sms.asp?action=sms>短信息 0 条</a>"
else
Response.Write "&nbsp;<a href=sms.asp?action=sms>短信息<font color=red><b>"&message("jinzhe")&"</font></b>条</a>"
Response.Write "<embed src=img/sms.swf width=0 height=0></embed>"
end if%>
</td></tr>
</table>
<%end if
rs.close
set rs=nothing
else
%>
<div>
<form method="post" action="user.asp?action=login"><%call br%>
&emsp;用户名:<input name="user" type='text'  style="width:100px" maxlength='20' class="yecao"><%call br%>
&emsp;密&nbsp;&nbsp;码:<input name="pass" type='password' style="width:100px" maxlength='20' class="yecao"><%call br%>
&emsp;&emsp;<input name='submit' type='submit' value="登 录" class="put" onmouseover="this.className='overput'"" onmouseout="this.className='put'" class="put">
<input name='reg' onclick='window.location="user.asp"' type='button' value='注 册' class="put" onmouseover="this.className='overput'"" onmouseout="this.className='put'" class="put" />  
</form><%call br%>
<center><a href="user_lostpass.asp">找回密码</a></center>
<%
Call br()
end if
end sub
function myclass(tab,url,myclassdj)
set rsclass=server.CreateObject("adodb.recordset")
sqlclass="select * from ["&tab&"] where id="&myclassdj&" order by id desc"
rsclass.open sqlclass,conn,1,1
if not rsclass.bof and not rsclass.eof then
response.Write "<a href="""&url&".asp?action=list&class="&rsclass("id")&""">"&rsclass("classname")&"</a>"
end if
rsclass.close
set rsclass=nothing
end Function
'点击排行
Function Huaihi_top(tab,showpage)
set rstop=server.createobject("adodb.recordset")
if request.querystring("class")<>"" then
sql="select * from ["&tab&"] where pass=true and class="&request.querystring("class")&" order by click DESC"
else
sql="select * from ["&tab&"] where pass=true order by click DESC"
end if
rstop.open sql,conn,1,1
n=0
do while not rstop.eof
Huaihi("<a href='"&showpage&"?id="&rstop("id")&"' target='"&showpage&"'>"&Huaihi_Kill_Word(rstop("title"),20)&"</a><br>")
n=n+1
if n=clng(toplist) then exit do end if
rstop.movenext
loop
if rstop.eof and rstop.bof then
Huaihi("<center>暂时没有数据!</center> ")
end if
rstop.close
set rstop=nothing
End Function
'推荐排行
Function Huaihi_best(tab,showpage)
set rsbest=server.createobject("adodb.recordset")
if request.querystring("class")<>"" then
sql="select * from ["&tab&"] where pass=true and class="&request.querystring("class")&" and best=true order by click DESC"
else
sql="select * from ["&tab&"] where pass=true and best=true order by click DESC"
end if
rsbest.open sql,conn,1,1
n=0
do while not rsbest.eof
Huaihi("·<a href='"&showpage&"?id="&rsbest("id")&"' target='"&showpage&"'>"&Huaihi_Kill_Word(rsbest("title"),20)&"</a><br>")
n=n+1
if n=clng(bestlist) then exit do end if
rsbest.movenext
loop
if rsbest.eof and rsbest.bof then
Huaihi("<center>暂时没有数据!</center>")
end if
rsbest.close
set rsbest=Nothing
End Function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:search                      ◇
'◇功  能:站内搜索                    ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub search()%>
<form name="search" action="search.asp" method="post"><%call br()%><%call br()%>
栏&emsp;目:<select name="yecaoclass" class="yecao">
<option value="搜索新闻">搜索新闻动态</option>
<option value="搜索文章">搜索文章作品</option>
<option value="搜索下载">搜索站内软件</option>
<option value="搜索图片">搜索站内图片</option>
<option value="搜索娱乐">搜索影音娱乐</option>
<option value="搜索会员">搜索本站会员</option>
</select><%call br()%>
方&emsp;式:<select name="mode" class="yecao">
<option value="按标题">以标题来查询</option>
<option value="按内容">以内容来查询</option>
</select><%call br()%>
关键词:<input type="text" class="yecao" maxlength="30" name="keyword" size=16><%call br()%>
<%if username<>"" then%>
<input type="submit" name="submit" value="搜 索" class="put" onmouseover=this.className='overput' onmouseout=this.className='put'>&nbsp;&nbsp;<input type="reset" name="reset" value="清 空" class="put" onmouseover=this.className='overput' onmouseout=this.className='put'><input type="hidden" name="searching" value="true">
<%else%>
<input type="submit" name="submit" value="请登陆" class="put" disabled>&nbsp;&nbsp;<input type="reset" name="reset" value="清 空" class="put" disabled><%end if%>
<%call br()%><%call br()%>
</form>
<%end sub
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:br                          ◇
'◇功  能:系统换行                    ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub br()
Response.write "<table><td height=5></td></table>"
end sub
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆函数名:br                          ◇
'◇功  能:取得表中的数据个数          ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub mytable(name)
set rs=server.CreateObject("adodb.recordset")
rs.open name,conn,1,3
name=rs.recordcount
response.write name
rs.close
set rs=nothing
end sub
'滚轮控制图片函数
Function bbimg(strText)
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
Dim s
s=strText
re.Pattern="<img(.[^>]*)>"
s=re.replace(s,"<img onclick=javascript:window.open(this.src); onload=javascript:resizepic(this) onmousewheel='return bbimg(this)' alt='点击在新窗口中打开图片' $1>")
response.Write s
End Function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:Huaihi_Kill_Word                                          ◆
'◇功  能:截字符串,汉字一个算两个字符,英文算一个字符          ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◇◆◇◆◇◆◇◆◇◆◇◆
function Huaihi_Kill_Word(str,strlen)
if str="" then
Huaihi_Kill_Word=""
exit function
end if
dim l,t,c, i
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
Huaihi_Kill_Word=left(str,i) & "…"
exit for
else
Huaihi_Kill_Word=str
end if
next
Huaihi_Kill_Word=Huaihi_Kill_Word
end function
function Huaihi(str)
Response.Write""&str&""&vbcrlf
end function
function YC(str)
Response.Write""&str&""
end function
function YCGO(str)
Response.redirect""&str&""
end function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:pl  pltab=类型,id=类型ID    ◇
'◇功  能:评论调用过程                ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub pl(pltab,id)%>
<table border="0" cellspacing="0" cellpadding="0" width=100%>
<tr>
<td class=showtop>&emsp;※&nbsp;网友评论</td>
</tr></table>
<table border="0"   cellspacing="0" cellpadding="0" width=100%><tr>
<td  class=showcenter valign=top>
<table  width=100% border=1 bordercolor=<%=border%> rules=rows frame=void  cellspacing=0 cellpadding=0>
<%
set rspl=server.CreateObject("adodb.recordset")
sqlpl="select top 5 * from Huaihi_pl where pltype='"&pltab&"' and plid="&id&" order by time desc"
rspl.open sqlpl,conn,1,3
if rspl.bof or rspl.eof then%>
<tr height=40><td align=center><font color=red><b>暂时没有网友评论!</b></font></td></tr>
<%else
do while not rspl.eof%>
<tr class=bg height=25><td>&nbsp;√&nbsp;评论者:<%=key(rspl("title"))%> 发表时间:<%=rspl("time")%> IP:<%=rspl("ip")%> </td></tr>
<tr height=35>
<td valign=top style="word-break:break-all;table-layout:fixed;text-align:left;line-height:180%">
&nbsp;<%=Encode(key(rspl("content")))%></td></tr>
<%
rspl.movenext
loop
end if
rspl.close
set rspl=nothing%>
</table>
</TD></TR></table>
<table border="0"  cellspacing="0" cellpadding="0" width=100%><tr>
<td class=showfoot></td></tr></table>
<%call br()%>
<table border="0" cellspacing="0" cellpadding="0" width=100%>
<tr>
<td class=showtop>&emsp;※&nbsp;发表评论&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;<a href="pl.asp?id=<%=id%>&pltab=<%=pltab%>" target="_blank">全部评论</a></td></tr></table>
<table border="0" cellspacing="0" cellpadding="0" width=100%><tr>
<td class=showcenter valign=top>
<table width=700 border=0 align=center><form method="post" name="form" id="form">
<tr><td style="width:300px" align=center><%call br()%>
<input type="hidden" name="id" value=<%=id%>>
<input type="hidden" name="pltab" value=<%=pltab%>>
&nbsp;姓名:<input type="text" name="title" class="yecao" style="width:200px;" value="<%if session("user")<>"" then response.write session("user")%>"><%call br()%>
&nbsp;评论:<textarea name="content" style="width:200px;height:65px" class="yecao" onkeydown="bookcount(this.form.content,this.form.total,this.form.used,this.form.remain);" 
onkeyup="bookcount(this.form.content,this.form.total,this.form.used,this.form.remain);"></textarea><%call br()%>
&nbsp;最多:<input disabled maxLength="4" size="3" value="250" name="total" class=yecao>&nbsp;&nbsp;已用:<input disabled maxLength="4" size="3" value="0" name="used" class=yecao>&nbsp;&nbsp;剩余:<input disabled maxLength="4" size="3" value="250" name="remain" class=yecao><%call br()%>
&emsp;验证码:<input name="code" type="text" size="7" maxlength="4" class="yecao">&nbsp;<img src="inc/code.asp" style="width:40;height=15" border=0 align=absmiddle><%call br%>
<input type="submit" name="pl" value="发 表" class="put"  onmouseover="this.className='overput'" onmouseout="this.className='put'">
<input type="reset" name="reset" value="清 空" class="put" onmouseover="this.className='overput'" onmouseout="this.className='put'">
<%call br()%></td><td></form>
<ul style=list-style-type:square;line-height:180%>
<li>尊重网上道德,遵守国家的相关法律法规。</li>
<li>一切后果都由评论者自己承担。</li>
<li>管理员有权保留或删除评论中的内容。</li>
<li>本站有权在网站内转载或引用您的评论。</li>
<li>参与本评论即表明您已经接受上述条款。</li></ul>
&emsp;&emsp;注意:本站的评论功能已经启动文字过滤功能,请不要随意<br>&emsp;&emsp;&emsp;&emsp;&emsp;发表恶意文字,若未遵守将封闭IP处理。
</td></tr></table>

</TD></TR></table>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr>
<td class=showfoot></td></tr></table>
<%
if request.Form("pl")<>""then
if int(request("code"))<>int(Session("code")) then
 Response.Write("<script language=javascript>alert('请输入正确的认证码!');history.go(-1);</script>") 
Response.End 
end if
Session("code")=""
If Len(Request.Form("title"))>10 Then
Response.Write "<script language=javascript>alert('您的名字太长了!');history.go(-1);</script>"
Response.End
End If
If Trim(Request.Form("content"))="" or Trim(Request.Form("title"))="" Then
Response.Write "<script language=javascript>alert('网友姓名或评论内容不能为空!');history.go(-1);</script>"
Response.End
End If
If Request.Form("content")<>"" Then
If Len(Request.Form("content"))<10 or Len(Request.Form("content"))>300 then
Response.Write "<script language=javascript>alert('错误提示:\n\n1. 评论不得低于10个字!\n\n2. 评论不得高于300个字,长篇大论请到论坛发表!');history.go(-1);</script>"
Response.End
End If

⌨️ 快捷键说明

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