仿2.0论坛IP置于下方


con_forum_main.asp 文件(JK_CMS1.2版):自己对照修改。
<%
function forum_main()
  dim classid,forum_w,forum_w2,f_remark,fcid,forum_new_info,f_new_view,mdim,mnum
  fcid=0
  sql="select forum_id,forum_n,forum_w,forum_name,forum_type,forum_pro,forum_new_info,forum_new_num,forum_topic_num,forum_data_num,forum_power,forum_remark,forum_pic,class_id from bbs_forum where forum_hidden=0 and forum_star<2 order by class_id,forum_order,forum_star"
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
  if not rs.eof then mdim=rs.getrows()
  rs.close
  mnum=-1
  if isarray(mdim) then mnum=ubound(mdim,2)
  for i=0 to mnum
    classid=mdim(13,i)
    if cint(fcid)<>cint(classid) then
      if cint(classid)>cint(fcid) and cint(fcid)>0 then response.write vbcrlf&forum_main_end("")
      response.write vbcrlf&forum_main_head(mdim(3,i),mdim(0,i),"c")
      fcid=classid
    else
      forum_w=mdim(2,i)
      f_remark=mdim(11,i)
      forum_w2=1
      if forum_w=false then forum_w2=0
      forum_new_info=""
      f_new_view=forum_new_view_true(mdim(4,i))
      if f_new_view=true then
        forum_new_info=mdim(6,i)
      end if
      response.write vbcrlf&forum_main_body(mdim(0,i),mdim(1,i),forum_w2,mdim(3,i),mdim(4,i),forum_new_info,mdim(7,i),mdim(8,i),mdim(9,i),mdim(10,i),f_remark,mdim(12,i),f_new_view)
      response.buffer
    end if
  next
  if mnum>=0 then erase mdim
  if cint(fcid)>0 then response.write vbcrlf&forum_main_end("")
  call web_branch(0)
end function

sub forum_user_stat(w_num)
  dim temp1
  sql="select top "&w_num&" id,topic,tim from bbs_cast where sort='forum' order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  if not rs.eof then
    temp1="<a href='update.asp?action=forum#"&rs("id")&"' target=_blank>"&joekoe_cms.code_html(rs("topic"),1,0)&"</a> <font class=tims>"&joekoe_cms.time_type(rs("tim"),4)&"</font>"
  end if
  rs.close
  response.write vbcrlf&"<table cellspacing=1 cellpadding=1 class=table>" & _
   vbcrlf&"<tr><td class=td colspan=2> "&img_skin(web_img_m)&" 论坛数据 用户状态</td></tr>" & _
   vbcrlf&"<tr><td class=bg_td>" & _
   vbcrlf&"  <table border=0 width='100%'>" & _
   vbcrlf&"  <tr>" & _
   vbcrlf&"  <td align=center width=50><img src='"&joekoe_cms.web_dir_skin&"forum/forum_stat.gif' border=0></td>" & _
   vbcrlf&"  <td height="&m_hei&" width=*>主题总数 <font class=red>"&num_topic&"</font> 贴,贴子总数 <font class=red>"&num_data&"</font> 贴,今日贴数 <font class=red>"&new_num&"</font> 贴,网站注册<font class=red>"&num_reg&"</font> 人,新进来宾:"&format_user_name(new_username,0,"")&"</td>" & _
   vbcrlf&"  </tr>" & _
   vbcrlf&"  <tr>" & _
   vbcrlf&"  <td align=center><img src='"&joekoe_cms.web_dir_skin&"forum/forum_cast.gif' border=0></td>" & _
   vbcrlf&"  <td height="&m_hei&"><a href='update.asp?action=forum'>论坛公告</a>:<b>"&temp1&"</b></td></tr>" & _
   vbcrlf&"  <tr>"
    if login_mode="" or var_null(login_mode)="" then
         response.write vbcrlf&"<form name=login_frm action='login.asp?action=login_chk' method=post><td align=center><img src='"&joekoe_cms.web_dir_skin&"forum/forum_user.gif' border=0></td><td>用户名:<input type=text name=username value='' size=15 maxlength=10>  密码:<input type=password name=password value='' size=15 maxlength=20>  <input type=checkbox id=id_memery_info name=memery_info value='yes'><label for=id_memery_info id=label_memery_info alt='如选择“记住密码”登陆,以后将自动登陆本站!'>记住密码</label>  " &_
   vbcrlf&"<input type=image src='images/index/user_login_button.gif' border=0 align=absmiddle onclick='jacascript:return login_true();'>  <a href='register.asp'>注册新用户</a>  <a href='user_getpass.asp' style='cursor:help;'>忘记密码</a>  <a href='register.asp?action=resend' alt='重新发送一次我的注册验证邮件!'>发送注册邮件</a>"
       else
         response.write  vbcrlf&"<td align=center><img src='"&joekoe_cms.web_dir_skin&"forum/forum_user.gif' border=0></td><td>您好,<font class=blue><b>"&login_username&"</b></font> 您现在已登陆 <font class=red2>"&format_power(login_mode,1)&"</font> 模式 您目前有 <font class=red>"&login_emoney&"</font>"&joekoe_cms.web_unit&",<font class=red>"&login_integral&"</font>分 <a href='user_mail.asp'><img src='skin/"&joekoe_cms.web_skin&"/mail/new.gif' align=absmiddle border=0> 我的短信箱("
         if login_msg>0 then
           response.write "<font class=red>"&login_msg&"</font>"
         else
           response.write "<font class=gray>0</font>"
         end if
         response.write  vbcrlf&"新)</a> <img src='skin/"&joekoe_cms.web_skin&"/small/u_logout.gif' border=0 align=absmiddle> <a href='login.asp?action=logout' onclick=""javascript:return click_return('退出本次登陆',1);"">退出登陆</a></td>"
       end if
  response.write vbcrlf&"  </tr>" & _
   vbcrlf&"  </table>" & _
   vbcrlf&"</td></tr>" & _
   vbcrlf&"<tr><td class=bg_tds align=center height=30>" & _
   vbcrlf&"    <table border=0 cellspacing=0 cellpadding=2>" & _
   vbcrlf&"    <tr>" & _
   vbcrlf&"    <td><a href='forum_action.asp?action=new'>论坛新贴</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='forum_action.asp?action=hot'>论坛热贴</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='forum_action.asp?action=good'>论坛精华</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='forum_action.asp?action=top'>论坛置顶</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='forum_search.asp'>论坛搜索</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='help.asp?action=forum'>论坛帮助</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='forum_action.asp?action=my'>我发布的主题</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='forum_action.asp?action=join'>我参与的主题</a></td>" & _
   vbcrlf&"    <td class=gray>☉</td>" & _
   vbcrlf&"    <td><a href='user_action.asp?action=list'>用户列表</a></td>" & _
   vbcrlf&"    </tr>" & _
   vbcrlf&"    </table>" & _
   vbcrlf&"</td></tr>" & _
   vbcrlf&"</table>"&ukong
  call web_branch(0)
end sub

sub forum_down()
  dim udim,counter_r
  sql="select count(*) from user_login where l_type=0"
  set rs=joekoe_cms.exec(sql,1)
  counter_r=rs(0)
  rs.close
%>
<script language=javascript>
function forum_load_online(fname)
{
  var targetimg =eval("document.all.forum_online_img");
  var targetDivtr =eval("document.all.forum_online_tr");
  var targetDiv =eval("document.all.forum_online");
  //if (targetimg.src.indexOf("nofollow")!=-1){return false;}
  if (targetDivtr.style.display!='block')
  {
    document.all.forum_online_var.innerHTML="关闭在线列表";
    targetDivtr.style.display="block";
    if (targetimg.loaded=="no")
    {
      targetimg.loaded="";
      document.frames["hiddenframe"].location.replace("forum_loadonline.asp?fname="+fname);
    }
  }
  else
  {
    document.all.forum_online_var.innerHTML="打开在线列表";
    targetDivtr.style.display="none";
  }
}
</script>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0><%response.write img_skin(web_img_m)%> 论坛图例</td></tr>
<tr><td class=bg_td><%response.write img_user%></td></tr>
<tr><td class=bg_td align=center>
  <table border=0 cellspacing=0 cellpadding=0 width='100%'>
  <tr><td height=1></td></tr>
  <tr><td height=<%response.write m_hei%>>用户系统信息:您的真实IP是:<%response.write user_ip%>,<%response.write user_sys_type(user_sys)%></td></tr>
  <tr><td height=5></td></tr>
  <tr><td height=20>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td>网站当前在线 <font class=red><%response.write online_num%></font> 人,其中注册用户 <font class=red><%response.write counter_r%></font> 人,游客 <font class=red><% response.write (online_num-counter_r)%></font> 人</td>
    <td width=30 align=center><img loaded=no id=forum_online_img src='<%response.write joekoe_cms.web_dir_skin%>small/new_f.gif' border=0></td>
    <td><span style=cursor:hand onclick="javascript:forum_load_online('');" id=forum_online_var>打开在线列表</a></span></td>
    </tr>
    </table>
  </td></tr>
  <tr style="display:none" id=forum_online_tr height=30><td id=forum_online width='100%'><div class=div_alt onclick="javascript:forum_load_online('');">正在读取在线用户数据,请稍侯……</div></td></tr>
  <tr><td height=1></td></tr>
  </table>
