website by clansystem 2.0

thanks Bobsobol
yes I check with clandb.dbo.ul and i don't found 'admin' in that .

picture SQL with clan.db.ul


How should I edit?
I do not know about sql
help me
thanks a lot
 

Attachments

  • untitled - website by clansystem 2.0 - RaGEZONE Forums
    untitled.webp
    51.3 KB · Views: 54
Last edited:
That screenshot is not related to the SQL query. Look at the table data, not it's structure. :ott1:
 
: D sorry I do not know much about information technology. so you understand. the sql query is not my field.
and after trying to fix it, I succeeded sodpersonal score. but there is a small error on your code would help me
it does not connect to the class icon


I think the code is not know the problem but fix it. probably need a code for it to connect to img

thanks Bobsobol
thank you very much
 

Attachments

  • 13 - website by clansystem 2.0 - RaGEZONE Forums
    13.webp
    72.1 KB · Views: 44
  • 14 - website by clansystem 2.0 - RaGEZONE Forums
    14.webp
    69.5 KB · Views: 52
Last edited:
Eww. Yucky code. All of the rows are listed in one cell of the table? Euck. :lol:

Hmm, well it seems to be a broken image embedding doesn't it? The part you highlight is just the column header.
Code:
		strSoDTablePersonal = strSoDTablePersonal & "</td><td><strong>[color=red]Class[/color]</strong><BR>"
CFXAq - website by clansystem 2.0 - RaGEZONE Forums
I don't think there's anything wrong with that. (other than the general nastiness of the table layout XD)

It must be contained in the loop below:-
Code:
		For i = 1 To (iC - 1)
			If i <= Results Then
				strSoDTablePersonal = strSoDTablePersonal & gClass(i) & "<BR>"
			End If
		Next
