<%
Function Getsearchsortcount()
sql="select count(info_id) from [info] where [sortid]="&rssort("sortid")&" and [keywords] like '%["&keywords&"]%' and [flag]=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount=totle
End Function

Function Getsearchtypecount()
sql="select count(info_id) from [info] where [typeid]="&rstype("typeid")&" and [keywords] like '%["&keywords&"]%' and [flag]=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount=totle
End Function

Function Getsearchtypecount_sale()
sql="select count(info_id) from info where type='卖' and typeid="&rstype("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount_sale=totle
End Function

Function Getsearchsortcount_sale()
sql="select count(info_id) from info where type='卖' and sortid="&rssort("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount_sale=totle
End Function

Function Getsearchtypecount_buy()
sql="select count(info_id) from info where type='买' and typeid="&rstype("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount_buy=totle
End Function

Function Getsearchsortcount_buy()
sql="select count(info_id) from info where type='买' and sortid="&rssort("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount_buy=totle
End Function

Function Getsearchtypecount1()
sql="select count(info_id) from info where type='卖' and typeid="&typeid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount1=totle
End Function

Function Getsearchtypecount1_1()
sql="select count(info_id) from info where type='买' and typeid="&typeid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount1_1=totle
End Function

Function Getsearchtypecount1_1_1()
sql="select count(id) from productshow where typeid="&typeid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount1_1_1=totle
End Function

Function Getsearchtypecount1_1_1_1()
sql="select count(id) from corporation where typeid="&typeid&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount1_1_1_1=totle
End Function

Function Getsearchsortcount1()
sql="select count(info_id) from info where type='卖' and sortid="&sortid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount1=totle
End Function

Function Getsearchsalecount1()
sql="select count(info_id) from info where type='卖' and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsalecount1=totle
End Function

Function Getsearchtypecount2()
sql="select count(info_id) from info where type='买' and typeid="&rstype("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount2=totle
End Function

Function Getsearchsortcount2()
sql="select count(info_id) from info where type='买' and sortid="&rssort("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount2=totle
End Function

Function Getsearchsortcount3()
sql="select count(info_id) from info where type='买' and sortid="&rstype("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount3=totle
End Function

Function Getsearchtypecount4()
sql="select count(info_id) from info where typeid="&rssort("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount4=totle
End Function

Function Getsearchsortcount4()
sql="select count(info_id) from info where sortid="&sortid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount4=totle
End Function

Function Getsearchsortcount5()
sql="select count(info_id) from info where sortid="&rstype("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount5=totle
End Function

Function Getsearchtypecount6()
sql="select count(info_id) from info where type='卖' and typeid="&rssort("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount6=totle
End Function

Function Getsearchsortcount6()
sql="select count(info_id) from info where type='卖' and sortid="&sortid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount6=totle
End Function

Function Getsearchsortcount7()
sql="select count(info_id) from info where type='卖' and sortid="&rstype("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount7=totle
End Function

Function Getsearchtypecount8()
sql="select count(info_id) from info where type='买' and typeid="&rssort("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount8=totle
End Function

Function Getsearchsortcount8()
sql="select count(info_id) from info where type='买' and sortid="&sortid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount8=totle
End Function

Function Getsearchsortcount9()
sql="select count(info_id) from info where type='买' and sortid="&rstype("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount9=totle
End Function

Function Getsearchtypecount10()
sql="select count(id) from productshow where typeid="&rssort("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount10=totle
End Function

Function Getsearchsortcount10()
sql="select count(id) from productshow where sortid="&sortid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount10=totle
End Function

Function Getsearchsortcount11()
sql="select count(id) from productshow where sortid="&rstype("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount11=totle
End Function

Function Getsearchtypecount12()
sql="select count(id) from corporation where typeid="&rssort("typeid")&" and zycp like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchtypecount12=totle
End Function

Function Getsearchsortcount12()
sql="select count(id) from corporation where sortid="&sortid&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount12=totle
End Function

Function Getsearchsortcount13()
sql="select count(id) from corporation where sortid="&rstype("sortid")&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchsortcount13=totle
End Function

Function Getsearchprocount()
sql="select count(id) from productshow where keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchprocount=totle
End Function

Function Getsearchprosortcount()
sql="select count(id) from productshow where sortid="&sortid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchprosortcount=totle
End Function

Function Getsearchprotypecount()
sql="select count(id) from productshow where typeid="&typeid&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchprotypecount=totle
End Function

Function Getsearchprosortcount1()
sql="select count(id) from productshow where sortid="&rssort("sortid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchprosortcount1=totle
End Function

Function Getsearchprotypecount1()
sql="select count(id) from productshow where typeid="&rstype("typeid")&" and keywords like '%"&keywords&"%' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchprotypecount1=totle
End Function

Function Getsearchcorcount()
sql="select count(id) from corporation where zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchcorcount=totle
End Function

Function Getsearchcorsortcount()
sql="select count(id) from corporation where sortid="&sortid&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchcorsortcount=totle
End Function

Function Getsearchcortypecount()
sql="select count(id) from corporation where typeid="&typeid&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchcortypecount=totle
End Function

Function Getsearchcorsortcount1()
sql="select count(id) from corporation where sortid="&rssort("sortid")&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchcorsortcount1=totle
End Function

Function Getsearchcortypecount1()
sql="select count(id) from corporation where typeid="&rstype("typeid")&" and zycp like '%"&keywords&"%' and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
Getsearchcortypecount1=totle
End Function

'一级分类统计---供应
Function yijicount_sale() 
sql="select count(info_id) from info where type='卖' and sortid="&rssort("sortid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijicount_sale=totle
End Function

'专项商机总数
Function zxshangji_all() 
sql="select count(vipinfo_id) from vipinfo"
set totle=conn.execute(sql)
totle=totle(0)
zxshangji_all=totle
End Function

'专项商机统计---采购
Function zxshangji_buy() 
sql="select count(vipinfo_id) from vipinfo where viptype='采购项目'"
set totle=conn.execute(sql)
totle=totle(0)
zxshangji_buy=totle
End Function

'专项商机统计---合作
Function zxshangji_hz() 
sql="select count(vipinfo_id) from vipinfo where viptype='合作项目'"
set totle=conn.execute(sql)
totle=totle(0)
zxshangji_hz=totle
End Function

'专项商机统计---代理
Function zxshangji_dl() 
sql="select count(vipinfo_id) from vipinfo where viptype='代理项目'"
set totle=conn.execute(sql)
totle=totle(0)
zxshangji_dl=totle
End Function

'专项商机统计---供应
Function zxshangji_gy() 
sql="select count(vipinfo_id) from vipinfo where viptype='供应项目'"
set totle=conn.execute(sql)
totle=totle(0)
zxshangji_gy=totle
End Function

'专项商机统计---商务服务
Function zxshangji_fw() 
sql="select count(vipinfo_id) from vipinfo where viptype='商务服务'"
set totle=conn.execute(sql)
totle=totle(0)
zxshangji_fw=totle
End Function

'一级分类统计---采购
Function yijicount_buy() 
sql="select count(info_id) from info where type='买' and sortid="&rssort("sortid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijicount_buy=totle
End Function

'一级分类统计---供应及采购
Function yijicount_buy_sale() 
sql="select count(info_id) from info where sortid="&rssort("sortid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijicount_buy_sale=totle
End Function

'二级分类统计---供应
Function erjicount_sale() 
sql="select count(info_id) from info where type='卖' and typeid="&rstype("typeid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
erjicount_sale=totle
End Function

'list级统计---供应
Function listcount_sale() 
sql="select count(info_id) from info where type='卖' and typeid="&typeid&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_sale=totle
End Function

'list级统计---供应(html)
Function listcount_sale_html() 
sql="select count(info_id) from info where type='卖' and typeid="&ttid&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_sale_html=totle
End Function

'二级分类统计---采购
Function erjicount_buy() 
sql="select count(info_id) from info where type='买' and typeid="&rstype("typeid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
erjicount_buy=totle
End Function

'公司库一级分类统计
Function yijicount_cor() 
sql="select count(id) from corporation where sortid="&rssort("sortid")&" and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijicount_cor=totle
End Function

'公司库二级分类统计
Function erjicount_cor() 
sql="select count(id) from corporation where typeid="&rstype("typeid")&" and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
erjicount_cor=totle
End Function

'list级相关公司统计
Function listcount_cor() 
sql="select count(id) from corporation where typeid="&typeid&" and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_cor=totle
End Function

'list级相关公司统计(HTML页）
Function listcount_cor_html() 
sql="select count(id) from corporation where typeid="&ttid&" and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_cor_html=totle
End Function

'产品目录一级分类统计
Function yijicount_pro() 
sql="select count(id) from productshow where sortid="&rssort("sortid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijicount_pro=totle
End Function

'产品目录二级分类统计
Function erjicount_pro() 
sql="select count(id) from productshow where typeid="&rstype("typeid")&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
erjicount_pro=totle
End Function

'list级产品目录统计
Function listcount_pro() 
sql="select count(id) from productshow where typeid="&typeid&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_pro=totle
End Function

'list级产品目录统计(HTML页）
Function listcount_pro_html() 
sql="select count(id) from productshow where typeid="&ttid&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_pro_html=totle
End Function

'供应信息总数
Function allinfo_sale() 
sql="select count(info_id) from info where type='卖' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
allinfo_sale=totle
End Function

'求购信息总数
Function allinfo_buy() 
sql="select count(info_id) from info where type='买' and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
allinfo_buy=totle
End Function

'今日供应信息总数
Function todayinfo_sale() 
sql="select count(info_id) from info where type='卖' and dateandtime>=getdate()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
todayinfo_sale=totle
End Function

'今日供应信息总数---- 一级
Function yijitodayinfo_sale() 
sql="select count(info_id) from info where type='卖' and sortid="&rssort("sortid")&" and dateandtime>=getdate()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijitodayinfo_sale=totle
End Function

'今日供应信息总数---- 二级
Function erjitodayinfo_sale() 
sql="select count(info_id) from info where type='卖' and typeid="&rstype("typeid")&" and dateandtime>=getdate()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
erjitodayinfo_sale=totle
End Function

'今日求购信息总数
Function todayinfo_buy() 
sql="select count(info_id) from info where type='买' and dateandtime>=getdate()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
todayinfo_buy=totle
End Function

'今日新增采购信息数
Function todayvipinfo_buy() 
sql="select count(vipinfo_id) from vipinfo where viptype='采购项目' and dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
todayvipinfo_buy=totle
End Function

'今日新增供应信息数
Function todayvipinfo_gy() 
sql="select count(vipinfo_id) from vipinfo where viptype='供应项目' and dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
todayvipinfo_gy=totle
End Function

'今日新增商务服务信息数
Function todayvipinfo_fw() 
sql="select count(vipinfo_id) from vipinfo where viptype='商务服务' and dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
todayvipinfo_fw=totle
End Function

'今日新增合作信息数
Function todayvipinfo_hz() 
sql="select count(vipinfo_id) from vipinfo where viptype='合作项目' and dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
todayvipinfo_hz=totle
End Function

'今日新增代理信息数
Function todayvipinfo_dl() 
sql="select count(vipinfo_id) from vipinfo where viptype='代理项目' and dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
todayvipinfo_dl=totle
End Function

'今日求购信息总数---- 一级
Function yijitodayinfo_buy() 
sql="select count(info_id) from info where type='买' and sortid="&rssort("sortid")&" and dateandtime>=getdate()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijitodayinfo_buy=totle
End Function

'今日求购信息总数---- 二级
Function erjitodayinfo_buy() 
sql="select count(info_id) from info where type='买' and typeid="&rstype("typeid")&" and dateandtime>=getdate()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
erjitodayinfo_buy=totle
End Function

'供求信息总数
Function allinfo_sale_buy() 
sql="select count(info_id) from info where flag=1"
set totle=conn.execute(sql)
totle=totle(0)
allinfo_sale_buy=totle
End Function

'公司总数
Function allcorporation() 
sql="select count(id) from corporation where cflag=1"
'sql="select max(id) from corporation"
set totle=conn.execute(sql)
totle=totle(0)
allcorporation=totle
End Function

'数增公司数
Function today_corporation() 
sql="select count(id) from corporation where idate>=getdate()-1 and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
today_corporation=totle
End Function

'询价数
Function xunjia() 
sql="select count(id) from getprice"
set totle=conn.execute(sql)
totle=totle(0)
xunjia=totle
End Function

'资讯总数
Function zixun_all() 
sql="select count(newsid) from news"
set totle=conn.execute(sql)
totle=totle(0)
zixun_all=totle
End Function

'二级资讯总数
Function zixun_erji() 
sql="select count(newsid) from news where typeid="&typeid&""
set totle=conn.execute(sql)
totle=totle(0)
zixun_erji=totle
End Function

'今日资讯数
Function zixun_datetime() 
sql="select count(newsid) from news where dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
zixun_datetime=totle
End Function

'今日二级资讯数
Function zixun_datetime_erji() 
sql="select count(newsid) from news where typeid="&typeid&" and dateandtime>=getdate()-1"
set totle=conn.execute(sql)
totle=totle(0)
zixun_datetime_erji=totle
End Function

'各地营销处总数统计
Function yingxiao_all() 
sql="select count(id) from about where type='各地营销处'"
set totle=conn.execute(sql)
totle=totle(0)
yingxiao_all=totle
End Function

'各咨讯相关评论数统计
Function news_com() 
sql="select count(com_id) from infocom where bpjid="&newsid&" and pass=1"
set totle=conn.execute(sql)
totle=totle(0)
news_com=totle
End Function

'行业大类统计
Function sort_all() 
sql="select count(SortID) from class_1"
set totle=conn.execute(sql)
totle=totle(0)
sort_all=totle
End Function

'行业小类统计
Function type_all() 
sql="select count(typeID) from class_2"
set totle=conn.execute(sql)
totle=totle(0)
type_all=totle
End Function
%>