</td></tr>
</table>
<%
  if isonline then response.write joekoe_cms.js_put("forum_load_online('');",1)
  response.write ukong&forum_img_tim
  call web_branch(0)
end sub

sub user_birthday()
  dim temp1,nnum,username,power,ta
  temp1=""
  nnum=0
  ta="'"
  sql="select username,sex,power,tim,last_tim from user_data where hidden=1 and month(birthday)="&month(joekoe_cms.now_time)&" and day(birthday)="&day(joekoe_cms.now_time)&" order by id"
  call joekoe_cms.exec(sql,-1)
  rs.open sql,conn,1,1
  do while not rs.eof
    temp1=temp1&"<tr>"
    for i=1 to 5
      if rs.eof then exit for
      username=rs(0)
      power=rs(2)
      temp1=temp1&"<td>"&user_view_sex(rs(1),rs(4))&" <a href='user_view.asp?username="&server.urlencode(username)&"' alt='用户类型:"&format_power(power,1)&"<br>注册时间:"&joekoe_cms.time_type(rs(3),1)&"' target=_blank>"&username&"</a></td>"
      rs.movenext
      nnum=nnum+1
    next
    temp1=temp1&"</tr>"
  loop
  rs.close
  response.write vbcrlf&"<table cellspacing=1 cellpadding=1 class=table>" & _
                 vbcrlf&"<tr><td class=td> "&img_skin(web_img_m)&" 今天过生日的用户(共 <font class=red>"&nnum&"</font> 人)</td></tr>" & _
                 vbcrlf&"<tr><td class=bg_td align=center>" & _
                 vbcrlf&"  <table border=0 width='98%' cellspacing=0 cellpadding=2>" & _
                 vbcrlf&"  <tr><td width='20%' height=5></td><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td></tr>"
  if temp1="" then
    response.write vbcrlf&"<tr><td colspan=5 class=gray>   今天没有过生日的用户</td></tr>"
  else
    response.write vbcrlf&temp1
  end if
  response.write vbcrlf&"  <tr><td height=5></td></tr>" & _
                 vbcrlf&"  </table>" & _
                 vbcrlf&"</td></tr>" & _
                 vbcrlf&"</table>"&ukong
  call web_branch(0)
end sub

sub forum_links()
%>
<table cellspacing=1 cellpadding=1 class=table>
<tr><td class=td> <%response.write img_skin(web_img_m)%> 论坛链接</td></tr>
<tr><td class=bg_td align=center>
<script language=javascript src='style/data_link_forum_main.js'></script>
</td></tr>
</table>
<%
  response.write ukong
end sub


function forum_main_head(vars,cid,ct)
  dim hurl,temp1
  hurl="forum_list.asp?forum_id="
  if ct="f" then hurl="forum_list.asp?forum_id="
  temp1=temp1&vbcrlf&"<table cellspacing=1 cellpadding=1 class=table>" & _
              vbcrlf&"<tr><td class=td colspan=4> "&img_skin(web_img_m)&" <a href='"&hurl&cid&"' class=h_td>"&vars&"</a></td></tr>"
  forum_main_head=temp1
end function

