diff options
| author | James Atkinson <thefinn@users.sourceforge.net> | 2001-02-24 01:02:41 +0000 |
|---|---|---|
| committer | James Atkinson <thefinn@users.sourceforge.net> | 2001-02-24 01:02:41 +0000 |
| commit | 852eaf0da905c31a73bc312ad27bd6c9fc03101a (patch) | |
| tree | bf398682dbc928e1b55e2ce9ad28c76817b09f94 /phpBB/functions/functions.php | |
| parent | ddc2cd6eadff7f0284e3ec37814b55a7c090cf20 (diff) | |
| download | forums-852eaf0da905c31a73bc312ad27bd6c9fc03101a.tar forums-852eaf0da905c31a73bc312ad27bd6c9fc03101a.tar.gz forums-852eaf0da905c31a73bc312ad27bd6c9fc03101a.tar.bz2 forums-852eaf0da905c31a73bc312ad27bd6c9fc03101a.tar.xz forums-852eaf0da905c31a73bc312ad27bd6c9fc03101a.zip | |
Forums can have moderators now..
git-svn-id: file:///svn/phpbb/trunk@39 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/functions/functions.php')
| -rw-r--r-- | phpBB/functions/functions.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/phpBB/functions/functions.php b/phpBB/functions/functions.php index 5d660f8db9..b9daefd91e 100644 --- a/phpBB/functions/functions.php +++ b/phpBB/functions/functions.php @@ -127,4 +127,35 @@ function make_jumpbox($db, $phpEx) return($boxstring); } +function get_moderators($db, $forum_id) +{ + $sql = "SELECT u.username, u.user_id FROM " . FORUM_MODS_TABLE ." f, " . USERS_TABLE . " u + WHERE f.forum_id = '$forum_id' AND u.user_id = f.user_id"; + if($result = $db->sql_query($sql)) + { + if($total_mods = $db->sql_numrows($result)) + { + $rowset = $db->sql_fetchrowset($result); + for($x = 0; $x < $total_mods; $x++) + { + $modArray[] = array("id" => $rowset[$x]["user_id"], + "name" => $rowset[$x]["username"]); + } + } + else + { + $modArray[] = array("id" => "-1", + "name" => "ERROR"); + } + + } + else + { + $modArray[] = array("id" => "-1", + "name" => "ERROR"); + } + + return($modArray); +} + ?> |
