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

include_once('./common.php');

//删除session
if($_SGLOBAL['supe_uid']) {
	$_SGLOBAL['db']->query("DELETE FROM ".tname('session')." WHERE uid='$_SGLOBAL[supe_uid]'");
	$_SGLOBAL['db']->query("DELETE FROM ".tname('adminsession')." WHERE uid='$_SGLOBAL[supe_uid]'");//管理平台
}

include_once S_ROOT.'./uc_client/client.php';
$ucsynlogout = uc_user_synlogout();

clearcookie();
ssetcookie('_refer', '');
header("Location: /index.php");
?>