Changeset 541 for trunk/app/views/layouts/portal.ctp
- Timestamp:
- 05/21/08 15:27:00 (5 months ago)
- Files:
-
- 1 modified
-
trunk/app/views/layouts/portal.ctp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/layouts/portal.ctp
r539 r541 26 26 <div id="toplinks"> 27 27 <?php 28 if ( isset( $cU['User']['id']) ):28 if ( $session->check('Auth.User') ): 29 29 echo '<span style="font-size:7pt;color:#8bb126;padding-right:15px">You are logged in as <b>'; 30 30 31 echo $ cU['User']['username'].'</b></span>'.$html->link('(Logout)', '/users/logout') . ' | ';31 echo $session->read('Auth.User.username') .'</b></span>'.$html->link('(Logout)', '/users/logout') . ' | '; 32 32 33 if ( $cU['User']['group_id']< 3 ): // the logged user is teacher or admin?33 if ( $session->read('Auth.User.group_id') < 3 ): // the logged user is teacher or admin? 34 34 echo $html->link('Admin', '/admin/entries/start') . ' | '; 35 35 endif; 36 36 37 if ( $ cU['User']['group_id']== 3 ): // the logged user is student37 if ( $session->read('Auth.User.group_id') == 3 ): // the logged user is student 38 38 echo $html->link('My profile', '/users/edit'). ' | '.$html->link( 39 39 $html->image('static/mailgray.png', … … 67 67 68 68 // if student logged in, show groups 69 if ( isset($cU['User']) && $cU['User']['group_id']== 3 && $Element['Vclassrooms'] != false):69 if ( $session->check('Auth.User') && $session->read('Auth.User.group_id') == 3 && $Element['Vclassrooms'] != false): 70 70 echo $this->element('studentclass', $Element['Vclassrooms']); 71 71 endif; 72 72 73 73 74 if ( isset( $cU['User']['id']) ) 75 { 76 echo $html->div('outbutton', $html->link($html->image('static/logout.gif', array('alt'=>'Logout', 'title'=>'Logout')), 74 if ( $session->check('Auth.User') ): 75 echo $html->div('outbutton', $html->link($html->image('static/logout.gif', array('alt'=>'Logout', 'title'=>'Logout')), 77 76 '/users/logout', null, null, false)); 78 } 79 else 80 { 77 78 else: 81 79 echo $this->element('login'); 82 }80 endif; 83 81 84 echo $this->element('lastentries', $Element[ "Lentry"]);82 echo $this->element('lastentries', $Element['Lentry']); 85 83 echo '<br />'; 86 84 87 85 echo $html->div(null, $html->link($html->image('teacher_podcast.jpg', array('alt'=>'Podcast', 'style'=>'border:1px solid black')), '/podcasts/recent', null, null, false)); 88 86 89 echo $this->element('poll', $Element["Poll"]);87 echo $this->element('poll', $Element['Poll']); 90 88 91 89 echo $this->element('subjects'); 92 90 ?> 93 <ul>94 <li id="archives">95 <h2 class="bg3">Search</h2>96 <?php echo $this->element('search'); ?>97 </li>98 </ul>91 <ul> 92 <li id="archives"> 93 <h2 class="bg3">Search</h2> 94 <?php echo $this->element('search'); ?> 95 </li> 96 </ul> 99 97 <?php 100 98 $tmp = $html->para(null,$html->link($html->image('static/valid_xhtml10_80x15_22.png'), 'http://www.w3.org/TR/xhtml1/', null, null, false)); … … 120 118 <!-- end footer --> 121 119 <?php 122 if ( !isset( $cU['User']) ) 123 { 124 echo $this->element('login_hide'); //login javascript popup 125 } 120 if ( $session->check('Auth.User') ): 121 echo $this->element('login_hide'); //login javascript popup 122 endif; 126 123 127 echo $html->link('Karamelo Demo', 'http://www.chipotle-software.com/index.php?id=9', array("id"=>"Demo")); 128 124 echo $html->link('Karamelo Demo', 'http://www.chipotle-software.com/index.php?id=9', array("id"=>"Demo")); 129 125 ?> 130 126 </body>
