<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>数据调用</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
	$('#modelid').val('<?php echo $modelid;?>');
	});
</script>
</head>
<style type="text/css">
body,table,tr,td,input{font-family:"宋体"}
</style>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="javascript:void(0);" class="on">会员调用</a></li>			
		</ul>
	</div>
	<div class="main">
	<fieldset>
		<legend>操作提示</legend>
		1：通过内容调用可以方便的调用所有内容数据； 2：更多帮助文档请参看http://doc.dircms.net/
	</fieldset>	
		<table cellspacing="0" class="sub">
			<tr>
				<td colspan="2" height="30" style="padding-left:10px">
				会员模型：  
				<?php echo $modelid_select;?>
				</td>
			</tr>
			<tr>
				<td colspan="2" height="30" style="padding-left:10px">
				读取条数：  
				<input type="text" id="number" size="5" value="10" /> 条 
				&nbsp;&nbsp;分页：<input type="checkbox" class="checkbox" id="ispage" value="$page" />是
				</td>
			</tr>
			<tr>
				<td colspan="2" height="30" style="padding-left:10px">
				排序方式：  
				<select id="orderby">
					<option value="id ASC" >ID 升序</option>
					<option value="id DESC" selected>ID 降序</option>
					<option value="point ASC" >积分 升序</option>
					<option value="point DESC" >积分 降序</option>
					<option value="amount ASC" >资金 升序</option>
					<option value="amount DESC" >资金 降序</option>
					<option value="regtime ASC" >注册时间 升序</option>
					<option value="regtime DESC" >注册时间 降序</option>
					<option value="logintime ASC" >登录时间 升序</option>
					<option value="logintime DESC" >登录时间 降序</option>
					<option value="logintimes ASC" >登录次数 升序</option>
					<option value="logintimes DESC" >登录次数 降序</option>
				</select>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="padding-left:10px">
				显示模板：<br />
				<textarea cols="120" id="tlpid" rows="13" style="font-family:'宋体'"><a href="{{mydc:spaceurl}}" target="_blank">{{mydc:username}}</a>&nbsp;{{date('Y-m-d H:i:s',mydc:regtime)}}<br /></textarea>
				</td>
			</tr>
			<tr>
				<td height="40" colspan="2" align="center">
				<input type="button" onclick="get_tag();" value="生成会员调用标记" class="button" />
				</td>
			</tr>
			<tr>
			  <td colspan="2" style="padding-left:10px">
			  输出结果<br />
			  <span id="msg" style="color:#ff0000; font-family:'宋体'"></span><br />
			 <textarea cols="120" rows="13" id="resultid" style="font-family:'宋体'"></textarea>
			  </td>
			</tr>
			<tr>
				<td colspan="2" height="100"></td>
			</tr>
		</table>
		<script language="javascript">
			function get_tag()
			{
				var ispage=$('#ispage').attr('checked')==true?'$page':'0';
				$('#resultid').val('{{dir:member modelid="'+$('#modelid').val()+'" row="'+$('#number').val()+'" orderby="'+$('#orderby').val()+'" ispage="'+ispage+'"}}\n'+$('#tlpid').val()+'\n{{/dir:member}}\n');
				$('#msg').html('↓将以下代码贴到模板的对应位置');
			}
		</script>
	</div>
</div>
</body>
</html>