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

📄 admin_review.asp

📁 打开目录ads文件夹 找到top_ads.js文件 用记事本打开后就可以看到: -------------------------------------- var head_ads_tx
💻 ASP
字号:
<!-- #include file="include/admin_onlogin.asp" -->
<%

dim ndim,nnum,ntit1,ntit2
index_url="review"
call admin_master(0,0)
call admin_header(0,0)
nsort=""
ntit=tit
call joekoe_chk_dim()
ntit2=tit_fir&"查看"
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td><a href='?nsort=<%response.write nsort%>'><%response.write ntit1&tit%></a></td>
  <td width=10></td>
  <td><a href='?nsort=<%response.write nsort%>&action=clear' onclick="return click_return('清空<%response.write ntit1&tit_fir%>',0);">清空<%response.write ntit1&tit_fir%></a></td>
  </tr>
  </table>
</td></tr>
</table>
<%
call admin_table(1)

if int(nnum)<0 then
  response.write vbcrlf&"<tr><td align=center height=100 colspan=2><font class=red>暂时没有栏目"&tit_fir&"可管理!</font><br><br>请先在 <a href='admin_menu.asp'>管理菜单</a> 里设置正确。</td></tr>"
else
  response.write vbcrlf&"<tr align=center valign=top><td>" & _
		 vbcrlf&"<table class=table2>" & _
		 vbcrlf&"<tr><td width=15></td><td></td></tr>"
  for i=0 to nnum+1
    if nsort=ndim(0,i) then
      response.write vbcrlf&"<tr><td align=center>"&img_admin("s_left_sort","")&"</td><td><a href='?nsort="&ndim(0,i)&"' class=red2>"&ndim(1,i)&tit_fir&"</a></td></tr>"
    else
      response.write vbcrlf&"<tr><td align=center>"&img_admin("s_nsort","")&"</td><td><a href='?nsort="&ndim(0,i)&"'>"&ndim(1,i)&tit_fir&"</a></td></tr>"
    end if
  next
  response.write vbcrlf&"</table>" & _
		 vbcrlf&"</td><td>"
  select case action
  case "delete"
    call joekoe_chk_delete()
  case "reply"
    call joekoe_chk_reply()
  case "clear"
    call joekoe_chk_clear()
  case else
    call joekoe_chk_main()
  end select
  response.write vbcrlf&"</td></tr>"
end if

call joekoe_chk_erase()
call admin_ender(1)

sub joekoe_chk_delete()
  dim sel_type,seltype,sel_id,hdim,hnum,hid,hi,htype
  htype=1
  sel_type="删除"
  seltype="delete"
  if joekoe_cms.post_chk()=false or seltype="" then
    call admin_event("外部提交!!!",0,0)
    call joekoe_chk_main()
    exit sub
  end if
  sel_id=trim(request.form("sel_id"))
  sel_id=replace(sel_id," ","")
  hdim=split(sel_id,",")
  hnum=ubound(hdim)
  for hi=0 to hnum
    hid=hdim(hi)
    if isnumeric(hid) then
      call joekoe_cms.exec("delete from "&data_name&" where rid="&hid,0)
    end if
  next
  erase hdim
  action=""
  call admin_event(sel_type&" "&(hnum+1)&"条("&tit_fir&")记录",0,0)
  call admin_msg("已成功("&sel_type&")操作了"&(hnum+1)&"条记录!","?nsort="&nsort,1)
end sub

sub joekoe_chk_clear()
  dim nnsort:nnsort=trim(request.querystring("nsort"))
  sql_add=" where rsort='"&nnsort&"'"
  if nnsort="_all" then sql_add=" "
  sql="delete from review"&sql_add
  response.write ntit1
  call joekoe_cms.exec(sql,0)
  call admin_event("删除 "&ntit1&" 评论的记录",0,0)
  call admin_msg("已成功删除了"&ntit1&"评论的记录!","?",1)
end sub

sub joekoe_chk_reply()
  dim reword
  sql="select top 1 * from "&data_name&" where rid="&id
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,3
  if rs.eof then
    rs.close
    call admin_msg(tit_fir&"ID("&id&")不存在!","?nsort="&nsort,1)
    exit sub
  end if
  if chk() then
    reword=code_admin("reword",1,250)
    rs("reword")=reword
    rs("retim")=joekoe_cms.now_time
    rs.update
    rs.close
    call admin_msg("成功回复了"&tit_fir&"(ID:"&id&")","?nsort="&nsort,1)
    exit sub
  end if
  call form_first()
%>
<table cellspacing=1 cellpadding=3 class=table0>
<form action='?nsort=<%response.write nsort%>&action=reply&id=<%response.write id%>' method=post>
<input type=hidden name=chk value='yes'>
<tr>
<td width='20%' class=td></td>
<td width='80%' class=td><%response.write tit_fir%>回复</td>
</tr>
<tr>
<td><%response.write tit_fir%>作者:</td>
<td><%
  if rs("rtype")=1 then
    response.write format_user_view(rs("rusername"),1,0)
  else
    response.write rs("rusername")
  end if
