<?php
/*
	[Office 515158] (C) 2009-2014 天生创想 Inc.
	$Id: sms.class.php mobile $
*/
!defined('IN_TOA') && exit('Access Denied!');
function mob_sms_receive($user=0){
	global $db;
	$user1='';
	$user2='';
	$sql = "SELECT id,sendperson,receiveperson FROM ".DB_TABLEPRE."sms_receive where sendperson='".$user."' or receiveperson='".$user."' order by id desc";
	$query = $db->query($sql);
	while ($row = $db->fetch_array($query)) {
		if(sizeof(explode($row['sendperson'].','.$row['receiveperson'].',',$user2))<2){
			$user1.= $row['id'].',';
			$user2.= $row['sendperson'].','.$row['receiveperson'].',';
		}
	}
	return substr($user1, 0, -1);
}

?>