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

📄 index.asp

📁 一个简易论坛自己手动写成的代码一个简易论坛自己手动写成的代码一个简易论坛自己手动写成的代码
💻 ASP
📖 第 1 页 / 共 5 页
字号:
	   list_top()
    Case "list_notop" 
	   list_notop()	   
   Case "member_reg" 
	   Call member_reg() 
   Case "exitcookies"
	  Call exitcookies()
   Case "edituser"
	  Call member_edit()
   Case "member_list"
	  Call member_list()
    Case "edit_my"	
		Call edit_my()
    Case "member_topices_list"
	     Call member_topics_list()
	Case "member_topics_search"
	      Call member_topics_search()
	Case "topic_classedit"
	      Call topic_cls()
	Case "forum"
	      Call forum()
	Case "movetopic"
	      Call movetopic()
	Case "stopip"
	      Call stopip()
	Case "dbCompact"
	      Call dbCompact()
End Select
Response.Write( "</td></tr>")
if jd_acview>0 then
Response.Write(" <tr><td >")
call jd_onliner()
Response.Write("</td></tr>")
end if
Response.Write("</table>")
call connClose()
call foot()
' 主程序结束
' 页脚
sub foot()
Response.Write("<table width='"&jd_table_w&"'  border='0' align='center' cellpadding='0' cellspacing='1'><tr><td  valign='top' ><table align=center cellpadding=0 cellspacing=0><tr><td width='"&jd_table_w&"' ></td> </tr><tr><td class='footline'></td></tr><tr align=center height='' style='line-height:130%'><td> <span class='unnamed1'>")
      if jd_foot_addr="" then
	 Response.Write (jd100_foot) 
	 time2=timer
	  Response.Write "执行时间"&(time2-time1)*1000&"ms"
	  else 
	  call jd_bannar(jd_foot_addr,jd_table_w,jd_foot_h,"")
	  end if
Response.Write("</span></td></tr></table></td></tr></table>")
end sub

'签写留言 添加新留言(发主题贴)
 Sub Add_New() 
call jd_loginyn()
dim tb_topic
tb_topic="jd_gb_"&jd_rnd(3)
with Response
.Cookies("JD100_NET_GBBOOK__CK")("topic")=tb_topic
if  Sessionwebname<>"Login" then
	if jd_memyn=1 and (jd_username="" or jd_username=null) then
	call msg_List("错误","你还不是会员或者你还没登录",3,indexfilename&"?forumid="&forumid)
	end if
end if

