#!/bin/sh
#This script is created by ssparser automatically. The parser first created by MaoShouyan
printf "Content-type: text/html
Cache-Control: no-cache

"
echo -n ""; 
. ../common/common.sh 
[ "${CGI_sort}" = "" ] && CGI_sort="bytes"
args="ipaddr=${CGI_ipaddr}&sort=${CGI_sort}"
MOD_TAB_LIST="ſ#/cgi-bin/Monitor/ipview_data?${args} Ϣ#/cgi-bin/Monitor/ipview_flow?${args} #/cgi-bin/Monitor/ipview_account?${args} û#/cgi-bin/Monitor/ipview_lip?${args} ƶն#/cgi-bin/Monitor/ipview_mobile?${args}"
afm_load_page 30 "/cgi-bin/Monitor/ipview_mobile?${args}"
myself="/cgi-bin/Monitor/`basename $0`"
urlpath="${myself}?ipaddr=${CGI_ipaddr}"

echo -n "
<body>
";
for nameval in `${FLOWEYE} ipobj get ${CGI_ipaddr}`
do
	eval "${nameval}"
done
if [ ${usertype} -ne 0 ]; then
	MOD_TAB_LIST="${MOD_TAB_LIST} ˺Ϣ#/cgi-bin/Monitor/ipview_usrinfo?${args}"
fi
[ "${nbname}" != "" ] && nbname="(${nbname})"
cgi_show_title "${CGI_ipaddr}${nbname}" 613 

echo -n "
<br>
"; cgi_show_ipobj_info 
echo -n "
<br>
"; cgi_print_mod_header "ƶն" 613 
echo -n "
<table width=613 border=0 cellspacing=1 cellpadding=1> 
<tr id=tblhdr>
	<td width=50  align=center></td>
	<td width=150 align=center>ն</td>
	<td width=150 align=center>״η</td>
	<td width=*   align=center></td>
</tr>
";
idname="row1"
no=1
${FLOWEYE} mobile list ip=${CGI_ipaddr} | \
while read name cname ipaddr birth lastime theothers
do 
echo -n "
	<tr id=${idname}>
	<td align=center>${no}</td>
	<td align=center>${cname}</td>
	<td align=center>${birth}</td>
	<td align=center>${lastime}</td>
	</tr>
";
	if [ "${idname}" = "row1" ]; then
		idname="row2"
	else
		idname="row1"
	fi
	no=$((${no} + 1))
done

echo -n "
</table>
</body>
</html>
";