{template header.html}
<script type="text/javascript">
$(function() {
	SwapTab(0);
});
function dr_to_code(name) {
	var throughBox	= $.dialog.through;
	var dr_Dialog = throughBox({title: "生成结果"});
	var _data = $("#"+name).serialize();
	$.ajax({type: "POST", url:"{dr_url($furi.'tag')}", dataType:'text', data:_data,
	    success: function (text) {
			dr_Dialog.content(text);
	    },
	    error: function(HttpRequest, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + HttpRequest.statusText + "\r\n" + HttpRequest.responseText);
		}
	});
}
</script>
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		{$menu}
	</div>
	<div class="bk10"></div>
	<div class="table-list col-tab" id="myform">
		<ul class="tabBut cu-li">
			<li onclick="SwapTab(0)">会员组循环</li>
			<li onclick="SwapTab(1)">会员等级循环</li>
		</ul>
		<div class="contentList pad-10">
			<div id="cnt_0" style="display:none" class="dr_hide">
				<form action="" id="member_group" name="member_group" method="post">
       			<input name="action" type="hidden" value="member_group" />
				<table width="100%" class="table_form">
                <tr>
					<th width="200">返回变量： </th>
					<td>
                    <input class="input-text" type="text" name="data[return]" value="{$return_var}" size="10" />
					</td>
				</tr>
                <tr>
                    <th style="border:none;">&nbsp;</th>
                    <td><input class="button" type="button" name="button" onclick="dr_to_code('member_group')" value="生成代码" /></td>
                </tr>
				</table>
				</form>
			</div>
			<div id="cnt_1" style="display:none" class="dr_hide">
				<form action="" id="member_level" name="member_level" method="post">
       			<input name="action" type="hidden" value="member_level" />
       			<input name="data[module]" type="hidden" value="index" />
				<table width="100%" class="table_form">
                <tr>
					<th width="200">会员组id： </th>
					<td>
                    <input class="input-text" id="gid" type="text" name="data[gid]" value="0" size="10" />
                    <select onchange="$('#gid').val(this.value)">
                    <option value="">--</option>
                    {list action=cache name=member.group}
                    {if $t.id>2}<option value="{$t.id}">{$t.name}</option>{/if}
                    {/list}
                    </select>
					</td>
				</tr>
                <tr>
					<th width="200">返回变量： </th>
					<td>
                    <input class="input-text" type="text" name="data[return]" value="{$return_var}" size="10" />
					</td>
				</tr>
                <tr>
                    <th style="border:none;">&nbsp;</th>
                    <td><input class="button" type="button" name="button" onclick="dr_to_code('member_level')" value="生成代码" /></td>
                </tr>
				</table>
				</form>
			</div>
			<div id="cnt_2" style="display:none" class="dr_hide">
				
			</div>
			<div id="cnt_3" style="display:none" class="dr_hide">
				
			</div>
			<div id="cnt_4" style="display:none" class="dr_hide">
				
			</div>
			<div id="cnt_5" style="display:none" class="dr_hide">
				
			</div>
			<div id="cnt_6" style="display:none" class="dr_hide">
				
			</div>
			<div id="cnt_7" style="display:none" class="dr_hide">
				
			</div>
			<div id="cnt_8" style="display:none" class="dr_hide">
				
			</div>
		</div>
	</div>
</div>

{template footer.html}