This repository has been archived by the owner on Jan 26, 2020. It is now read-only.
/
listavatar.php
68 lines (52 loc) · 2.16 KB
/
listavatar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
ThWboard - PHP/MySQL Bulletin Board System
==============================================
(c) 2000-2004 by ThWboard Development Group
download the latest version:
http://www.thwboard.de
This program is free software; you can
redistribute it and/or modify it under the
terms of the GNU General Public License as
published by the Free Software Foundation;
either version 2 of the License, or (at
your option) any later version.
==============================================
*/
// ===================================================
// Hier kann die maximale Anzahl der Avatar-Bilder pro
// Zeile eingestellt werden, einfach die vorgegebene
// Nummer durch die gewünschte Zahl ersetzen:
$maxpics = 5;
// ===================================================
define('THWB_NOSESSION_PAGE', true);
include "./inc/header.inc.php";
$navpath .= 'Alle Avatare auflisten';
$Tframe=new Template("templates/" . $style['styletemplate'] . "/frame.html");
$Tavatar=new Template("templates/" . $style['styletemplate'] . "/listavatar.html");
if( isset($sortbyname) && $sortbyname )
{
$avatar_sort = "$style[stdfont]<a href=\"".build_link("listavatar.php")."\">Nach Avatar-Nummer sortieren</a>$style[stdfontend]";
$orderby = "avatarname";
}
else
{
$avatar_sort = "$style[stdfont]<a href=\"".build_link("listavatar.php?sortbyname=1")."\">Nach Namen sortieren</a>$style[stdfontend]";
$orderby = "avatarid";
}
$start = $e = 0;
$r_avatar = thwb_query("SELECT avatarid, avatarname, avatarurl FROM ".$pref."avatar ORDER BY $orderby");
$avatar_rows = '';
while( $avatar_data = mysql_fetch_array($r_avatar) )
{
$start++;
$avatar_rows .= "<td".($e % 2 == 0 ? ' bgcolor="'.$style['CellA'].'"' : ' bgcolor="'.$style['CellB'].'"')."><img src=\"$avatar_data[avatarurl]\" border=\"0\"><br><b>".$style['smallfont']."$avatar_data[avatarid]. $avatar_data[avatarname]</font></b></td>\n";
if ( $start == $maxpics )
{
$avatar_rows .= "</tr><tr>";
$start = 0;
$e++;
}
}
eval($Tavatar->GetTemplate("CONTENT"));
eval($Tframe->GetTemplate());