<%
pageSection=request.QueryString("pageSection")
sAction=request.querystring("navaction")
rAction=request.querystring("action")
CharID=request.querystring("CharID")
detailID=request.querystring("detailID")
StartDBConnection()
strSQL=""
strSQL = "SELECT * FROM tableCharacter where pk_charID='" & charID & "'"
rsRecords.Open strSQL, dbConnect, adOpenKeyset, adLockOptimistic
strImageDir=Session("softwarePlatform")
if(len(strImageDir)=0 or isNull(strImageDir)) then
strImageDir="Mac"
end if
if(sAction="rankTally") then
doRankUpdate
elseif(sAction="upgrade") then
showUpgrade
else
showDefault
end if
sub doRankUpdate
intUserType=getRigPermissions
if(intUserType>4) then
StartDBConnection()
strSQL=""
strSQL = "SELECT * from tableCharacterQueue order by fk_charID DESC"
rsRecords.Open strSQL, dbConnect, adOpenKeyset, adLockOptimistic
intTotal=0
if(not(rsRecords.EOF)) then
currID=rsRecords.fields("fk_charID")
intTotal=rsRecords.fields("rank")
while not(rsRecords.EOF)
if(not(currID=rsRecords.fields("fk_charID"))) then
strSubSQL="Update tableCharacter set queueRank=" & intTotal & " where pk_charID='" & currID & "'"
Set rsSubRecords = Server.CreateObject( "ADODB.Recordset" )
rsSubRecords.Open strSubSQL, dbConnect, adOpenKeyset, adLockOptimistic
intTotal=0
currID=rsRecords.fields("fk_charID")
end if
intTotal=cInt(intTotal)+cInt(rsRecords.fields("rank"))
rsRecords.MoveNext
wend
rsRecords.close
end if
end if
end sub
sub showDefault
sAction=request.querystring("navaction")
%>
<%
strHeight="580"
strURL=""
if(sAction="vmanual") then
strURL="?navaction=vmanual&CharID=" & CharID
strHeight="900"
response.write("")
elseif(sAction="queue") then
strHeight="900"
response.write("")
else
response.write("")
end if
%>