<?php if(Yii::app()->user->ckAct('Site','Schedule')): ?> <li><a class="<?php echo (in_array($cur_controller_action, array('schedule', 'schedulehistory')))?'active':''?>" href="<?php echo $this->createUrl('site/schedule'); ?>"><?php echo It::t('menu_label', 'home_schedule'); ?></a></li> <?php endif;?> <?php if(Yii::app()->user->ckAct('Site','StationTypeDataExport')): ?> <li><a class="<?php echo (in_array($cur_controller_action, array('stationtypedataexport', 'stationtypedatahistory')))?'active':''?>" href="<?php echo $this->createUrl('site/StationTypeDataExport'); ?>"> ODSS export</a></li> <?php endif; ?> <?php } ?> </ul> <?php }?> <div class="clear"></div> </div> */ ?> <?php $mainMenu = MainMenu::getInstance($cur_controller, $cur_controller_action); echo $mainMenu->getFirstMenu(); ?> </div> </div><!-- div#headerwrap--> <div id="middlewrap"> <?php echo $mainMenu->getSecondMenu(); ?> <?php $this->widget('ThrowStatus'); ?> <?php
function error_page() { $menu = MainMenu::getInstance()->getMenu(); $html = "<!DOCTYPE HTML>"; $html .= "<head>"; $html .= "<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=yes'>"; $html .= "<meta name='format-detection' content='telephone=no'/>"; $html .= "<title>Page Not Found</title>"; $html .= "<style type='text/css'>"; $html .= file_get_contents("css/404.css"); $html .= "</style>"; $html .= "</head>"; $html .= "<body>"; $html .= "<img src='/img/yawn.png' alt=''>"; $html .= "<h1>Page Not Found</h1>"; $html .= "<p>Sorry, but the page you were trying to view does not exist.</p>"; $html .= "<p> </p>"; $html .= "<p>Maybe, you try it here:</p>"; $html .= "<ul>"; $html .= "<li><a href='/'><strong>Start</strong></a><li>"; foreach ($menu as $item) { $html .= "<li><a href='" . $item->url . "'>" . $item->title . "</a></li>"; } $html .= "</ul>"; $html .= "</body>"; $html .= "</html>"; $html .= "<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->"; echo $html; }