<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
	if(!$module->roleid_check('yp',$_roleid))showmsg_nourl($lang['RETURN_NOPRI']);
?>
<!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=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script language="javascript" src="admin/template/js/css.js"></script>
<script src="images/js/check.func.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		checkForm(0);
		$('#typeid').val('<?php echo $newsinfo['typeid'];?>');
	});
</script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=yp&mod=yp&action=news&ypid=<?php echo $newsinfo['ypid'];?>">新闻管理</a></li>
			<li><a href="javascript:void(0);" class="on">编辑新闻</a></li>	
		</ul>
	</div>
	<div class="main">
	<fieldset>
		<legend><?php echo $lang['RETURN_TIPS'];?></legend>
		1：新闻标题不能为空
	</fieldset>
<?php if(!$ypinfo){?>

		<span style="color:#ff0000">您尚未开通企业店铺, 不能进行此操作, 请先开通!</span>

<?php }else {?>
	<form action="" method="post" name="myform">
	<input type="hidden" name="do_submit" value="1" />
	<input type="hidden" name="id" value="<?php echo $id;?>" />
	<input type="hidden" name="info[ypid]" value="<?php echo $newsinfo['ypid'];?>" />
	<table cellspacing="0" class="sub" width="98%">
		<tr>
			<td width="201" align="right">新闻标题：</td>
			<td width="1084">
			<input type="text"  name="info[title]" datatype="limit" value="<?php echo $newsinfo['title'];?>" min="1" max="100" size="40" />
		  </td>
		</tr>
		<tr>
			<td width="201" align="right">关键字：</td>
			<td>
			<input type="text" size="40" datatype="max" max="100" value="<?php echo $newsinfo['keywords'];?>" name="info[keywords]" />
			<span>多个关键字用,隔开</span>
			</td>
		</tr>
		<tr>
			<td width="201" align="right">新闻来源：</td>
			<td>
			<input type="text" size="24" datatype="max" max="80" value="<?php echo $newsinfo['copyfrom'];?>" name="info[copyfrom]" />
			</td>
		</tr>
		<tr>
			<td width="201" align="right">作者：</td>
			<td>
			<input type="text" size="24" datatype="max" max="80" value="<?php echo $newsinfo['author'];?>"  name="info[author]" />
			</td>
		</tr>
		<tr>
			<td width="201" align="right">Description：</td>
			<td>
			<textarea rows="5" cols="60" name="info[description]"><?php echo $newsinfo['description'];?></textarea>
			</td>
		</tr>
		<tr>
			<td width="201" align="right" valign="top">新闻内容：</td>
			<td>
			<?php echo $form->fckeditor('content',$newsinfo['content']);?>
			</td>
		</tr>
		<tr class="bg2"><td></td><td><input type="button" class="button" onclick="doSubmit(this);" value="保存新闻" /> <input type="button" class="button" onclick="window.location.href='<?php echo ADMIN_FILE;?>?file=yp&mod=yp&action=news&ypid=<?php echo $newsinfo['ypid'];?>'" value="取消返回" /></td></tr>
	</table>
	</form>
<?php }?>
	</div>
</div>
</body>
</html>