<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>发布<?php echo $cInfos['typename'];?>-会员中心-<?php echo $cfg_webname;?></title>
		<script src="<?php echo $cfg_cmsurl;?>/static/web/js/jquery.min.js"></script>
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/style.css">
		<script src="<?php echo $cfg_cmsurl;?>/static/web/js/user.album.js"></script>
	</head>
	<body class="body-bg">
		<?php pasterTempletDiy('top.htm');?>
		<main class="container py-3">
			<div class="row">
				<div class="col-md-12">
					<div class="pannel-main-container shadow-sm rounded">
						<nav class="navbar navbar-expand-lg p-0">
							<ol class="breadcrumb mr-auto">
								<li class="breadcrumb-item"><a href="<?php echo $cfg_memberurl;?>/">会员中心</a></li>
								<li class="breadcrumb-item">发布<?php echo $cInfos['typename'];?></li></li>
							</ol>
							<span class="navbar-text"><a href="javascript:location.href='content_list.php?channelid=<?php echo $channelid;?>'" class="btn btn-outline-success btn-sm">返回</a></span>
						</nav>
						<form name="addcontent" action="album_add.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
							<input type="hidden" name="dopost" value="save">
							<input type="hidden" name="channelid" value="<?php echo $channelid;?>">
							<input type="hidden" name="imagebody" id="imagebody" value="">
							<input type="hidden" id="litpic" name="litpic" value="">						
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">标题</label>
								<div class="col-sm-10"><input type="text" name="title" id="title" class="form-control" placeholder="请输入标题"></div>
							</div>
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">标签</label>
								<div class="col-sm-10"><input type="text" name="tags" id="tags" class="form-control" placeholder="请输入标签"></div>
							</div>
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">缩略图</label>
								<div class="col-sm-10">
									<img id="imgLitpic" src="/static/web/img/thumbnail.jpg" class="thumbnail-md mr-3">
									<span class="btn btn-success btn-sm" id="btnUploadLitpic">上传缩略图</span>
									<input id="iptLitpic" type="file" name="iptLitpic" class="d-none">
								</div>
							</div>
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">作者</label>
								<div class="col-sm-10"><input type="text" name="writer" id="writer" class="form-control" value="<?php echo $cfg_ml->M_UserName?>"></div>
							</div>
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">发布栏目</label>
								<div class="col-sm-10">
									<?php
									$typeOptions = GetOptionList(0,$channelid);
									echo "<select name='typeid'  class='form-control'>";
									echo "<option value='0' selected>请选择栏目</option>";
									echo $typeOptions;
									echo "</select>";
									?>
								</div>
							</div>
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">描述</label>
								<div class="col-sm-10"><textarea name="description" id="description" class="form-control" placeholder="请输入描述"></textarea></div>
							</div>
							<?php PrintAutoFieldsAdd(stripslashes($cInfos['fieldset']),'autofield');?>
							<div class="form-group row">
								<label class="col-sm-2 col-form-label">正文</label>
								<div class="col-sm-10"><?php GetEditor("body","",400,"Member");?></div>
							</div>
							<input name="maxwidth" type="hidden" id="maxwidth" value="<?php echo $cfg_album_width;?>">
							<input name="prow" type="hidden" value="<?php echo $cfg_album_row;?>">
							<input name="pcol" type="hidden" value="<?php echo $cfg_album_col;?>">
							<input name="ddmaxwidth" type="hidden" value="<?php echo $cfg_album_ddwidth;?>">
							<div class="form-group">
								<label>表现方式：</label>
								<label><input type="radio" name="pagestyle" id="pagestyle1" onclick="checkMuList()" value="1" <?php if ($cfg_album_style==1) echo " checked='checked'";?>> 多页多图显示（适用于表情等）</label>
								<label><input type="radio" name="pagestyle" id="pagestyle2" onclick="checkMuList()" value="2" <?php if ($cfg_album_style==2) echo " checked='checked'";?>> 多页单图显示（幻灯）</label>
								<label><input type="radio" name="pagestyle" id="pagestyle3" onclick="checkMuList()" value="3" <?php if ($cfg_album_style==3) echo " checked='checked'";?>> 多行多列显示（缩略图）</label>
								<div id="spagelist" style="display:none">每页图片数：<input name="pagpicnum" id="pagpicnum" class="form-control w-25" value="<?php echo $cfg_album_pagesize;?>"></div>
							</div>
							<div class="form-group">
								<span>图片数目：<input type="text" name="picnum" value="5" id="picnum" class="form-control w-25"></span>
								<button type="button" name="kkkup" id="kkkup2" class="btn btn-success btn-sm" onclick="MakeUpload(0);">添加</button>（最大60幅）
							</div>
							<div id="uploadfield"></div>
							<script>
								MakeUpload(2);
							</script>
							<div class="text-center">
								<button type="submit" class="btn btn-success btn-sm">提交</button>
								<button type="reset" class="btn btn-outline-success btn-sm" onclick="location.reload();">重置</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</main>
		<?php pasterTempletDiy('foot.htm');?>
		<?php include(DEDEMEMBER."/templets/widget_litpic.htm");?>
	</body>
</html>