<div class="codetitle"><span><a class="copybut" data="90057" id="copybut90057"><u>复制代码</u></a></span> 代码如下:</div><div class="codebody" id="code90057"><br>Class template <br><br> Private c_Char, c_Path, c_FileName, c_Content, c_PageUrl, c_CurrentPage, c_PageStr, ReplacePageStr <br> Private TagName <br><br> ' *************************************** <br> ' 设置编码 <br> ' *************************************** <br> Public Property Let Char(ByVal Str) <br> c_Char = Str <br> End Property <br> Public Property Get Char <br> Char = c_Char <br> End Property <br><br> ' *************************************** <br> ' 设置模板文件夹路径 <br> ' *************************************** <br> Public Property Let Path(ByVal Str) <br> c_Path = Str <br> End Property <br> Public Property Get Path <br> Path = c_Path <br> End Property <br><br> ' *************************************** <br> ' 设置模板文件名 <br> ' *************************************** <br> Public Property Let FileName(ByVal Str) <br> c_FileName = Str <br> End Property <br> Public Property Get FileName <br> FileName = c_FileName <br> End Property <br><br> ' *************************************** <br> ' 获得模板文件具体路径 <br> ' *************************************** <br> Public Property Get FilePath <br> If Len(Path) > 0 Then Path = Replace(Path, "\", "/") <br> If Right(Path, 1) <> "/" Then Path = Path & "/" <br> FilePath = Path & FileName <br> End Property <br><br> ' *************************************** <br> ' 设置分页URL <br> ' *************************************** <br> Public Property Let PageUrl(ByVal Str) <br> c_PageUrl = Str <br> End Property <br> Public Property Get PageUrl <br> PageUrl = c_PageUrl <br> End Property <br><br> ' *************************************** <br> ' 设置分页 当前页 <br> ' *************************************** <br> Public Property Let CurrentPage(ByVal Str) <br> c_CurrentPage = Str <br> End Property <br> Public Property Get CurrentPage <br> CurrentPage = c_CurrentPage <br> End Property <br><br> ' *************************************** <br> ' 输出内容 <br> ' *************************************** <br> Public Property Get Flush <br> Response.Write(c_Content) <br> End Property <br><br> ' *************************************** <br> ' 类初始化 <br> ' *************************************** <br> Private Sub Class_Initialize <br> TagName = "pjblog" <br> c_Char = "UTF-8" <br> ReplacePageStr = Array("", "") <br> End Sub <br><br> ' *************************************** <br> ' 过滤冲突字符 <br> ' *************************************** <br> Private Function doQuote(ByVal Str) <br> doQuote = Replace(Str, Chr(34), """) <br> End Function <br><br> ' *************************************** <br> ' 类终结 <br> ' *************************************** <br> Private Sub Class_Terminate <br> End Sub <br><br> ' *************************************** <br> ' 加载文件方法 <br |
|