<?php
# Basisscript *unbekannt*
# Angepasst by Lord|Schirmer
# Support www.ilch.de
# Topliste ILCH
defined (
'main'
)
or
die
(
'no direct access'
);
$title
=
$allgAr
[
'title'
].
' :: Toplist'
;
$hmenu
=
'Topliste'
;
$design
=
new
design (
$title
,
$hmenu
, 1);
unset(
$_SESSION
[
'counter'
]);
$ergb
= db_query(
"SELECT * FROM prefix_topliste_config"
);
$rowb
= db_fetch_assoc(
$ergb
);
$limit
=
$rowb
[
'toplist_limit'
];
$page
= (
$menu
->getA(1) ==
'p'
?
$menu
->getE(1) : 1 );
$MPL
= db_make_sites (
$page
,
""
,
$limit
,
'?topliste'
,
'topliste'
);
$anfang
= (
$page
- 1) *
$limit
;
$tpl
=
new
tpl (
'topliste/show.htm'
);
$tpl
->set_out (
'MPL'
,
$MPL
, 0);
$class
=
''
;
$erg
= db_query(
"SELECT * FROM prefix_topliste ORDER BY rang ASC LIMIT "
.
$anfang
.
","
.
$limit
.
""
);
while
(
$row
= @db_fetch_object(
$erg
)) {
if
(
$class
==
'Cmite'
) {
$class
=
'Cnorm'
; }
else
{
$class
=
'Cmite'
; }
if
(
$row
->uid ==
$_SESSION
[
'authid'
]) {
$beschreibung
=
$row
->beschreibung.
' <a href="?topliste-aendern-'
.
$row
->id.
'"><img src="include/images/topliste/icons/edit-s.png" border="0" title="ändern" alt="ändern" /></a> <a href="javascript:checkDelete('
.
$row
->id.
')"><img src="include/images/topliste/icons/del-s.png" border="0" title="löschen" alt="löschen" /></a>'
;
}
else
{
$beschreibung
=
$row
->beschreibung;
}
if
(!
empty
(
$row
->bild)) {
$row
->bild =
'<img src="'
.
$row
->bild.
'" border="0" style="max-width:'
.
$rowb
[
'toplist_banner'
].
'px;" alt="'
.
$row
->name.
'">'
;
}
$ar
=
array
(
'name'
=>
$row
->name,
'bild'
=>
$row
->bild,
'besch'
=>
$beschreibung
,
'class'
=>
$class
,
'rang'
=>
$row
->rang,
'in'
=>
$row
->klickin,
'out'
=>
$row
->klickout,
'id'
=>
$row
->id,
'user'
=>
$row
->user
);
$tpl
->set_ar_out(
$ar
,1);
}
$toplists
= @db_result(db_query(
'SELECT count(id) FROM prefix_topliste'
),0);
$tpl
->set(
'toplists'
,
$toplists
);
$gesin
= @db_result(db_query(
'SELECT sum(klickin) FROM prefix_topliste'
),0);
$tpl
->set(
'gesin'
,
$gesin
);
$gesout
= @db_result(db_query(
'SELECT sum(klickout) FROM prefix_topliste'
),0);
$tpl
->set(
'gesout'
,
$gesout
);
$tpl
->out(2);
$design
->footer();
?>