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

'一级分类统计---采购
Function yijicount_buy() 
sql="select count(info_id) from snsn_info where type='买' and classid="&rssort("id")&" 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 snsn_info where classid="&rssort("id")&" 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 snsn_info where type='卖' and xclassid="&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 snsn_info where type='卖' and xclassid="&typeid&" and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
listcount_sale=totle
End Function

'二级分类统计---采购
Function erjicount_buy() 
sql="select count(info_id) from snsn_info where type='买' and xclassid="&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 snsn_user where classid="&rssort("id")&" and cflag=1"
set totle=conn.execute(sql)
totle=totle(0)
yijicount_cor=totle
End Function

'供应信息总数
Function allinfo_sale() 
sql="select count(info_id) from snsn_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 snsn_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 snsn_info where type='卖' and dateandtime>=date()-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 snsn_info where type='卖' and classid="&rssort("id")&" and dateandtime>=date()-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 snsn_info where type='卖' and xclassid="&rstype("typeid")&" and dateandtime>=date()-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 snsn_info where type='买' and dateandtime>=date()-1 and flag=1"
set totle=conn.execute(sql)
totle=totle(0)
todayinfo_buy=totle
End Function

'今日求购信息总数---- 一级
Function yijitodayinfo_buy() 
sql="select count(info_id) from snsn_info where type='买' and classid="&rssort("id")&" and dateandtime>=date()-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 snsn_info where type='买' and xclassid="&rstype("typeid")&" and dateandtime>=date()-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 snsn_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 snsn_user 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 snsn_user where idate>=date()-1 and uflag=3"
set totle=conn.execute(sql)
totle=totle(0)
today_corporation=totle
End Function

'询价数
Function xunjia() 
sql="select count(id) from snsn_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>=date()-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>=date()-1"
'set totle=conn.execute(sql)
'totle=totle(0)
'zixun_datetime_erji=totle
'End Function
'今日宝典数
'Function baod_datetime() 
'sql="select count(newsid) from listinfo where dateandtime>=date()-1"
'set totle=conn.execute(sql)
'totle=totle(0)
'baod_datetime=totle
'End Function
%>
