#!/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 

echo -n "
<script type=\"text/javascript\" src=\"/img/common.js\"></script>
<script languate=javascript>
function setLink(id) 
{
	window.location.href = \"/cgi-bin/Setup/policy_setlink?link=\" + id; 
}
</script>
<body>
"; cgi_show_title "->·" 
echo -n "
<br>
<table width=900 border=0 cellspacing=1 cellpadding=1> 
<tr id=tblhdr>
        <td width=130 align=center>·</td>
	<td width=70  align=center></td>
	<td width=80  align=center>(kbps)</td>
	<td width=100 align=center>̬IP</td>
	<td width=110 align=center>ٶάʱ()</td>
	<td width=140 align=center>ʹ(/)</td>
	<td width=70  align=center>ٱ</td>
	<td width=70  align=center>ٱ</td>
	<td width=*   align=center></td>
</tr>
";
idname="row1"
${FLOWEYE} policy listlink |  \
while read name id type bandwidth enable holdtime lowwater highwater speedup speeddown theothers
do 
echo -n "
	<tr id=${idname}>
	<td align=center><a style=\"color:#0000ff\" href=\"javascript:setLink('${id}')\">${name}</a></td>
	"; if [ "${type}" = "bridge" ]; then 
echo -n "
	<td align=center></td>
	"; else 
echo -n "
	<td align=center></td>
	"; fi 
echo -n "
	<td align=center>${bandwidth}</td>
	
	"; if [ ${enable} -eq 0 ]; then 
echo -n "
	<td align=center></td>
	"; else 
echo -n "
	<td align=center></td>
	"; fi 
echo -n "
	<td align=center>${holdtime}</td>
	<td align=center>${highwater}%/${lowwater}%</td>
	<td align=center>${speedup}%</td>
	<td align=center>${speeddown}%</td>
       	<td align=center><a style=\"color:#0000ff\" href=\"javascript:setLink('${id}')\">༭</a></td>
	</tr>
	"; if [ "${idname}" = "row1" ]; then
		idname="row2"
	else
		idname="row1"
	fi
done

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