#!/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 "";
if [ "${PALANG}" = "en" ]; then
	LANG_001="Cache|Device"
	LANG_002="Cache|Group"
	LANG_003="Policy"
	LANG_004="Name"
	LANG_005="slot"
fi
CGI_browsertitle="iXCache"
. ../../common/common.sh
cfgroot="/cgi-bin/App/ixcache"
myself="${cfgroot}/`basename $0`"
MOD_TAB_LIST="${LANG_001:=豸}#${cfgroot}/ixcache_list ${LANG_002:=}#${cfgroot}/ixcgroup_list ${LANG_003:=ǣ}#${cfgroot}/webmain"

echo -n "
<script type=\"text/javascript\" src=\"/img/common.js\"></script>
<script language=\"javascript\">
function editGroup(id)
{
        var url = \"${cfgroot}/ixcgroup_edit?id=\" + id;
        ShowWindow(url, \"\", 340, 580);
}
</script>
<body>
"; cgi_print_mod_header "${LANG_002:=}" 1280 
echo -n "
<table width=1280 border=0 cellspacing=1 cellpadding=1> 
<tr id=tblhdr>
	<td width=*  align=left>${LANG_004:=}</td>
	"; 
		solt=1
		while [ ${solt} -le 16 ];
		do
			echo "<td width=72 align=right>${LANG_005:=λ}${solt}</td>"
			solt=$((${solt}+1))
		done
	
echo -n "
</tr>
";
idname="row1"
${FLOWEYE} ixcgroup list | while read id name cache1 req1 cache2 req2 cache3 req3 cache4 req4 cache5 req5 cache6 req6 cache7 req7 cache8 req8 \
cache9 req9 cache10 req10 cache11 req11 cache12 req12 cache13 req13 cache14 req14 cache15 req15 cache16 req16 theothers
do 
	name=`echo ${name} | sed 's/δ/default/g'`

echo -n "
	<tr id=${idname}>
	<td align=left><a style=\"color:#0000ff\" href=\"javascript:editGroup('${id}')\">${name}</a></td>
";
	if [ "${cache1}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache1}</td>"
	fi
	if [ "${cache2}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache2}</td>"
	fi
	if [ "${cache3}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache3}</td>"
	fi
	if [ "${cache4}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache4}</td>"
	fi
	if [ "${cache5}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache5}</td>"
	fi
	if [ "${cache6}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache6}</td>"
	fi
	if [ "${cache7}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache7}</td>"
	fi
	if [ "${cache8}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache8}</td>"
	fi
	if [ "${cache9}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache9}</td>"
	fi
	if [ "${cache10}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache10}</td>"
	fi
	if [ "${cache11}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache11}</td>"
	fi
	if [ "${cache12}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache12}</td>"
	fi
	if [ "${cache13}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache13}</td>"
	fi
	if [ "${cache14}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache14}</td>"
	fi
	if [ "${cache15}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache15}</td>"
	fi
	if [ "${cache16}" = "NULL" ]; then
		echo "<td align=right></td>"
	else
		echo "<td align=right>${cache16}</td>"
	fi
	echo "</tr>"
	if [ "${idname}" = "row1" ]; then
		idname="row2"
	else
		idname="row1"
	fi
done 

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