Example #1
0
 public function getFilteringGroups()
 {
     if (Yii::app()->user->userLevel == 1) {
         return TrackingGroups::Model()->findAll();
     } else {
         return TrackingGroups::Model()->findAll('accountID=:accountID', array(':accountID' => Yii::app()->user->id));
     }
 }
Example #2
0
 public function getAllTrackingGroups()
 {
     $groups = TrackingGroups::Model()->findAll();
     return $groups;
 }
Example #3
0
</head>

<body>
		
<div class="container" id="page">

	<div id="header">
	<!-- header image code removed here -->
	</div><!-- header -->
	<div class="topmenu">
		<?php 
//Get current controller and action for url
$curpage = Yii::app()->getController()->getAction()->controller->id;
$curpage .= '/' . Yii::app()->getController()->getAction()->controller->action->id;
//Get tracking groups
$groups = TrackingGroups::Model()->findAll();
foreach ($groups as $group) {
    $filterMenu[] = array('label' => $group->name, 'url' => array($curpage . "&tgid=" . $group->trackingGroupID));
}
$filterMenu1 = array(array('label' => 'transactions', 'url' => array('wallet/index')), array('label' => 'sell orders', 'url' => array('sellOrders/index')), array('label' => 'buy orders', 'url' => array('buyOrders/index')), array('label' => 'stock', 'url' => array('stock/index')), array('label' => 'movers', 'url' => array('movers/index')), array('label' => 'm3 profit', 'url' => array('m3Profit/index')), array('label' => 'assets', 'url' => array('assets/index')), array('label' => 'characters', 'url' => array('characters/index')), array('label' => 'blueprints', 'url' => array('blueprints/index')));
$filterMenu2 = array(array('label' => 'transactions', 'url' => array('corpWallet/index')), array('label' => 'jobs', 'url' => array('industryJobs/index')), array('label' => 'pi', 'url' => array('pi/index')), array('label' => 'assets', 'url' => array('corpAssets/index')), array('label' => 'pos', 'url' => array('pos/index')), array('label' => 'bpc stock', 'url' => array('bpcStock/index')));
$filterMenu3 = array(array('label' => 'capital', 'url' => array('capitalProduction/index')), array('label' => 'subcapital', 'url' => array('subcapitalProduction/index')), array('label' => 't2', 'url' => array('t2Production/index')), array('label' => 'invention', 'url' => array('invention/index')), array('label' => 'invention stats', 'url' => array('inventionStats/index')), array('label' => 'minerals', 'url' => array('minerals/index')), array('label' => 'moon ships', 'url' => array('moonShips/index')));
$this->widget('application.extensions.CDropDownMenu', array('items' => array(array('label' => 'overview', 'url' => array('mainPage/index'), 'visible' => !Yii::app()->user->isGuest), array('label' => 'personal', 'url' => array('#'), 'visible' => !Yii::app()->user->isGuest, 'items' => $filterMenu1), array('label' => 'corp', 'url' => array('#'), 'visible' => !Yii::app()->user->isGuest, 'items' => $filterMenu2), array('label' => 'production', 'url' => array('#'), 'visible' => !Yii::app()->user->isGuest, 'items' => $filterMenu3), array('label' => 'reports', 'url' => array('reports/index'), 'visible' => !Yii::app()->user->isGuest), array('label' => 'switch group', 'url' => array('#'), 'visible' => !Yii::app()->user->isGuest, 'items' => $filterMenu), array('label' => 'admin', 'url' => array('admin/index'), 'visible' => !Yii::app()->user->isGuest), array('label' => 'login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest), array('label' => 'logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest))));
echo "<div class='evetime'>" . date('H:i n/j', strtotime("+4 hour")) . ' EVE</div>';
?>
		</div>
		<div style="clear: both;"></div>
		<!-- mainmenu -->

	<?php 
$this->widget('zii.widgets.CBreadcrumbs', array('links' => $this->breadcrumbs));