<html><hand>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=<?php echo CHARSET;?>">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta HTTP-EQUIV="Content-Language" CONTENT="<?php echo CHARSET;?>">
<script language='JavaScript' src='admin/img/admin.js'></script>
<link href="admin/img/style.css" rel="stylesheet" type="text/css">
<?php 
if(!defined('IN_ADMIN')) exit('Access Denied');
switch ($action){
	case 'add':
?>
<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<form name='myform' method='post' Action='<?=SCRIPT_NAME;?>?file=type&action=add'>
<tr class=td4><td colspan=2><strong>添加分类</strong></td></tr>
<input name=info[lx] type=hidden value='<?=$lx?>'>
<tr class=td2><td width='20%'><strong>分类名称</strong></td>
<td width='80%'><input name=info[title] maxlength=20 value="" style='height:18px;width:150px'></td></tr>
<tr class=td2><td></td>
<td><input type=submit value=' 提 交 ' name='dosubmit'></td></tr>
</form>
</table>
<?php 	
	break;
	case 'list':
	?>
<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<tr class=td4><td colspan=3><strong>分类管理</strong> <a href="?file=type&action=add&lx=<?=$lx?>">添加</a></td></tr>
<tr align='center' class=td3>
<td width='30%'>分类名称</td>
<td width='50%'>所属模型</td>
<td width='20%'>操作</td></tr>
<?php 
if(is_array($t) && !empty($t)){
	foreach($t as $ty){ 
	?>
<tr align=center class=td2 onMouseMove="this.className='td3'" onMouseOut="this.className='td2'">
<td><?=$ty['title']?></td>
<td><span class=Font2><?php if($ty['lx']==1) echo '新闻'; elseif($ty['lx']==2) echo '产品'?></span></td>
<td><span class=Font5><a href="?file=type&action=edit&id=<?=$ty['id']?>">修改</a> | <a href="?file=type&action=del&id=<?=$ty['id']?>">删除</a></span></td>
</tr>
<?php }}?>
</table>
<table width='100%' border=0 cellspacing=0 cellpadding=5 style='border-top:1px #C4D8ED solid'>
<tr><td align=center class=td2><?=$dispage;?>
</td>
</tr>
</table>
<?php 	
	break;
	case 'edit':
	?>
	<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<form name='myform' method='post' Action='<?=SCRIPT_NAME;?>?file=type&action=edit'>
<tr class=td4><td colspan=2><strong>修改分类</strong></td></tr>
<input name=id type=hidden value='<?=$ty['id']?>'>
<tr class=td2><td width='20%'><strong>名称</strong></td>
<td width='80%'><input name=info[title] maxlength=20 value="<?=$ty['title']?>" style='height:18px;width:150px'></td></tr>
<tr class=td2><td></td>
<td><input type=submit value=' 提 交 ' name='dosubmit'></td></tr>
</form>
</table>
	<?php 
	break;
}
?>