2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
24 require_once('./includes/init.php');
25 require_once('./includes/functions.php');
27 // ###################################################################
31 $lang->string('Administration Locations') => array(
32 $lang->string('Home') => 'index.php',
33 $lang->string('Logout') => '../login.php?do=cplogout'
36 $lang->string('Options') => array(
37 $lang->string('Bugdar Settings') => 'setting.php',
38 $lang->string('Manage Languages') => 'language.php',
39 $lang->string('Edit User Help') => 'userhelp.php'
42 $lang->string('Bug Fields') => array(
43 $lang->string('Products / Versions / Components') => 'product.php',
44 $lang->string('Priorities') => 'priority.php',
45 $lang->string('Resolutions') => 'resolution.php',
46 $lang->string('Severities') => 'severity.php',
47 $lang->string('Statuses') => 'status.php',
48 $lang->string('Custom Bug Fields') => 'field.php',
49 $lang->string('Automatic Actions') => 'autoaction.php'
52 $lang->string('User Management') => array(
53 $lang->string('Users') => 'user.php',
54 $lang->string('Usergroups') => 'usergroup.php',
55 $lang->string('Usergroup Permissions') => 'permission.php'
59 // ###################################################################
62 require_once('./includes/adminfunctions.php');
63 $admin = new Admin_Print_Class();
65 // ###################################################################
67 function admin_login()
69 global $admin, $bugsys;
71 $admin->page_start('Login', '', 15, '', 'document.cplogin.' . (($bugsys->userinfo
['email']) ?
'password' : 'email') . '.focus();');
73 $admin->form_start('../login.php', 'cplogin', false
, 'cplogin');
74 $admin->table_start(true
, '425');
75 $admin->table_head($bugsys->lang
->string('Login to Bugdar'));
76 $admin->row_input($bugsys->lang
->string('Email'), 'email', $bugsys->userinfo
['email'], 2, 35, false
, false
, 'middle');
77 $admin->row_input($bugsys->lang
->string('Password'), 'password', '', 2, 35, false
, true
, 'middle');
78 $admin->row_submit('', $bugsys->lang
->string('Login'));
85 // ###################################################################
87 $bugsys->userinfo
['adminsession'] = false
;
89 if ($_COOKIE[COOKIE_PREFIX
. 'adminsession'])
91 if (can_perform('canadminpanel'))
93 if (md5(md5($bugsys->userinfo
['authkey']) . md5(gmdate('F j, Y @ H'))) != $_COOKIE[COOKIE_PREFIX
. 'adminsession'])
95 $funct->cookie(COOKIE_PREFIX
. 'adminsession', '');
97 // do we need this message?
98 $admin->error($lang->string('Invalid admin session has been terminated.'));
103 $funct->cookie(COOKIE_PREFIX
. 'adminsession', md5(md5($bugsys->userinfo
['authkey']) . md5(gmdate('F j, Y @ H'))), false
);
104 $bugsys->userinfo
['adminsession'] = true
;
109 $funct->cookie(COOKIE_PREFIX
. 'adminsession', '');
114 if (!$_COOKIE[COOKIE_PREFIX
. 'adminsession'])
119 /*=====================================================================*\
120 || ###################################################################
123 || ###################################################################
124 \*=====================================================================*/