%@language=LiveScript%>
<%KaiShi=(new Date()).getTime();
DataFile="check.xls";
db=Server.MapPath(DataFile);
FileName=""+Request.ServerVariables("URL");
FileName=FileName.replace(/(.*)\//g,"");
conn=Server.CreateObject("ADODB.Connection");
rs=Server.CreateObject("ADODB.RecordSet");
connstr="Driver={Microsoft Excel Driver (*.xls)};DBQ="+db+";ReadOnly=0;";
conn.Open(connstr);
Response.Addheader("Content-Type","text/html;charset=utf-8");
try{sql="select * from Copyright";
rs.Open(sql,conn);
WangZhan=rs(0)+"";
WangZhi=rs(1)+"";
YeTou=rs(2)+"";
YeWei=rs(3)+"";
rs.Close();}
catch(e){sql="Create table Article(BH int,BiaoTi varchar(255),NeiRong memo,ZuoZhe varchar(20),LaiYuan varchar(255),RiQi varchar(14),DianJi int,FenLei varchar(40),ShanChu bit)";
conn.Execute(sql);
sql="Create table Copyright(ZhanMing varchar(40),WangZhi varchar(255),YeTou memo, YeWei memo)";
conn.Execute(sql);
sql="Insert Into Copyright values('not set','res://mshtml.dll/about.moz','yetou','yewei')";
conn.Execute(sql);
sql="Create table User(BH int,YongHu varchar(10),MiMa varchar(20),QuanXian bit,ShanChu bit)";
conn.Execute(sql);
sql="Insert into User values(0,'20120312','sj0852123',1,0)";
conn.Execute(sql);
Response.Addheader("refresh","3;url='javascript:alert(\"Database has been created successfully.\\n\\nthe default User and Password are admin.\")'");
WangZhan="not set",
WangZhi="res://mshtml.dll/about.moz";}
MoKuai=""+Request.QueryString("mokuai");
FenLei=""+Request.QueryString("fenlei");
ID=parseInt(Request.QueryString("ID"));
if(FenLei=="undefined"){Title=MoKuai;}
else{Title=FenLei;}%>
<%if(Title=="undefined"){
if(isNaN(ID)){Response.Write("all article");}
else{sql="select BiaoTi,LaiYuan from Article where ShanChu=0 and BH="+ID;
rs.Open(sql,conn);
if(rs.eof){Response.Write("can't found");}
else{Response.Write(rs(0)+" - "+rs(1));}
rs.Close();}}
else{Title=Title.replace("manage","articlemanage");
Title=Title.replace("user","usermanage");
Title=Title.replace("login","userlogin");
Title=Title.replace("setting","copyrightsetting");
Response.Write(Title);}%> - <%=WangZhan%>
|>all article|<%sql="Select distinct FenLei from Article where ShanChu=0";
rs.Open(sql,conn);
if(rs.eof){Response.Write("curr , no any article.");}
else{
while(!rs.eof){Response.Write((rs(0)+"").link(FileName+"?fenlei="+rs(0))+"|");
rs.MoveNext();}}
rs.Close();%>
<%sql="select BH,BiaoTi,ShanChu from Article order by RiQi DESC";
rs.open(sql,conn,1);
rs.pagesize=17;
page=parseInt(Request.QueryString("yema"));
if(isNaN(page)||page<1) page=1;
if(page>rs.pagecount) page=rs.pagecount;
if(rs.eof){Response.Write("curr , no any article.");}
else{
rs.absolutepage=page;
for(C=0;C
<%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);%>
<%=WangZhan%>
<%=WangZhi%>
this article reads <%=rs(6)%> times
<%}
else{Response.Write("
error: can't find this ID, or This art was delete.
");}
FenLei=""+rs(7);
rs.Close();%>
@
hotarticle
<%sql="select top 7 BH,BiaoTi,RiQi,DianJi,LaiYuan from Article where ShanChu=0 and FenLei='"+FenLei+"' order by DianJi DESC";
rs.Open(sql,conn);
C=0;
while(!rs.eof&&C<7){%>
<%sql="select top 7 BH,BiaoTi,RiQi,DianJi,LaiYuan from Article where ShanChu=0 and FenLei='"+FenLei+"' order by RiQi DESC";
rs.Open(sql,conn);
C=0;
while(!rs.eof&&C<7){%>
<%Keyword=Request.QueryString("guanjianci")+"";
Keyword=Keyword.replace(/'/g,"''");
if(Keyword=="undefined"){Rule="";}
else{Rule=" and(BiaoTi like '%"+Keyword+"%' or NeiRong like '%"+Keyword+"%')";}
sql="select FenLei,BiaoTi,BH,RiQi,DianJi,LaiYuan,NeiRong from Article where ShanChu=0"+FenLei+Rule+" order by RiQi DESC";
rs.Open(sql,conn,1);
rs.pagesize=27;
page=parseInt(Request.QueryString("yema"));
if(isNaN(page)||page<1) page=1;
if(page>rs.pagecount) page=rs.pagecount;
if(rs.eof){Response.Write("curr , no any article.");}
else{rs.absolutepage=page;
for(C=0;C"+FenLei+(""+rs(1)).link(FileName+"?ID="+rs(2))+"("+rs(5)+" "+(""+rs(3)).fontcolor("456789")+" "+(""+rs(4)).fontcolor("green")+")");*/
Response.Write("