Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
entrix
WoWSimpleRegistration
Commits
d0bf449e
Commit
d0bf449e
authored
Mar 31, 2020
by
Amin.MasterkinG
Browse files
Fixed top players by honor for Legion/BFA. (Honor Level and Honor)
parent
38904ce6
Changes
5
Hide whitespace changes
Inline
Side-by-side
application/config/config.php.sample
View file @
d0bf449e
...
...
@@ -44,7 +44,7 @@ $config['realmlists'] = array(
'db_host'
=>
"127.0.0.1"
,
'db_port'
=>
"3306"
,
'db_user'
=>
"root"
,
'db_pass'
=>
"
root
"
,
'db_pass'
=>
'
root
'
,
'db_name'
=>
"rm1_chars"
)
);
...
...
application/include/status.php
View file @
d0bf449e
...
...
@@ -60,7 +60,13 @@ class status
public
static
function
get_top_honorpoints
(
$realmID
)
{
$datas
=
database
::
$chars
[
$realmID
]
->
select
(
"characters"
,
array
(
"name"
,
"race"
,
"class"
,
"gender"
,
"level"
,
"totalHonorPoints"
),
[
'LIMIT'
=>
10
,
"ORDER"
=>
[
"totalHonorPoints"
=>
"DESC"
],
"name[!]"
=>
''
]);
if
(
get_config
(
'expansion'
)
>=
6
)
{
$datas
=
database
::
$chars
[
$realmID
]
->
select
(
"characters"
,
array
(
"name"
,
"race"
,
"class"
,
"gender"
,
"level"
,
"honorLevel"
,
"honor"
),
[
'LIMIT'
=>
10
,
"ORDER"
=>
[
"honorLevel"
=>
"DESC"
,
"honor"
=>
"DESC"
],
"name[!]"
=>
''
]);
}
else
{
$datas
=
database
::
$chars
[
$realmID
]
->
select
(
"characters"
,
array
(
"name"
,
"race"
,
"class"
,
"gender"
,
"level"
,
"totalHonorPoints"
),
[
'LIMIT'
=>
10
,
"ORDER"
=>
[
"totalHonorPoints"
=>
"DESC"
],
"name[!]"
=>
''
]);
}
if
(
!
empty
(
$datas
[
0
][
"name"
]))
{
return
$datas
;
}
...
...
template/icecrown/tpl/main.php
View file @
d0bf449e
...
...
@@ -340,10 +340,27 @@ require_once 'header.php'; ?>
if
(
!
is_array
(
$data2show
))
{
echo
"<span style='color: #0d99e5;'>Don't have anything for display.</span>"
;
}
else
{
echo
'<table class="table table-dark"><thead><tr><th scope="col">Rank</th><th scope="col">Name</th><th scope="col">Race</th> <th scope="col">Class</th><th scope="col">Level</th><th scope="col">Honor Points</th></tr></thead><tbody>'
;
echo
'<table class="table table-dark"><thead><tr><th scope="col">Rank</th><th scope="col">Name</th><th scope="col">Race</th> <th scope="col">Class</th><th scope="col">Level</th>'
;
if
(
get_config
(
'expansion'
)
>=
6
)
{
echo
'<th scope="col">Honor Level</th>'
;
}
echo
'<th scope="col">Honor Points</th></tr></thead><tbody>'
;
$m
=
1
;
foreach
(
$data2show
as
$one_char
)
{
echo
'<tr><td>'
.
$m
++
.
'<th scope="row">'
.
$antiXss
->
xss_clean
(
$one_char
[
'name'
])
.
'</th><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/race/'
.
$antiXss
->
xss_clean
(
$one_char
[
"race"
])
.
'-'
.
$antiXss
->
xss_clean
(
$one_char
[
"gender"
])
.
'.gif\'></td><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/class/'
.
$antiXss
->
xss_clean
(
$one_char
[
"class"
])
.
'.gif\'></td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'level'
])
.
'</td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'totalHonorPoints'
])
.
'</td></tr>'
;
echo
'<tr><td>'
.
$m
++
.
'<th scope="row">'
.
$antiXss
->
xss_clean
(
$one_char
[
'name'
])
.
'</th><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/race/'
.
$antiXss
->
xss_clean
(
$one_char
[
"race"
])
.
'-'
.
$antiXss
->
xss_clean
(
$one_char
[
"gender"
])
.
'.gif\'></td><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/class/'
.
$antiXss
->
xss_clean
(
$one_char
[
"class"
])
.
'.gif\'></td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'level'
])
.
'</td>'
;
if
(
get_config
(
'expansion'
)
>=
6
)
{
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'honorLevel'
])
.
'</td>'
;
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'honor'
])
.
'</td>'
;
}
else
{
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'totalHonorPoints'
])
.
'</td>'
;
}
echo
'</tr>'
;
}
echo
'</table>'
;
}
...
...
template/kaelthas/tpl/main.php
View file @
d0bf449e
...
...
@@ -327,10 +327,27 @@ require_once 'header.php'; ?>
if
(
!
is_array
(
$data2show
))
{
echo
"<span style='color: #0d99e5;'>Don't have anything for display.</span>"
;
}
else
{
echo
'<table class="table table-dark"><thead><tr><th scope="col">Rank</th><th scope="col">Name</th><th scope="col">Race</th> <th scope="col">Class</th><th scope="col">Level</th><th scope="col">Honor Points</th></tr></thead><tbody>'
;
echo
'<table class="table table-dark"><thead><tr><th scope="col">Rank</th><th scope="col">Name</th><th scope="col">Race</th> <th scope="col">Class</th><th scope="col">Level</th>'
;
if
(
get_config
(
'expansion'
)
>=
6
)
{
echo
'<th scope="col">Honor Level</th>'
;
}
echo
'<th scope="col">Honor Points</th></tr></thead><tbody>'
;
$m
=
1
;
foreach
(
$data2show
as
$one_char
)
{
echo
'<tr><td>'
.
$m
++
.
'<th scope="row">'
.
$antiXss
->
xss_clean
(
$one_char
[
'name'
])
.
'</th><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/race/'
.
$antiXss
->
xss_clean
(
$one_char
[
"race"
])
.
'-'
.
$antiXss
->
xss_clean
(
$one_char
[
"gender"
])
.
'.gif\'></td><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/class/'
.
$antiXss
->
xss_clean
(
$one_char
[
"class"
])
.
'.gif\'></td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'level'
])
.
'</td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'totalHonorPoints'
])
.
'</td></tr>'
;
echo
'<tr><td>'
.
$m
++
.
'<th scope="row">'
.
$antiXss
->
xss_clean
(
$one_char
[
'name'
])
.
'</th><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/race/'
.
$antiXss
->
xss_clean
(
$one_char
[
"race"
])
.
'-'
.
$antiXss
->
xss_clean
(
$one_char
[
"gender"
])
.
'.gif\'></td><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/class/'
.
$antiXss
->
xss_clean
(
$one_char
[
"class"
])
.
'.gif\'></td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'level'
])
.
'</td>'
;
if
(
get_config
(
'expansion'
)
>=
6
)
{
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'honorLevel'
])
.
'</td>'
;
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'honor'
])
.
'</td>'
;
}
else
{
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'totalHonorPoints'
])
.
'</td>'
;
}
echo
'</tr>'
;
}
echo
'</table>'
;
}
...
...
template/light/tpl/main.php
View file @
d0bf449e
...
...
@@ -293,10 +293,27 @@ require_once 'header.php'; ?>
if
(
!
is_array
(
$data2show
))
{
echo
"<span style='color: #0d99e5;'>Don't have anything for display.</span>"
;
}
else
{
echo
'<table class="table table-striped"><thead><tr><th scope="col">Rank</th><th scope="col">Name</th><th scope="col">Race</th> <th scope="col">Class</th><th scope="col">Level</th><th scope="col">Honor Points</th></tr></thead><tbody>'
;
echo
'<table class="table table-striped"><thead><tr><th scope="col">Rank</th><th scope="col">Name</th><th scope="col">Race</th> <th scope="col">Class</th><th scope="col">Level</th>'
;
if
(
get_config
(
'expansion'
)
>=
6
)
{
echo
'<th scope="col">Honor Level</th>'
;
}
echo
'<th scope="col">Honor Points</th></tr></thead><tbody>'
;
$m
=
1
;
foreach
(
$data2show
as
$one_char
)
{
echo
'<tr><td>'
.
$m
++
.
'<th scope="row">'
.
$antiXss
->
xss_clean
(
$one_char
[
'name'
])
.
'</th><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/race/'
.
$antiXss
->
xss_clean
(
$one_char
[
"race"
])
.
'-'
.
$antiXss
->
xss_clean
(
$one_char
[
"gender"
])
.
'.gif\'></td><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/class/'
.
$antiXss
->
xss_clean
(
$one_char
[
"class"
])
.
'.gif\'></td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'level'
])
.
'</td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'totalHonorPoints'
])
.
'</td></tr>'
;
echo
'<tr><td>'
.
$m
++
.
'<th scope="row">'
.
$antiXss
->
xss_clean
(
$one_char
[
'name'
])
.
'</th><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/race/'
.
$antiXss
->
xss_clean
(
$one_char
[
"race"
])
.
'-'
.
$antiXss
->
xss_clean
(
$one_char
[
"gender"
])
.
'.gif\'></td><td><img src=\''
.
get_config
(
"baseurl"
)
.
'/template/'
.
$antiXss
->
xss_clean
(
get_config
(
"template"
))
.
'/images/class/'
.
$antiXss
->
xss_clean
(
$one_char
[
"class"
])
.
'.gif\'></td><td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'level'
])
.
'</td>'
;
if
(
get_config
(
'expansion'
)
>=
6
)
{
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'honorLevel'
])
.
'</td>'
;
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'honor'
])
.
'</td>'
;
}
else
{
echo
'<td>'
.
$antiXss
->
xss_clean
(
$one_char
[
'totalHonorPoints'
])
.
'</td>'
;
}
echo
'</tr>'
;
}
echo
'</table>'
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment