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

New Try

Location:
trunk/app/views/layouts
Files:
6 modified

Legend:

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

    r539 r541  
    3434</div> 
    3535<div style="width:700px;float:left;">  
    36 Logged in as <strong><?php echo $cU['User']['username']; ?></strong> | 
     36Logged in as <strong><?php echo $session->read('Auth.User.username'); ?></strong> | 
    3737<?php   
    38   echo $html->link($cU['User']['username'] . '\'s blog',  '/blog/'. $cU['User']['username']) . ' | ';  
     38  echo $html->link($session->read('Auth.User.username') . '\'s blog',  '/blog/'. $session->read('Auth.User.username')) . ' | ';  
    3939  echo $html->link($_SERVER['HTTP_HOST'], '/').' | '; 
    4040  echo $html->link('My Account', '/admin/users/edit') .' | '. $html->link('Logout', '/users/logout'); ?> 
  • trunk/app/views/layouts/berlin.ctp

    r315 r541  
    342342<?php 
    343343//var_dump($pages); 
    344 echo "<p>".$blog[0]["User"]["cv"] . "<br />"; 
     344 
    345345echo $html->image('avatars/'.$blog[0]["User"]["photo"], array("alt"=>$blog[0]["User"]["username"], "title"=>$blog[0]["User"]["username"])) . "</p>"; 
    346 ?> 
    347  
    348 <?php  
    349  
    350 if ( $blog[0]["Page"] != null) 
     346 
     347 if ( $blog["Lesson"] != null ): 
     348      echo $this->element('lesson', $blog["Lesson"]);   
     349 endif;  
     350          
     351 if ( $blog["Podcast"] != null ):  
     352      echo $this->element('podcast', $blog["Podcast"]);   
     353 endif; 
     354          
     355 if ( $blog["Catfaq"] != null ):  
     356      echo $this->element('catfaqs', $blog["Catfaq"]);   
     357 endif; 
     358          
     359 if ( $blog["Acquaintance"] != null ):  
     360       echo $this->element('acquaintances', $blog["Acquaintance"]);   
     361 endif; 
     362         
     363/* maybe remove this later 
     364if ( $blog["Catforum"] != null)  
    351365{ 
    352      echo $this->renderElement('static', $blog[0]["Page"]);  
    353 } 
    354  
    355 if ( $blog[0]["Podcast"] != null ) 
    356 { 
    357      echo $this->renderElement('podcast', $blog[0]["Podcast"]);  
    358 } 
    359  
    360 if ( $blog[0]["Catfaq"] != null ) 
    361 { 
    362      echo $this->renderElement('catfaqs', $blog[0]["Catfaq"]);  
    363 } 
    364  
    365 if ( $blog[0]["Vinculum"] != null) 
    366 { 
    367      echo $this->renderElement('vinculums', $blog[0]["Vinculum"]);  
    368 } 
    369  
    370 ?> 
    371    
     366         echo $this->element('catforums', $blog["Catforum"]);   
     367} 
     368*/ 
     369 
     370 if ( $session->check('Auth.User') ):   
     371      e($html->para($html->link( 
     372                           $html->image('static/login.png', array("alt"=>'Login', "title"=>'Login')),  
     373                           '/users/login', false, false, null), aa('style', 'text-align:center;margin:35px 0 35px 0')));  
     374 endif;  
     375?>   
    372376<div class="temas">Powered by:</div> 
    373377<div style="text-align:center;padding-top:15px"><a href="http://karamelo.chipotle-software.com/"> 
  • trunk/app/views/layouts/paris.ctp

    r342 r541  
    44?> 
    55<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    6  
    76<head> 
    87<?php 
     
    2019 
    2120<body> 
    22 <?php echo $this->renderElement('search_blog'); ?> 
     21<?php echo $this->element('search_blog'); ?> 
    2322 
    2423<div id="box"> 
     
    6160<div id="sidebar"> 
    6261<?php 
    63  if ( $blog["Lesson"] != null) 
    64  { 
    65             echo $this->renderElement('lesson', $blog["Lesson"]);  
    66  } 
    67  if ( $blog["Podcast"] != null ) 
    68  { 
    69             echo $this->renderElement('podcast', $blog["Podcast"]);  
    70  } 
     62 if ( $blog["Lesson"] != null): 
     63            echo $this->element('lesson', $blog["Lesson"]);  
     64 endif; 
     65 
     66 if ( $blog["Podcast"] != null ): 
     67            echo $this->element('podcast', $blog["Podcast"]);  
     68 endif; 
    7169                  
    72  if ( $blog["Catfaq"] != null ) 
    73  { 
    74            echo $this->renderElement('catfaqs', $blog["Catfaq"]);  
    75  } 
     70 if ( $blog["Catfaq"] != null ): 
     71           echo $this->element('catfaqs', $blog["Catfaq"]);  
     72 endif; 
    7673                 
    77  if ( $blog["Acquaintance"] != null) 
    78  { 
    79            echo $this->renderElement('acquaintances', $blog["Acquaintance"]);  
    80  } 
     74 if ( $blog["Acquaintance"] != null); 
     75           echo $this->element('acquaintances', $blog["Acquaintance"]);  
     76 endif; 
    8177         
    82  if ( $blog["Vclassroom"] != null) 
    83  { 
    84            echo $this->renderElement('vclassrooms', $blog["Vclassroom"]);  
    85  } 
     78 if ( $blog["Vclassroom"] != null): 
     79           echo $this->element('vclassrooms', $blog["Vclassroom"]);  
     80 endif; 
    8681        
    87  if ( $blog["Catforum"] != null) 
    88  { 
    89                       echo $this->renderElement('catforums', $blog["Catforum"]);  
    90  } 
     82/* if ( $blog["Catforum"] != null): 
     83                      echo $this->element('catforums', $blog["Catforum"]);  
     84 endif; */ 
    9185 
    92  if ( !$cU['User'] ) 
    93  {  
     86 if ( !$session->check('Auth.User') ):  
    9487      echo '<p style="text-align:center;margin:35px 0 35px 0">' . $html->link( 
    9588         $html->image('static/login.png', array("alt"=>'Login', "title"=>'Login')), 
    9689                                                         '/users/login', false, false, null) . "</p>"; 
    97  } 
     90 endif; 
    9891?> 
    9992           
  • 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> 
  • trunk/app/views/layouts/rubyx.ctp

    r464 r541  
    114114 if ( $blog["Vclassroom"] != null)  
    115115 {  
    116      echo $this->renderElement('vclassrooms', $blog["Vclassroom"]);   
     116     echo $this->element('vclassrooms', $blog["Vclassroom"]);   
    117117 } 
    118118 
     
    127127     
    128128     
    129  if ( $blog["Lesson"] != null)  
    130  {  
    131     echo $this->renderElement('lesson', $blog["Lesson"]);   
    132  }  
     129 if ( $blog["Lesson"] != null ): 
     130      echo $this->element('lesson', $blog["Lesson"]);   
     131 endif;  
    133132          
    134  if ( $blog["Podcast"] != null )  
    135  {  
    136          echo $this->renderElement('podcast', $blog["Podcast"]);   
    137  }  
     133 if ( $blog["Podcast"] != null ):  
     134      echo $this->element('podcast', $blog["Podcast"]);   
     135 endif; 
    138136          
    139  if ( $blog["Catfaq"] != null )  
    140  {  
    141          echo $this->renderElement('catfaqs', $blog["Catfaq"]);   
    142  }  
     137 if ( $blog["Catfaq"] != null ):  
     138      echo $this->element('catfaqs', $blog["Catfaq"]);   
     139 endif; 
    143140          
    144  if ( $blog["Acquaintance"] != null)  
    145  {  
    146          echo $this->renderElement('acquaintances', $blog["Acquaintance"]);   
    147  } 
     141 if ( $blog["Acquaintance"] != null ):  
     142       echo $this->element('acquaintances', $blog["Acquaintance"]);   
     143 endif; 
    148144         
    149145/* maybe remove this later 
    150146if ( $blog["Catforum"] != null)  
    151147{ 
    152          echo $this->renderElement('catforums', $blog["Catforum"]);   
     148         echo $this->element('catforums', $blog["Catforum"]);   
    153149} 
    154150*/ 
    155151 
    156  if ( !isset( $cU['User']['id'] ) )  
    157  {   
    158  e($html->para($html->link( 
     152 if ( $session->check('Auth.User') ):   
     153      e($html->para($html->link( 
    159154                           $html->image('static/login.png', array("alt"=>'Login', "title"=>'Login')),  
    160155                           '/users/login', false, false, null), aa('style', 'text-align:center;margin:35px 0 35px 0')));  
    161  }  
     156 endif;  
    162157      
    163158 e($html->div('temas', 'Powered by')); 
     
    175170    <div id="footer">  
    176171        <div id="top" class="noprint"><p><span class="noscreen">Back on top</span> <a href="#header" title="Back on top ^">^<span></span></a></p></div>  
    177                 <hr class="noscreen" />  
     172      <hr class="noscreen" />  
    178173                  
    179174  <p id="createdby">created by <a href="http://www.nuvio.cz">Nuvio | Webdesign</a> <!-- DON?T REMOVE, PLEASE! --></p>  
     
    185180</div> <!-- /footer -->  
    186181</div> <!-- /main -->  
    187   
    188182</body>  
    189183</html> 
  • trunk/app/views/layouts/school.ctp

    r343 r541  
    4949</div> <!-- /search -->  
    5050<?php 
    51  if ( $blog["Lesson"] != null) 
    52  { 
    53             echo $this->renderElement('lesson', $blog["Lesson"]);  
    54  } 
    55  if ( $blog["Podcast"] != null ) 
    56  { 
    57             echo $this->renderElement('podcast', $blog["Podcast"]);  
    58  } 
     51  if ( $blog["Lesson"] != null): 
     52            echo $this->element('lesson', $blog["Lesson"]);  
     53 endif; 
     54 
     55 if ( $blog["Podcast"] != null ): 
     56            echo $this->element('podcast', $blog["Podcast"]);  
     57 endif; 
    5958                  
    60  if ( $blog["Catfaq"] != null ) 
    61  { 
    62            echo $this->renderElement('catfaqs', $blog["Catfaq"]);  
    63  } 
     59 if ( $blog["Catfaq"] != null ): 
     60           echo $this->element('catfaqs', $blog["Catfaq"]);  
     61 endif; 
    6462                 
    65  if ( $blog["Acquaintance"] != null) 
    66  { 
    67            echo $this->renderElement('acquaintances', $blog["Acquaintance"]);  
    68  } 
     63 if ( $blog["Acquaintance"] != null); 
     64           echo $this->element('acquaintances', $blog["Acquaintance"]);  
     65 endif; 
    6966         
    70  if ( $blog["Vclassroom"] != null) 
    71  { 
    72            echo $this->renderElement('vclassrooms', $blog["Vclassroom"]);  
    73  } 
     67 if ( $blog["Vclassroom"] != null): 
     68           echo $this->element('vclassrooms', $blog["Vclassroom"]);  
     69 endif; 
    7470        
    75  if ( $blog["Catforum"] != null) 
    76  { 
    77                       echo $this->renderElement('catforums', $blog["Catforum"]);  
    78  } 
     71 if ( $blog["Catforum"] != null): 
     72           echo $this->element('catforums', $blog["Catforum"]);  
     73 endif; 
    7974 
    80  if ( !$cU['User'] ) 
    81  {  
     75 if ( !$session->check('Auth.User') ):  
    8276      echo '<p style="text-align:center;margin:35px 0 35px 0">' . $html->link( 
    8377         $html->image('static/login.png', array("alt"=>'Login', "title"=>'Login')), 
    8478                                                         '/users/login', false, false, null) . "</p>"; 
    85  } 
     79 endif; 
    8680?> 
    8781</td>