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

myself="/cgi-bin/Maintain/`basename $0`"
trackdns=0

echo -n "
<script type=\"text/javascript\" src=\"/img/common.js\"></script>
";

if [ "${REQUEST_METHOD}" = "POST" ]; then
	operator_check "${myself}"
  
  if [ "${CGI_trackdns}" != "" ]; then
        
      if [ "$CGI_trackdns" = "1" ]; then
          trackdns_cfg_value="1"
      else
          trackdns_cfg_value="0"
      fi
      
      errmsg=`${FLOWEYE} app set http trackdns=${trackdns_cfg_value}`
      if [ $? -eq 0 ]; then
          afm_dialog_msg "ɹ!"
          afm_load_page 0 "${myself}"
          exit 0
      fi
      afm_dialog_msg "ִ:${errmsg}" 
  fi
fi

eval `${FLOWEYE} app get http | grep trackdns`
trackdns=$((${trackdns}))

echo -n "
<body>
"; cgi_show_title "߼-->WWW" 
echo -n "
";
for nameval in `${FLOWEYE} logger stat`
do
	eval "${nameval}"
done

echo -n "
<br>
<form method=post action=\"${myself}\">
<table width=700 border=0 cellspacing=0 cellpadding=3 bgcolor=\"#ffffff\">
<tr id=row1>
	<td style=\"width:20\"></td>
        <td align=left style=\"width:80\">WWW</td>
        <td align=left width=*>
      	<select name=trackdns value=${sshd_status} style="width:110">
";    
if [ ${trackdns} -eq 1 ]; then
echo -n "
          <option value=0>ر</option>
          <option value=1 selected></option>
";
else
echo -n "                                                  
      	  <option value=0 selected>ر</option>
          <option value=1></option>
";
fi
echo -n "
      	</select> (رWWW)</td>
</tr>
</table>
<table style=\"width:700; border-bottom:1px #787882 solid; color:#0000ff\">
<tr><td align=right>&nbsp;</td></tr>
</table>
<table style=\"width:700\"> 
<tr>
        <td align=right>
		<input type=submit style=\"width:80\" value=\"ύ\"></input>
	</td>
</tr>
</table>
</form>
</body>
</html>
";