.Write("<script language=javascript>")
.Write("function showimage(){document.images.showimages.src='"&img2&"head/'+document.form.sex.options[document.form.sex.selectedIndex].value+""""+document.form.img.options[document.form.img.selectedIndex].value+"".gif"";}")

.Write("function DoTitle(addTitle) { var revisedTitle; var currentTitle = document.form.title.value; revisedTitle = addTitle+currentTitle; document.form.title.value=revisedTitle; document.form.title.focus(); return; }")
.Write("</SCRIPT>")

.Write("<TABLE width='"&jd_table_w&"' height=51 border=1 align=center cellPadding=0 cellSpacing=0 class='jd_tab' style='border-collapse:collapse' > <TBODY>")

.Write("<TR ><TD height=25 class='jd_title' ><div align='center'><font size='3'><strong>发 表 主 题</strong></font><font color='#333333'> </font></div></TD>")
.Write("</TR><TR> <TD height='21' align=middle valign='top' class='jd_tab' >")
.Write("<table width='90%' border='0' align='center' cellpadding='1' cellspacing='1' class='unnamed1'>")
.Write("<form name='form' method='post' action='"&indexfilename&"' onSubmit='submitonce(this);submits();'>")
		   
.Write("<tr>  <td width='93'  > <div align='right'>姓名:</div></td><td width='210'> <table width='100%' border='0' cellspacing='0' cellpadding='0'><tr> <td width='81%' class='unnamed1'><input name='"&tb_topic&"' type='text' class='input1' value='"&jd_username&"' size='15' maxLength=10>")
.Write("<font color='#FF0000'>*</font></td><td width='19%'>	</td> </tr></table></td><td width='30%'></td></tr>")
				if jd_username="" then
.Write("<tr><td align='right'> 性别: </td><td> <select name='sex' size='1' onChange='showimage()'><option value='1'>男</option><option value='2'>女</option></select> </td> <td width='30%' rowspan='5'> 选择头像:  <select name='img' size='1' onChange='showimage()'>")
               
		          for i=101 to 101+m
                  .Write("<option value='"&i&"'>"&i&"</option>")
                  next 
.Write("</select><br><img src='"&img2&"head/1101.gif' name=showimages id='showimages'> </td></tr><tr> <td align='right'>QQ:</td><td><input name='qq' type='text' class='input1' id='qq' size='20' maxLength=25></td></tr><tr> <td align='right'>主页: </td><td> <input name='web' type='text' class='input1' value='http://' size='20' maxLength=50> </td></tr> <tr> <td align='right'>来自:</td><td><input name='come' type='text' class='input1' id='come' size='20' maxlength='30'></td></tr><tr> <td align='right'> E-mail: </td><td> <input name='email' type='text' class='input1' size='20' maxLength=60> </td></tr>")
			end if 
.Write("<td align='right'>主题:</td><td><input name='title' type='text' class='input1' id='qq3' size='30' maxlength=50> <font color='#FF0000'>*</font> <select name=font onchange=""DoTitle(this.options[this.selectedIndex].value)""><OPTION selected value="""">选择话题</OPTION><option value=[原创]>[原创]</option><option value=[转帖]>[转帖]</option><option value=[灌水]>[灌水]</option><option value=[讨论]>[讨论]</option><option value=[求助]>[求助]</option><option value=[推荐]>[推荐]</option><option value=[公告]>[公告]</option><option value=[注意]>[注意]</option><option value=[贴图]>[贴图]</option><option value=[建议]>[建议]</option><option value=[下载]>[下载]</option><option value=[分享]>[分享]</option></select></td><td width='30%'>&nbsp;</td> </tr>")
call upphoto("content")
.Write("<tr> <td align='right' valign='top'> 内容: </td><td colspan='2' class='jd_title'>")
call jd_editor(0)
.Write("</td> </tr><tr> <td align='right' valign='top'>&nbsp;</td><td colspan='2'> ")
if jd_mm=1 then
.Write("<input name='view' type='checkbox' id='view' value='2' "&view2&"> <font color='#666666'>给版主留言(只有版主可见)</font> ")
end if
.Write("</td></tr><tr align='center'> <input type='hidden' name='forumid' value='"&forumid&"'> <td colspan='3'> <input type='hidden' name='action_e' value='Add_New'> <br> </td></tr></form> </table></TD></TR> </TBODY></TABLE><br>")
	end with
 End Sub 	

' 主菜单
 Sub Main_Menu()
 with Response
