<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />
<title>已有分类管理 - 会员中心 - <?php echo $cfg_webname; ?></title>
<link href="<?php echo $GLOBALS['cfg_templets_skin']; ?>/diary/css.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0"  style="background-color=transparent">
<?php 
   		include(DEDEMEMBER."/templets/menu.php"); 
        $channels = array();
        foreach($channelInfos as $mrow)
        {
          if($mrow['id'] < 0) continue;
          if($mrow['isshow'] == 0 || $mrow['issend'] == 0) continue;
          if($cfg_mb_album=='N' && $mrow['nid']=='image') continue;
          if(trim($mrow['usertype']) != '' && $mrow['usertype'] != $cfg_ml->fields['mtype']) continue;
          $channels[$mrow['id']] = $mrow;
        }
      ?>
<table width="284" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="370" width="284" align="right">
      <table border="0" width="278" id="table8" cellspacing="0" cellpadding="0" height="370">
        <tr> 
          <td height="19" colspan="3">　</td>
        </tr>
        <tr> 
          <td height="19" width="16"></td>
          <td height="19" width="200">日记分类</td>
          <td height="19" width="62" align="right"><a href="#" onclick="document.all.editfl.style.display='none';document.all.addfl.style.display='block';">添加</a></td>
        </tr>
        <tr> 
          <td background="/templets/default/diary/linebg2.gif" colspan="3" height="1"><img border="0" src="/templets/default/diary/linebg2.gif" width="4" height="1"></td>
        </tr>
        <tr valign="top"> 
          <td colspan="3"> 
            <table border="0" width="100%" id="table9" cellspacing="0" cellpadding="0">
              <tr> 
                <td align="center"> 		  
		  <form action="mtypes.php?dopost=save" method="post">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" id="table10">
                    <tr> 
                      <td align="center" style="font-size: 9pt; font-family: Verdana; color: #000000; letter-spacing: 1pt; word-break: break-all;padding-top:3px" background="img/bg_line.gif"> 
               
                        <table width="98%" border="0" cellpadding="0" cellspacing="0"  id="table11">
<tr bordercolor="DDE7AB" height=20> 
                            <td width="2"></td>
                            <td width="36" style="display:none">&nbsp;ID</td>
                            <td width="33" align=center><font color="#51300C">删除</font></td>
                            <td width="170">&nbsp;名称</td>
                            <td width="30" style="display:none">类别</a>
                            </td>
                          </tr>
<?php  foreach($GLOBALS['mtypearr'] as $key=>$value){ ?>     
                          <tr bordercolor="DDE7AB" height=20> 
                            <td></td>
                            <td style="display:none">&nbsp;<?php echo $value['mtypeid']; ?></td>
                            <td align=center><font color="#51300C"><a target="_blank" href="#"> 
                              <font color="#800000"><input type="checkbox" name="mtypeidarr[]" value="<?php echo $value['mtypeid']; ?>"/></font></a></font></td>
                            <td>&nbsp;<input type="text" style="width:170px" name="mtypename[<?php echo $value['mtypeid']; ?>]" value="<?php echo $value['mtypename']; ?>"/></td>
                            <td style="display:none"><a href='mtypes.php?channelid=<?php echo $value['channelid']; ?>'><?php echo $channels[$value['channelid']]['typename']; ?></a>
                            </td>
                          </tr>

           <?php  }    ?>
             </table>
		
                        <table width="98%" border="0" cellspacing="0" cellpadding="0" id="table14">
                          <tr> 
                            <td align="center" style="font-size: 9pt; font-family: Verdana; color: #000000; letter-spacing: 1pt; word-break: break-all"><button class="button2 mt10" type="submit">提交</button></td>
                          </tr>
                        </table>
</form>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<div id="addfl" style="display:none;position:absolute;left:2px;top:40px;padding:5px;width:280px;height:25px;background:white;">
<form class="mTB10" action="mtypes.php?dopost=add" method="post">
分类名称:<input type="text" name="mtypename" style='width:110px'/>
<select name='channelid' style='width:70px;display:none'>
<?php foreach($channels as $nrow) echo "<option value='{$nrow['id']}'>{$nrow['typename']}</option>\r\n";?>
</select>
<input type="submit" class="button2" name="Submit" value="添加" style="width:40px;height:25px"> <input class="button2" type="button" onclick="document.all.addfl.style.display='none';" name="Submit" value="取消" style="width:40px;height:25px"></form>
</div>
<div id="editfl" style="display:none;position:absolute;left:80px;top:10px;padding:5px;width:220px;height:15px;"><form name="form1" method="post" action="?a=edit">
    <input type="text" id="flmc" name="flmc" size="12" maxlength="12"><input type="hidden" id="flmcid" name="flmcid" size="12" maxlength="12">
    <input type="submit" name="Submit" value="更改分类"> <input type="button" onclick="document.all.editfl.style.display='none';" name="Submit" value="取消">
</form>
</div>

</body>
</html>