<?php
	$title='添加文章';
    require ('./header.php');
?>
<script charset="utf-8" src="./editor/kindeditor.js"></script>
<script charset="utf-8" src="./editor/lang/zh_CN.js"></script>
<div class="mdui-container" style="margin-top: 4%;">
	<div class="panel panel-default">
		<div class="panel-heading"><b><?php echo $lang->admin->add_wz;?></b></div>
		<div class="panel-body">
			<form action="./submit.php" method="post">
				<input type="text" value="wz" name="from" style="display: none;">
				<div class="input-group">
					<span class="input-group-addon" id="basic-addon1">名称</span>
					<input type="text" class="form-control" placeholder="请输入文章标题[必填]" aria-describedby="basic-addon1" name="name" required>
				</div>
				<br>
				<div class="input-group">
					<span class="input-group-addon" id="basic-addon1">推荐</span>
					<input type="number" class="form-control" placeholder="请输入[必填，且只能填数字0或1,其中1代表推荐]" aria-describedby="basic-addon1" name="tui" required>
				</div>
				<br>
				<div class="input-group">
					<span class="input-group-addon" id="basic-addon1">分类</span>
					<select name="sortname" class="form-control" required>
					 <option value="">请选择站点分类[必选]</option>
						<?php
							mysql_query("set names utf8");
							$result = mysql_query("SELECT * FROM zzdh_sortwz order by sid asc");
							while($row = mysql_fetch_array($result))
							{
						?>
						<option value="<?php echo $row['sortname'];?>"><?php echo $row['sortname'];?></option>
						<?php }?> 
					</select>
				</div>
				<br>
				<div class="input-group">
					<span class="input-group-addon" id="basic-addon1">文章内容</span>

					<textarea id="content" rows="15" class="form-control" name="introduce"></textarea>
				</div>
				<br>
			    <div style="text-align: center;">
					<input type="submit" class="btn btn-info" style="width: 80%;" value="添加">
			    </div>
			</form>
		</div>
	</div>
</div>
<script>loadEditor('content');</script>
<?php
    require ('./footer.php');
?>