<!--#Include File="WapConfig/WapHeader.asp"-->
<%
'以下为文件正文。
XML.WriteRow XML.Img(XML.SiteLogo)

'以下为用户登陆信息。
If Session("OnlineName")="" Or Session("OnlineName")="游客" then
XML.WriteOut "您好,请您" & XML.ImgA("","Login.asp","登陆") & "本站。"
Else 
XML.WriteOut Session("OnlineName") & ",欢迎您!("
XML.WriteOut XML.A("","UserAdmin.asp","管理中心") & "/"
XML.WriteRow XML.A("","CheckUser.asp?ToDo=Exit","注销登录") & ")"
End If

XML.WriteOut "<h1>::: 欢迎您的光临！:::</h1>"

'设置简体繁体。
XML.WriteOut XML.ImgA("Images/RedDot.gif","FontType.asp?FontType=Simple","简体中文") & "　"
XML.WriteRow XML.ImgA("Images/GreenDot.gif","FontType.asp?FontType=Complex","繁體中文")
XML.WriteOut XML.ImgA("Images/RedDot.gif","SiteSearch.asp","本站搜索") & "　"
XML.WriteRow XML.ImgA("Images/RedDot.gif","SQSpecial.asp","特别专题")

'XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 最新公告</h2>"
'    XML.StrSql="Select Title,Id From SQ_Announce Order By DateAndTime Desc"
'    XML.MdbDo '执行SQL语句。
'For I=0 To XML.Rs.RecordCount-1
'    XML.WriteRow XML.ImgA("Images/GreenDot.gif","AnnounceShow.asp?ListId=" & XML.RS("Id"),XML.RS("Title"))
'    XML.Rs.MoveNext
'Next

XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 栏目导航</h2>"

XML.StrSql="Select ChannelID,ChannelName,ModuleType From SQ_Channel Where ChannelType<>2 And Disabled=False Order By OrderID Asc"
XML.MdbDo '执行SQL语句。
For I=0 To XML.Rs.RecordCount-1
    Select Case XML.RS("ModuleType")
    	Case 1 '文章
	XML.WriteOut XML.ImgA("","NewsClass.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName")) 
    	Case 2 '下载
	XML.WriteOut XML.ImgA("","SoftClass.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName"))
    	Case 3 '图片
	XML.WriteOut XML.ImgA("","ShowClass.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName"))
    	Case 4 '留言
	XML.WriteOut XML.ImgA("","GuestBook.asp?ChannelName=" & XML.SubmitText(XML.RS("ChannelName")),XML.RS("ChannelName"))
    	Case 5 '商城
	XML.WriteOut XML.ImgA("","ProductClass.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName"))
	'以下有待开发。
    	Case 6 '供求信息
	XML.WriteOut XML.ImgA("","ChannelList.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName"))
    	Case 7 '房产
	XML.WriteOut XML.ImgA("","NewsClass.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName"))
    	Case 8 '职位
	XML.WriteOut XML.ImgA("","ProductClass.asp?ListId=" & XML.RS("ChannelID"),XML.RS("ChannelName"))
    End Select
    XML.Rs.MoveNext
    If I<XML.Rs.RecordCount-1 Then '如果四个为一行则 (I+4)Mod 4=3	
	If (I+3)Mod 3=2 Then XML.WriteRow "" Else XML.WriteOut "|"
    End If
Next

'以下是数据库的设置信息

XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 最新文章</h2>"
XML.StrSql="select Top 5 ClassID,Title,ArticleID from SQ_Article Where Status=3 order by ArticleID desc" '要查询数据库的SQL语句。
XML.MdbDo '执行SQL语句。
    If XML.Rs.RecordCount<1 Then XML.WriteRow XML.Img("Images/RedDot.gif") & "此栏目暂无内容。"
For I=0 To XML.Rs.RecordCount-1
    ClassID=XML.RS("ClassID")
    XML.StrSql="Select ClassName From SQ_Class where ClassID=" & ClassID
    XML.MdbDo 1
    XML.WriteOut XML.ImgA("Images/RedDot.gif","NewsList.asp?ListId=" & ClassID,"[" & XML.RS1("ClassName") & "]")
    XML.WriteRow XML.ImgA("","NewsShow.asp?ListId=" & XML.RS("ArticleID"),XML.RS("Title"))
    XML.Rs.MoveNext
Next

XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 推荐文章</h2>"
XML.StrSql="select Top 5 ClassID,Title,ArticleID from SQ_Article Where Status=3 And Elite=True order by ArticleID desc" '要查询数据库的SQL语句。
XML.MdbDo '执行SQL语句。
    If XML.Rs.RecordCount<1 Then XML.WriteRow XML.Img("Images/RedDot.gif") & "此栏目暂无内容。"
For I=0 To XML.Rs.RecordCount-1
    ClassID=XML.RS("ClassID")
    XML.StrSql="Select ClassName From SQ_Class where ClassID=" & ClassID
    XML.MdbDo 1
    XML.WriteOut XML.ImgA("Images/RedDot.gif","NewsList.asp?ListId=" & ClassID,"[" & XML.RS1("ClassName") & "]")
    XML.WriteRow XML.ImgA("","NewsShow.asp?ListId=" & XML.RS("ArticleID"),XML.RS("Title"))
    XML.Rs.MoveNext
Next



'XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 图片中心</h2>"
'XML.StrSql="select Top 5 ClassID,PhotoName,PhotoId from SQ_Photo Where Status=3 order by UpdateTime desc"
'XML.MdbDo '执行SQL语句。
'    If XML.Rs.RecordCount<1 Then XML.WriteRow XML.Img("Images/RedDot.gif") & "此栏目暂无内容。"
'For I=0 To XML.Rs.RecordCount-1  
'    ClassID=XML.RS("ClassID")
'    XML.StrSql="Select ClassName From SQ_Class where ClassID=" & ClassID
'    XML.MdbDo 1
'    XML.WriteOut XML.ImgA("Images/RedDot.gif","ShowList.asp?ListId=" & ClassID,"[" & XML.RS1("ClassName") & "]")
'    XML.WriteRow XML.ImgA("","ShowShow.asp?ListId=" & XML.RS("PhotoId"),XML.RS("PhotoName"))
'    '以下一行为分类和图片标题为同一链接的样式。
'    'XML.WriteRow XML.ImgA("Images/GreenDot.gif","ShowShow.asp?ListId=" & XML.RS("PhotoId"),"[" & XML.RS1("ClassName") & "]" & XML.RS("PhotoName"))
'    XML.Rs.MoveNext
'Next

If 1=2 Then
XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 在线商城</h2>"
XML.StrSql="select Top 5 ClassID,ProductName,ProductId from SQ_Product order by UpdateTime desc"
XML.MdbDo '执行SQL语句。
    If XML.Rs.RecordCount<1 Then XML.WriteRow XML.Img("Images/RedDot.gif") & "此栏目暂无内容。"
For I=0 To XML.Rs.RecordCount-1  
    ClassID=XML.RS("ClassID")
    XML.StrSql="Select ClassName From SQ_Class where ClassID=" & ClassID
    XML.MdbDo 1
    XML.WriteOut XML.ImgA("Images/RedDot.gif","ShowList.asp?ListId=" & ClassID,"[" & XML.RS1("ClassName") & "]")
    XML.WriteRow XML.ImgA("","ProductShow.asp?ListId=" & XML.RS("ProductId"),XML.RS("PhotoName"))
    '以下一行为分类和图片标题为同一链接的样式。
    'XML.WriteRow XML.ImgA("Images/GreenDot.gif","ProductShow.asp?ListId=" & XML.RS("ProductId"),"[" & XML.RS1("ClassName") & "]" & XML.RS("ProductName"))
    XML.Rs.MoveNext
Next
End If

'XML.WriteOut "<h2>" & XML.Img("Images/book.gif") & " 其他工具</h2>"
'XML.WriteOut XML.ImgA("Images/RedDot.gif","VisitCountList.asp","访问统计") & "　"
'XML.WriteRow XML.ImgA("Images/RedDot.gif","CityPostType.asp","邮编查询")
'XML.WriteOut XML.ImgA("Images/RedDot.gif","WeekQuery.asp","星期查询") & "　"
'XML.WriteRow XML.ImgA("Images/RedDot.gif","CallPhone.asp","在线呼叫")
'XML.WriteOut XML.ImgA("Images/RedDot.gif","GoUrl.asp","转到网址") & "　"
'XML.WriteRow XML.ImgA("Images/RedDot.gif","SendMail.asp","发送邮件")

'以下进行访问统计
XML.MdbPath="MyDataBase/#Company.mdb"
XML.VisitCount "Phone"
%>
<!--#Include File="WapConfig/WapFooter.asp"--> 