%></td>
</tr>
<tr>
<td><%response.write tit_fir%>内容:</td>
<td><%response.write joekoe_cms.code_html(rs("rword"),1,0)%></td>
</tr>
<tr>
<td><%response.write tit_fir%>邮件:</td>
<td><%response.write rs("remail")%></td>
</tr>
<tr>
<td><%response.write tit_fir%>时间:</td>
<td><%response.write rs("rtim")%></td>
</tr>
<tr>
<td><%response.write tit_fir%>回复:<br><br>250字以内</td>
<td><textarea name=reword cols=50 rows=6><%response.write joekoe_cms.code_html(rs("reword"),0,0)%></textarea></td>
</tr>
<td>回复时间:</td>
<td><%response.write rs("retim")%></td>
</tr>
<%call submit_edit()%>
</table>
<%
  rs.close
end sub

sub joekoe_chk_main()
  dim rid,rusername,rword,remail,rtype,rtim
%>
<form name=sel_form action='?nsort=<%response.write nsort%>&action=delete' method=post>
<table cellspacing=1 cellpadding=3 class=table0>
<tr align=center>
<td class=td width='7%'>序号</td>
<td class=td width='66%'><%response.write tit_fir%>内容</td>
<td class=td width='15%'><%response.write tit_fir%>时间</td>
<td class=td width='7%'>操作</td>
<td class=td width='5%'><input type=checkbox name=sel_all value='yes' onclick="javascript:select_all(this.form);"></td>
</tr>
<%
  if nsort<>ndim(0,0) then
    sql_add=" where rsort='"&nsort&"'"
    pageurl=pageurl&"nsort="&nsort&"&"
  end if
  sql="select count(rid) from "&data_name&sql_add
  set rs=joekoe_cms.exec(sql,1)
  rssum=rs(0)
  rs.close
  call format_pagecute()
  sql="select top "&nummer*viewpage&" * from "&data_name&sql_add&" order by rid desc"
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
  if int(viewpage)>1 then rs.move (viewpage-1)*nummer
  if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
  for i=1 to nums
    rid=rs("rid")
    rword=rs("rword")
    rtim=rs("rtim")
%>
<tr align=center>
<td>
<%
    if rs("rsort")="scast" then
%>
<a href='<%response.write joekoe_is_nsort_index(rs("rsort"))%>.asp?action=view&id=<%response.write rs("re_id")%>' target=_blank><%response.write (viewpage-1)*nummer+i%></a></td>
<%
    else
%>
<a href='<%response.write joekoe_is_nsort_index(rs("rsort"))%>_view.asp?id=<%response.write rs("re_id")%>' target=_blank><%response.write (viewpage-1)*nummer+i%></a></td>
<%
    end if
%>
<td align=left><%response.write joekoe_cms.code_html(rword,1,0)%></td>
<td><%response.write "<font class=tims alt='"&joekoe_cms.time_type(rtim,2)&"'>"&joekoe_cms.time_type(rtim,3)&"</font>"%></td>
<td><a href='?nsort=<%response.write nsort%>&action=reply&id=<%response.write rid%>'><%response.write img_admin("reply","回复此条"&tit_fir)%></td>
<td><input type=checkbox name=sel_id value='<%response.write rid%>'></td>
</tr>
<%
    rs.movenext
  next
  rs.close
%>
<tr class=tr1>
<td colspan=2>
现有<font class=red><%response.write rssum%></font>篇<%response.write tit_fir%>,
页次:<font class=red><%response.write viewpage%></font>/<font class=red><%response.write thepages%></font>
分页:<%response.write jk_pagecute(nummer,thepages,viewpage,pageurl,5,"#ff0000")%>
</td>
<td colspan=3 align=center>
执行
<select name=sel_type size=1>
<option value='删除'>删除</option>
</select>
<input type=submit value='操作' onclick="return sel_click(this.form);">
</td>
</tr>
</form>
</table>
<%
end sub

function joekoe_is_nsort_index(tsort)
  dim ti
  select case tsort
  case "mdisk"
    joekoe_is_nsort_index="music_disk"
    exit function
  case "msing"
    joekoe_is_nsort_index="music_singer"
    exit function
  case "flash","film"
    joekoe_is_nsort_index="gallery"
    exit function
  case "scast"
    joekoe_is_nsort_index="shop_cast"
    exit function
  end select
  for ti=0 to nnum+1
    if ndim(0,ti)=tsort then
      joekoe_is_nsort_index=ndim(2,ti)
      exit function
    end if
  next
end function

sub joekoe_chk_dim()
  dim tmpsort
  tmpsort=trim(request.querystring("nsort"))
  nnum=-1
  sql="select m_nsort,m_tit_fir,m_index_url from admin_menu where m_is_master=1 and m_is_review=1 order by m_id"
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
  if not rs.eof then
    nnum=rs.recordcount-1
    redim ndim(2,nnum+1)
    ndim(0,0)="_all"
    ndim(1,0)="所有"
    for i=1 to nnum+1
      ndim(0,i)=rs(0)
      ndim(1,i)=rs(1)
      ndim(2,i)=rs(2)
      if tmpsort=ndim(0,i) then
        nsort=tmpsort
        ntit=ndim(1,i)
      end if
      rs.movenext
    next
    if nsort="" then
      nsort=ndim(0,0)
      ntit=ndim(1,0)
    end if
    ntit1=ntit
    ntit=ntit&tit_fir
  end if
  rs.close
end sub

sub joekoe_chk_erase()
  if isarray(ndim) then erase ndim
end sub

%>

⌨️ 快捷键说明

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