Main_Style(1, 0)
''MainStyle = Replace(MainStyle, "{$InstallDir}", ReadInstallDir(BindDomain))
MainStyle = Replace(MainStyle, "{$SkinPath}", SkinPath)
MainStyle = Split(MainStyle, "|||")
HtmlCss = MainStyle(0)
HtmlTop = MainStyle(1)
HtmlFoot = MainStyle(2)
If pageid <> 0 Then
Name = "Templates" & ChannelID & skinid & pageid
If ObjIsEmpty() Then
TemplatesToCache ChannelID, pageid
End If
ByValue = Value
End If
End Sub
Private Sub TemplatesToCache(ChannelID, pageid)
On Error Resume Next
Dim Rs, SQL, rstmp
SQL = "SELECT skinid,page_content,page_setting FROM [NC_Template] WHERE ChannelID = " & ChannelID & " And skinid = " & skinid & " And pageid = " & pageid
Set Rs = Execute(SQL)
If Not Rs.EOF Then
Value = Rs.GetRows(1)
Else
Set rstmp = Execute("SELECT skinid,page_content,page_setting FROM [NC_Template] WHERE ChannelID = " & ChannelID & " And isDefault = 1 And pageid = " & pageid)
Value = rstmp.GetRows(1)
Set rstmp = Nothing
End If
Set Rs = Nothing
End Sub
Private Sub TemplatesMainCache(skinid)
On Error Resume Next
Dim Rs, SQL, rstmp
SQL = "SELECT TemplateDir,page_content,page_setting FROM [NC_Template] WHERE pageid = 0 And skinid = " & skinid & " And ChannelID = 0"
Set Rs = Execute(SQL)
If Not Rs.EOF Then
Value = Rs.GetRows(1)
Else
Set rstmp = Execute("SELECT TemplateDir,page_content,page_setting from [NC_Template] WHERE pageid = 0 And isDefault = 1 And ChannelID = 0")
Value = rstmp.GetRows(1)
Set rstmp = Nothing
End If
Set Rs = Nothing
End Sub
Public Property Let ByValue(ByVal vNewValue)
Dim tmpstr
tmpstr = vNewValue
Html_Setting = tmpstr(2, 0)
Html_Setting = Split(Html_Setting, "|||")
HtmlContent = tmpstr(1, 0)
If CInt(Html_Setting(0)) <> 0 Then
HtmlContent = HtmlTop & HtmlContent & HtmlFoot
End If
HtmlContent = Replace(HtmlContent, "{$Style_CSS}", HtmlCss)
HtmlContent = Replace(HtmlContent, "{$SkinPath}", SkinPath)
HtmlContent = Replace(HtmlContent, "{$Width}", Main_Setting(0))
HtmlContent = Replace(HtmlContent, "{$ChannelMenu}", ChannelMenu)
HtmlContent = Replace(HtmlContent, "{$WebSiteName}", SiteName)
HtmlContent = Replace(HtmlContent, "{$WebSiteUrl}", SiteUrl)
HtmlContent = Replace(HtmlContent, "{$MasterMail}", MasterMail)
HtmlContent = Replace(HtmlContent, "{$Keyword}", keywords)
HtmlContent = Replace(HtmlContent, "{$Copyright}", Copyright)
HtmlContent = Replace(HtmlContent, "{$IndexName}", IndexName)
HtmlContent = Replace(HtmlContent, "{$Version}", "")
HtmlContent = HtmlContent
End Property