]>
src.bluestatic.org Git - bugdar.git/blob - admin/global.php
2 /*=====================================================================*\
3 || ################################################################### ||
4 || # BugStrike [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
15 require_once('./includes/init.php');
16 require_once('./includes/functions.php');
18 // ###################################################################
22 $lang->string('Administration Locations') => array(
23 $lang->string('Home') => 'index.php',
24 $lang->string('Logout') => '../login.php?do=cplogout'
27 $lang->string('Options') => array(
28 $lang->string('BugStrike Settings') => 'setting.php',
29 $lang->string('Manage Languages') => 'language.php'
32 $lang->string('Bug Fields') => array(
33 $lang->string('Products / Versions / Components') => 'product.php',
34 $lang->string('Priorities') => 'priority.php',
35 $lang->string('Resolutions') => 'resolution.php',
36 $lang->string('Severities') => 'severity.php',
37 $lang->string('Statuses') => 'status.php',
38 $lang->string('Custom Bug Fields') => 'field.php',
39 $lang->string('Automatic Actions') => 'autoaction.php'
42 $lang->string('User Management') => array(
43 $lang->string('Usergroups') => 'usergroup.php'
47 // ###################################################################
50 require_once('./includes/adminfunctions.php');
51 $admin = new Admin_Print_Class();
53 // ###################################################################
55 function admin_login()
57 global $admin, $bugsys;
59 $admin->page_start('Login', '', 15, '', 'document.cplogin.' . (($bugsys->userinfo
['email']) ? 'password' : 'email') . '.focus();');
61 $admin->form_start('../login.php', 'cplogin', false, 'cplogin');
62 $admin->table_start(true, '425');
63 $admin->table_head($bugsys->lang
->string('Login to BugStrike'));
64 $admin->row_input($bugsys->lang
->string('Email'), 'email', $bugsys->userinfo
['email'], 2, 35, false, false, 'middle');
65 $admin->row_input($bugsys->lang
->string('Password'), 'password', '', 2, 35, false, true, 'middle');
66 $admin->row_submit('', $bugsys->lang
->string('Login'));
73 // ###################################################################
75 $bugsys->userinfo
['adminsession'] = false;
77 if ($_COOKIE[COOKIE_PREFIX
. 'adminsession'])
79 if (can_perform('canadminpanel'))
81 if (md5(md5($bugsys->userinfo
['authkey']) . md5($bugsys->userinfo
['email']) . md5($bugsys->userinfo
['userid'])) != $_COOKIE[COOKIE_PREFIX
. 'adminsession'])
83 $funct->cookie(COOKIE_PREFIX
. 'adminsession', '');
84 $admin->error($lang->string('Invalid admin session has been terminated.'));
89 $funct->cookie(COOKIE_PREFIX
. 'adminsession', md5(md5($bugsys->userinfo
['authkey']) . md5($bugsys->userinfo
['email']) . md5($bugsys->userinfo
['userid'])), false);
90 $bugsys->userinfo
['adminsession'] = true;
95 $funct->cookie(COOKIE_PREFIX
. 'adminsession', '');
100 if (!$_COOKIE[COOKIE_PREFIX
. 'adminsession'])
105 /*=====================================================================*\
106 || ###################################################################
109 || ###################################################################
110 \*=====================================================================*/