% Dim Action,AllSmsSize If Not BBS94KK.FoundUser Then BBS94KK.GoToErr(20) BBS94KK.Position=BBS94KK.Position&" → 用户控制面版" BBS94KK.Head "处理信件" ShowMySmsInfo() Action=Lcase(Request("Action")) If Len(Action)>10 Then BBS94KK.GoToErr(1) Select Case Action Case"save" SaveSms Case"del" Del Case"delall" DelAll Case"write" WriteSms Case Else ReadSms End Select BBS94KK.Footer() Set BBS94KK=Nothing Sub Del Dim ID,I,Rs ID=BBS94KK.CheckNum(request("ID")) Set Rs=BBS94KK.Execute("Select MyName,Name From[KK_sms] where ID="&ID&" And (Name='"&BBS94KK.MyName&"' or MyName='"&BBS94kk.MyName&"')") If not Rs.eof then If Lcase(BBS94KK.MyName)=Lcase(Rs(0)) Then BBS94KK.execute("Update [KK_sms] set MyFlag=2 where ID="&ID) Else BBS94KK.execute("Update [KK_sms] set Flag=2 where ID="&ID) End If BBS94KK.Execute("Delete from [KK_sms] where MyFlag=2 And Flag=2") BBS94KK.Execute("Update [KK_User] set SmsSize=SmsSize-1 where ID="&BBS94KK.MyID) End If Rs.close Set Rs=Nothing Response.Redirect "sms.asp" End Sub Sub DelAll Dim ID,I ID=BBS94KK.CheckNum(request("ID")) I=0 If ID=1 Then'删收箱 I=BBS94KK.Execute("select count(*) From[KK_Sms] where Name='"&MyName&"' And Flag=0" )(0) BBS94KK.Execute("Update [KK_sms] Set MyFlag=2 where MyName='"&BBS94KK.MyName&"'") ElseIf ID=2 Then'删发箱 I=BBS94KK.Execute("select count(*) From[KK_Sms] where MyName='"&MyName&"' And Flag<>2" )(0) BBS94KK.Execute("Update [KK_sms] Set Flag=2 where Name='"&BBS94KK.MyName&"'") Else BBS94KK.Execute("Update [KK_sms] Set Flag=2 where Name='"&BBS94KK.MyName&"'") BBS94KK.Execute("Update [KK_sms] Set MyFlag=2 where MyName='"&BBS94KK.MyName&"'") End If If isnull(I) Then I=0 BBS94KK.Execute("Update [KK_User] set SmsSize="&i&" where ID="&BBS94KK.MyID) BBS94KK.Execute("Delete from [KK_sms] where MyFlag=2 And Flag=2") Session(CacheName & "MyInfo") = Empty BBS94KK.Alert"清空所有信件成功!","Sms.asp" End Sub Sub ShowMySmsInfo() Dim SmsSize,content SmsSize=int(SESSION(CacheName & "MyInfo")(20)) AllSmsSize=SmsSize/Int(SESSION(CACHENAME & "MYGRADEINFO")(18))*100 If AllSmsSize>100 Then AllSmsSize=100 IF AllSmsSize<0 Then AllSmsSize=0 IF AllSmsSize>0 And AllSmsSize<1 Then AllSmsSize=1 Content=SmsSize/SESSION(CacheName & "MyGradeInfo")(18)*250 If Content>250 Then Content=250 Content="
" Response.Write BBS94KK.ReadSkins("用户控制面版") BBS94KK.ShowTable"论坛留言信箱",Content End Sub Sub ReadSms() Dim S,div,Content,Temp,UserPic,Rs,P,strPageInfo,Arr_Rs,I,Caption,bgColor,BBS94KK_ubb,Sqlwhere,title,UserName If Action="elapse" Then Title="发送的信件记录" Sqlwhere="Name='"&BBS94KK.MyName&"' and Flag=0" ElseIf Action="colloquy" Then UserName=Request.querystring("Name") If Not BBS94KK.Fun.CheckName(UserName) Then BBS94KK.GoToErr(1) Title="和"&UserName&"的交谈记录" Sqlwhere="(MyName='"&BBS94KK.MyName&"' and Name='"&UserName&"' and MyFlag<2) or (Name='"&BBS94KK.MyName&"' And MyName='"&UserName&"' and Flag=0)" Else Title="收取信件" Sqlwhere="MyName='"&BBS94KK.MyName&"' and MyFlag<2" End If Set P = New Cls_PageView P.strTableName = "[KK_Sms]" P.strPageUrl="?Action="&Action P.strFieldsList = "ID,Name,Content,AddTime,MyFlag,UbbString,Flag,MyName" P.strCondiction = Sqlwhere P.strOrderList = "ID desc" P.strPrimaryKey = "ID" P.intPageSize = 10 P.intPageNow = Request.querystring("page") P.strCookiesName = "Sms"&Action P.InitClass Arr_Rs = P.arrRecordInfo strPageInfo = P.strPageInfo Set P = nothing If IsArray(Arr_Rs) Then Set BBS94KK_ubb=New BBS94KKubb_Cls Div="
"
End if
Rs.Close
Set Rs=nothing
End If
If I mod 2 <>0 Then bgColor="background-color: "&BBS94KK.SkinsPIC(1)&";" Else bgColor=""
S="亲爱的用户,您的论坛留言信箱容量已满,请尽快删除一些信件!