%
Dim strSql,inConnect,inCondition,inFields,inTable,rsRecord
Dim strCorp_Id,search_id
strCorp_Id=Corp_ID
TYPE_NAME=request("TYPE_NAME")
'if Type_ID="" then
if TYPE_NAME="" then
inCondition = "CORP_ID="&strCorp_Id&" and is_e=0 and IMFOR_FLAG='是'"
else
'inCondition = "CORP_ID="&strCorp_Id&" and is_e=0 and Type_ID="&Type_ID
inCondition = "CORP_ID="&strCorp_Id&" and is_e=0 and TYPE_NAME='"&TYPE_NAME&"'"
end if
set inConnect = DB_GetConnection()
inFields = "NEWS_TITLE,CREATE_TIME,NEWS_ID,TYPE_NAME,FIRST_FLAG,IMFOR_FLAG,DOT_AMOUNT,CORP_ID,Type_ID"
inTable = "NEWS_CONTENT"
strSql = DB_GetQuerySQL(inTable,inFields,inCondition)
strSql = strSql&" order by CREATE_TIME"
set rsRecord1 = DB_GetRecordset(inConnect,strSql)
inCondition = "CORP_ID="&strCorp_Id
inFields = "CORP_ID,TYPE_ID,TYPE_NAME"
inTable = "NEWS_TYPE"
strSql = DB_GetQuerySQL(inTable,inFields,inCondition)
set rs = DB_GetRecordset(inConnect,strSql)
%>