<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=False
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Dim ChannelID
ChannelID=0
%>
<!--#include file="../Conn.asp"-->
<!--#include file="../Inc/Cl_Const.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
body {background:#def0fa;font-size: 12px; margin-top:0px;
SCROLLBAR-FACE-COLOR: #0096CE; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #0096CE; 
SCROLLBAR-3DLIGHT-COLOR: #0096CE; SCROLLBAR-ARROW-COLOR: #def0fa;
SCROLLBAR-TRACK-COLOR: #def0fa;}
TD,INPUT{FONT-SIZE: 12px}
INPUT {HEIGHT: 20px;}
Button,Select{FONT-SIZE: 9pt;HEIGHT: 20px; }
</style>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
Cl.GetWeb_Setting()
'if Request.ServerVariables("HTTP_REFERER")="" then
'	Cl.OutErr("<li>以下操作需要登录后方或进行，您未登录。</li>")
'	Response.end
'end if
if Not Cl.ChkUserLogin then
	Cl.OutErr("<li>以下操作需要登录后方或进行，您未登录。</li><li>请点击<a href='LogIn.asp' target='_Top'>这里登录</a>。")
	Response.end
end if

ChkMain

%>
</body>
</html>
<%

Sub ChkMain()
	Dim Title,rsCheck,SQLCheck,SQLCheck2,SQLCheck3
	Title=Trim(request("TitleName"))
	ChannelID=Cl.ChkClng(request("ChannelID"))
	CL.GetChannelSetting(ChannelID)
	Select Case Clng(Cl.Channel_Setting(20))
	Case 1
		SQLCheck="Select Top 20 ArticleID,Title From Cl_Article Where ChannelID="&ChannelID&" and Title like '%"&Title&"%'"
		SQLCheck2="Select Top 20 ArticleID,Title,Keyword From Cl_Article Where ChannelID="&ChannelID&" and Keyword like '%"&Title&"%'"
	Case 2
		SQLCheck="Select Top 20 SoftID,SoftName From Cl_Soft Where ChannelID="&ChannelID&" and SoftName like '%"&Title&"%'"
		SQLCheck2="Select Top 20 SoftID,SoftName,Keyword From Cl_Soft Where ChannelID="&ChannelID&" and Keyword like '%"&Title&"%'"
	Case 3
		SQLCheck="Select Top 20 PhotoID,PhotoName From Cl_Photo Where ChannelID="&ChannelID&" and PhotoName like '%"&Title&"%'"
		SQLCheck2="Select Top 20 PhotoID,PhotoName,Keyword From Cl_Photo Where ChannelID="&ChannelID&" and Keyword like '%"&Title&"%'"
	Case 4
		SQLCheck="Select Top 20 MovieID,MovieName From Cl_Movie Where ChannelID="&ChannelID&" and MovieName like '%"&Title&"%'"
		SQLCheck2="Select Top 20 MovieID,MovieName,Keyword From Cl_Movie Where ChannelID="&ChannelID&" and Keyword like '%"&Title&"%'"
	Case 5
		SQLCheck="Select Top 20 ProductID,ProductName From Cl_Product Where ChannelID="&ChannelID&" and ProductName like '%"&Title&"%'"
		SQLCheck2="Select Top 20 ProductID,ProductName,Keyword From Cl_Product Where ChannelID="&ChannelID&" and Keyword like '%"&Title&"%'"
	Case 6
		SQLCheck="Select Top 20 ArticleID,Title From Cl_Topic Where ChannelID="&ChannelID&" and Title like '%"&Title&"%'"
		SQLCheck2="Select Top 20 ArticleID,Title,Keyword From Cl_Topic Where ChannelID="&ChannelID&" and Keyword like '%"&Title&"%'"
	Case Else
		%>
		<script type="text/javascript" language=javascript>window.close()</script>
		<%
	End Select
	Response.write "<font color='#0000ff'>名称</font>类似于<font color='#ff0033'>" & Title & "</font>的" & Cl.Channel_Setting(2)
	Set rsCheck=Cl.Execute(SQLCheck)
	if not(rsCheck.bof and rsCheck.eof) then
		Response.write "<ol>"
		do while Not rsCheck.Eof
			Response.write "<li>" & Replace(rsCheck(1),Title,"<font color='#ff0033'>" & Title & "</font>")
			rsCheck.MoveNext
		Loop
		Response.write "</ol>"
		'Call Cl.OutMsg("注意：" & Title & " 已经存在于数据库中！","javascript:window.close()")
	else

		Response.write "<li>无任何类似" & Cl.Channel_Setting(2) & "</li><br>"
	end if
	rsCheck.Close : set rsCheck=Nothing
	Response.write "<font color='#0000ff'>关键字</font>类似于<font color='#ff0033'>" & Title & "</font>的" & Cl.Channel_Setting(2)
	Set rsCheck=Cl.Execute(SQLCheck2)
	if not(rsCheck.bof and rsCheck.eof) then
		Response.write "<ol>"
		do while Not rsCheck.Eof
			Response.write "<li>"&rsCheck(1)&"<br>关键字：" & Replace(rsCheck(2),Title,"<font color=red>" & Title & "</font><>")
			rsCheck.MoveNext
		Loop
		Response.write "</ol>"
	else
		Response.write "<li>无任何类似" & Cl.Channel_Setting(2)
	end if
	rsCheck.Close : set rsCheck=Nothing
End Sub

'===================================================
' CreateLive CMS Version 3.1
'							Powered by Aspoo.CoM
'===================================================
' Mail: aspoo@126.com, Info@aspoo.cn
' Q  Q: 3315263, 596197794
' Msn : aspoo@126.com, Clw866@hotmail.com
' Web : http://www.aspoo.com, http://www.aspoo.net
' Bbs : http://bbs.aspoo.com, http://bbs.aspoo.net
' Copyright (C) 2005 Aspoo.CoM All Rights Reserved.
'===================================================
%>
