* Invision Power Services * IP.Board v3.3.4 * ACP ranks skin file * Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @license http://www.invisionpower.com/company/standards.php#license * @package IP.Board * @subpackage Members * @link http://www.invisionpower.com * @since 20th February 2002 * @version $Rev: 10914 $ * */ class cp_skin_ranks { /** * Registry Object Shortcuts * * @var $registry * @var $DB * @var $settings * @var $request * @var $lang * @var $member * @var $memberData * @var $cache * @var $caches */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; protected $memberData; protected $cache; protected $caches; /** * Constructor * * @param object $registry Registry object * @return @e void */ public function __construct( ipsRegistry $registry ) { $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); $this->lang = $this->registry->class_localization; } /** * Ranks overview page * * @param array Rows * @return string HTML */ public function titlesOverview( $rows ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$this->lang->words['rnk_titles']}

{$this->lang->words['rnk_titles']}

HTML; if( count($rows) ) { foreach( $rows as $rank ) { $rank['img'] = ""; if( preg_match( "/[a-zA-Z]{1,}/", $rank['pips'] ) ) { $rank['img'] = ""; } else { for ( $i = 1; $i <= $rank['pips']; $i++ ) { $rank['img'] .= $rank['A_STAR']; } } $IPBHTML .= << HTML; } } $IPBHTML .= <<
form_code}&do=do_add_rank' method='post'>

{$this->lang->words['rnk_addarank']}

{$this->lang->words['rnk_title']} {$this->lang->words['rnk_minposts']} {$this->lang->words['rnk_pips']}  
form_code}&do=rank_edit&id={$rank['id']}'>{$rank['title']} {$rank['posts']} {$rank['img']}
{$this->lang->words['rnk_ranktitle']}
{$this->lang->words['rnk_minpostsneeded']}
{$this->lang->words['rnk_numpips']}
{$this->lang->words['rnk_numpips_info']}
HTML; //--endhtml--// return $IPBHTML; } /** * Ranks form * * @param array Rank data * @param string Action code * @param string Button text * @return string HTML */ public function titlesForm( $rank, $action, $button ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$button}

form_code}&do={$action}' method='post'>

{$button}

{$this->lang->words['rnk_ranktitle']}
{$this->lang->words['rnk_minpostsneeded']}
{$this->lang->words['rnk_numpips']}
{$this->lang->words['rnk_numpips_info']}
HTML; //--endhtml--// return $IPBHTML; } }