function forum_main_body(f_id,f_n,f_w,f_name,f_type,f_new_info,f_new_num,f_topic_num,f_data_num,f_power,f_remark,f_pic,f_new_view)
  dim temp1,ddim,temp_pic,fj
  temp1=temp1&vbcrlf&"<tr class=bg_td>" & _
              vbcrlf&"<td width='6%' align=center><img src='"&joekoe_cms.web_dir_skin&"forum/label_"&f_type
  if f_new_num>0 then temp1=temp1&"n"
  temp1=temp1&".gif' border=0></td>"
  temp1=temp1&vbcrlf&"<td width='94%'>" & _
              vbcrlf&"  <table border=0 width='100%' cellpadding=0 cellspacing=0>" & _
              vbcrlf&"  <tr height=22 class=bg_tds>" & _
              vbcrlf&"  <td width='72%'>" & _
              vbcrlf&"    <table border=0 width='100%' cellpadding=0 cellspacing=0>" & _
              vbcrlf&"    <tr align=center>" & _
              vbcrlf&"    <td width='25%' align=left> <b><a href='forum_list.asp?forum_id="&f_id&"'>"&f_name&" </a></b></td>" & _
              vbcrlf&"    <td width='12%' class=gray>"
  ddim=split(web_forum_type,"|")
  for fj=0 to ubound(ddim)
    if int(f_type)=int(fj+1) then
      temp1=temp1&ddim(fj)
      exit for
    end if
  next
  if isarray(ddim) then erase ddim
  temp1=temp1&"</td>"
  temp1=temp1&vbcrlf&"    <td width='4%'></td>" & _
              vbcrlf&"    <td align=left width='15%'><img src='"&joekoe_cms.web_dir_skin&"forum/forum_num_new.gif' alt='今日主题数' border=0> <font class=red>"&f_new_num&"</font></td>" & _
              vbcrlf&"    <td align=left width='15%'><img src='"&joekoe_cms.web_dir_skin&"forum/forum_num_topic.gif' alt='论坛主题数' border=0> "&f_topic_num&"</td>" & _
              vbcrlf&"    <td align=left width='15%'><img src='"&joekoe_cms.web_dir_skin&"forum/forum_num_data.gif' alt='论坛贴子数' border=0> "&f_data_num&"</td>" & _
              vbcrlf&"    <td width='10%' align=right>"
  if f_n>0 and f_w=1 then
    temp1=temp1&"<font class=gray alt='本论坛下面有 "&f_n&" 个分论坛'>[<font class=red>"&f_n&"</font>]</font> "
  end if
  '&forum_super_view(f_power,web_forum_power_type)&
  temp1=temp1&"<a href='forum_write.asp?forum_id="&f_id&"'><img src='"&joekoe_cms.web_dir_skin&"forum/mini_write.gif' align=absmiddle alt='发表主题' border=0></a> </td>"
  temp1=temp1&vbcrlf&"    </tr>" & _
              vbcrlf&"    </table>" & _
              vbcrlf&"  </td>" & _
              vbcrlf&"  <td width='28%'>"&forum_super_view(f_power,web_forum_power_type)&"</td>" & _
              vbcrlf&"  </tr>" & _
              vbcrlf&"  <tr class=bg_1>" & _
              vbcrlf&"  <td align=center>" & _
              vbcrlf&"    <table border=0 width='99%'>" & _
              vbcrlf&"    <tr>" & _
              vbcrlf&"    <td class=htd>"&joekoe_cms.code_html(f_remark,2,0)&"</td>"
  if var_null(f_pic)<>"" and  f_pic<>"" then
    temp_pic=f_pic
    if left(temp_pic,1)="$" then
      temp_pic=right(temp_pic,len(temp_pic)-1)
      temp_pic="images/forum_pic/"&temp_pic
    end if
    temp1=temp1&vbcrlf&"    <td align=right><img src='"&temp_pic&"' border=0></td>"
  end if
  temp1=temp1&vbcrlf&"    </tr>" & _
              vbcrlf&"    </table>" & _
              vbcrlf&"  </td>" & _
              vbcrlf&"  <td><font class=htd>"
  if f_w=1 then
    if f_new_view then
      f_new_info=split(f_new_info,"|")
      if int(ubound(f_new_info))=3 then
        temp1=temp1&"<font class=htd>新贴:<a href='forum_view.asp?forum_id="&f_id&"&view_id="&f_new_info(2)&"' alt='"&joekoe_cms.code_html(f_new_info(3),1,0)&"'>"&joekoe_cms.code_html(f_new_info(3),1,12)&"</a><br>作者:"&format_user_name(f_new_info(0),0,"")&"<br>时间:"&f_new_info(1)&"</font>"
      else
        temp1=temp1&"<font class=gray>暂无</font>"
      end if
    else
      temp1=temp1&"<p align=center class=gray>您没有浏览最后更新的权限</p>"
    end if
  else
    temp1=temp1&"<p align=center><a href='forum_list.asp?forum_id="&f_id&"' class=gray>点击浏览分论坛(<font class=red>"&f_n&"</font>个)信息</a></p>"
  end if
  if isarray(f_new_info) then erase f_new_info
  temp1=temp1&vbcrlf&"</td>" & _
              vbcrlf&"  </tr>" & _
              vbcrlf&"  </table>" & _
              vbcrlf&"</td></tr>"
  forum_main_body=temp1
end function

function forum_main_end(vars)
  forum_main_end=vbcrlf&"</table>"&ukong
end function
%>

文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 7 | 引用: 7 | 查看次数: 697
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