- Function ReplaceMenu()
- Dim HomeUrl,BlogUrl,MessageUrl,ProductUrl,IntroUrl,NewsUrl,JobUrl,RyzsUrl
- Dim AlbumUrl,GroupUrl,FriendUrl,XXUrl,InfoUrl,FreshUrl
- If KS.SSetting(21)="1" Then
- If Not KS.IsNul(Domain) Then
- If Instr(Domain,".")<>0 Then
- HomeUrl = "http://" & domain
- Else
- HomeUrl = "http://" & domain &"." & KS.SSetting(16)
- End If
- Else
- HomeUrl ="" & userid
- End If
- BlogUrl = "blog-" & userid
- MessageUrl= "message-"&userid
- ProductUrl= "product-"&userid
- IntroUrl = "intro-" &userid
- NewsUrl = "news-" & userid
- JobUrl = "job-" & userid
- RyzsUrl = "ryzs-" &userid
- AlbumUrl = "album-" & userid
- GroupUrl = "group-" & userid
- FriendUrl = "friend-" & userid
- XXUrl = "xx-" & userid
- InfoUrl = "info-" & userid
- FreshUrl = "fresh-" & userid
- Else
- HomeUrl = "../space/?" & userid
- BlogUrl = "../space/?" & userid & "/blog"
- MessageUrl= "../space/?" & userid & "/message"
- ProductUrl= "../space/?" & userid & "/product"
- IntroUrl = "../space/?" & userid & "/intro"
- NewsUrl = "../space/?" & userid &"/news"
- JobUrl = "../space/?" & userid & "/job"
- RyzsUrl = "../space/?" & userid & "/ryzs"
- AlbumUrl = "../space/?" & userid & "/album"
- GroupUrl = "../space/?" & userid & "/group"
- FriendUrl = "../space/?" & userid & "/friend"
- XXUrl = "../space/?" & userid & "/xx"
- InfoUrl = "../space/?" & userid & "/info"
- FreshUrl = "../space/?" & userid & "/fresh"
- End If
- if conn.execute("Select top 1 username From KS_enterprise Where UserName='" & UserName & "'").eof Then
- ReplaceMenu="<div id=""Menu"">"_
- & "<ul>"_
- &" <li><a href=""" & HomeUrl & """>首页</a></li>"_
- &" <li><a href=""" & FreshUrl & """>新鲜事</a></li>"_
- &" <li><a href=""" & BlogUrl & """>博文</a></li>"_
- &" <li><a href=""" & AlbumUrl & """>相册</a></li>"_
- &" <li><a href=""" & GroupUrl & """>圈子</a></li>" _
- &" <li><a href=""" & FriendUrl & """>好友</a></li>"_
- &" <li><a href=""" & XXUrl & """>文集</a></li>"_
- &" <li><a href=""" & InfoUrl & """>小档案</a></li>"_
- &" <li><a href=""" & MessageUrl & """>留言板</a>"_
- &"</ul>"_
- &"</div>"
- Else
- if conn.execute("Select top 1 ClassID From KS_enterprise Where ClassID=1").eof Then
- ReplaceMenu="<div id=""Menu"">"_
- & "<ul>"_
- &" <li><a href=""" & HomeUrl & """>首页</a></li>"_
- &" <li><a href=""" & introUrl & """ title=""公司简介"">企业简介</a></li>"_
- &" <li><a href=""" & NewsUrl & """ title=""公司动态"">企业新闻</a></li>"_
- &" <li><a href=""" & JobUrl & """ title=""公司招聘"">人才招聘</a></li>"_
- &" <li><a href=""" & AlbumUrl & """ title=""公司相册"">成功案例</a></li>"_
- &" <li><a href=""" & ryzsurl & """ title=""公司证书"">荣誉证书</a></li>"_
- &" <li><a href=""" & InfoUrl & """>联系我们</a></li>"_
- &" <li><a href=""" & MessageUrl & """>留言板</a>"_
- &"</ul>"_
- &"</div>"
- Else
- ReplaceMenu="<div id=""Menu"">"_
- & "<ul>"_
- &" <li><a href=""" & HomeUrl & """>首页</a></li>"_
- &" <li><a href=""" & introUrl & """ title=""公司简介"">企业简介</a></li>"_
- &" <li><a href=""" & NewsUrl & """ title=""公司动态"">企业新闻</a></li>"_
- &" <li><a href=""" & ProductUrl & """ title=""产品展示"">产品展示</a></li>"_
- &" <li><a href=""" & JobUrl & """ title=""公司招聘"">人才招聘</a></li>"_
- &" <li><a href=""" & AlbumUrl & """ title=""公司相册"">成功案例</a></li>"_
- &" <li><a href=""" & ryzsurl & """ title=""公司证书"">荣誉证书</a></li>"_
- &" <li><a href=""" & InfoUrl & """>联系我们</a></li>"_
- &" <li><a href=""" & MessageUrl & """>留言板</a>"_
- &"</ul>"_
- &"</div>"
- End If
- End If
- End Function
整段就是这样的,我在判断是否为企业空间后,加了一个条件,根据行业判断不同的导航,可是怎么判断都是后者。麻烦各位老大帮忙看看。