📄 hs_news.asp
字号:
call admin_td("添加"&tit_fir)
if chk() then
topic=code_admin("topic",1,40)
word=request.form("word")
if request.form("remote")=1 then word=ReplaceRemoteUrl(word,sAllowExt)
csid=trim(request.form("c_id"))
tcolor=trim(request.form("tcolor"))
if len(tcolor)<>6 then tcolor=""
if cs_nd(csid)=false then
call admin_error("请选择 "&tit_fir&"类型 !")
exit sub
end if
if topic="" or word="" then
call admin_error(tit_fir&"标题 和 "&tit_fir&"内容 不能为空!")
exit sub
end if
PaginationType=trim(request.form("PaginationType"))
MaxCharPerPage=trim(request.form("MaxCharPerPage"))
keyes=code_admin("keyes",1,20)
comto=code_admin("comto",1,10)
username=code_admin("username",1,20)
if symbol_name(username)=false then username=login_username
tim=code_admin("tim",1,20)
tim=joekoe_cms.time_type(tim,1)
if tim="" then tim=joekoe_cms.now_time
pic=code_admin("pic",1,100)
ispic=true
if pic="" then ispic=false
counter=trim(request.form("counter"))
if not isnumeric(counter) then counter=0
istop=0
if trim(request.form("istop"))="yes" then istop=1
hidden=true
if trim(request.form("hidden"))="yes" then hidden=false
call chk_cid_sid()
sql="select * from "&data_name
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,3
rs.addnew
rs("c_id")=cid
rs("s_id")=sid
rs("cod")=cod_type()
rs("topic")=topic
rs("comto")=comto
rs("username")=username
rs("tim")=tim
rs("counter")=counter
rs("istop")=istop
rs("hidden")=hidden
rs("keyes")=keyes
rs("pic")=pic
rs("ispic")=ispic
rs("word")=word
rs("tcolor")=tcolor
rs("PaginationType")=PaginationType
rs("MaxCharPerPage")=MaxCharPerPage
rs.update
rs.close
call upload_note(index_url,first_id(data_name,"id"))
call admin_msg("已成功添加了一条"&tit_fir&"!","?jk_mod="&jk_mod&"&c_id="&cid&"&s_id="&sid,0)
exit sub
end if
call form_first()
ispic=joekoe_cms.rand_file(index_url)
%>
<form name=add_frm action='?jk_mod=<%response.write jk_mod%>&action=add' method=post>
<input type=hidden name=chk value='yes'>
<input type=hidden name=upid value=''>
<tr>
<td><%response.write tit_fir%>标题:</td>
<td><input type=text name=topic size=60 maxlength=40><%response.write redx%></td>
</tr>
<tr>
<td><%response.write tit_fir%>标题颜色:</td>
<td>
# <input type=text name=tcolor value='' maxlength=7 size=10> <a href='javascript:;' onClick="javascript:slect_color('tcolor');"><img border=0 src="../common/html_edit/images/btn_fgcolor.gif" width=23 height=22 align=absmiddle alt='点击选取主题字体颜色'></a> 请正确填写<font class=red_3>6</font>位颜色代码。</td>
</tr>
<tr>
<td><%response.write tit_fir%>分类:</td>
<td><%call chk_csid(nsort,cid,sid)%></td>
</tr>
<tr>
<td><%response.write tit_fir%>关键字:</td>
<td><%call frm_keyes("")%></td>
</tr>
<tr>
<td><%response.write tit_fir%>出处:</td>
<td><input type=text name=comto size=20 maxlength=10> <%response.write tit_fir%>发布人:<input type=text name=username value='<%response.write login_username%>' size=20 maxlength=20></td>
</tr>
<tr>
<td>发布时间:</td>
<td><input type=text name=tim value='<%response.write joekoe_cms.now_time%>' size=20 maxlength=20> <input type=button class=btn name=st_btn value="选择" onclick="javascript:select_time(tim);return false;"> 浏览:<input type=text name=counter value='0' size=6 maxlength=10> 人次 推荐:<input type=checkbox name=istop value='yes'> 隐藏/审核:<input type=checkbox name=hidden value='yes'></td>
</tr>
<%call html_edit(1,"add_frm","word","")%>
<tr>
<td valign=top><%response.write tit_fir%>内容:</td>
<td>
<table border=0><tr>
<td><textarea name=word rows=8 cols=65></textarea></td>
<td width=5></td>
<td valign=bottom><%call textarea_resize("word")%></td>
</tr></table>
</td>
</tr>
<tr>
<td>保存远程图片:</td>
<td><input type=checkbox name=remote value='1'<%if request("remote")=1 then response.write" checked"%>> 是否自动保存远程图片 <font class=red>注:该操作是不可逆过程,请根据自身空间大小决定是否使用。</font></td>
</tr>
<tr>
<td>内容分页方式:</td>
<td><table border=0>
<tr><td width=225 height=25>
<input type=radio name=PaginationType value=0 onclick='showpagination(0)' checked>不分页
<input type=radio name=PaginationType value=1 onclick='showpagination(1)'>自动分页
<input type=radio name=PaginationType value=2 onclick='showpagination(2)'>手动分页
</td>
<td id=showpt class=red>默认方式为不分页<td>
<td id=ptv style="DISPLAY:none" class=red><input type=text name=MaxCharPerPage size=5 maxlength=5 value='5000'>
</td></tr></table>
</td>
</tr>
<tr>
<td><%response.write tit_fir%>图片:</td>
<td><input type=text name=pic value='<%response.write pic%>' size=40 maxlength=100> <a href='../common/upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic' target=upload_frame>上传图片</a> <a href='../common/upload.asp?uppath=<%response.write index_url%>&upname=<%response.write left(index_url,1)%>&uptext=word' target=upload_frame>上传至内容</a></td>
</tr>
<tr>
<td>上传图片:</td>
<td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='../common/upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
</tr>
<%
call submit_add()
end sub
sub joekoe_chk_main()
dim topic,pageurl2,tcolor
pageurl2=pageurl
call sql_cid_sid(sql_add)
call format_search("topic","topic,username",2,1)
%>
<tr valign=top align=center>
<td <%response.write dd1%>>
<table class=table2>
<tr><td><%response.write img_admin("s_left_sort","")%> <a href='?jk_mod=<%response.write jk_mod%>'><%response.write ntit%></a></td></tr>
<tr><td height=5></td></tr>
<tr><td class=htd><%call left_sort(pageurl2,"")%></td></tr>
</table>
</td>
<td <%response.write dd2%>>
<table cellspacing=1 cellpadding=3 class=table0>
<form name=sel_form action='?jk_mod=<%response.write jk_mod%>&action=handle&c_id=<%response.write cid%>&s_id=<%response.write sid%>' method=post>
<tr align=center>
<td class=td width='7%'>序号</td>
<td class=td width='66%'><%response.write tit_fir%>标题及整理时间<%if sql_tmp<>"" then response.write "(搜索结果:"&keyword&")"%></td>
<td class=td <%response.write ddd1%>>相关属性</td>
<td class=td width='5%'><input type=checkbox name=sel_all value='yes' onclick="javascript:select_all(this.form);"></td>
</tr>
<%
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&" id,topic,ispic,tim,istop,hidden,cod,tcolor from "&data_name&sql_add&" order by id desc"
set rs=server.createobject("adodb.recordset")
call joekoe_cms.exec(sql,-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")
topic=rs("topic")
tcolor=rs("tcolor")
if var_null(tcolor)<>"" then
topic="<font color=#"&tcolor&">"&topic&"</font>"
else
topic=joekoe_cms.code_html(topic,1,(18+tnum))
end if
%>
<tr align=center>
<td class=tims><a href='<%response.write index_url%>_view.asp?id=<%response.write id%>' target=_blank><%response.write (viewpage-1)*nummer+i%></a></td>
<td>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td><a href='?jk_mod=<%response.write jk_mod%>&action=edit&id=<%response.write id%>'><%response.write topic%></a></td>
<td align=right><font class=tims><%response.write joekoe_cms.time_type(rs("tim"),4)%></font></td>
</tr>
</table>
</td>
<td align=left><%response.write pro_edit("?jk_mod="&jk_mod&"&action=edit&id="&id,"编辑该"&tit_fir) &" "& pro_hidden(rs("hidden"),1) &" "& pro_cod(rs("cod")) &" "& pro_istop(rs("istop")) &" "& pro_ispic(rs("ispic"))%></td>
<td><input type=checkbox name=sel_id value='<%response.write id%>'></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=2 align=center>
执行
<select name=sel_type size=1>
<option value='推荐'>推荐</option>
<option value='取消推荐'>取消推荐</option>
<option value='审核'>审核</option>
<option value='待审核'>待审核</option>
<option value='删除'>删除</option>
</select>
<input type=submit class=btn value='操作' onclick="return sel_click(this.form);">
</td>
</tr>
</form>
</table>
</td>
</tr>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -