%
set db = server.createobject("adodb.connection")
db.open ("Provider=SQLOLEDB;User ID=dbman;Password=rmeofmftkfkdgkqslek;Initial Catalog=dbmana;;Data Source=211.174.179.8")
Set rs = server.createobject("adodb.recordset")
bigFolder = Server.MapPath("/") & "\files\"
%>
³ª¹«À§·Î Æú¦
<%
DIM strAdvertisement,strAboutGame
' AD
strAdvertisement=""
' NOTICE
strAboutGame=""
'---- DB Connection String ---
const SQLHEADER="SK_Ranking.dbo."
'SQLHEADER=""
DIM bLocal, strProvider, strBBSProvider, strDICProvider, strChatProvider, strTEXTProvider
bLocal = FALSE
if(bLocal) then
strProvider = "server=ADAL; uid=sa; pwd=dkfzhdekfzhd;driver={SQL Server};DB=SK_Ranking;"
else
strProvider = "server=211.174.179.26; uid=sa; pwd=tmxhsakskex;driver={SQL Server};DB=SK_Ranking;"
end if
const constCursorLocation=2
const constCursorType=3
const constLockType=3
'Response.Expires=0'Always reload
public Function FormatNumberEx(nVar)
if (nVar<>0) then
FormatNumberEx=FormatNumber(nVar,0)
else
FormatNumberEx=0
end if
end function
public Function IsValid(str)
if (IsEmpty(str) or IsNull(str) or Len(str)<1) then
IsValid=false
else
IsValid=true
end if
end function
%>
<%
'For WAP
DIM nGameKey
nGameKey=91
Public Function GetRank(nScore,DBConn)
'Calc Ranking
Set Rank = DBConn.Execute("Select r = count(gamekey) from SK_Ranking.dbo.score where gamekey=91 and gd_1>"&nScore )
GetRank = Rank("r")+1
Rank.Close
Set Rank=Nothing
End Function
function GetNationString2(scoreRS,nRank)
DIM strNameTag,strMID,strRank,strPhone,nl,nRl,nSl,i,strScore,score
if (not scoreRS.EOF) then '°ªÀÌ ÀÖ´Ù¸é
strNameTag=trim(scoreRS("phonesubno"))'Æù³Ñ¹ö µÞÀÚ¸®
nl=Len(strNameTag)
nRl=Len(Cstr(nRank))
nSl=Len(Cstr(scoreRS("gd_1")))
score=Cstr(scoreRS("gd_1"))
strRank=Cstr(nRank)
strScore=Cstr(score)
if nl=7 then
strPhone="019-"&Mid(strNameTag,1,1)&"XX-"&Mid(strNameTag,4,4)
end if
if nl=8 then
strPhone="019-"&Mid(strNameTag,1,2)&"XX-"&Mid(strNameTag,5,4)
end if
if nl=10 then
strPhone=Mid(strNameTag,1,3)&"-"&Mid(strNameTag,4,1)&"XX-"&Mid(strNameTag,7,4)
end if
if nl=11 then
strPhone=Mid(strNameTag,1,3)&"-"&Mid(strNameTag,4,2)&"XX-"&Mid(strNameTag,8,4)
end if
GetNationString2="
"&strRank&".
"&strPhone&"
"
else
GetNationString2=""
end if
end function
DIM DBConn,RankRS,i
DIM nRank,nTotal,User,nID
'--------------------
DIM strList,nMyScore
DIM strMyNation
Set DBConn = Server.CreateObject("ADODB.Connection")
Set RankRS = Server.CreateObject("ADODB.recordset")
strMyNation=""
DBConn.open( strProvider)
RankRS.CursorType = 3'static
RankRS.CursorLocation = 2
RankRS.LockType = 3'pess
set RankRS= DBConn.Execute( "Select * from SK_Ranking.dbo.score where gamekey=91 order by gd_1 desc")
for i=1 to 5
if (not RankRS.EOF) then
response.write " "
strList=strList&GetNationString2(RankRS,i)
RankRS.MoveNext
end if
next
RankRS.Close
DBConn.Close
set RankRS = Nothing
set DBConn = Nothing
%>