<?php
/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: site_settings.php 10953 2009-01-12 02:55:37Z liguode $
*/

if(!defined('IN_UCHOME')) {
	exit('Access Denied');
}
@include_once(S_ROOT.'./data/site_config.php');
$list = $bar = $desktop = $siteid = array();
$cdtat_start = '****----****';
$cdtat_end = '####----####';
$arrow = '$';
$desktopId = 0;
if ( !empty($_SGLOBAL['supe_uid']) )
{
	if ( isset( $_POST['target'] ) && $_POST['target'] != 0 )
	{
		$setarr = array(
			'active' => 0
		);
		updatetable('site_bar', $setarr, array('active'=>1,'uid'=>$_SGLOBAL['supe_uid']));
		updatetable('site_desktop', $setarr, array('active'=>1,'uid'=>$_SGLOBAL['supe_uid']));
		$setarredit_bar = array(
			'active' => 1
		);
		$setarredit_desktop = array(
			'active' => 1
		);
		updatetable('site_bar', $setarredit_bar, array('desktop_id'=>intval($_POST['target']),'uid'=>$_SGLOBAL['supe_uid']));
		updatetable('site_desktop', $setarredit_desktop, array('desktop_id'=>intval($_POST['target']),'uid'=>$_SGLOBAL['supe_uid']));
	}
}
else
{
	header("location: /window/login.php");
	exit;
}
?>