📄 sms_list.asp
字号:
<%
'===================================================================
'= ASP FILENAME : /sms/sms_list.asp
'= CREATED TIME : 2006-5-7
'= LAST MODIFIED: 2006-5-7
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : 站内短信
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/customer/include_customer_action_view.asp" -->
<!-- #include file = "../main_func.asp" -->
<!-- #include file = "./sms_inc.asp" -->
<!-- #include file = "../inc/logic/logic_sms.asp" -->
<%
'========================================================
'== Action参数设置
'========================================================
'== 页面名
Const CONST_PAGE_FILE = "sms/sms_list.asp"
'== 页面标题/功能
Const CONST_PAGE_TITLE = "站内短信"
'== 功能函数名字空间
Const CONST_ACTION_FUNC = "ShowSmsMainCtl"
'== 相对根目录路径
GBL_strHomeURL = "../"
'== 页面构造
Call ActionBuild()
'== 在模板中引用的标签变量
Dim TAG_strVerifyCode '== 表单校验
Dim TAG_objDicUnit '== 单列记录
'== 请求校验与过滤
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)
'== 页面析构
Call ActionOver()
%>
<%
'===================================================================
'= Function : LoadPageTpl()
'= Time : Created At 2006-5-4
'= Description : 加载页面模块
'===================================================================
Function LoadPageTpl()
%>
<!-- #include file = "../template_c/page_sms_list.html.asp" -->
<%
End Function
'===================================================================
'= Function : ShowSmsMainCtl()
'= Time : 2006-5-7
'= Input :
'= Description : 站内短信
'===================================================================
Function ShowSmsMainCtl()
Dim intMaxPerPage '== the max numbers of per page
Dim strFileName '== the redirect file name
Dim intCurPage,intTotalPut '== the current page , total
Dim strBoxType,strBoxName '== the name of box,the type
Dim intNowBoxSize '== now box capacity
Dim strBoxWhere '== now box
Dim strTmp
intNowBoxSize = 0
intMaxPerPage = GBL_intMaxPerPage
strBoxType = Trim(Request.QueryString("strBoxType")) '== 箱类型
strFileName = "./sms_list.asp?strBoxType=" & strBoxType
Select Case strBoxType
Case "InBox" :
strBoxName = "收件箱"
Case "OutBox" :
strBoxName = "发件箱"
Case "IsSend" :
strBoxName = "已发送"
Case "RecycleBox" :
strBoxName = "废件箱"
Case Else
strBoxName = "收件箱"
End Select
'== 取得短信容量
Dim strSmsSizeInfo
If Not GetNowSmsSizeLogic(GBL_intUserId,strBoxType,strSmsSizeInfo,intNowBoxSize) Then Exit Function
'== 取得短信
If Not GetSmsesLogic(GBL_intUserId,strBoxType) Then Exit Function
If Not ResultExecute(GBL_objPubDB.intRSNum,strBoxName,"ES_DB_NO") Then
intTotalPut = GBL_objPubDB.intRSNum
intCurPage = GetCurPage(intMaxPerPage,intTotalPut)
If intCurPage = 1 Then
Call ShowContentSms(GBL_objPubDB.objPubRS,intMaxPerPage,strBoxName,intNowBoxSize)
Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
Else
If (intCurPage-1) * intMaxPerPage < intTotalPut Then
GBL_objPubDB.objPubRS.Move (intCurPage - 1) * intMaxPerPage
Dim BookMark
BookMark = GBL_objPubDB.objPubRS.BookMark
Call ShowContentSms(GBL_objPubDB.objPubRS,intMaxPerPage,strBoxName,intNowBoxSize)
Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
Else
intCurPage=1
Call ShowContentSms(GBL_objPubDB.objPubRS,intMaxPerPage,strBoxName,intNowBoxSize)
Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
End If
End If
End If
End Function
'===================================================================
'= Function : ShowContentSms(objRSCont,intMaxPerPage,strBoxName)
'= Time : Created At OCT,19,2003
'= Input : objRSCont: Recordset
'= intMaxPerPage: Max number in each page
'= strBoxName : The name of box
'= intNowSize : The used capacity of box
'= Description : Show list of Sms
'===================================================================
Function ShowContentSms(objRSCont,intMaxPerPage,strBoxName,intNowSize)
Dim i
Dim strTdClass '== td's css
Dim strFirstTitle '== the first column title
Dim strFirstContent '== the first column content
Dim clsTable '== the object of table
Dim clsForm '== the object of form
Dim strHtmlCode,strHtmlCode1
Dim intErrId
Dim strClewTo,strTmp
strClewTo = ""
intErrId = 0
i = 0
Set clsTable = New classTable
'== Set table prameters
clsTable.Border = "0"
clsTable.CellPadding = "2"
clsTable.CellSpacing = "1"
clsTable.Width = "98%"
clsTable.ClassType = GBL_cssListTable
clsTable.Align = "center"
clsTable.MakeTable()
strFirstTitle = ""
If strBoxName = "收件箱" Then
strFirstTitle = "来自"
ElseIf strBoxName = "发件箱" Or strBoxName = "已发送" Then
strFirstTitle = "发给"
ElseIf strBoxName = "废件箱" Then
strFirstTitle = "来自/发给"
Else
strFirstTitle = "来自"
End If
'== Set table header
clsTable.AddTitleTr GBL_cssListTitleTr
clsTable.AddTitleTd strFirstTitle,GBL_cssListTitleTd,"19%"
clsTable.AddTitleTd "主 题",GBL_cssListTitleTd,"30%"
clsTable.AddTitleTd "时 间",GBL_cssListTitleTd,"22%"
clsTable.AddTitleTd "大 小",GBL_cssListTitleTd,"12%"
clsTable.AddTitleTd "状态",GBL_cssListTitleTd,"8%"
clsTable.AddTitleTd "选取",GBL_cssListTitleTd,"*"
'== Set table contents
Do While Not objRSCont.Eof
If strBoxName = "收件箱" Then
strFirstContent = objRSCont("SMS_SENDER")
strClewTo = "来自:" & strFirstContent
ElseIf strBoxName = "发件箱" Or strBoxName = "已发送" Then
strFirstContent = objRSCont("SMS_INCEPTER")
strClewTo = "接收:" & strFirstContent
ElseIf strBoxName = "废件箱" Then
If objRSCont("SMS_SENDER") = Session(GBL_strCookieURL & "SEN_strUserRealName") Then
strFirstContent = "发给:" & objRSCont("SMS_INCEPTER")
Else
strFirstContent = "来自:" & objRSCont("SMS_SENDER")
End If
strClewTo = strFirstContent
Else
strFirstContent = objRSCont("SMS_SENDER")
strClewTo = "发送者:" & strFirstContent
End If
i = i + 1
'== Set td css change
If (i Mod 2) = 0 Then
strTdClass = GBL_cssListTd
Else
strTdClass = GBL_cssListTdChange
End If
clsTable.AddTr strTdClass
clsTable.AddTd strFirstContent,strTdClass
strHtmlCode1 = "主题:" & objRSCont("SMS_TITLE") & chr(13)
strHtmlCode1 = strHtmlCode1 & "时间:" & objRSCont("SMS_TIME") & chr(13)
strHtmlCode1 = strHtmlCode1 & strClewTo & chr(13)
strHtmlCode1 = strHtmlCode1 & "大小:" & objRSCont("SMS_SIZE") & "Byte"
strHtmlCode = "<a href='" & GBL_strHomeURL & "sms/sms_detail.asp?intSmsId=" & objRSCont("SMS_ID") & "' title='" & strHtmlCode1 & "' >" & objRSCont("SMS_TITLE") & "</a>"
clsTable.AddTd strHtmlCode,strTdClass
clsTable.AddTd objRSCont("SMS_TIME"),strTdClass
clsTable.AddTd objRSCont("SMS_SIZE") &" Byte",strTdClass
If objRSCont("SMS_VIEW_FLAG") Then
strHtmlCode = MakeImg(GBL_strImgDir & "ico/Sms_old.gif","该短信已读")
clsTable.AddTd strHtmlCode,strTdClass
Else
strHtmlCode = MakeImg(GBL_strImgDir & "ico/Sms_new.gif","该短信未读")
clsTable.AddTd strHtmlCode,GBL_strImgDir
End If
strHtmlCode = "<input type='checkbox' name='SmsId' value=" & objRSCont("SMS_ID") & " class='form_checkbox'>"
clsTable.AddTd strHtmlCode,strTdClass
clsTable.EndTd
If i >= intMaxPerPage Then Exit Do
objRSCont.MoveNext
Loop '== end of Do While Not objRSCont.Eof
'== Add title of box clew
clsTable.AddInfoTr GBL_cssListTdChange,"TOP"
clsTable.AddInfoTd "<p align=center>:::::::::::::::::::::::::::::::::::: <font color=red>" & strBoxName & "</font> ::::::::::::::::::::::::::::::::::::</p>",GBL_cssListTitleTr
clsTable.EndInfoTd
Dim strSmsInfo
Call GetUserSmsInfoLogic(GBL_intUserId,strSmsInfo)
clsTable.AddInfoTr GBL_cssListTdChange,"TOP"
clsTable.AddInfoTd strSmsInfo,GBL_cssListTdChange
clsTable.EndInfoTd
i = i + 1
'== Set td css change
If (i Mod 2) = 0 Then
strTdClass = GBL_cssListTd
Else
strTdClass = GBL_cssListTd
End If
strHtmlCode = " [" & strBoxName & "]" & "目前已使用" & intNowSize & ",请节约空间,及时删除无用信息"
'clsTable.AddInfoTr strTdClass,"BOTTOM"
'clsTable.AddInfoTd strHtmlCode,strTdClass
'clsTable.EndInfoTd
i = i + 1
'== Set td css change
If (i Mod 2) = 0 Then
strTdClass = GBL_cssListTd
Else
strTdClass = GBL_cssListTdChange
End If
clsTable.AddInfoTr "","BOTTOM"
strHtmlCode = MakeImg(GBL_strImgDir & "ico/Sms_new.gif","") & "→未阅读的短信 "
strHtmlCode = strHtmlCode & MakeImg(GBL_strImgDir & "ico/Sms_old.gif","") & "→已阅读的短信"
clsTable.AddInfoTd "图例:" & strHtmlCode,strTdClass
i = i + 1
'== Set td css change
If (i Mod 2) = 0 Then
strTdClass = GBL_cssListTd
Else
strTdClass = GBL_cssListTdChange
End If
strHtmlCode = "<input type='checkbox' name='chkSms' value='on' class='form_checkbox' onclick='CheckAll(this.form,this)'> 全选"
strHtmlCode = strHtmlCode & " "
strHtmlCode = strHtmlCode & "<input type='submit' name='subSmsDel' value='删除选中' onclick=""return CheckSelChkBox(this.form,'确认删除吗?')"" > "
strHtmlCode = strHtmlCode & "<input type='submit' name='subSmsDelAll' value='清空" & strBoxName & "' onclick=""return confirm('确认清空吗?')"" >"
strHtmlCode = strHtmlCode & "<input type='hidden' name='hidBoxName' value='" & strBoxName & "' >"
clsTable.AddInfoTr strTdClass,"BOTTOM"
clsTable.AddInfoTd strHtmlCode,""
'== Output the form and table
Response.Write "<br>"
strHtmlCode = "<form action='" & GBL_strHomeURL & "sms/sms_del.asp' method='post' id='frmDelSms' name='frmDelSms'>"
Response.Write strHtmlCode
clsTable.OutPutTable()
Response.Write "</form>"
Set clsTable = Nothing
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -