Changeset 9368
- Timestamp:
- Feb 24, 2011, 3:08:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r9358 r9368 22 22 // +-----------------------------------------------------------------------+ 23 23 24 //----------------------------------------------------------- include 24 // +-----------------------------------------------------------------------+ 25 // | Basic constants and includes | 26 // +-----------------------------------------------------------------------+ 27 25 28 define('PHPWG_ROOT_PATH','./'); 26 29 define('IN_ADMIN', true); 27 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 28 30 31 include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); 29 32 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 30 33 include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php'); … … 35 38 // | Check Access and exit when user status is not ok | 36 39 // +-----------------------------------------------------------------------+ 40 37 41 check_status(ACCESS_ADMINISTRATOR); 42 43 // +-----------------------------------------------------------------------+ 44 // | Direct actions | 45 // +-----------------------------------------------------------------------+ 38 46 39 47 // tags … … 68 76 69 77 // +-----------------------------------------------------------------------+ 70 // | synchronize user informations | 71 // +-----------------------------------------------------------------------+ 78 // | Synchronize user informations | 79 // +-----------------------------------------------------------------------+ 80 72 81 if (mt_rand(0,9)==0) 73 82 { … … 76 85 77 86 // +-----------------------------------------------------------------------+ 78 // | variables init|87 // | Variables init | 79 88 // +-----------------------------------------------------------------------+ 80 89 … … 114 123 $link_start = PHPWG_ROOT_PATH.'admin.php?page='; 115 124 $conf_link = $link_start.'configuration&section='; 116 //----------------------------------------------------- template initialization 125 126 // +-----------------------------------------------------------------------+ 127 // | Template init | 128 // +-----------------------------------------------------------------------+ 129 117 130 $title = l10n('Piwigo Administration'); // for include/page_header.php 118 131 $page['page_banner'] = '<h1>'.l10n('Piwigo Administration').'</h1>'; … … 159 172 ); 160 173 161 //---------------------------------------------------------------- plugin menus 174 // +-----------------------------------------------------------------------+ 175 // | Plugin menu | 176 // +-----------------------------------------------------------------------+ 177 162 178 $plugin_menu_links = trigger_event('get_admin_plugin_menu_links', array() ); 163 179 … … 169 185 $template->assign('plugin_menu_items', $plugin_menu_links); 170 186 171 include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php'); 172 173 //------------------------------------------------------------- content display 174 175 // +-----------------------------------------------------------------------+ 176 // | errors & infos | 177 // +-----------------------------------------------------------------------+ 178 179 $template->assign('ACTIVE_MENU', get_active_menu($page['page'])); 180 181 if (count($page['errors']) != 0) 182 { 183 $template->assign('errors', $page['errors']); 184 } 185 186 if (count($page['infos']) != 0) 187 { 188 $template->assign('infos', $page['infos']); 189 } 190 191 if (count($page['warnings']) != 0) 192 { 193 $template->assign('warnings', $page['warnings']); 194 } 195 196 // Add the Piwigo Official menu 197 $template->assign( 'pwgmenu', pwg_URL() ); 198 199 include(PHPWG_ROOT_PATH.'include/page_header.php'); 200 201 trigger_action('loc_end_admin'); 202 203 $template->pparse('admin'); 204 205 // +-----------------------------------------------------------------------+ 206 // | order permission refreshment | 207 // +-----------------------------------------------------------------------+ 187 // +-----------------------------------------------------------------------+ 188 // | Refresh permissions | 189 // +-----------------------------------------------------------------------+ 190 208 191 // Only for pages witch change permissions 209 192 if ( … … 235 218 } 236 219 220 // +-----------------------------------------------------------------------+ 221 // | Include specific page | 222 // +-----------------------------------------------------------------------+ 223 224 include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php'); 225 226 // +-----------------------------------------------------------------------+ 227 // | Errors, Infos & Warnings | 228 // +-----------------------------------------------------------------------+ 229 230 $template->assign('ACTIVE_MENU', get_active_menu($page['page'])); 231 232 if (count($page['errors']) != 0) 233 { 234 $template->assign('errors', $page['errors']); 235 } 236 237 if (count($page['infos']) != 0) 238 { 239 $template->assign('infos', $page['infos']); 240 } 241 242 if (count($page['warnings']) != 0) 243 { 244 $template->assign('warnings', $page['warnings']); 245 } 246 247 // +-----------------------------------------------------------------------+ 248 // | Sending html code | 249 // +-----------------------------------------------------------------------+ 250 251 // Add the Piwigo Official menu 252 $template->assign( 'pwgmenu', pwg_URL() ); 253 254 include(PHPWG_ROOT_PATH.'include/page_header.php'); 255 256 trigger_action('loc_end_admin'); 257 258 $template->pparse('admin'); 259 237 260 include(PHPWG_ROOT_PATH.'include/page_tail.php'); 238 261 ?>
Note: See TracChangeset
for help on using the changeset viewer.