<?
/*
실험주소
http://www.owllab.com/ios/smartreports_type.php
*/

header("Cache-Control: no-cache, must-revalidate");
header("Content-type: application/xml; charset=UTF-8");

include_once ("session.php");
include_once ("dbcon_light.php");

$table = "report_type_demo";
$result = -1;
$msg = "죄송합니다.\n시스템장애로 작업을 취소했습니다.\n나중에 다시 시도해 주세요.";

$sql = " select * from $table order by name ";
$rs = mysql_select_list($sql);
if (count($rs[rowid])>0) {
	$result = 1;
	$msg = "데이터를 가져왔습니다.";
}

?>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?>
<lists>
	<info>
		<result><? echo $result;?></result>
		<totrec><? echo count($rs[rowid]);?></totrec>
		<msg><![CDATA[<? echo $msg;?>]]></msg>
	</info>
	<? for ($i=0;$i<count($rs[rowid]);$i++) { ?>  
	<data>
		<rowid><? echo $rs[rowid][$i];?></rowid>
		<name><![CDATA[<? echo $rs[name][$i];?>]]></name>
	</data>
	<? }// for i?>
</lists>