includes/template.php
changeset 1103 90225c988124
parent 1101 30d8bb88572d
child 1132 05fe0039d952
equal deleted inserted replaced
1102:faef5e62e1e0 1103:90225c988124
     1 <?php
     1 <?php
     2 
     2 
     3 /*
     3 /*
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     5  * Version 1.1.6 (Caoineag beta 1)
     5  * Copyright (C) 2006-2009 Dan Fuhry
     6  * Copyright (C) 2006-2008 Dan Fuhry
       
     7  *
     6  *
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     7  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     8  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    10  *
     9  *
    11  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    10  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  1177     // ASSIGN VARIABLES
  1176     // ASSIGN VARIABLES
  1178     //
  1177     //
  1179     
  1178     
  1180     $this->assign_vars(array(
  1179     $this->assign_vars(array(
  1181         'PAGE_NAME' => htmlspecialchars($this->page->ns->cdata['name']),
  1180         'PAGE_NAME' => htmlspecialchars($this->page->ns->cdata['name']),
  1182         'PAGE_URLNAME' => sanitize_page_id($this->page_id),
  1181         'PAGE_URLNAME' => $paths->nslist[$this->namespace] . sanitize_page_id($this->page_id),
  1183         'TOOLBAR' => $tb,
  1182         'TOOLBAR' => $tb,
  1184         'TOOLBAR_EXTRAS' => $this->toolbar_menu,
  1183         'TOOLBAR_EXTRAS' => $this->toolbar_menu,
  1185         'STYLE_LINK' => makeUrlNS('Special', 'CSS', null, true), //contentPath.$paths->nslist['Special'].'CSS' . $p,
  1184         'STYLE_LINK' => makeUrlNS('Special', 'CSS', null, true), //contentPath.$paths->nslist['Special'].'CSS' . $p,
  1186         'LOGIN_LINK' => $login_link,
  1185         'LOGIN_LINK' => $login_link,
  1187         'LOGOUT_LINK' => $logout_link,
  1186         'LOGOUT_LINK' => $logout_link,
  2594     if ( !$q )
  2593     if ( !$q )
  2595       $db->_die();
  2594       $db->_die();
  2596     $messages = array();
  2595     $messages = array();
  2597     while ( $row = $db->fetchrow() )
  2596     while ( $row = $db->fetchrow() )
  2598     {
  2597     {
  2599       $messages[] = '<a href="' . makeUrlNS('Special', 'PrivateMessages/View/' . $row['message_id']) . '" title="Sent ' . enano_date('F d, Y h:i a', $row['date']) . ' by ' . $row['message_from'] . '">' . $row['subject'] . '</a>';
  2598       $messages[] = '<a href="' . makeUrlNS('Special', 'PrivateMessages/View/' . $row['message_id']) . '" title="Sent ' . enano_date(ED_DATE | ED_TIME, $row['date']) . ' by ' . $row['message_from'] . '">' . $row['subject'] . '</a>';
  2600     }
  2599     }
  2601     $ob .= implode(",\n    " , $messages)."\n";
  2600     $ob .= implode(",\n    " , $messages)."\n";
  2602     $ob .= '</div>'."\n";
  2601     $ob .= '</div>'."\n";
  2603     return $ob;
  2602     return $ob;
  2604   }
  2603   }
  3014     $js_dynamic = '';
  3013     $js_dynamic = '';
  3015     if ( defined('IN_ENANO_INSTALL') )
  3014     if ( defined('IN_ENANO_INSTALL') )
  3016     {
  3015     {
  3017       $js_dynamic .= '<script type="text/javascript" src="install.php?mode=langjs"></script>';
  3016       $js_dynamic .= '<script type="text/javascript" src="install.php?mode=langjs"></script>';
  3018     }
  3017     }
  3019     $js_dynamic .= '<script type="text/javascript">var title="'. $title .'"; var scriptPath="'.scriptPath.'"; var cdnPath="'.scriptPath.'"; var ENANO_SID=""; var AES_BITS='.AES_BITS.'; var AES_BLOCKSIZE=' . AES_BLOCKSIZE . '; var pagepass=\'\'; var ENANO_LANG_ID = 1;</script>';
  3018     $js_dynamic .= '<script type="text/javascript">var title="'. $title .'"; var scriptPath="'.scriptPath.'"; var cdnPath="'.scriptPath.'"; var ENANO_SID=""; var AES_BITS='.AES_BITS.'; var AES_BLOCKSIZE=' . AES_BLOCKSIZE . '; var pagepass=\'\'; var ENANO_LANG_ID = 1; var msg_loading_component = \'Loading %component%...\';</script>';
  3020     
  3019     
  3021     global $site_name, $site_desc;
  3020     global $site_name, $site_desc;
  3022     $site_default_name = ( !empty($site_name) ) ? $site_name : 'Critical error';
  3021     $site_default_name = ( !empty($site_name) ) ? $site_name : 'Critical error';
  3023     $site_default_desc = ( !empty($site_desc) ) ? $site_desc : 'This site is experiencing a problem and cannot load.';
  3022     $site_default_desc = ( !empty($site_desc) ) ? $site_desc : 'This site is experiencing a problem and cannot load.';
  3024     
  3023