{%if $view_purview==1%}
<script type="text/javascript" src="{%$rootdir%}js/pagebotton.js"></script>
<script type="text/javascript">
	$().ready(function () {
		var loadurl = $('#loadurl').val();
		var limit = $('#limit').val();
		var countnum = $('#countnum').val();
		var maxpage = $('#maxpage').val();
		var nowpage = $('#nowpage').val();
		var loadname = $('#loadname').val();
		var pagetextname = $('#pagetextname').val();
		var pagebottonname = $('#pagebottonname').val();
		pageload(loadurl, limit, countnum, maxpage, nowpage, loadname, pagetextname, pagebottonname, 'ajaxFormlist');
	});

	function pageselectCallback(limit, nowpage, maxpage, countnum, pagetextname, loadname, loadurl) {
		$("#nowpage").val(nowpage);

		var limitstard = (limit * nowpage);


		$.ajax({
			type: "get", url: loadurl, data: {'limitstard': limitstard, 'nowpage': nowpage, 'limit': limit}, global: false,
			beforeSend: function () {
				$('#espcms_bbs_loading').removeClass("displaynone");
			},
			success: function (data) {
				$('#espcms_bbs_loading').addClass("displaynone");
				$(loadname).empty().append(data);
			}
		});
		$(pagetextname).text("共有 " + countnum + " 条记录  当前第 " + (Number(nowpage) + 1) + " 页/共有 " + maxpage + "  页   每页显示 " + limit + " 条");
	}
</script>
<form name="ajaxFormlist" id="ajaxFormlist" method="post">
	<input type="hidden" name="loadurl" id="loadurl" value="{%$formlink.ajaxdoclist%}">

	<input type="hidden" name="limit" id="limit" value="{%$limit%}"/>

	<input type="hidden" name="countnum" id="countnum" value="{%$countnum%}"/>

	<input type="hidden" name="maxpage" id="maxpage" value="{%$maxpage%}"/>

	<input type="hidden" name="nowpage" id="nowpage" value="0"/>
	<input type="hidden" name="loadname" id="loadname" value="#bbsajaxlist"/>
	<input type="hidden" name="pagetextname" id="pagetextname" value="#espcms_bbs_pagelist"/>
	<input type="hidden" name="pagebottonname" id="pagebottonname" value="#espcms_bbs_pagination"/>
	<div class="espcms_bbs_loading displaynone" id="espcms_bbs_loading"><img src="{%$rootpath%}images/lightbox-ico-loading.gif"></div>
	<ul class="espcms_bbs_list_all" id="bbsajaxlist"></ul>
</form>
<div class="espcms_page_botton">
	<div id="espcms_bbs_pagelist"></div>
</div>
<div class="espcms_page_botton">
	<div id="espcms_bbs_pagination" class="pagination"></div>
</div>
{%/if%}
{%if $add_purview==1%}
<form name="messformsave" method="post" action="{%$formlink.save%}">
	<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
	<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
	<input type="hidden" name="addtype" value="ajaxlistadd"/>
	<input type="hidden" name="sourcecode" value="{%$source_array.key%}"/>
	<input type="hidden" name="sourceurl" value="{%$source_array.url%}"/>
	<input type="hidden" name="sourcetitle" value="{%$source_array.title%}"/>
	<input type="hidden" name="btid" value="{%$type_read.btid%}"/>
	<div class="espcms_bbs_form pt20">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div class="title"><div class="messageicon"></div><div class="messtitle">网站留言</div></div>
		<div class="content">
			<div class="espcms_form_group">
				<label for="username" class="control_label">姓名</label>
				<div class="control_required"><input type="text" name="addname" id="addname" class="col5 infoInput"/></div>
			</div>
			<div class="espcms_form_group">
				<label for="username" class="control_label">Email</label>
				<div class="control_required"><input type="text" name="email" id="email" class="col5 infoInput"/></div>
			</div>
			<div class="espcms_form_group">
				<label for="content" class="control_label">内容</label>
				<div class="control_required">
					<textarea name="content" id="content" rows="6" class="col11 infoInput"></textarea>
				</div>
			</div>
			{%if $type_read.isseccode==1%}
			<div class="espcms_form_group">
				<label for="username" class="control_label">验证码</label>
				<div class="control_required">
					<input type="text" id="seccode" name="seccode" class="infoInput" maxlength="4" size="5" style="text-transform: uppercase;"/>
					<img title="点击更换验证码" id="memberseccodesrc" onclick="sessionimg('memberseccodesrc', '{%$rootdir%}')" src="{%$seccodelink%}" style="cursor: pointer;height:27px" align="absmiddle"/>
				</div>
			</div>
			{%/if%}
			<div class="espcms_form_group">
				<label class="control_label"> </label>
				<div class="control_required"><input type="submit" id="submit" class="button blue2" value="确认提交"> </div>
			</div>
		</div>
		<b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>
	</div>
</form>
{%/if%}