#!/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_lip?${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 class=bgurl1 align=center></td>
	<td width=150 class=bgurl1 align=center>ûIPַ</td>
	<td width=* class=bgurl1 align=center>ʱ</td>
</tr>
";
idname="row1"
acctno=1
${FLOWEYE} appobj natiplist ip=${CGI_ipaddr} | \
while read et type account ipaddr refcnt lastdate lasttime theothers
do

echo -n "
	<tr id=${idname}>
	<td align=center>${acctno}</td>
	<td align=left>&nbsp;&nbsp;&nbsp;${account}</td>
	<td align=center>${lastdate} ${lasttime}</td>
	</tr>
";
	if [ "${idname}" = "row1" ]; then
		idname="row2"
	else
		idname="row1"
	fi
	acctno=$((${acctno} + 1))
done

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