<?php
	!defined('DIRCMS_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>
<title>编辑内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script src="images/js/jquery.min.js"></script>
<script src="images/js/check.func.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
	checkForm(0);
	$('#info_content_point').val(<?php echo $point;?>);
	$('#info_catid_').val(<?php echo $catid;?>);
});
$(document).ready(function(){$("#info_parentid_").val(<?php echo $parentid;?>);});
$(function () {
	$(".tab a").each(function () {
		$(this).click(function () {
			$(".tab a").each(function(){
				$(this).attr('class','');
				$("#tab_" + $(this).attr('id')).css('display','none');
			});
			$(this).attr('class', 'on');
			$("#tab_" + $(this).attr('id')).css('display','block');

		});
	});
});
</script>
</head>
<body>
<div id="wrap">
	<div class="tab">
	<ul>
		<li><a href="javascript:void(0);" class="on" id="1">基本内容</a></li>
		<li><a href="javascript:void(0);" id="2">高级内容</a></li>
	</ul>
	</div>
	<div class="main">
		<fieldset>
		<legend>操作提示</legend>
		如果点击 <font style="background:#2782D6; color:#fff; padding:3px">保存内容</font> 时提交不了，仔细检查下是不是某项没有填写正确。
		</fieldset>
	<form action="" method="post" name="myform" enctype="multipart/form-data">		
	<input type="hidden" name="do_submit" value="1" />
	<input type="hidden" name="id" value="<?php echo $id;?>" />
	<input type="hidden" name="inputtime" value="<?php echo $inputtime;?>" />
	<input type="hidden" name="info[url]" value="<?php echo $url;?>" />
	<input type="hidden" name="info[catid]" value="<?php echo $catid;?>" />
	<input type="hidden" name="forwardurl" value="<?php echo '?file=content&action=edit&catid='.$catid.'&id='.$id;?>" />
		<table width="100%">
		<tr><td>
			
			<div id="tab_1">
			<table class="sub">
				<tr>
					<td width="150" align="right">所属栏目：</td>
					<td><?php echo $catid_select;?></td>
				</tr>
				<?php if($base_r)foreach($base_r as $val){ ?>
				<tr>
					<td width="150" align="right"><?php echo $val['name'];?>：</td>
					<td>
					<?php echo $val['form'];?> <?php echo $val['danwei']?$val['danwei']:'';?>
					<span><?php echo $val['tips'];?></span>
					</td>
				</tr>
				<?php }?>
				<tr>
					<td width="150" align="right">内容选项：</td>
					<td>
						<div style="width:647px; height:55px; line-height:2em; background-color:#ffffcc; border:#FFCC00 1px solid">
						<table width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<td width="30%"><input type="checkbox" class="checkbox" value="1"  name="auto_image" />自动读取远程图片到本地</td>
							<td><input type="checkbox" class="checkbox" value="1"  name="auto_description" checked="checked" />截取内容前255字符作为摘要</td>
						</tr>
						<tr>
							<td width="30%"><input type="checkbox" class="checkbox" value="1"  name="auto_image" />自动给图片加 ALT 标签</td>
							<td><input type="checkbox" class="checkbox" checked="checked" value="1"  name="auto_thumb" />获取第 <input type="text" name="imgindex" value="1" size="1" /> 张图片作为标题图片</td>
						</tr>
						</table>
						</div>
					</td>
				</tr>
				<tr>
					<td width="150" align="right"><font color="#FF3300" face="宋体">*</font> 内容：</td>
					<td>
					<?php echo $f->editor('content',$content,'','','',0,50,650,350);?>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">发布状态：</td>
					<td>
					<?php echo $f->status('status',$status);?>
					</td>
				</tr>
				<tr>
					<td width="150" align="right">开启评论：</td>
					<td>
					<input type="radio" class="radio" name="info[iscomment]" <?php echo $iscomment?'checked="checked"':'';?> value="1" />开启
					<input type="radio" class="radio" name="info[iscomment]" <?php echo $iscomment?'':'checked="checked"';?> value="0" />关闭
					</td>
				</tr>
			</table>
			</div>
		
			<div id="tab_2" style="display:none">
			<table class="sub">
				<tr>
					<td width="150" align="right">转向链接：</td>
					<td><?php echo $f->islink($url,$islink);?></td>
				</tr>
				<tr>
					<td width="150" align="right">内容类型： </td>
					<td>
					<?php echo $f->typeid($typeid,$modelid);?>
					</td>
				</tr>
				<?php if($more_r)foreach($more_r as $val){ ?>
				<tr>
					<td width="150" align="right"><?php echo $val['name'];?>：</td>
					<td>
					<?php echo $val['form'];?> <?php echo $val['danwei']?$val['danwei']:'';?>
					<span><?php echo $val['tips'];?></span>
					</td>
				</tr>
				<?php }?>
				<tr>
					<td width="150" align="right">内容模板： </td>
					<td>
					<?php echo $f->content_tlp($catid,$template);?>
					</td>
				</tr>
			</table>
			</div>

			</td>
		</tr>
		<tr>
			<td align="center">
			<input type="button" onfocus="blur();" value="保存内容" class="button" onclick="doSubmit(this);" />
			<input type="button" onfocus="blur();" value="预览内容" class="button" onclick="this.form.action='?file=<?php echo $file;?>&action=preview';this.form.target='_blank';this.form.submit();" style="margin-left:10px" />
			<input type="button" onfocus="blur();" value="取消返回" class="button" onclick="javascript:history.back();" style="margin-left:10px" />
			</td>
		</tr>
	</table>
	</form>
	</div>
</div>
</body>
</html>