[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the Admin UI class. 4 * Alternate admin skins should derive from this class. 5 * 6 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. 7 * See also {@link http://sourceforge.net/projects/evocms/}. 8 * 9 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}. 10 * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}. 11 * 12 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL) 13 * 14 * {@internal Open Source relicensing agreement: 15 * Daniel HAHLER grants Francois PLANQUE the right to license 16 * Daniel HAHLER's contributions to this file and the b2evolution project 17 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 18 * }} 19 * 20 * @package admin-skin 21 * @subpackage evo 22 * 23 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 24 * @author blueyed: Daniel HAHLER 25 * 26 * @version $Id: _adminUI.class.php,v 1.20 2007/09/03 16:44:28 fplanque Exp $ 27 */ 28 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 29 30 /** 31 * Includes 32 */ 33 require_once dirname(__FILE__).'/../_adminUI_general.class.php'; 34 35 36 /** 37 * We'll use the default AdminUI templates etc. 38 * 39 * @package admin-skin 40 * @subpackage evo 41 */ 42 class AdminUI extends AdminUI_general 43 { 44 45 /** 46 * Display doctype + <head>...</head> section 47 */ 48 function disp_html_head() 49 { 50 require_css( 'skins_adm/evo/rsc/css/style.css', TRUE, 'Blue' ); 51 52 parent::disp_html_head(); 53 } 54 55 56 /** 57 * Get the top of the HTML <body>. 58 * 59 * @uses get_page_head() 60 * @return string 61 */ 62 function get_body_top() 63 { 64 global $Messages; 65 66 $r = ''; 67 68 if( empty($this->mode) ) 69 { // We're not running in an special mode (bookmarklet...) 70 71 $r .= $this->get_page_head(); 72 73 // Display MAIN menu: 74 $r .= $this->get_html_menu().' 75 76 <div class="panelbody"> 77 '; 78 } 79 80 $r .= ' 81 82 <div id="payload"> 83 '; 84 85 $r .= $this->get_bloglist_buttons( '<div id="TitleArea">', '</div>' ); 86 87 // Display info & error messages 88 $r .= $Messages->display( NULL, NULL, false, 'all', NULL, NULL, 'action_messages' ); 89 90 return $r; 91 } 92 93 94 /** 95 * Close open div(s). 96 * 97 * @return string 98 */ 99 function get_body_bottom() 100 { 101 global $rsc_url; 102 103 $r = ''; 104 105 if( empty($this->mode) ) 106 { // We're not running in an special mode (bookmarklet...) 107 $r .= "\n\t</div>"; 108 } 109 110 $r .= "</div>\n"; // Close right col. 111 112 $r .= '<img src="'.$rsc_url.'/img/blank.gif" width="1" height="1" />'; 113 114 return $r; 115 } 116 117 118 /** 119 * GLOBAL HEADER - APP TITLE, LOGOUT, ETC. 120 * 121 * @return string 122 */ 123 function get_page_head() 124 { 125 global $current_User, $htsrv_url_sensitive, $baseurl, $admin_url, $rsc_url, $Blog; 126 global $app_shortname, $app_version; 127 128 $r = ' 129 <div id="header"> 130 <h1>'.$this->get_title_for_titlearea().'</h1> 131 </div> 132 '; 133 134 return $r; 135 } 136 137 /** 138 * Get a template by name and depth. 139 * 140 * @param string The template name ('main', 'sub'). 141 * @return array 142 */ 143 function get_template( $name, $depth = 0 ) 144 { 145 switch( $name ) 146 { 147 case 'main': 148 // main level 149 global $app_shortname, $app_version; 150 151 return array( 152 'before' => '<div id="mainmenu"><ul>', 153 'after' => "</ul>\n<p class=\"center\">$app_shortname v <strong>$app_version</strong></p>\n</div>", 154 'beforeEach' => '<li>', 155 'afterEach' => '</li>', 156 'beforeEachSel' => '<li class="current">', 157 'afterEachSel' => '</li>', 158 'beforeEachSelWithSub' => '<li class="parent">', 159 'afterEachSelWithSub' => '</li>', 160 '_props' => array( 161 /** 162 * @todo Move to new skin (recurse for subentries if an entry is selected) 163 'recurseSelected' => true, 164 */ 165 ), 166 ); 167 break; 168 169 170 case 'CollectionList': 171 // Template for a list of Collections (Blogs) 172 return array( 173 'before' => '', 174 'after' => '', 175 'beforeEach' => '', 176 'afterEach' => '', 177 'beforeEachSel' => '', 178 'afterEachSel' => '', 179 ); 180 181 182 default: 183 // Delegate to parent class: 184 return parent::get_template( $name, $depth ); 185 } 186 } 187 188 } 189 190 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |