📄 inc.asp
字号:
<%
sub YC_userlogin()
if checklogined()=flase then
YC("<form method='post' action='user.asp?action=user_login'>")
call br()
YC(" 用户名:<input name='username' type='text' style='width:100px' class='input' />")
call br()
YC(" 密 码:<input name='password' type='password' style='width:100px' class='input' />")
call br()
YC(" 保存期:<select class='input' name=""cookiesdate"" style=""width:100px""><option value='0'>不保存</option><option value='1'>保存一天</option><option value='30'>保存一月</option><option value='365'>保存一年</option></select>")
call br()
if logincode="yes" then
YC(" 验证码:<input name='code' type='text' size='6' maxlength=""4"" class='input' /> <img src='inc/code.asp' style='cursor:hand;width:40px;height:15px' border=""0"" align='absmiddle' onclick=""this.src='inc/code.asp'"" alt='请点击刷新验证码' />")
call br()
end if
YC("<center><input name='submit' type='submit' value='登 录' onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class='put'>")
YC(" <input name='reg' onclick=""window.location='user.asp?action=notice';"" type=""button"" value=""注 册"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put""> <input name=""reg"" onclick=""window.location='user.asp?action=lostpass';"" type=""button"" value=""找 密"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class='put'></center></form>")
call br()
else
sql="select * from [YC_user] where pass=1 and id="&userid&""
set rs=conn.execute(sql)
if rs.eof and rs.bof then
response.Redirect"error.asp?action=error&text=系统无法识别您的身份!"
response.end
else
YC("<center><span id=""tab"" onmouseover=""this.className='overtab'"" onmouseout=""this.className='tab'"" class=""tab"" onclick=""tab();"">基本资料</span><span id=""tab_"" onmouseover=""this.className='overtab'"" onmouseout=""this.className='tab'"" class=""tab"" onclick=""tab_();"">控制面板</span>")
YC("<div style=""display:block;text-align:left;"" id=""tabweb"">")
YC("<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""187"" align=""center"">")
YC("<tr><td width=""70"" height=""100"" >")
YC("<img src="""&rs("user_face")&""" border=""0"" align=""left"" width=""70"" height=""100"" />")
YC("</td><td>")
YC(" 权限:")
if useradmin=1 then
YC("普通用户")
elseif useradmin=2 then
YC("<font color=""#ff6600"">V I P</font>")
elseif useradmin=3 then
YC("<font color=""#ff0000"">管理员</font>")
else
YC("非法用户")
end if
YC("<br />")
YC(" 积分:"&rs("user_exper")&"<br />")
YC(" 登陆:"&rs("user_login_time")&" 次<br />")
YC(" 短信:")
set sms=conn.execute("Select count(*) as lovesms From [YC_sms] where to_user='"&username&"' and ok=0")
if sms("lovesms")="0" then
YC("<u>0</u> 条")
else
YC("<a href=""user.asp?action=user_sms_box""><font color=""red""><b><u>"&sms("lovesms")&"</u></b></font></a> 条<embed src=""img/sms.swf"" width=""0"" height=""0""></embed>")
end if
YC("</td></tr></table></div>")
YC("<div style=""display:none;"" id=""tabweb_"">")
YC("<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""187"" >")
YC("<tr><td height=""100"" align=""center"">")
YC("<a href='user.asp?action=user_sms_send'>发短信</a> ")
YC("<a href='user.asp?action=user_sms_box'>收件箱</a> ")
YC("<a href='user.asp?action=user_sms_sendbox'>发件箱</a><br />")
YC("<a href='user_center.asp' target='^_^'>发布信息</a><br />")
YC("<a href='user.asp?action=user_list'>会员列表</A><br />")
YC("<a href='user.asp?action=user_edit'>修改资料</A><br />")
YC("</td></tr></table></div>")
YC("</center>")
rs.close
set rs=nothing
end if
end if
end sub
sub myday()
YC("<script>")
YC("tmpDate=new Date();")
YC("document.write(tmpDate.getYear());")
YC("document.write(""年"");")
YC("document.write(tmpDate.getMonth()+1);")
YC("document.write(""月"");")
YC("document.write(tmpDate.getDate()); ")
YC("document.write(""日 "");")
YC("myArray=new Array(6);")
YC("myArray[0]=""星期日"";")
YC("myArray[1]=""星期一"";")
YC("myArray[2]=""星期二"";")
YC("myArray[3]=""星期三"";")
YC("myArray[4]=""星期四"";")
YC("myArray[5]=""星期五"";")
YC("myArray[6]=""星期六"";")
YC("weekday=tmpDate.getDay();if(weekday==0|weekday==6){document.write(myArray[weekday])}else{document.write(myArray[weekday])};</script>")
end sub
sub YC_search(mode,searchclass)
call br()
YC("<center>")
if mode=0 then
YC("<form name=""search"" action=""search.asp"" method=""post"" align=""center"">")
YC(" 栏 目:<select name=""jinzheclass"" class=""input"">")
YC("<option value=""搜索新闻"">搜索新闻动态</option>")
YC("<option value=""搜索文章"">搜索文章作品</option>")
YC("<option value=""搜索下载"">搜索站内软件</option>")
YC("<option value=""搜索图片"">搜索站内图片</option>")
YC("<option value=""搜索娱乐"">搜索影音娱乐</option>")
YC("<option value=""搜索用户"">搜索本站会员</option> ")
YC("</select>")
call br()
YC(" 方 式:<select name=""mode"" class=""input"">")
YC("<option value=""按标题"">以标题来查询</option>")
YC("<option value=""按内容"">以内容来查询</option>")
YC("</select>")
call br()
YC(" 关键词:<input type=""text"" class=""input"" maxlength=""30"" name=""keyword"" size=""16"">")
call br()
if username<>"" then
YC("<center><input type=""submit"" name=""submit"" value=""搜 索"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put"">")
YC(" <input type=""reset"" name=""reset"" value=""清 空"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put"">")
YC("</center>")
else
YC("<center><input type=""submit"" name=""submit"" value=""请登陆"" class=""put"" disabled></center>")
end if
YC("</form>")
else
YC("<form name=""search"" action=""search.asp"" method=""post"" align=""center"">")
YC("<input type=""hidden"" name=""jinzheclass"" value="""&searchclass&""">")
YC("方 式:<select name=""mode"" class=""input"">")
YC("<option value=""按标题"">以标题来查询</option>")
YC("<option value=""按内容"">以内容来查询</option>")
YC("</select> ")
call br()
YC("关键词:<input type=""text"" class=""input"" maxlength=""30"" name=""keyword"" size=""16"">")
call br()
if username<>"" then
YC("<input type=""submit"" name=""submit"" value=""搜 索"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put"">")
YC(" <input type=""reset"" name=""reset"" value=""清 空"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put"">")
else
YC("<input type=""submit"" name=""submit"" value=""请登陆"" class=""put"" disabled>")
YC("</form>")
end if
end if
YC("</center>")
call br()
end sub
sub pl(pltab,id)
if request.form("pl")<>""then
checkgetcode()
If Len(Request.Form("title"))>10 Then
YC("<script language=javascript>alert('您的名字太长了!');history.go(-1);</script>")
Response.End
End If
If Trim(Request.Form("content"))="" or Trim(Request.Form("title"))="" Then
YC("<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
YC("<script language=javascript>alert('错误提示:\n\n1. 评论不得低于10个字!\n\n2. 评论不得高于250个字,长篇大论请到论坛发布!');history.go(-1);</script>")
Response.End
End If
End If
set rsplok=server.CreateObject("adodb.recordset")
sqlplok="select pltype,plid,title,content,ip from YC_pl"
rsplok.open sqlplok,conn,1,3
rsplok.addnew
rsplok("pltype")=request.Form("pltab")
rsplok("plid")=request.Form("id")
rsplok("title")=request.Form("title")
rsplok("content")=request.Form("content")
rsplok("ip")=request.servervariables("remote_addr")
rsplok.update
response.redirect Request.ServerVariables("HTTP_REFERER")
rsplok.close
set rsplok=nothing
end if
call br()
sqlpl="select top 5 title,content,ip,time from [YC_pl] where pltype='"&pltab&"' and plid="&id&" order by time desc"
set rspl=conn.execute(sqlpl)
if not(rspl.bof or rspl.eof) then
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0""><tr>")
YC("<td class=""111"" nowrap></td><td class=""222"" nowrap> 网友评论")
YC("<td class=""333"" nowrap></td></td></tr></table>")
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0"">")
YC("<tr><td class=""444"" nowrap></td>")
YC("<td class=""555"" valign=""top"" nowrap>")
do while not rspl.eof
YC("<p class=""show_title""> √ 评论者:"&rspl("title")&" 发布时间:"&replacetime(rspl("time"),"4")&" IP:"&rspl("ip")&" ")
YC("<div class=""show_content"" style=""line-height:150%;height:40px;padding:2px;"">"&Encode(rspl("content"))&"</div>")
rspl.movenext
loop
YC("<td class=""666"" nowrap></td></tr></table>")
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0"">")
YC("<tr>")
YC("<td class=""777"" nowrap></td>")
YC("<td class=""888"" nowrap></td>")
YC("<td class=""999"" nowrap></td>")
YC("</tr></table>")
call br()
end if
rspl.close
set rspl=nothing
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0""><tr>")
YC("<td class=""111"" nowrap></td><td class=""222"" nowrap> 发布评论 <a href=""pl.asp?id="&id&"&pltab="&pltab&""" target=""_blank"">全部评论</a>")
YC("<td class=""333"" nowrap></td></td></tr></table>")
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0"">")
YC("<tr><td class=""444"" nowrap></td>")
YC("<td class=""555"" valign=""top"" nowrap>")
YC("<div class=""show_content""><table width=""730"" border=""0"" align=""center"">")
YC("<form method=""post"" name=""form"" action="""">")
YC("<tr><td style=""width:370px"" >")
call br()
YC("<input type=""hidden"" name=""id"" value="""&id&""">")
YC("<input type=""hidden"" name=""pltab"" value="""&pltab&""">")
YC(" 姓名:<input type=""text"" name=""title"" class=""input"" style=""width:150px;"" value="""&username&""">")
if logincode="yes" then
YC(" 验证码:<input name=""code"" type=""text"" size=""7"" maxlength=""4"" class=""input""> <img src=""inc/code.asp"" style=""width:40;height:15"" border=""0"" align=""absmiddle"">")
end if
call br()
YC(" 评论:<textarea name=""content"" style=""width:310px;height:65px"" class=""input"" 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()
YC("<center> 最多:<input disabled maxLength=""4"" size=""3"" value=""250"" name=""total"" class=""input""> 已用:<input disabled maxLength=""4"" size=""3"" value=""0"" name=""used"" class=""input""> 剩余:<input disabled maxLength=""4"" size=""3"" value=""250"" name=""remain"" class=""input"">")
call br()
YC("<input type=""submit"" name=""pl"" value=""发 表"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put""> <input type=""reset"" name=""reset"" value=""清 空"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put""></center>")
call br()
YC("</td><td></form>")
YC("<ul style=""list-style-type:square;line-height:180%"">")
YC("<li>尊重网上道德,遵守国家的相关法律法规。</li>")
YC("<li>一切后果都由评论者自己承担。</li>")
YC("<li>管理员有权保留或删除评论中的内容。</li>")
YC("<li>本站有权在网站内转载或引用您的评论。</li>")
YC("<li>参与本评论即表明您已经接受上述条款。</li></ul>")
YC("  注意:本站的评论功能已经启动文字过滤功能,请不要随意<br>     发布恶意文字,若未遵守将封闭IP处理。</td></tr></table></div>")
YC("<td class=""666"" nowrap></td></tr></table>")
YC("<table border=""0"" cellspacing=""0"" cellpadding=""0"">")
YC("<tr>")
YC("<td class=""777"" nowrap></td>")
YC("<td class=""888"" nowrap></td>")
YC("<td class=""999"" nowrap></td>")
YC("</tr></table>")
end sub
sub YC_user()
call br()
sql="select user_name,user_all,id from [YC_user] WHERE pass=1 order by user_all desc"
set rs=conn.execute(sql)
i=0
YC("<ul class=""list"">")
do while not rs.eof
YC("<li><a href=""user.asp?action=show_user_data&user="&rs("user_name")&""" title=""查看["&rs("user_name")&"]的资料"">"&YC_cut(rs("user_name"),10)&"</a>")
YC("["&rs("user_all")&"]</li>")
i=i+1
if i>=10 then exit do end if
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<center>暂时没有会员!</center>"
end if
YC("</ul>")
rs.close
set rs=nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -