Пример #1
0
 * CLAROLINE
 *
 * @version     1.9 $Revision: 12923 $
 * @copyright   (c) 2001-2011, Universite catholique de Louvain (UCL)
 * @license     http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
 * @package     CLKERNEL
 * @author      Claro Team <*****@*****.**>
 * @deprecated  since 1.9, use display.lib instead
 */
if (count(get_included_files()) == 1) {
    die('The file ' . basename(__FILE__) . ' cannot be accessed directly, use include instead');
}
// this file can be called from within a function so we need to add the
// folowwing line !!!
$claroline = Claroline::getInstance();
if (!isset($hide_body) || $hide_body == false) {
    echo "\n" . '</div>' . "\n" . '<!-- - - - - - - - - - -   End of Claroline Body   - - - - - - - - - - -->' . "\n\n\n";
}
if (get_conf('claro_brailleViewMode', false)) {
    echo $claroline->display->banner->render();
}
// don't display the footer text if requested, only display minimal html closing tags
if (isset($hide_footer) && $hide_footer) {
    $claroline->display->footer->hide();
}
// if (!isset($hide_footer) || $hide_footer == false)
echo $claroline->display->footer->render();
if (claro_debug_mode()) {
    echo claro_disp_debug_banner() . "\n";
}
echo '</body>' . "\n" . '</html>' . "\n";
Пример #2
0
 /**
  * Generate and set output to client
  *
  * @access  public
  */
 public function render()
 {
     try {
         $this->_globalVarsCompat();
         $contents = '';
         if (!$this->bannerAtEnd) {
             $contents .= $this->banner->render() . "\n";
         }
         $contents .= $this->body->render();
         if ($this->bannerAtEnd) {
             $contents .= $this->banner->render() . "\n";
         }
         $contents .= $this->footer->render() . "\n";
         if (claro_debug_mode()) {
             $contents .= claro_disp_debug_banner();
         }
         $output = '';
         $output .= $this->header->render();
         if (true === get_conf('warnSessionLost', true) && claro_get_current_user_id()) {
             $this->jsBodyOnload[] = 'claro_session_loss_countdown(' . ini_get('session.gc_maxlifetime') . ');';
         }
         $output .= '<body dir="' . get_locale('text_dir') . '"' . (!empty($this->jsBodyOnload) ? ' onload="' . implode('', $this->jsBodyOnload) . '" ' : '') . '>' . "\n";
         $output .= $contents;
         $output .= '</body>' . "\n";
         $output .= '</html>' . "\n";
         $this->header->sendHttpHeaders();
         return $output;
     } catch (Exception $e) {
         if (claro_debug_mode()) {
             die($e->__toString());
         } else {
             die($e->getMessage());
         }
     }
 }