<?php
	require("__include-common.php");
	require("../account/__logincheck.php");
	if (check_permit_id($_SESSION['login_id'], $_SESSION['current_id']) == "") {
		exit;
	}
	$con = my_mysql_connect(_DB_SCHEMA);
	$sql = "select id_num, c_name from m_lifeplan";
	$sql .= " where id_account = " . $_SESSION['current_id'] . " order by id_num";
	$rs = my_mysql_query($sql);
	if ($rs) {
		if (mysql_num_rows($rs) <> 0) {
			$names = '';
			while ($rec=mysql_fetch_array($rs)) {
				$names .= $rec['id_num'].':'.$rec['c_name'].',';
			}
			echo $names;
		} else {
			echo 'NoData';
		}
	}
	mysql_query($sql);
	$con = mysql_close($con);
?>
