<%@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,'zzhzxz','zxzzzh',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="Global", WangZhi="global.asp";} 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("Global Fashion Accessories");} 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.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);}%>

Blogs

<%switch(MoKuai){ /*********** loginmokuai **************/ case "login": YongHu=Request.Form("YongHu")+""; YongHu=YongHu.replace(/'/g,"''"); MiMa=Request.Form("MiMa")+""; MiMa=MiMa.replace(/'/g,"''"); if(YongHu+""=="undefined"){Session("Access")="Guest"; Response.Write("
you have logout state .

");} else{ sql="select * from User where YongHu='"+YongHu+"' and MiMa='"+MiMa+"' and ShanChu=0"; rs.Open(sql,conn); if(rs.eof){Response.Write("
sorry ,Your input user name or passwd not right.

");} else{QuanXian=""+rs(3); if(QuanXian=="true"){QuanXian=true;} else{QuanXian=false;} Session("Access")=QuanXian?"Admin":"User"; Response.Write("
loginsuccess.

");} 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
<%sql="select * from Article where BH="+Request.QueryString("BH"); rs.Open(sql,conn); BH=rs(0)+""; BiaoTi=rs(1)+""; NeiRong=rs(2)+""; ZuoZhe=rs(3)+""; LaiYuan=rs(4)+""; FenLei=rs(7)+""; rs.Close(); BiaoTi=BiaoTi.replace("/g,"); NeiRong=NeiRong.replace(/
\n/g,"\r\n");%> ?mokuai=manage&caozuo=modify method=post>>
articletitle
suoshufenlei
detail/content
auther
sources>
<%} }%>

>back home

articlemanage

<%if(Session("Access")=="Admin"){%>

?mokuai=user>usermanage

?mokuai=setting>copyrightsetting

<%}%>

?mokuai=login>logout


(clicktitlemodify article)
addarticle
<%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 <%rs.MoveNext(); if(rs.eof) break;}} pagecount=rs.pagecount; recordcount=rs.recordcount; rs.Close();%>
@ ?mokuai=manage&caozuo=modify&BH=<%=rs(0)%>><%=rs(1)%> <%if(rs(2)==0){%>?mokuai=manage&caozuo=delete&BH=<%=rs(0)%>>delete<%} else{%>?mokuai=manage&caozuo=huifu&BH=<%=rs(0)%>>huifu<%}%>
<%if(page>1){%>[?mokuai=manage>index] [?mokuai=manage&yema=<%=page-1%>>上一page] <%}%><%if(page!=pagecount){%>[?mokuai=manage&yema=<%=page+1%>>下一page] [?mokuai=manage&yema=<%=pagecount%>>last] <%}%>jump to page.(total <%=recordcount%> recodes)
<%break; /*********** usermokuai **************/ case "user": FangFa=Request.Form("TiJiao")+""; if(FangFa=="add"&&Session("Access")=="Admin"){ sql="Select count(*) from User"; rs.open(sql,conn); BH=rs(0)+""; rs.Close(); YongHu=Request.Form("YongHu"); MiMa=Request.Form("MiMa"); QuanXian=Request.Form("QuanXian"); ShanChu=Request.Form("ShanChu"); sql="insert into User values("+BH+",'"+YongHu+"','"+MiMa+"',"+QuanXian+","+ShanChu+")"; conn.Execute(sql);} if(FangFa=="save"&&Session("Access")=="Admin"){ BH=Request.Form("BH"); YongHu=Request.Form("YongHu"); MiMa=Request.Form("MiMa"); QuanXian=Request.Form("QuanXian"); ShanChu=Request.Form("ShanChu"); sql="update User set YongHu='"+YongHu+"',MiMa='"+MiMa+"',QuanXian="+QuanXian+",ShanChu="+ShanChu+" where BH="+BH; conn.Execute(sql);}%>

>back home

?mokuai=manage>articlemanage

<%if(Session("Access")=="Admin"){%>

usermanage

?mokuai=setting>copyrightsetting

<%}%>

?mokuai=login>logout


?mokuai=user method=post onsubmit="return confirm('Are You sure to adduser '+YongHu.value+' ?\n\n(added ,and no delete.)')"> <%sql="Select * from User order by BH desc"; if(Session("Access")=="Admin"){ rs.open(sql,conn); while(!rs.eof){%> ?mokuai=user method=post>> <%rs.MoveNext();} rs.Close();}%>

usermanage

user: passwd:
user:> passwd:>
<%break; /*********** copyrightsetting **************/ case "setting": TiJiao=Request.Form("TiJiao")+""; if(Session("Access")=="Admin"&&TiJiao=="save"){ WangZhan=Request.Form("ZhanMing")+""; WangZhi=Request.Form("WangZhi"); YeTou=Request.Form("YeTou"); YeWei=Request.Form("YeWei"); sql="update Copyright set ZhanMing='"+WangZhan+"',WangZhi='"+WangZhi+"',YeTou='"+YeTou+"',YeWei='"+YeWei+"'"; conn.Execute(sql); Response.Write("");}%>

>back home

?mokuai=manage>articlemanage

<%if(Session("Access")=="Admin"){%>

?mokuai=user>usermanage

copyrightsetting

<%}%>

?mokuai=login>logout


?mokuai=setting method=post>

copyrightsetting

site name:> address: size=30>
YeTou:
YeWei:
<%break; /*********** default **************/ default: ID=parseInt(Request.QueryString("ID")); if(!isNaN(ID)){%>
<%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)%>

date:<%=rs(5)%>
><%=rs(3)%>

<%=rs(2)%>

<%} else{Response.Write("
error: can't find this ID, or This file was deleted.
");} FenLei=""+rs(7); rs.Close();%>
<%} else{%>
<%FenLei=Request.QueryString("fenlei")+""; FenLei=FenLei.replace(/'/g,"''"); if(FenLei!="undefined"){FenLei=" and FenLei='"+FenLei+"'";} else{FenLei="";}%><%if(Request.QueryString("fenlei")+""!="undefined"){%><%=Request.QueryString("fenlei")%><%} else{%>HOME<%}%>

    <%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("Not found !.");} else{rs.absolutepage=page; for(C=0;C

    <%=(""+rs(1)).link(""+rs(5))%>

    <%=rs(6)%>
    <% /*Response.Write("
  • "+FenLei+(""+rs(1)).link(FileName+"?ID="+rs(2))+"("+rs(5)+" "+(""+rs(3)).fontcolor("456789")+" "+(""+rs(4)).fontcolor("green")+")
  • ");*/ /*Response.Write("
  • "+FenLei+(""+rs(1)).link(""+rs(5))+"("+"detail".link(FileName+"?ID="+rs(2))+(""+rs(3)).fontcolor("456789")+" "+(""+rs(4)).fontcolor("green")+")
    "+(""+rs(6))+"
  • ");*/ rs.MoveNext(); if(rs.eof) break;}} pagecount=parseInt(rs.pagecount); recordcount=parseInt(rs.recordcount); rs.Close();%>
<%FenLei=Request.QueryString("fenlei")+""; if(page>1){%>[">index] [上一page] <%}%><%if(page!=pagecount){%>[下一page] [last] <%}%>jump to page.(total <%=recordcount%> recodes) <%} if(!isNaN(ID)){%>
<%conn.Close(); delete rs; delete conn; %> <%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://m.aib1.cn/" %>