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

"
echo -n "";
. ../common/common.sh

echo -n "
<body>
";
cgi_show_title "DHCP->̬䵼"
cfgfile=/usr/ramdisk/admin/tmp/dhcpstatic.conf
[ -f ${cfgfile} ] && rm -f ${cfgfile}
touch ${cfgfile}
${FLOWEYE} dhcpsta list | sort -n -k 3 | while read mac ip ipn desc theothers
do
	if [ "${desc}" != "NULL" ]; then 
		echo "${mac} ${ip} ${desc}" >> ${cfgfile}
	else
		echo "${mac} ${ip}" >> ${cfgfile}
	fi
done

echo -n "
<br>
<table width=\"700\" border=0 cellspacing=1 cellpadding=3 style=\"font-bold:true;font-size:15px\">
<tr>
    <td width=20></td>
    <td width=*>ڴ˴&nbsp;<a style=\"color:#ff0000;font-size:15px;\" href=\"/tmp/dhcpstatic.conf\"><b>Ҽѡ\"Ϊ...\"</b></a>&nbsp;ǰļ</td>
</tr>
</table>
</body>
</html>
";