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

📄 dll.asp

📁 学校网站管理系统
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<%
userid=session("userid")
username=session("username")
useradmin=session("useradmin")
If NOT IsNumeric(useradmin) Then useradmin=0
userlogin=session("userlogin")
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:login                   ◇
'◇功  能:用户登陆                ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub login()
if userlogin=sys then
sql="select * from [YC_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%> height=100%>
<tr><td width=60 align=center style=line-height:148%>
<a href="sms.asp?action=send"><font color=#007100>发送短信</font></a><br>
<a href="sms.asp?action=sms"><font color=#007100>查收短信</font></a><br>
<a href="sms.asp?action=box"><font color=#007100>已发短信</font></a><br>
<a href="user_center.asp" target=_blank><font color=#007100>发表选项</font></a><br>
<a href="user.asp?action=edit_data"><font color=#007100>修改资料</font></a><br>
<a href="user.asp?action=list"><font color=#007100>会员列表</font></a><br>
<a href="user.asp?action=loginout"><font color=#007100>安全退出</font></a><br>
<%
if useradmin="3"  then
response.write"<a href='admin.asp' target=_blank><font color=#007100>后台管理</font></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 YC_sms where to_user='"&username&"' and ok=0") 
if message("jinzhe")="0" then
Response.Write "&nbsp;<a href=sms.asp?action=sms><font color=#007100>短信息 0 条</font></a>"
else
Response.Write "&nbsp;<a href=sms.asp?action=sms><font color=#007100>短信息</font><font color=#007100><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%><%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;保&nbsp;&nbsp;存:<select class="yecao" name="cookieTime" style="width:100px;">
<option value="0">不保存</option>
<option value="1">保存一天</option>
<option value="7">保存一周</option>
<option value="30">保存一月</option>
<option value="365">保存一年</option>
</select><%call br()%>
&emsp;验证码:<input name="code" type="text" size="6" maxlength="4" class="yecao">&nbsp;<img src="inc/code.asp" border=0 align=absmiddle><%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"fs>        
</form><%call br%><%call br%>
<center><a href="user_lostpass.asp"><font color=#007100>找回密码</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="bbs/index.asp"><font color=#007100>进入论坛</font></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
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名: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="搜索Flash">搜索动漫娱乐</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 sou="yes" 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%>
<%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%>
<%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
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:YC_Kill_Word                                          ◆
'◇功  能:截字符串,汉字一个算两个字符,英文算一个字符          ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◇◆◇◆◇◆◇◆◇◆◇◆
function YC_Kill_Word(str,strlen)
if str="" then
YC_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
YC_Kill_Word=left(str,i) & "…"
exit for
else
YC_Kill_Word=str
end if
next
YC_Kill_Word=YC_Kill_Word
end function
function YCMS(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;<img border=0 src='img/mor.gif' align=absmiddle>&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 YC_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;<img border=0 src='img/mor.gif' align=absmiddle>&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"><font color=#007100>全部评论</font></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")%>" size="20"><%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);" rows="1" cols="20"></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" 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>
</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
End If
set rspl=server.CreateObject("adodb.recordset")
sqlpl="select * from YC_pl"
rspl.open sqlpl,conn,1,3
rspl.addnew
rspl("pltype")=request.Form("pltab")
rspl("plid")=request.Form("id")
rspl("title")=request.Form("title")
rspl("content")=request.Form("content")
rspl("ip")=request.servervariables("remote_addr")
rspl.update
response.redirect Request.ServerVariables("HTTP_REFERER")
rspl.close
set rspl=nothing
end if
end sub
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:checkshowcontent        ◇
'◇功  能:验证系统安全            ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
sub checkshowcontent()

⌨️ 快捷键说明

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