1 |
1782
|
Luisehahne
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category admin
|
5 |
|
|
* @package login
|
6 |
|
|
* @author Ryan Djurovich (2004-2009)), WebsiteBaker Project
|
7 |
|
|
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
8 |
|
|
* @link http://www.websitebaker2.org/
|
9 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
|
|
* @platform WebsiteBaker 2.9
|
11 |
|
|
* @requirements PHP 5.2.2 and higher
|
12 |
|
|
* @version $Id$
|
13 |
|
|
* @filesource $HeadURL$
|
14 |
|
|
* @lastmodified $Date$
|
15 |
|
|
*
|
16 |
|
|
*/
|
17 |
|
|
if(!defined('WB_PATH'))
|
18 |
|
|
{
|
19 |
|
|
require('../../config.php');
|
20 |
|
|
}
|
21 |
2098
|
darkviper
|
$oDb = WbDatabase::getInstance();
|
22 |
|
|
$oTrans = Translate::getInstance();
|
23 |
|
|
$oTrans->enableAddon('admin\\settings');
|
24 |
|
|
|
25 |
1782
|
Luisehahne
|
$admin = new admin('Start', 'settings', false, false);
|
26 |
|
|
|
27 |
2098
|
darkviper
|
if ($admin->get_user_id() == 1) {
|
28 |
1782
|
Luisehahne
|
$val = (((int)(defined('SYSTEM_LOCKED') ? SYSTEM_LOCKED : 0)) + 1) % 2;
|
29 |
2109
|
darkviper
|
db_update_key_value($oDb->TablePrefix.'settings', 'system_locked', $val);
|
30 |
1782
|
Luisehahne
|
}
|
31 |
|
|
// redirect to backend
|
32 |
|
|
header('Location: ' . ADMIN_URL . '/index.php');
|
33 |
|
|
exit();
|