Show
Ignore:
Timestamp:
05/21/08 15:27:00 (5 months ago)
Author:
aarkerio
Message:

New Try

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/layouts/portal.ctp

    r539 r541  
    2626<div id="toplinks"> 
    2727<?php 
    28  if ( isset( $cU['User']['id']) ): 
     28 if ( $session->check('Auth.User') ): 
    2929   echo '<span style="font-size:7pt;color:#8bb126;padding-right:15px">You are logged in as <b>'; 
    3030 
    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') . ' | ';  
    3232 
    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? 
    3434           echo $html->link('Admin', '/admin/entries/start') . ' | '; 
    3535   endif; 
    3636 
    37    if (  $cU['User']['group_id'] == 3 ): // the logged user is student 
     37   if (  $session->read('Auth.User.group_id') == 3 ): // the logged user is student 
    3838     echo $html->link('My profile', '/users/edit'). ' | '.$html->link( 
    3939                                                                        $html->image('static/mailgray.png',  
     
    6767    
    6868   // 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): 
    7070           echo $this->element('studentclass', $Element['Vclassrooms']); 
    7171   endif;     
    7272 
    7373   
    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')), 
    7776                           '/users/logout', null, null, false)); 
    78    } 
    79    else 
    80    { 
     77    
     78   else: 
    8179             echo $this->element('login'); 
    82    } 
     80   endif; 
    8381 
    84    echo  $this->element('lastentries', $Element["Lentry"]); 
     82   echo  $this->element('lastentries', $Element['Lentry']); 
    8583   echo  '<br />'; 
    8684       
    8785   echo  $html->div(null, $html->link($html->image('teacher_podcast.jpg', array('alt'=>'Podcast', 'style'=>'border:1px solid black')), '/podcasts/recent', null, null, false)); 
    8886 
    89    echo  $this->element('poll',       $Element["Poll"]);  
     87   echo  $this->element('poll', $Element['Poll']);  
    9088         
    9189   echo $this->element('subjects');  
    9290?> 
    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> 
    9997<?php  
    10098  $tmp  = $html->para(null,$html->link($html->image('static/valid_xhtml10_80x15_22.png'), 'http://www.w3.org/TR/xhtml1/', null, null, false)); 
     
    120118<!-- end footer --> 
    121119<?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; 
    126123 
    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")); 
    129125?> 
    130126</body>