<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站后台管理</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="statics/data.input.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>
<script language="javascript">
$(document).ready(function(){
	$('#parentid').val(<?php echo $typeid;?>);
});
</script>
</head>

<body>
	<div class="top-tips">
		<div class="tips-wrap">
			<div class="title">添加新闻分类</div>
			目前只支持3级分类，超过3级可能会影响效率 。带星号项目均不可留空。<a href="<?php echo IN_SYS;?>" target="_blank" style="color:#FF0000">获取帮助</a>
		</div>
	</div>
	<form action="" method="post" name="myform" onsubmit="return datainputcheck('myform');" id="myform" enctype="multipart/form-data">
	<input type="hidden" name="do_submit" value="1" />
	<table class="table-wrap" cellpadding="0" cellspacing="0">
		<?php if($typeid){?>
		<?php $typeinfo=$conobj->typeinfo($typeid);?>
		<input type="hidden" name="info[modelid]" value="<?php echo $typeinfo['modelid'];?>" />
		<?php }else{?>
		<tr>
			<td bgcolor="#EFF7FF" width="15%" class="tb-name">数据模型：<span>*</span></td>
			<td>
				<select name="info[modelid]" title="数据模型">
					<?php foreach($typelist as $r){?>
					<option value="<?php echo $r['id'];?>"><?php echo $r['name'];?></option>
					<?php }?>
				</select>
				<span style="color:#FF0000">&nbsp;注意：添加后不可更改</span>
			</td>
		</tr>
		<?php }?>
		<tr>
			<td bgcolor="#EFF7FF" width="15%" class="tb-name">所属分类<span>*</span></td>
			<td>
				<select name="info[parentid]" id="parentid" title="所属分类">
					<option value="0">一级分类</option>
					<?php echo $conobj->type_select_cat($moduleid,0);?>
				</select>
			</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">分类名称：<span>*</span></td>
			<td><input type="text" size="24" class="input-txt" title="分类名称" name="info[name]" notnull="1" /></td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">SEO关键词：<span>*</span></td>
			<td><input type="text" size="36" class="input-txt" title="SEO关键词" name="info[keywords]" notnull="1" /></td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">SEO描述：<span>*</span></td>
			<td><textarea name="info[description]" class="input-txtarea" cols="55" rows="5" title="SEO描述"></textarea></td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">父栏目模板：<span>*</span></td>
			<td><input type="text" size="16" class="input-txt" title="父栏目模板" name="info[index_tlp]" notnull="1" /></td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">列表页模板：<span>*</span></td>
			<td><input type="text" size="16" class="input-txt" title="列表页模板" name="info[list_tlp]" notnull="1" /></td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">内容页模板：<span>*</span></td>
			<td><input type="text" size="16" class="input-txt" title="内容页模板" name="info[article_tlp]" notnull="1" /></td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">分类排序：<span>*</span></td>
			<td><input type="text" size="4" class="input-txt" title="分类排序" name="info[orderby]" datatype="integer" value="0" /></td>
		</tr>
		<tr>
			<td colspan="2" class="save-td"><input type="submit" class="save-btn" value="保存分类" /></td>
		</tr>
	</table>
	</form>
</body>
</html>
