|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全存储历程|排序加贴存储历程:
ifexists(select*fromsysobjectswhereid=object_id("lybsave"))
dropproclybsave
CREATEPROCEDURE[lybsave]@keyidint=0,@guestnamevarchar(20),@guestitlevarchar(100),@guestcommtext,@guestemailvarchar(50)=,@emailflagbit=0,@fromipvarchar(15),@recimailvarchar(50)OUTPUT
AS
DECLARE@ostrvarchar(30),@rootidint,@lybidint,@ostrsvarchar(30),@ltinyint,@tdtdatetime,@putdatevarchar(10),@puttimevarchar(5),@eflagbit
select@tdt=getdate()
select@putdate=convert(varchar(4),datepart(yy,@tdt))+-+left(0+convert(varchar(2),datepart(mm,@tdt)),2)+-+left(0+convert(varchar(2),datepart(dd,@tdt)),2)
select@puttime=left(0+convert(varchar(2),datepart(hh,@tdt)),2)+:+left(0+convert(varchar(2),datepart(mi,@tdt)),2)
select@ostr=,@rootid=0,@lybid=0,@l=0
if(@guestemail=)select@emailflag=0
If@keyid=0--发新贴
gotonewin
ELSE
begin
SELECT@lybid=lybid,@rootid=rootid,@ostr=orderstr,@recimail=guestemail,@eflag=emailflagfromguestbookwherelybid=@keyid
IF@lybid=0--复兴贴没找到,当新贴宣布
gotonewin
ELSE
BEGIN
if(@eflag=0and@guestemailswuse@21cn.comabc)select@recimail=--假如是版主复兴且指定发邮件给发问者,则不论发贴者是不是请求复兴,前面的abc相称于办理暗码
if(@rootid=0)select@rootid=@lybid
select@ostrs=@ostr+%,@lybid=0
selecttop1@lybid=lybid,@ostrs=orderstrfromguestbookwhererootid=@rootidand(orderstrlike@ostrs)andlybid@keyidorderbyorderstr
if(@lybid=0)select@ostr=@ostr+char(122)
else
begin
select@l=len(@ostrs)
select@ostr=left(@ostrs,@l-1)+char(ascii(substring(@ostrs,@l,1))-1)
end
gotonewin
end
end
newin:
INSERTintoguestbook(guestname,guestitle,guestcomm,putdate,puttime,guestemail,emailflag,rootid,fromip,orderstr)values(@guestname,@guestitle,@guestcomm,@putdate,@puttime,rtrim(@guestemail),@emailflag,@rootid,@fromip,@ostr)
删贴(剪枝)存储历程:
ifexists(select*fromsysobjectswhereid=object_id("lybdel"))
dropproclybdel
CREATEPROCEDURE[lybdel]@keyidint
AS
DECLARE@ostrvarchar(30),@rootidint,@lybidint
select@ostr=,@rootid=0,@lybid=0
SELECT@ostr=orderstr,@rootid=rootid,@lybid=lybidfromguestbookwherelybid=@keyid
if(@lybid0)
BEGIN
if(@rootid=0)select@rootid=@lybid
SELECT@ostr=@ostr+%
DELETEFROMguestbookwhereorderstrlike@ostrandrootid=@rootidorlybid=@rootid
END
软件利用主页http://swuse.yeah.net创作
</p>无法实现跨操作系统的应用。当然这也是微软的理由之一,只有这样才能发挥ASP最佳的能力。可是我却认为正是Windows限制了ASP,ASP的概念本就是为一个能让系统运行于一个大的多样化环境而设计的; |
|