主题: |
:2005/1/15 23:49:16 |
|
【用户】
吴卫东 |
|
1.2CMS发表文章审核开关
本功能可以实现:
1、发表文章无需审核;
2、开放与关闭审核;
3、如果不需要审核,发表成功后显示“谢谢您的支持!”
4、如果需要审核,发表成功后显示“请等等审核。”
修改user_put.asp
找到
call time_lock()
dim nsort,data_name,session_for,go_back,dim_down,types
替换为:
call time_lock()
dim nsort,data_name,session_for,go_back,dim_down,types,shhh
找到:
sub put_art()
dim topic,keyes,comto,author,power,emoney,username,tim,counter,istop,hidden,word
if chk() then
topic=code_admin("topic",1,50)
word=request.form("word")
csid=trim(request.form("c_id"))
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
keyes=code_admin("keyes",1,20)
comto=code_admin("comto",1,20)
author=code_admin("author",1,20)
power=code_admin("power",1,50)
power=replace(power," ","")
power=replace(power,",",".")
emoney=trim(request.form("emoney"))
if not isnumeric(emoney) then emoney=0
username=code_admin("username",1,20)
if symbol_name(username)=false then username=login_username
tim=joekoe_cms.now_time
counter=0
istop=0
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("author")=author
rs("power")=power
rs("emoney")=emoney
rs("username")=username
rs("tim")=tim
rs("counter")=counter
rs("istop")=istop
rs("hidden")=hidden
rs("keyes")=keyes
rs("word")=word
rs.update
rs.close
call upload_note(index_url,first_id(data_name,"id"))
call admin_msg("发表")
exit sub
end if
call form_first()
%>
替换为:
sub put_art()
dim topic,keyes,comto,author,power,emoney,username,tim,counter,istop,hidden,word
shhh=1 '是否需要审核 1为不需要审核,0为需要审核
if chk() then
topic=code_admin("topic",1,50)
word=request.form("word")
csid=trim(request.form("c_id"))
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
keyes=code_admin("keyes",1,20)
comto=code_admin("comto",1,20)
author=code_admin("author",1,20)
power=code_admin("power",1,50)
power=replace(power," ","")
power=replace(power,",",".")
emoney=trim(request.form("emoney"))
if not isnumeric(emoney) then emoney=0
username=code_admin("username",1,20)
if symbol_name(username)=false then username=login_username
tim=joekoe_cms.now_time
counter=0
istop=0
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("author")=author
rs("power")=power
rs("emoney")=emoney
rs("username")=username
rs("tim")=tim
rs("counter")=counter
rs("istop")=istop
rs("hidden")=shhh
rs("keyes")=keyes
rs("word")=word
rs.update
rs.close
call upload_note(index_url,first_id(data_name,"id"))
call admin_msg("发表")
exit sub
end if
call form_first()
%>
找到
sub admin_msg(tvar)
session(session_for&"addfrm")=false
call joekoe_cms.exec("update user_data set integral=integral+"&int(dim_num(24))&" where username='"&login_username&"'",0)
%>
| 已成功<%response.write tvar%>了一个<%response.write tit_fir%>!
请等待管理审核通过…… |
<%
end sub
替换为:
sub admin_msg(tvar)
session(session_for&"addfrm")=false
call joekoe_cms.exec("update user_data set integral=integral+"&int(dim_num(24))&" where username='"&login_username&"'",0)
%>
已成功<%response.write tvar%>了一个<%response.write
tit_fir%>!
<%
if shhh=1 then
response.write"
谢谢您的支持! | "
else
response.write"
请等待管理审核通过……"
end if
%>
<%
end sub
|
|
|
|