<%
'-----------------------------
'	判断是否VIP会员，临时新增
'	参数为用户当前组的ID
'-----------------------------
Function GetVipIco(GroupID)
	Dim UserGroupVipID: UserGroupVipID	= 17	'VIP组ID
	On error resume next
	If IsNumeric(GroupID) Then
		IF ChkClng(GroupID) = UserGroupVipID Then
			GetVipIco = "<img src='/style/images/vip.gif' alt='尊贵VIP会员' align='absmiddle' />"
		End IF
	Else
		GetVipIco = ""
	End If
	If Err Then GetVipIco = ""
End Function

'-----------------------------
'	获取任务好评时限
'-----------------------------
Function TaskHaoPingLimit(HaoPingLimit,ShopDynamic,HaoPingContent)
	Dim Val,Val2,Val3,str,str2,str3
	Val = ChkClng(HaoPingLimit)
	Val2 = ChkClng(ShopDynamic)
	Val3 = HaoPingContent
	If Val3 <> "" Then str3 = "带字"
	If Val2 = 5 Then
		str2 = "和店评5分"
	End If
	If Val = 1 Then
		str = "<span title=""立即确认收货" & str3 & "好评"& str2 &""">立即确认</span>"
	ElseIF Val =2 Then
		str = "<span title=""30分钟后确认收货" & str3 & "好评"& str2 &""">30分钟后好评</span>"
	ElseIF Val =3 Then
		str = "<span title=""1天后确认收货" & str3 & "好评"& str2 &""">1天后好评</span>"
	ElseIF Val =4 Then
		str = "<span title=""2天后确认收货" & str3 & "好评"& str2 &""">2天后好评</span>"
	ElseIF Val =5 Then
		str = "<span title=""3天后确认收货" & str3 & "好评"& str2 &""">3天后好评</span>"
	ElseIF Val =6 Then
		str = "<span title=""4天后确认收货" & str3 & "好评"& str2 &""">4天后好评</span>"
	ElseIF Val =7 Then
		str = "<span title=""5天后确认收货" & str3 & "好评"& str2 &""">5天后好评</span>"
	ElseIF Val =8 Then
		str = "<span title=""6天后确认收货" & str3 & "好评"& str2 &""">6天后好评</span>"
	ElseIF Val =9 Then
		str = "<span title=""7天后确认收货" & str3 & "好评"& str2 &""">7天后好评</span>"
	Else
		str = "联系发布方"
	End If
	TaskHaoPingLimit = str
End Function

'-----------------------------
'  获取会员的积分图标
'-----------------------------
Function ScoreGradeIco(Score)
	Dim str: Score = ChkClng(Score)
	If Score <= 20 Then
	str = "<img src='/style/images/new.gif' align='absmiddle' alt='新手' />"
	ElseIf Score > 20 And Score <= 50 Then
	str = "<img src='/style/images/score_1.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 50 And Score <= 100 Then
	str = "<img src='/style/images/score_2.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 100 And Score <= 200 Then
	str = "<img src='/style/images/score_3.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 200 And Score <= 350 Then
	str = "<img src='/style/images/score_4.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 350 And Score <= 600 Then
	str = "<img src='/style/images/score_5.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 600 And Score <= 1000 Then
	str = "<img src='/style/images/score_6.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 1000 And Score <= 2000 Then
	str = "<img src='/style/images/score_7.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 2000 And Score <= 4000 Then
	str = "<img src='/style/images/score_8.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 4000 And Score <= 8000 Then
	str = "<img src='/style/images/score_9.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 8000 And Score <= 20000 Then
	str = "<img src='/style/images/score_10.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 20000 And Score <= 50000 Then
	str = "<img src='/style/images/score_11.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	ElseIf Score > 50000 Then
	str = "<img src='/style/images/score_12.gif' align='absmiddle' alt='经验积分：" & Score & "' />"
	End If
	ScoreGradeIco = str
End Function

'检查是否是数字 ，并转换为长整型
Function ChkClng(ByVal str)
	On Error Resume Next
	If IsNumeric(str) Then
		ChkClng = CLng(str)
	Else
		ChkClng = 0
	End If
	If Err Then ChkClng=0
End Function


'==================================================
'函数名：GetHttpPage
'作  用：获取网页源码
'参  数：HttpUrl ------网页地址
'用  途：目前应用于绑定买号时获取买号初始信誉值，和定期批量更新信誉值 2010-12-27
'==================================================
Function GetHttpPage(HttpUrl,CharsetCode)
   If IsNull(HttpUrl) = True Or Len(HttpUrl) < 18 Or HttpUrl = "Error" Then
	  GetHttpPage = "Error"
	  Exit Function
   End If
   Dim Http
  Set Http = CreateObject("MSXML2.ServerXMLHTTP") 
   Http.Open "GET", HttpUrl, False
  on error resume next
   Http.Send
   If Http.Readystate <> 4 Then
  'If Http.Status<>200 then 
	  Set Http = Nothing
	  GetHttpPage = "Error"
	  Exit Function
   End If
   if CharsetCode="auto" Or CharsetCode="" then CharsetCode=GetEncodeing(HttpUrl)
   GetHttpPage = BytesToBstr(Http.ResponseBody, CharsetCode)
   Set Http = Nothing
   If Err.Number <> 0 Then
	  Err.Clear
   End If
End Function
'自动取得编码格式
function GetEncodeing(sUrl)
On Error Resume Next
dim http,re,encodeing
Set http=CreateObject("Microsoft.XMLHTTP")
http.Open "GET",sUrl,False
http.send
if http.status="200" then
	Set re=new RegExp
	re.IgnoreCase =True
	re.Global=True
	re.Pattern="encoding=\""gb2312"
	if re.test(http.responseText) then
		encodeing="gb2312"
	else
		encodeing="utf-8"
	end if
	set re=nothing
end if
If Err Then
	Err.Clear
	GetEncodeing="utf-8"
else
	GetEncodeing=encodeing
End If
set http=nothing
end function
'==================================================
'函数名：BytesToBstr
'作  用：将获取的源码转换为中文
'参  数：Body ------要转换的变量
'参  数：Cset ------要转换的类型
'==================================================
Function BytesToBstr(Body, Cset)
   Dim Objstream
   Set Objstream = CreateObject("adodb.stream")
   Objstream.Type = 1
   Objstream.Mode = 3
   Objstream.Open
   Objstream.Write Body
   Objstream.Position = 0
   Objstream.Type = 2
   Objstream.Charset = Cset
   BytesToBstr = Objstream.ReadText
   Objstream.Close
   Set Objstream = Nothing
End Function


'传入DLL配置参数
Function TaskConfig()
	Dim Arr(108)
	Arr(0) = ChannelID
	Arr(1) = AdminGroupID
	Arr(2) = UserGroupVipID
	Arr(3) = TaskEnabled
	Arr(4) = TaskCloseMsg
	Arr(5) = TaskAddEnabled
	Arr(6) = TaskAddCloseMsg
	Arr(7) = BinDing_OverTime
	Arr(8) = Pay_OverTime
	Arr(9) = HaoPing_OverTime
	Arr(10) = TaskCardPrice1
	Arr(11) = TaskCardPrice2
	Arr(12) = TaskCardPoint2
	Arr(13) = TaskCardPrice3
	Arr(14) = TaskCardPoint3
	Arr(15) = TaskCardPrice4
	Arr(16) = TaskCardPoint4
	Arr(17) = TaskCardPrice5
	Arr(18) = TaskCardPoint5
	Arr(19) = TaskPointExchangeMoneyVIP
	Arr(20) = TaskPointExchangeMoneyCommon
	Arr(21) = BinDing_VipMaiHao
	Arr(22) = BinDing_VipShopHao
	Arr(23) = BinDing_CommonMaiHao
	Arr(24) = BinDing_CommonShopHao
	Arr(25) = BinDing_GetTaobaoXinYu
	Arr(26) = Fabu_MinScore
	Arr(27) = Fabu_MinScoreAddNum
	Arr(28) = Fabu_DaySameIPAddNum
	Arr(29) = Fabu_ShenSuNum
	Arr(30) = Fabu_NoFaHuoVIPAddNum
	Arr(31) = Fabu_NoFaHuoCommonAddNum
	Arr(32) = Fabu_DelTaskReturnPoint
	Arr(33) = JieShou_ReturnPoint
	Arr(34) = JieShou_MinScore
	Arr(35) = JieShou_MinNum
	Arr(36) = JieShou_CommonNum
	Arr(37) = JieShou_VipNum
	Arr(38) = JieShou_ShenSuNum
	Arr(39) = JieShou_MaiHaoDayBuyNum
	Arr(40) = JieShou_MaiHaoLimitSameURlDay
	Arr(41) = JieShou_MaiHaoMonthSameShopNum
	Arr(42) = JieShou_MaiHaoWeekBuyNum
	Arr(43) = JieShou_MaiHaoDaySameIPBuyNum
	Arr(44) = TemplateCommonUserNum
	Arr(45) = Express_CommonRndQueryNum
	Arr(46) = Express_CommonDefQueryNum
	Arr(47) = TiXian_Enabled
	Arr(48) = TiXian_MinMoney
	Arr(49) = TiXian_VIPDayNum
	Arr(50) = TiXian_CommonDayNum
	Arr(51) = BlackList_VIPNum
	Arr(52) = BlackList_CommonNum
	Arr(53) = BlackList_ExcessPoint
	Arr(54) = BlackList_LockMaxNum
	Arr(55) = SMS_Send_Enabled
	Arr(56) = SMS_UserName
	Arr(57) = SMS_Key
	Arr(58) = SMS_Price
	Arr(59) = SMS_IDAuthentication_Enabled
	Arr(60) = SMS_IDAuthentication_GiveVIP
	Arr(61) = GiveVIP_KS_UserCard_ID
	Arr(62) = Fabu_Enabled_LailuSearch
	Arr(63) = Fabu_Enabled_LimitArea
	Arr(64) = Fabu_Enabled_WangWangChat
	Arr(65) = Score_System_FinishScore
	Arr(66) = Score_System_AddTaskScore
	Arr(67) = Score_System_CardScore
	Arr(68) = TaskList_Index_MaxPerPage
	Arr(69) = TaskList_Index_TopNum
	Arr(70) = TaskList_DisplayDay
	Arr(71) = Promotion_ReturnPoint_Enabled
	Arr(72) = Promotion_Multiples_Enabled
	Arr(73) = Promotion_FaBuTaskCountNum
	Arr(74) = Promotion_FaBuReturnPointNum
	Arr(75) = Promotion_JieShouTaskCountNum
	Arr(76) = Promotion_JieShouReturnPointNum
	Arr(77) = Promotion_Second_ReturnPoint_Enabled
	Arr(78) = Promotion_Second_ReturnPointNum
	Arr(79) = User_ReturnPoint_Enabled
	Arr(80) = User_Multiples_Enabled
	Arr(81) = User_FaBuTaskCountNum
	Arr(82) = User_FaBuReturnPointNum
	Arr(83) = User_JieShouTaskCountNum
	Arr(84) = User_JieShouReturnPointNum	
	Arr(85) = DataServer & "||" & DataUser & "||" & DataBaseName & "||" & DataBasePsw	
	Arr(86) = BinDing_MaxTaobaoXinYu
	Arr(87) = BinDing_DefaultActivate
	Arr(88) = JieShou_SameIPMonthBuyNum	
	Arr(89) = Fabu_HongbaoDaifu_LimitShangBaoJieShou
	Arr(90) = Fabu_HaoPingPoint
	Arr(91) = Fabu_LailuSearchPoint
	Arr(92) = Fabu_IsCollectPoint
	Arr(93) = Fabu_IsModAddressPoint
	Arr(94) = Fabu_RealNameType1Point
	Arr(95) = Fabu_RealNameType2Point
	Arr(96) = Fabu_ShangBaoPoint
	Arr(97) = Fabu_LimitCityPoint
	Arr(98) = Fabu_LimitBuyPoint
	Arr(99) = Fabu_WangWangChatPoint
	Arr(100) = Fabu_VerificUserPoint
	Arr(101) = Fabu_BaseFilterPoint
	Arr(102) = Fabu_LimitUserNamePoint
	Arr(103) = Fabu_PlanAddDatePoint
	Arr(104) = Fabu_ContinueAddPoint
	Arr(105) = Fabu_DapeiMealPoint
	Arr(106) = Fabu_HongbaoDaifuSetPoint
	Arr(107) = Fabu_PriceAndPointCalc
	Arr(108) = Shangbao_JoinMoneyAndJieShowMoney

	TaskConfig = Arr
End Function

'============================================== End  ===========================================
%>