<?php
/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: site_rss_desktop_save.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 = array();
$cdtat_start = '****----****';
$cdtat_end = '####----####';
if ( !empty($_SGLOBAL['supe_uid']) )
{
	$setarr = array(
		'content' => addslashes(strip_tags($_POST['desktop_content']))
	);
	$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('site_desktop')." where desktop_id=".intval($_POST['desktop_id'])." and uid=".$_SGLOBAL['supe_uid']);
	while ($value = $_SGLOBAL['db']->fetch_array($query)) {
		$list[] = $value;
	}
	$content = str_replace(',','|',$list[0]['content']);
	$pieces = explode(",", $content);
	if ( !in_array($pieces,$content) )
	{
		updatetable('site_desktop', $setarr, array('desktop_id'=>intval($_POST['desktop_id']),'uid'=>$_SGLOBAL['supe_uid']));
		$msg = "ok";
	}
}
else
{
	$msg = "not login";
}
?>