<?php
//加载
require_once ("../manager_include.inc");

// 参数取得
$mobile = ParamUtil::getRequestString("mobile");

$sql = "select u.* from user_mst u, user_buy_couse_dat ub where u.delete_flg=false and ub.delete_flg=false and ub.status='FINISH' and u.id=ub.user_id and u.mobile like '%{$mobile}%'";
$db = &KoalaDBManager::getInstance();
$data_list = $db->executeQuery($sql);
ob_start()
?>
<?
	if(!empty($data_list)) {
		$index = 0;
		foreach($data_list as $data) {
			$index++;
			$user_id = $data["id"];
			$nickname = $data["nickname"];
?>
<div class="search_user_item" onClick="addUser('<?=$user_id?>','<?=$nickname?>');"><?=$index?>.<?=$nickname?></div>
<?
		}
	}
?>
<?
$html = ob_get_contents();
ob_end_clean();
print json_encode(array("html"=>$html));