Specifically, the content of gClass(i) must be wrong. (probably pointing to a missing image URL. The array gClass() must expand to something like:-
Code:
'<img src="\images\class\1.gif">Fighter',
'<img src="\images\class\2.gif">Pikeman',
'<img src="\images\class\3.gif">Archer',
'<img src="\images\class\4.gif">Mech',
'<img src="\images\class\5.gif">Knight',
'<img src="\images\class\6.gif">Ata',
'<img src="\images\class\7.gif">Priestess',
'<img src="\images\class\8.gif">Mage'

The code before fills out the array:-
Code:
		For i = 1 To RS.RecordCount
			If iC <= 250 Then
				tName = RS("CharName").Value
				tLevel = RS("GLevel").Value
				tPoints = RS("Point").Value
				tKills = RS("KillCount").Value
				[color=red[tClass = GetCharType(RS("CharType").Value)[/color]
				tRegistDay = RS("RegistDay").Value

				If InArray(tName, gName) = False And tPoints > 0 Then
					If Not ucase(left(tName,3)) = "GM-" Then
						gName(iC) = tName
						gLevel(iC) = tLevel
						gPoints(iC) = tPoints
						gKills(iC) = tKills
						[color=red]gClass(iC) = tClass[/color]
						gRegistDay(iC) = tRegistDay
						iC = iC + 1
					End If
				End If

				If i < RS.RecordCount Then
					RS.MoveNext
				End If
			End If
		Next
So effectively, gClass(i) = iteration i of GetCharType(RS("CharType").Value

RS is a query produced by:-
Code:
	If ChType="" Then
		QUERY = "SELECT * FROM SoD2RecBySandurr ORDER BY Point DESC"
	Else
		QUERY = "SELECT * FROM SoD2RecBySandurr WHERE CharType='" & GetCharTypeInt(ChType) & "' ORDER BY Point DESC"
	End If

...

	OpenConnection(dbname3)
	RS.Open QUERY, objConn, 3, 1
CharType is an integer allocated in the SQL file "Sod3DB.sql"
Code:
CREATE TABLE [dbo].[[color=red]SOD2RecBySandurr[/color]](
	[SNo] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [varchar](50) NULL,
	[CharName] [varchar](50) NULL,
	[color=red][CharType] [int] NULL,[/color]
	[Point] [int] NULL,
	[KillCount] [int] NULL,
	[GLevel] [int] NULL,
	[TotalPoint] [int] NULL,
	[TotalUser] [int] NULL,
	[SuccessUser] [int] NULL,
	[ServerName] [varchar](50) NULL,
	[PCRNo] [int] NULL,
	[GPCode] [varchar](50) NULL,
	[BusinessName] [varchar](100) NULL,
	[BAddress1] [varchar](100) NULL,
	[PMNo] [int] NULL,
	[Contribute] [int] NULL,
	[RegistDay] [datetime] NULL,
	[ServerTime] [bigint] NULL,
	[Flag] [int] NULL,
	[ClanIDX] [int] NULL,
	[ClanName] [varchar](50) NULL
) ON [PRIMARY]
So we are looking for the function with resolves:-
Code:
GetCharType(int).value
^_^

I found that in "database.asp"
Code:
Function GetCharType(ID)
	Select Case ID
		Case "1"
			GetCharType = "Fighter"
		Case "2"
			GetCharType = "Mechanician"
		Case "3"
			GetCharType = "Archer"
		Case "4"
			GetCharType = "Pikeman"
		Case "5"
			GetCharType = "Atalanta"
		Case "6"
			GetCharType = "Knight"
		Case "7"
			GetCharType = "Magician"
		Case "8"
			GetCharType = "Priestess"
	End Select
End Function
Which doesn't include any <img> tag at all. So either I'm missing something in my copy, or your copy is different to the one I have. :/: Sorry.

I'm expecting yours to look like
Code:
Function GetCharType(ID)
	Select Case ID
		Case "1"
			GetCharType = "<img src="\images\class\1.gif">Fighter"
		Case "2"
			GetCharType = "<img src="\images\class\2.gif">Mechanician"
		Case "3"
			GetCharType = "<img src="\images\class\3.gif">Archer"
		Case "4"
			GetCharType = "<img src="\images\class\4.gif">Pikeman"
		Case "5"
			GetCharType = "<img src="\images\class\5.gif">Atalanta"
		Case "6"
			GetCharType = "<img src="\images\class\6.gif">Knight"
		Case "7"
			GetCharType = "<img src="\images\class\7.gif">Magician"
		Case "8"
			GetCharType = "<img src="\images\class\8.gif">Priestess"
	End Select
End Function
Except there is no saying what the images may be called, or where they may be stored.

My archive doesn't contain any class images, and since the code doesn't seem to point to any either, that isn't a problem. Maybe you have some class logos in there? Maybe you'd be happy to have it show nothing rather than the broken image place-holder?
 
Last edited:
woa ! thanks Bobsobol

although not used for sharing your code, but I'm also happy to have you help and a little more about asp.
when I search database.asp I see: I had no img folder in the function.

this is the result

3 - website by clansystem 2.0 - RaGEZONE Forums


thank you very much
 

Attachments

  • 1 - website by clansystem 2.0 - RaGEZONE Forums
    1.webp
    62.5 KB · Views: 55
  • 2 - website by clansystem 2.0 - RaGEZONE Forums
    2.webp
    34.6 KB · Views: 63
Last edited:
Super! Congratulations! We got there in the end. :D:

Also, thank you for telling us how you used the information you where given to achieve success. I'm sure it will be helpful to others who search.

--- EDIT ---
Okay, now try changing the loop below the class header in sodpersonal.asp to look like this:-
Code:
		For i = 1 To (iC - 1)
			If i <= Results Then
				strSoDTablePersonal = strSoDTablePersonal & "<img src=functions/img/" & str(i) & ".gif>" & gClass(i) & "<BR>"
			End If
		Next
And set the database.asp function back the way mine is:-
Code:
Function GetCharType(ID)
	Select Case ID
		Case "1"
			GetCharType = "Fighter"
		Case "2"
			GetCharType = "Mechanician"
		Case "3"
			GetCharType = "Archer"
		Case "4"
			GetCharType = "Pikeman"
		Case "5"
			GetCharType = "Atalanta"
		Case "6"
			GetCharType = "Knight"
		Case "7"
			GetCharType = "Magician"
		Case "8"
			GetCharType = "Priestess"
	End Select
End Function

I think you'll find it produces the same layout on the page, but I think it's a more elegant solution. (Smaller code, less dynamic so it may cache better, more intuitive when re-reading in order to debug)
 
Last edited:
Back