#!/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="Config"
	LANG_002="Structure"
	LANG_003="Status"
	LANG_004="Error"
	LANG_005="Success"
	LANG_006="Enable"
	LANG_007="Disable"
	LANG_008="Account TTL"
	LANG_009="Submit"
	LANG_010="Seconds (account not updated within TTL time will be deleted)"
fi
CGI_browsertitle="Drcom"
. ../../common/common.sh 
myself="/cgi-bin/App/drcom/`basename $0`"
MOD_TAB_LIST="${LANG_001:=}#/cgi-bin/App/drcom/webmain ${LANG_002:=ܹ}#/cgi-bin/App/drcom/drcom_map ${LANG_003:=״̬}#/cgi-bin/App/drcom/drcom_stat"
APPCTRL=/usr/ramdisk/app/drcom/appctrl
. /etc/PG.conf
APPCTRL=/usr/ramdisk/app/drcom/appctrl
if [ "${REQUEST_METHOD}" = "POST" ]; then
	operator_check "${myself}"
	[ "${CGI_ttl}" = "" ] && CGI_ttl=300
	errmsg=`${FLOWEYE} drcom config enable=${CGI_enable} ttl=${CGI_ttl}`
	if [ "$?" != "0" ]; then
		afm_dialog_msg "${LANG_004:=ִ}: ${errmsg}"
	else
		afm_dialog_msg "${LANG_005:=ɹ}"
	fi
fi
for namev in `${FLOWEYE} drcom stat`
do
	eval "${namev}"
done

echo -n "
<script language=\"javascript\">
function beforeCommit(frm)
{
	return true;
}
</script>
<body>
";
cgi_print_mod_header "${LANG_001:=}" "100%"

echo -n "
</br>
<form method=post action=\"${myself}\">
<table width=600 border=0 cellspacing=0 cellpadding=3 bgcolor=\"#ffffff\">
<tr id=row1>
	<td width=20></td>
	<td width=80 align=left>${LANG_003:=״̬}</td>
	<td width=150 align=left>
		<select name=enable value=${enable} style=\"width:100\">
		"; if [ ${enable} -eq 0 ]; then 
echo -n "
			<option value=1>${LANG_006:=}</option>
			<option value=0 selected>${LANG_007:=}</option>
		"; else 
echo -n "
			<option value=1 selected>${LANG_006:=}</option>
			<option value=0>${LANG_007:=}</option>
		"; fi 
echo -n "
		</select>
	</td>
	<td width=*></td>
</tr>
<tr id=row1>
	<td width=20></td>
	<td align=left>${LANG_008:=˺TTL}</td>
	<td align=left>
		<input type=\"text\" value=\"${ttl}\" name=\"ttl\" style=\"width:100px\" /> ${LANG_010:= (˺TTLʱδ״̬ᱻɾ)}
	</td>
	<td width=*></td>
</tr>
</table>
<table style=\"width:600; border-bottom:1px #787882 solid; color:#0000ff\">
<tr><td align=right>&nbsp;</td></tr>
</table>
<table style=\"width:600\">
<tr>
	<td align=right>
		<input type=submit style=\"width:80\" value=\"${LANG_009:=ύ}\" class=\"btns\"></input>
	</td>
</tr>
</table>
</form>
</body>
</html>
";