root/admin/pagestart.php

Revision 324, 1.9 kB (checked in by Nafania, 1 year ago)

Много мелких изменений. Если используется xbtt, то надо обязательно скачать новую версию на форуме.
Добавлен файл cron.php - если есть возможность, то пускайте cron таски через него. Особенно если используете массовую рассылку почты.

Line 
1 <?php
2 /***************************************************************************</span>
3 <span class="code-comment"> *                               pagestart.php
4  *                            -------------------
5  *   begin                : Thursday, Aug 2, 2001
6  *   copyright            : (C) 2001 The phpBB Group
7  *   email                : support@phpbb.com
8  *
9  *   $Id: pagestart.php,v 1.1.2.9 2005/06/26 14:39:30 acydburn Exp $
10  *
11  *
12  ***************************************************************************/
13
14 /***************************************************************************
15  *
16  *   This program is free software; you can redistribute it and/or modify
17  *   it under the terms of the GNU General Public License as published by
18  *   the Free Software Foundation; either version 2 of the License, or
19  *   (at your option) any later version.
20  *
21  ***************************************************************************/
22
23 if (!defined('IN_PHPBB'))</span>
24 <span class="code-keyword">{
25         die("Hacking attempt");
26 }
27
28 define('IN_ADMIN', true);
29 $root_path = './../';
30 $admin_path = './';</span>
31 <span class="code-lang">require_once ($root_path . 'include/config.php');
32
33 //</span>
34 <span class="code-comment">// Start session management
35 //
36 $userdata = session_pagestart($user_ip);
37 init_userprefs($userdata);
38 $session_id = request_var('sid', '');
39 $no_page_header = ( !empty($no_page_header) ? $no_page_header : request_var('no_page_header', 0) );
40
41 $current_page = extract_current_page();
42 //</span>
43 <span class="code-comment">// End session management
44 //
45
46 if ( $userdata['class'] < UC_ADMINISTRATOR )</span>
47 <span class="code-keyword">{
48         trigger_error($lang['not_admin']);
49         return;
50 }
51
52 if (!isset($userdata['session_admin']) || !$userdata['session_admin'] || !$userdata['session_logged_in'] )
53 {
54     define('IN_ADMIN_START', true);
55     show_login_box('admin/index.php', true);
56 }
57
58 if ( !$no_page_header )
59 {
60         // Not including the pageheader can be neccesarry if META tags are
61         // needed in the calling script.
62         include('./page_header_admin.'.$phpEx);
63 }
64
65 ?>
Note: See TracBrowser for help on using the browser.