Articlesearch
Blogs
");} else{ sql="select * from User where YongHu='"+YongHu+"' and MiMa='"+MiMa+"' and ShanChu=0"; rs.Open(sql,conn); if(rs.eof){Response.Write("
");} else{QuanXian=""+rs(3); if(QuanXian=="true"){QuanXian=true;} else{QuanXian=false;} Session("Access")=QuanXian?"Admin":"User"; Response.Write("
");} rs.Close();} break; /*********** articlemanage **************/ case "manage": if(Request.QueryString("caozuo")+""=="delete"&&Session("Access")=="Admin"){ sql="update Article set ShanChu=1 where BH="+Request.QueryString("BH"); conn.Execute(sql);} if(Request.QueryString("caozuo")+""=="huifu"&&Session("Access")=="Admin"){ sql="update Article set ShanChu=0 where BH="+Request.QueryString("BH"); conn.Execute(sql);} if(Request.QueryString("caozuo")+""=="add"){ sql="select count(*) from Article"; rs.open(sql,conn); BH=rs(0)+""; rs.Close(); BiaoTi=Request.Form("BiaoTi")+""; FenLei=Request.Form("FenLei")+""; NeiRong=Request.Form("NeiRong")+""; ZuoZhe=Request.Form("ZuoZhe")+""; LaiYuan=Request.Form("LaiYuan")+""; BiaoTi=BiaoTi.replace(/'/g,"''"); FenLei=FenLei.replace(/'/g,"''"); NeiRong=NeiRong.replace(/'/g,"''"); NeiRong=NeiRong.replace(/\r/g,"
"); ZuoZhe=ZuoZhe.replace(/'/g,"''"); LaiYuan=LaiYuan.replace(/'/g,"''"); RiQi=new Date(); Nian=RiQi.getYear(); Yue=RiQi.getMonth()+1; /*********** NeiRong=NeiRong.replace(/ /g," ");*************/ if(Yue<10) Yue="0"+Yue; Ri=RiQi.getDate(); if(Ri<10) Ri="0"+Ri; RiQi=Nian+"-"+Yue+"-"+Ri+""; sql="select top 1 BH from Article where ShanChu=1 order by RiQi asc"; rs.open(sql,conn); if(!rs.eof){ sql="Update Article set BiaoTi='"+BiaoTi+"',NeiRong='"+NeiRong+"',ZuoZhe='"+ZuoZhe+"',LaiYuan='"+LaiYuan+"',RiQi='"+RiQi+"',DianJi=0,FenLei='"+FenLei+"',ShanChu=0 where BH="+rs(0);} else{sql="insert into Article values("+BH+",'"+BiaoTi+"','"+NeiRong+"','"+ZuoZhe+"','"+LaiYuan+"','"+RiQi+"',0,'"+FenLei+"',0)";} rs.Close(); if(Session("Access")=="User"||Session("Access")=="Admin") conn.Execute(sql);} if(Request.QueryString("caozuo")+""=="modify"&&Session("Access")=="Admin"){ if(Request.Form("BH")+""!="undefined"){ BiaoTi=Request.Form("BiaoTi")+""; FenLei=Request.Form("FenLei")+""; NeiRong=Request.Form("NeiRong")+""; ZuoZhe=Request.Form("ZuoZhe")+""; LaiYuan=Request.Form("LaiYuan")+""; BiaoTi=BiaoTi.replace(/'/g,"''"); FenLei=FenLei.replace(/'/g,"''"); NeiRong=NeiRong.replace(/'/g,"''"); NeiRong=NeiRong.replace(/\r/g,"
"); ZuoZhe=ZuoZhe.replace(/'/g,"''"); LaiYuan=LaiYuan.replace(/'/g,"''"); RiQi=new Date(); Nian=RiQi.getYear(); Yue=RiQi.getMonth()+1; /*************NeiRong=NeiRong.replace(/ /g," ");*************/ if(Yue<10) Yue="0"+Yue; Ri=RiQi.getDate(); if(Ri<10) Ri="0"+Ri; RiQi=Nian+"-"+Yue+"-"+Ri+"-"; sql="Update Article set BiaoTi='"+BiaoTi+"',NeiRong='"+NeiRong+"',ZuoZhe='"+ZuoZhe+"',LaiYuan='"+LaiYuan+"',RiQi='"+RiQi+"',FenLei='"+FenLei+"' where BH="+Request.Form("BH"); conn.Execute(sql);} else{%>
modify article | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
articlemanage <%if(Session("Access")=="Admin"){%>?mokuai=setting>copyrightsetting <%}%> |
|
<%if(Session("Access")=="Admin"){%> usermanage ?mokuai=setting>copyrightsetting <%}%> |
|
<%if(Session("Access")=="Admin"){%> copyrightsetting <%}%> |
|
<%sql="select * from Article where ShanChu=0 and BH="+ID; rs.Open(sql,conn); if(!rs.eof){sql="update Article set DianJi=DianJi+1 where BH="+ID; conn.Execute(sql);%>
<%=rs(1)%>
><%=rs(3)%>
<%=rs(2)%>
<%} else{Response.Write("