📄 admin_photo.asp
字号:
<!-- #include file="include/admin_onlogin.asp" -->
<!-- #include file="include/jk_ubb.asp" -->
<%
'****************************************************
' 本插件由杉杉小屋www.cedarn.info修改自原1.0版
'****************************************************
index_url="photo"
data_name="admin_photo"
tit_fir="照片"
tit="管理照片"
call admin_master(0,0)
call admin_header(0,0)
call admin_table(1)
select case action
case "handle"
call sushi_chk_handle()
case else
call photo_main()
end select
call admin_ender(1)
sub photo_main()
dim id,nname,topic,hidden,tim
sql="select count(id) from photo"
set rs=joekoe_cms.exec(sql,1)
rssum=rs(0)
rs.close
if int(rssum)<1 then
' call photo_write()
exit sub
end if
call format_pagecute()
sql="select top "&nummer*viewpage&" id,photopic,nname,topic,word,tim,sampname,hidden,counter,photoname from photo order by id 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)
%>
<form name=sel_form action='?action=handle' method=post>
<tr align=center><td class=td>No.</td><td class=td>主题</td><td class=td>作者</td><td class=td>时间</td><td class=td>公开</td><td class=td>操作</td></tr>
<%
for i=1 to nums
id=rs("id")
topic=rs("topic")
tim=rs("tim")
dim d_name
if rs("photoname")<>"" then
d_name=rs("photoname")
else
d_name=rs("nname")
end if
%>
<tr class=bg_td align=center><td><%response.write rssum-(i+(viewpage-1)*nummer)+1%></td>
<td align=left><font alt='<%response.write joekoe_cms.code_html(topic,1,0)%>'><%response.write joekoe_cms.code_html(topic,1,20)%></font></td>
<td><%response.write d_name%></td>
<td><%response.write tim%></td>
<td><%if rs("hidden")=true then%><font color=blue><b alt=公开>√</b></font><%else%><font color=red><b alt=不公开>×</b></font><%end if%></td>
<td><input type=checkbox name=sel_id value=<%response.write id%>></td>
</tr>
<%
rs.movenext
next
rs.close
%>
<tr class=bg_tds height=30><td colspan=4> 共有<font class=red><%response.write rssum%></font>条照片 页次:<font class=red><%response.write viewpage&"</font>/<font class=red>"&thepages%></font> 分页:<% response.write jk_pagecute(nummer,thepages,viewpage,"?action=myphoto&",5,"#ff0000") %></td>
<td align=center>
执行
<select name=sel_type size=1>
<option value='公开照片'>公开照片</option>
<option value='取消公开'>取消公开</option>
<option value='删除照片'>删除照片</option>
</select>
<input type=submit value='操作' onclick="return sel_click(this.form);">
</td><td align=center><input type=checkbox name=sel_all value='yes' onclick="javascript:select_all(this.form);"></td>
</tr></form>
<%
end sub
function weeks(w)
select case w
case 1 weeks="日"
case 2 weeks="一"
case 3 weeks="二"
case 4 weeks="三"
case 5 weeks="四"
case 6 weeks="五"
case 7 weeks="六"
end select
end function
sub sushi_chk_handle()
dim sel_type,seltype
sel_type=trim(request.form("sel_type"))
select case sel_type
case "公开照片"
seltype="gkphoto"
case "取消公开"
seltype="qxphoto"
case "删除照片"
seltype="delete"
case else
sel_type=""
seltype=""
end select
if sel_type="" or seltype="" then
Response.Write "<script>"
Response.Write "alert('您在提交用户操作时出现非法的数据');"
Response.Write "</script>"
exit sub
end if
dim sel_id,hdim,hnum,id
sel_id=trim(request.form("sel_id"))
sel_id=replace(sel_id," ","")
hdim=split(sel_id,",")
hnum=ubound(hdim)
for i=0 to hnum
id=hdim(i)
if isnumeric(id) then
select case seltype
case "delete"
call joekoe_cms.exec("delete from photo where id="&id&"",0)
case "gkphoto"
sql="update photo set hidden=1 where id="&id
conn.execute(sql)
case "qxphoto"
sql="update photo set hidden=0 where id="&id
conn.execute(sql)
case else
end select
end if
next
erase hdim
Response.Write ("<tr><td align=left class=td> 成功信息</td></tr>")
Response.Write ("<tr><td align=center class=bg_td height=180>")
Response.Write ("已成功("&sel_type&")操作了"&(hnum+1)&"条"&tit_fir&"记录!<br><br>")
Response.Write ("<a href='"&trim(request.servervariables("http_referer"))&"'>返回上页</a>")
Response.Write (" <a href=?>首页</a></td></tr>")
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -