<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp" -->
<!--#include file="inc/plus_check.asp"-->
<!--#include file="Dv_Plus/Avatar/Plus_Avatar_Const.asp"-->
<%
Dim SumAmount, i, j
Dim AvatarArray, ItemCount, AvatarStr, TempArray()

Dv_Plus.Name = "Plus_Avatar"
Dv_Plus.CheckLogin
Dvbbs.LoadTemplates "Avatar"
Dvbbs.Stats = Template.Strings(22)
Dvbbs.ActiveOnline
v_FoundErr = False
If Dvbbs.Forum_Setting(82) <> "0" Then
	v_ErrCodes = "<li>该论坛尚未开启虚拟形象功能，不能复制形象！"
	v_FoundErr = True
Else
	If Trim(Request("Avatar")) = "" Then
		AvatarStr = ""
	Else
		AvatarStr = Split(Trim(Request("Avatar")), ",")(0)
	End If
	ItemCount = Avatar_GetInfo(AvatarStr, AvatarArray)
	If ItemCount = 0 Then
		If v_ErrCodes <> "" Then v_ErrCodes = v_ErrCodes & "<br>"
		v_ErrCodes = v_ErrCodes & "<li>提交的数据有错误！"
		v_FoundErr = True
	Else
		Dvbbs.Head
		Call Main
	End If
End If
If v_FoundErr Then Call ShowErr(False)
Dvbbs.Footer
Set Dv_Plus = Nothing

Sub Main()
	Dim i, TempStr
	
	TempStr = Template.HTML(15)
	TempStr = Replace(TempStr, "{$UserAvaSetting}", AvatarStr)
	With AvatarXMLDOM.documentElement.selectSingleNode("AvatarInfo").Attributes
		TempStr = Replace(TempStr, "{$AvatarWidth}", .getNamedItem("AvatarWidth").Text)
		TempStr = Replace(TempStr, "{$AvatarHeight}", .getNamedItem("AvatarHeight").Text)
		TempStr = Replace(TempStr, "{$LocalPic}", .getNamedItem("LocalPic").Text)
		TempStr = Replace(TempStr, "{$PicPath}", .getNamedItem("PicPath").Text)
	End With
	Response.Write TempStr
End Sub
%>