<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<link href=images/style.css rel=stylesheet type=text/css>
<script language=javascript>
function chkform(){
	if(document.form.areaname.value==""){
		alert('请输入信息标题！');
		document.form.areaname.focus();
		return false;
	}
	if(document.form.areaname.value.length>50 || document.form.areaname.value.length<2){
		alert('信息标题请控制在2~30字之间!');
		document.form.areaname.focus();
		return false;
	}
}
</script>
</head>
<body>
<table width=96% border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
  <tr>
    <td height=25 class=header> 修改地区</td>
  </tr>
  <tr>
    <td height="93" align=center bgcolor=#FFFFFF><table width=96% align=center border=0 cellspacing=1 cellpadding=4>
      <form method=post onSubmit="return chkform()" name="form" action="area.php?act=update">
        <tr>
          <td width="44%" align="right">地区名称： </td>
          <td width="56%"><div align="left">
            <input name="areaname" type="text" id="areaname" value="<?=$area[areaname]?>" size="30"  class="dfinput"> 
            *</div></td>
        </tr>
        <tr>
          <td align="right">分类选择： </td>
          <td><select name="parentid" id="parentid" >
              <option value="0">作为根分类</option>
              <?php
foreach ($areas AS $areas)
{
	if($areas['areaid'] == $area['parentid'])
	{
		echo "<option value='$areas[areaid]' selected>$areas[areaname]</option>\n";
	}else{
		echo "<option value='$areas[areaid]' >$areas[areaname]</option>\n";
	}
    
}
?>
            </select>
          </td>
        </tr>
        <tr>
          <td align="right">地区排序： </td>
          <td><input name="areaorder" type="text" id="areaorder" value="<?=$area[areaorder]?>" size="30"  class="dfinput"> </td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" name="submit" value=" 提 交 " class="newFormBtn_red2"  />
                <input type="hidden" name="areaid" value="<?=$area[areaid]?>">
            &nbsp;&nbsp;
            <input name="reset" type="reset" value=" 重 置 " >          </td>
        </tr>
      </form>
    </table></td>
  </tr>
</table>
</body>
</html>