.Write("<table width='"&jd_table_w&"' border='0' align='center' cellspacing='0' class='unnamed1'><tr><td colspan='2' >&nbsp;")
.Write(forumlist())
.Write("</td></tr> <tr> <td width='80%' class=jd_titlemu> &nbsp;")       
	if jd_username="" and jd_memyn<>0 then
	.Write("<a href="&indexfilename &"?action=member_login&forumid="&forumid&">登录</a>&nbsp;") 
	.Write("<a href="&indexfilename &"?action=member_reg&forumid="&forumid&">注册</a> ") 
	elseif jd_username<>"" then
	.Write("欢迎您: <b>"&jd_username & "</b> &nbsp;") 
	.Write("<a href="&indexfilename &"?action=exitcookies&forumid="&forumid&" class=jd100>注销</a>&nbsp;") 
	.Write("<a href="&indexfilename &"?action=edituser&forumid="&forumid&" class=jd100>个人信息</a>&nbsp;") 
    .Write("<a href="&indexfilename &"?action=member_topices_list&forumid="&forumid&" class=jd100>我发的贴</a>&nbsp;")
	.Write("<a href="&indexfilename &"?action=member_topics_search&forumid="&forumid&" class=jd100>搜索</a>&nbsp;")
	.Write("<a href="&indexfilename &"?action=msg&forumid="&forumid&" class='jd100'>")
		if not conn.execute("select id from msg where jd_name='"&jd_username&"' and jd_view=1").eof then
			if action="" or action="View_Words" then
			call jdswf(indeximg&"msg.swf",0,0,0,0,0)
			end if
			.Write("<img src='"&indeximg&"msg.gif' border='0'><font color=#ff0000>有短消息</font>")
			else
			.Write("短消息")
		end if
	.Write("</a>")
	end if
    if jd_membercls=9 then
	.Write("&nbsp;<a href='?action=member_list&forumid="&forumid&"' class='jd100'>会员管理</a>")
    end if
.Write("&nbsp;<a href='"&indexfilename &"?action=UbbHelp&forumid="&forumid&"' class='jd100'>UBB帮助</a></td><td class=jd_titlemu  width='20%'> <div align='right'>")
         If Sessionwebname="Login" Then 
call jd_jsdiv()
.Write("<SCRIPT language=JavaScript type=text/JavaScript>function ee() {MM_showHideLayers('ee','','show');}function ff() {MM_showHideLayers('ee','','hide');}</SCRIPT>")
.Write("<a style=cursor:hand onmouseover=ee() onmouseout=ff()><font color='#ff0000'>管理</font></a>")
.Write("<DIV id=Layer3 style=""POSITION: absolute"">")
.Write("<DIV id=ee onmouseover=""MM_showHideLayers('ee','','show')"" style=""Z-INDEX: 6; FILTER: Alpha(Opacity=80,Style=0) Shadow(Color=#333333, Direction=-100,Strength=3); LEFT: -200px; VISIBILITY: hidden; WIDTH: 200px; POSITION: absolute; TOP: 12px; HEIGHT: 120px"" onmouseout=ff()>")
.Write("<TABLE cellSpacing=0 cellPadding=8 width=80 bgColor=#e5e5e5 border=0><tr><td height=100% width=100% class=tblbevel1>")
.Write("&nbsp;<a href='?action=Edit_web&forumid="&forumid&"' class='jd100'>基本设置</a><br> ")
.Write("&nbsp;<a href='?action=forum&forumid="&forumid&"' class='jd100'>版块管理</a><br> ")
.Write("&nbsp;<a href='?action=member_list&forumid="&forumid&"' class='jd100'>会员管理</a><br> ")
.Write("&nbsp;<a href='?action=stopip&forumid="&forumid&"' class='jd100'>IP管理</a><br> ")
.Write("&nbsp;<a href='?action=EditPWD&forumid="&forumid&"' class='jd100'>修改密码</a><br> ") 
.Write("&nbsp;<a href='?action=dbCompact&forumid="&forumid&"' class='jd100'>数据压缩</a><br> ") 
.Write("&nbsp;<a href='?action=Exit&forumid="&forumid&"' class='jd100'>退出管理</a><br>  ")
.Write("</td></tr></TABLE></DIV></DIV>")
         Else 
			if jd_membercls>1 then
.Write("<a href='?action=Admin_Login&forumid="&forumid&"' class='jd100'>管理 </a> ")	
			else
.Write("<font color=#666666>"&year(date())&"年"&month(date())&"月"&day(date())&"日</font>&nbsp;&nbsp;")	
			end if
		End If

.Write("</div></td></tr><tr> <td colspan='2'>	<table width='100%' border='0' cellpadding='0' cellspacing='0' class='unnamed1'><tr class=jd_title><td width='40%' >&nbsp;")
call jd_memu()
.Write("</td><td width='50%' align='right'><font color=#666666>"&jd_tjmsg&"</font>&nbsp;&nbsp;</td><td width='10%' ><div align='right'>"&main_list&"</div></td></tr></table></td></tr></table>")
end with
End Sub 

