call admin_msg(\"免费版没有JS 功能!QQ:39483630 http://179fei.cn\",\"?\",1)
end sub
function links_fso(lt,nummer)
dim temp1,nname,topic
temp1=\"document.write (\"\"<table border=0 width=\'100%\' cellspacing=2 cellpadding=2>\"\");\"
sql=\"select * from links where sort=\'\"<&\"\' and hidden=1 order by orders\"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
temp1=temp1&vbcrlf&\"document.write (\"\"<tr align=center>\"\");\"
for i=1 to nummer
if rs.eof then exit for
temp1=temp1&vbcrlf&\"document.write (\"\"<td><a href=\'\"&rs(\"url\")&\"\' target=_blank>\"
if lt=\"txt\" then
temp1=temp1&joekoe_cms.code_js(joekoe_cms.code_html(rs(\"nname\"),1,0),1)
else
temp1=temp1&\"<img src=\'\"&rs(\"pic\")&\"\' border=0 width=88 height=31 alt=\'\"&joekoe_cms.code_js(rs
(\"nname\"),1)&\"\'>\"
end if
temp1=temp1&\"</a></td>\"\");\"
rs.movenext
next
temp1=temp1&vbcrlf&\"document.write (\"\"</tr>\"\");\"
loop
rs.close
temp1=temp1&vbcrlf&\"document.write (\"\"</table>\"\");\"
links_fso=temp1
end function
sub joekoe_chk_list()
dim j
for j=0 to dim_n
rssum=0
sql=\"select * from links where sort=\'\"&dim_sort(j,0)&\"\' order by orders,id\"
call joekoe_cms.exec(\"\",-1)
rs.open sql,conn,1,3
if not rs.eof then rssum=rs.recordcount
for i=1 to rssum
rs(\"orders\")=i
rs.update
rs.movenext
next
rs.close
next
call admin_msg(\"已成功对所有\"&tit_fir&\"进行重新排序 !\",\"?\",1)
end sub
function joekoe_chk_order()
dim actions,tmp_id_1,tmp_id_2,tmp_order_1,tmp_order_2,update_ok
actions=trim(request.querystring(\"actions\"))
update_ok=\"no\"
sql_add=\"\"
if actions=\"up\" then sql_add=\" desc\"
sql=\"select sort from links where id=\"&id
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
sort=link_sort_type(rs(\"sort\"))
end if
rs.close
if sort=\"\" then call joekoe_chk_edit()
sql=\"select * from links where sort=\'\"&sort&\"\' order by orders\"&sql_add
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
if int(rs(\"id\"))=int(id) then
tmp_id_1=id
tmp_order_1=rs(\"orders\")
rs.movenext
if not rs.eof then
tmp_id_2=rs(\"id\")
tmp_order_2=rs(\"orders\")
update_ok=\"yes\"
exit do
end if
exit do
end if
rs.movenext
loop
rs.close
if update_ok=\"yes\" then
sql=\"update links set orders=\"&tmp_order_2&\" where id=\"&tmp_id_1
call joekoe_cms.exec(sql,0)
sql=\"update links set orders=\"&tmp_order_1&\" where id=\"&tmp_id_2
call joekoe_cms.exec(sql,0)
end if
end function
sub joekoe_chk_edit()
dim nname,orders,nsort,hidden
call admin_td(\"编辑\"&tit_fir)
sql=\"select top 1 * from links where id=\"&id
call joekoe_cms.exec(\"\",-1)
rs.open sql,conn,1,3
if rs.eof then
rs.close
call admin_msg(tit&\"(\"&id&\")不存在!\",\"?sort=\"&sort,0)
exit sub
end if
if chk() then
nname=code_admin(\"nname\",1,20)
nsort=link_sort_type(code_admin(\"sort\",1,0))
hidden=true
if trim(request.form(\"hidden\"))=\"yes\" then hidden=false
if nname=\"\" or nsort=\"\" then
rs.close
call admin_error(tit_fir&\"类型 和 网站名称 不能为空!\")
exit sub
end if
rs(\"sort\")=nsort
rs(\"nname\")=nname
rs(\"url\")=code_admin(\"url\",1,100)
rs(\"pic\")=code_admin(\"pic\",1,100)
rs(\"hidden\")=hidden
rs.update
rs.close
call admin_msg(\"成功编辑一项\"&tit,\"?sort=\"&sort,0)
exit sub
end if
call form_first()
nsort=rs(\"sort\")
%>
<form action=\'?action=edit&sort=<%response.write sort%>&id=<%response.write id%>\' method=post>
<input type=hidden name=chk value=\'yes\'>
<tr>
<td><%response.write tit_fir%>类型:</td>
<td><input type=radio name=sort value=\'fir\'<%if nsort=\"fir\" then response.write \" checked\"%>>首页<%
response.write tit_fir%>
<input type=radio name=sort value=\'sec\'<%if nsort=\"sec\" then response.write \" checked\"%>>内页<%
response.write tit_fir%>
<input type=radio name=sort value=\'forum\'<%if nsort=\"forum\" then response.write \" checked\"%>>论坛
<%response.write tit_fir%>
<input type=radio name=sort value=\'txt\'<%if nsort=\"txt\" then response.write \" checked\"%>>文字<%
response.write tit_fir%></td>
</tr>
<tr>
<td>网站名称:</td>
<td><input type=text name=nname value=\'<%response.write rs(\"nname\")%>\' size=50
maxlength=20></td>
</tr>
<tr>
<td><%response.write tit_fir%>地址:</td>
<td><input type=text name=url value=\'<%response.write rs(\"url\")%>\' size=50 maxlength=100></td>
</tr>
<tr>
<td><%response.write tit_fir%>LOGO:</td>
<td><input type=text name=pic value=\'<%response.write rs(\"pic\")%>\' size=60 maxlength=100></td>
</tr>
<tr>
<td>是否隐藏:</td>
<td><input type=checkbox name=hidden value=\'yes\'<%if rs(\"hidden\")=false then response.write \"
checked\"%>> 选择表示隐藏该<%response.write tit_fir%></td>
</tr>
<%
call submit_edit()
rs.close
end sub
sub joekoe_chk_add()
dim nname,orders,nsort,hidden
call admin_td(\"添加\"&tit_fir)
if chk() then
nname=code_admin(\"nname\",1,20)
nsort=link_sort_type(code_admin(\"sort\",1,0))
if nname=\"\" or nsort=\"\" then
call admin_error(tit_fir&\"类型 和 网站名称 不能为空!\")
exit sub
end if
orders=1
sql=\"select top 1 orders from links where sort=\'\"&nsort&\"\' order by orders desc\"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then orders=int(rs(\"orders\"))+1
rs.close
sql=\"select * from links\"
call joekoe_cms.exec(\"\",-1)
rs.open sql,conn,1,3
rs.addnew
rs(\"orders\")=orders
rs(\"sort\")=nsort
rs(\"nname\")=nname
rs(\"url\")=code_admin(\"url\",1,100)
rs(\"pic\")=code_admin(\"pic\",1,100)
rs(\"hidden\")=true
rs.update
rs.close
call admin_msg(\"成功添加一项新的\"&tit,\"?\",0)
exit sub
end if
call form_first()
%>
<form action=\'?action=add\' method=post>
<input type=hidden name=chk value=\'yes\'>
<tr>
<td><%response.write tit_fir%>类型:</td>
<td><input type=radio name=sort value=\'fir\' checked>首页<%response.write tit_fir%>
<input type=radio name=sort value=\'sec\'>内页<%response.write tit_fir%>
<input type=radio name=sort value=\'forum\'>论坛<%response.write tit_fir%>
<input type=radio name=sort value=\'txt\'>文字<%response.write tit_fir%></td>
</tr>
<tr>
<td>网站名称:</td>
<td><input type=text name=nname size=50 maxlength=20></td>
</tr>
<tr>
<td><%response.write tit_fir%>地址:</td>
<td><input type=text name=url value=\'http://\' size=50 maxlength=100></td>
</tr>
<tr>
<td><%response.write tit_fir%>LOGO:</td>
<td><input type=text name=pic value=\'images/links/\' size=60 maxlength=100></td>
</tr>
<tr>
<td>是否隐藏:</td>
<td><input type=checkbox name=hidden value=\'yes\'> 选择表示隐藏该<%response.write tit_fir%></td>
</tr>
<%
call submit_add()
end sub
sub joekoe_chk_main()
dim url,nname
nummer=10
nums=nummer
%>
<form name=sel_form action=\'?jk_mod=<%response.write jk_mod%>&sort=<%response.write sort%
>&action=handle\' method=post>
<tr align=center>
<td class=td width=\'6%\'>序号</td>
<td class=td width=\'20%\'>LOGO</td>
<td class=td width=\'20%\'>网站名称</td>
<td class=td width=\'30%\'>网站地址</td>
<td class=td width=\'18%\'>操作</td>
<td class=td width=\'6%\'><input type=checkbox name=sel_all value=\'yes\'></td>
</tr>
<%
if sort<>\"\" then
sql_add=\" where sort=\'\"&sort&\"\'\"
pageurl=pageurl&\"sort=\"&sort&\"&\"
end if
sql=\"select count(id) 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 orders,id\"
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
id=rs(\"id\")
nname=rs(\"nname\")
url=rs(\"url\")
%>
<tr align=center>
<td class=tims><%response.write (viewpage-1)*nummer+i%></td>
<td><%
if rs(\"sort\")=\"txt\" then
response.write \"文字\"&tit_fir
else
response.write \"<img src=\'\"&rs(\"pic\")&\"\' border=0>\"
end if
%></td>
<td><a href=\'<%response.write url%>\' target=_blank><%response.write joekoe_cms.code_html
(nname,1,0)%></a></td>
<td align=left><a href=\'<%response.write url%>\' target=_blank><%response.write
joekoe_cms.code_html(url,1,20+tnum)%></a></td>
<td><%response.write pro_edit(\"?jk_mod=\"&jk_mod&\"&sort=\"&sort&\"&action=edit&id=\"&id,\"编辑
该\"&tit_fir) &\"\"& pro_hidden(rs(\"hidden\"),1)%>
<a href=\'?sort=<%response.write sort%>&jk_mod=<%response.write jk_mod%>&id=<%
response.write id%>&action=order&actions=up\'><%response.write img_admin(\"up_2\",\"向上移动
此\"&tit_fir)%></a>
<a href=\'?sort=<%response.write sort%>&jk_mod=<%response.write jk_mod%>&id=<%
response.write id%>&action=order&actions=down\'><%response.write img_admin(\"down_2\",\"向下移动
此\"&tit_fir)%></a></td>
<td><input type=checkbox name=sel_id value=\'<%response.write id%>\'></td>
</tr>
<%
rs.movenext
next
rs.close
%>
<tr class=tr1>
<td colspan=4>
现有<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=2 align=center>
执行
<select name=sel_type size=1>
<option value=\'审核\'>显示</option>
<option value=\'待审核\'>审核</option>
<option value=\'删除\'>删除</option>
</select>
<input type=submit value=\'操作\'>
</td>
</tr>
</form>
<%
end sub
%>作者: 6w叔 时间: 2008-8-26 17:55
提示: 作者被禁止或删除 内容自动屏蔽作者: hxyly 时间: 2008-10-9 20:50
暂没有 .....
呵呵