|
From: FlorinCB <ory...@us...> - 2009-07-08 15:46:33
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15225/includes Modified Files: mx_functions_core.php Log Message: update, this will enable some features required by phpbb3 plugin Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** mx_functions_core.php 6 Nov 2008 20:23:07 -0000 1.114 --- mx_functions_core.php 8 Jul 2009 15:46:24 -0000 1.115 *************** *** 1209,1212 **** --- 1209,1253 ---- return $icons; } + + /** + * Obtain ranks + */ + function obtain_ranks() + { + if (($ranks = $this->get('_ranks')) === false) + { + global $db; + + $sql = 'SELECT * + FROM ' . RANKS_TABLE . ' + ORDER BY rank_min DESC'; + $result = $db->sql_query($sql); + + $ranks = array(); + while ($row = $db->sql_fetchrow($result)) + { + if ($row['rank_special']) + { + $ranks['special'][$row['rank_id']] = array( + 'rank_title' => $row['rank_title'], + 'rank_image' => $row['rank_image'] + ); + } + else + { + $ranks['normal'][] = array( + 'rank_title' => $row['rank_title'], + 'rank_min' => $row['rank_min'], + 'rank_image' => $row['rank_image'] + ); + } + } + $db->sql_freeresult($result); + + $this->put('_ranks', $ranks); + } + + return $ranks; + } /** |