<?php $title = '编辑日记 - '.setting('webname');?>
<?php include_once tpl('globalHeader');;?>
<div class="nav">编辑:<?php echo ilink($diary['subject'], url('system', array('s'=>'member','c'=>'diary','a'=>'read','id'=>$diary['id'])));?></div>
<form action="<?php url('system',array('s'=>'member','c'=>'diary','a'=>'edit', 'id'=>$diary['id']));?>" method="post">
标题:<input type="text" name="subject" maxlength="30" size="20" value="<?php echo $diary['subject'];?>" />
<br/>
摘要:<textarea rows="4" style="width: 99%" name="abstract"><?php echo $diary['abstract'];?></textarea>
    (小于200个字，不填默认截取内容的前面50个字)
<br/>
内容:<textarea rows="6" style="width: 99%" name="content"><?php echo $diary['content'];?></textarea>
<br/>
分类:<select name="type" value="<?php echo $diary['type'];?>"><option value="0">选择分类</option><?php if (!empty($typeList)):?><?php foreach ($typeList as $type):?><option value="<?php echo $type['id'];?>"<?php if ($type['id'] == $diary['tid']):?> selected="selected"<?php endif;?>><?php echo $this->filter($type['name']);?></option><?php endforeach;?><?php endif;?></select>
<br/>
隐私设置:
<select name="privacy">
	<option value="0"<?php if (0 == $diary['privacy']):?> selected="selected"<?php endif;?>>公开日志(任何人都可以访问)</option>
	<option value="1"<?php if (1 == $diary['privacy']):?> selected="selected"<?php endif;?>>只有我的好友能访问</option>
	<option value="2"<?php if (2 == $diary['privacy']):?> selected="selected"<?php endif;?>>私人日志(只有我自己能访问)</option>
</select>
<br/>
评论设置:<select name="comment">
	<option value="2"<?php if (2 == $diary['iscomment']):?> selected="selected"<?php endif;?>>所有人均可评论</option>
	<option value="1"<?php if (1 == $diary['iscomment']):?> selected="selected"<?php endif;?>>我的好友能评论</option>
	<option value="0"<?php if (0 == $diary['iscomment']):?> selected="selected"<?php endif;?>>禁止评论</option>
</select>
<br/>
访问密码:<input type="text" name="password" maxlength="10" value="<?php echo $diary['password'];?>" />
<br/>最长10个字，设置后其他人阅读需要输入密码，不用密码请留空
<br/>
置顶:<select name="toped"><option value="0"<?php if (0 == $diary['istoped']):?> selected="selected"<?php endif;?>>否</option><option value="1"<?php if (1 == $diary['istoped']):?> selected="selected"<?php endif;?>>是</option></select>
<br/>
<input type="submit" value="保存日志" />

<?php include_once tpl('globalFooter');?>