Project

General

Profile

1
<?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: locking.php 2109 2014-11-25 13:15:56Z darkviper $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/settings/locking.php $
14
 * @lastmodified    $Date: 2014-11-25 14:15:56 +0100 (Tue, 25 Nov 2014) $
15
 *
16
*/
17
if(!defined('WB_PATH'))
18
{
19
	require('../../config.php');
20
}
21
$oDb = WbDatabase::getInstance();
22
$oTrans = Translate::getInstance();
23
$oTrans->enableAddon('admin\\settings');
24

    
25
$admin = new admin('Start', 'settings', false, false);
26

    
27
if ($admin->get_user_id() == 1) {
28
	$val = (((int)(defined('SYSTEM_LOCKED') ? SYSTEM_LOCKED : 0)) + 1) % 2;
29
    db_update_key_value($oDb->TablePrefix.'settings', 'system_locked', $val);
30
}
31
// redirect to backend
32
header('Location: ' . ADMIN_URL . '/index.php');
33
exit();
(2-2/4)