<?php
/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: symbaloo_poller.php 10954 2009-01-12 05:26:27Z liguode $
*/

include_once('../common.php');

//是否关闭站点
checkclose();

//是否公开
if(empty($_SCONFIG['networkpublic'])) {
	checklogin();
}
$list = array();
if ( !empty($_SGLOBAL['supe_uid']) )
{
	$str = base64_decode($_POST['value']);
	$arr = explode(",", $str);
	$query = $_SGLOBAL['db']->query("SELECT lian FROM ".tname('site_game')." WHERE uid=".intval($_SGLOBAL['supe_uid']));
	while ($value = $_SGLOBAL['db']->fetch_array($query)) {
		$list[] = $value;
	}
	if ( $list )
	{
		$setarr = array(
			'lian' => $list[0]['lian']+intval($arr[3])
		);
		updatetable('site_game', $setarr, array('uid'=>intval($_SGLOBAL['supe_uid'])));
	}
	else
	{
		$setarr = array(
			'uid' => intval($_SGLOBAL['supe_uid']),
			'lian' => intval($arr[3])
		);
		$aid = inserttable('site_game', $setarr, 1);
	}
}
?>