'操作
function admin_ls(lsid,lst,lsc)
admin_ls=""
if Sessionwebname ="Login" or jd_membercls=9 or (jd_membercls=5 and instr(","&jd_ad&",",","&jd_username&",")<>0) then
	admin_ls="<a href=?action=Edit&id="&lsid&"&forumid="&forumid&"><font color=#566276>编</font></a>"
	if lsc>0 then
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=topic_classedit&clsid=0&id="&lsid&"&forumid="&forumid&"><font color=#566276>普</font></a>"
	else
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=topic_classedit&clsid=1&id="&lsid&"&forumid="&forumid&"><font color=#566276>精</font></a>"
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=topic_classedit&clsid=2&id="&lsid&"&forumid="&forumid&"><font color=#566276>锁</font></a>"
	end if
	if lst<1 then
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=list_top&id="&lsid&"&forumid="&forumid&"><font color=#566276>固</font></a><font color=#566276>"
	else
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=list_notop&id="&lsid&"&forumid="&forumid&"><font color=#566276>解</font></a>"
	end if
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=movetopic&id="&lsid&"&forumid="&forumid&"><font color=#566276>移</font></a><font color=#566276>"
	admin_ls=admin_ls&"<font color=#566276>|</font><a href=?action=View_Words&cls=del&id="&lsid&"&forumid="&forumid&" onClick=""return confirm('确定要删除吗?\n\n该操作不可恢复!')"" ><font color=#566276>删</font></a><font color=#566276>"
end if
end function
'''''''''''''''''''''''
'查看留言
Sub View_Words() 
call jd_loginyn()
	  if reStr(Request.QueryString("cls"))="del" and (jd_membercls>=5 or Sessionwebname="Login") then call deltopics()

	 '精点一百的简单分页
	  dim jd100_ID,jd100_biao,jd100_zd,jd100_order,jd100_page_count
	  dim titlepic,listad,jd_usermsg,titlead

	  'jd100_ID="id"  '索引ID
	  jd100_biao="topics" '表名 
	  jd100_order=" order by jd_top desc,jd_rdate desc"   '倒序
	  jd100_page_count=rsCount("id",jd100_biao,"where jd_forumid="&forumid)
with Response    
if  jd100_page_count>0 then
	'打开记录集
	dim sqlid

	if pagestyle<>0 or jd_sty=0 then
	SqlId=repageid(jd100_biao,jd100_page_n,Page,"where jd_forumid="&forumid&" "& jd100_order)
	end if

.Write("<form name='form' method='post' action='"&indexfilename&"' onSubmit='submitonce(this)'><table width='"&jd_table_w&"' border='0' cellspacing='1' cellpadding='4' align='center'>")
    if len(webtitle)>2 then
.Write("<tr> <td height='20' colspan='2' align='right' class='unnamed2'> <marquee onMouseOut=start(); onMouseOver=stop(); scrollamount=3>")
.Write(Ubb(unHtml(webtitle)))
.Write("</marquee></td></tr>")
    end if
.Write("<tr><td class='unnamed1' style='table-layout:fixed;word-break:break-all;word-wrap:break-word;'>")
	  if jd_tologin=5 then
	  .write("【认证版】" )
	  if jd_membercls=9 or Sessionwebname="Login" then .write("〖授权会员:"&jd_ad&"〗")
	  else
		  if jd_ad="" then
		  .write("【版主:暂无】")
		  else
		  .write("【版主:"&jd_ad&"】")
		  end if
	  end if
.Write("</td><td height='20'  class='unnamed1'><div align='right'>&nbsp;") 
.Write(rsPage( jd100_page_count,jd100_page_n,jd100_page_x,"action=View_Words&forumid="&forumid&"","主题数:"))
.Write("</div></td></tr></table>")

dim edit_list

⌨️ 快捷键说明

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