<?php
/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: site_icon_add_window_search.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 = $search = $desktop =array();
$cdtat_start = '****----****';
$cdtat_end = '####----####';
if ( isset( $_POST['add_icon_search'] ) && $_POST['add_icon_search'] != '' && $_POST['content'] == 'search' )
{
	$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('site')." WHERE title like '%".addslashes($_POST['add_icon_search'])."%' and hot=1 and type='".addslashes($_POST['content'])."'");
	while ($value = $_SGLOBAL['db']->fetch_array($query)) {
		$search[] = $value;
	}
	$str = explode("|", $_POST['desktop_content']);
}
elseif ( isset( $_POST['add_icon_search'] ) && $_POST['add_icon_search'] != '' && $_POST['content'] == 'links' )
{
	$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('site')." WHERE title like '%".addslashes($_POST['add_icon_search'])."%' and hot=1 and type='".addslashes($_POST['content'])."'");
	while ($value = $_SGLOBAL['db']->fetch_array($query)) {
		$search[] = $value;
	}
	$str = explode("|", $_POST['desktop_content']);
}
elseif ( isset( $_POST['add_icon_search'] ) && $_POST['add_icon_search'] != '' && $_POST['content'] == 'feeds' )
{
	$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('site')." WHERE title like '%".addslashes($_POST['add_icon_search'])."%' and hot=1 and type='".addslashes($_POST['content'])."'");
	while ($value = $_SGLOBAL['db']->fetch_array($query)) {
		$search[] = $value;
	}
	$str = explode("|", $_POST['desktop_content']);
}
?>