<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%=Property.bbsName%>
		</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<link href="<%=CurrentSkinPath%>style.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="templates/<%=CurrentTemplateName%>/scripts/common.js"></script>
		<script type="text/javascript" language="javascript" src="templates/<%=CurrentTemplateName%>/scripts/jquery.js"></script>
		<script type="text/javascript" language="javascript" src="templates/<%=CurrentTemplateName%>/scripts/thickbox.js"></script>		
	</HEAD>
	<script type="text/javascript" language="javascript" src="templates/scripts/dvajax.js"></script>
	<script type="text/javascript" language="javascript">
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
//extra height in px to add to iframe in FireFox 1.0+ browsers
var FFextraHeight=getFFVersion>=0.1? 16 : 0 
function dyniframesize(iframename) {
   var pTar = null;
   if (parent.$)
   {
     pTar = parent.$(iframename);
   }
   else{
     eval('pTar = ' + iframename + ';');
   }

   if (pTar && !window.opera){
     //begin resizing iframe
     pTar.style.display="block"    
     if (document.contentDocument && document.contentDocument.body.offsetHeight){
       //ns6 syntax
       pTar.height = document.contentDocument.body.offsetHeight+FFextraHeight; 
     }
     else if (parent.document.body.scrollHeight && document.body.scrollHeight){
       //ie5+ syntax
       pTar.height =document.body.scrollHeight;
     }
   }

}


	</script>
	<body MS_POSITIONING="GridLayout">
		<link href="<%=CurrentSkinPath%>style.css" rel="stylesheet" type="text/css" />
		<!--{if(Get("option")=="1")}-->
		<form id="addform" method="get" action="user_invite.aspx">
		<div id="tips" style="position:absolute; border:1px solid #CFBA67;padding:0px 3px;color:gray;display:none;line-height:22px; background:#FFFFE6 url(templates/<%=CurrentTemplateName%>/images/icon_warning.gif) no-repeat; text-indent:20px;"></div>
			<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; "
				width="100%" border="0" cellspacing="0" cellpadding="0" id="GetCodeInput">
				<tr>
					<td class="green">获取邀请码数量</td>
					<td><input type="text" id="CodeNum" name="CodeNum" onkeyup="this.value=this.value.replace(/[^\d,]+/g,'')"
							maxlength="6" onFocus="IEvent('focus',this);tips(this,'输入邀请码数量',135)"
					onBlur="IEvent('blur',this);outtips();getMoneyandEP()" onMouseOver="IEvent('mouseover',this)"
					onMouseOut="IEvent('mouseout',this)"></td>
				</tr>
				<tr>
					<td class="green">申请花费金币:</td>
					<td><font color="red"><span id="usermoney" name="usermoney"></span></font> 个</td>
				</tr>
				<tr>
					<td class="green">申请花费积分:</td>
					<td><font color="red"><span id="userEP" name="userEP"></span></font> 分</td>
				</tr>
				<tr>
					<td class="green">说明:</td>
					<td><div style="float:left">您共有金钱:<font color="red"><span id="intmoney"></span></font>,积分:<font color="red"><span id="intUserEP"></span></font>。当一个被邀请者注册成功，您将获得金钱:<font color="red"><span id="InvitorAddMoney"></span></font>，积分:<font color="red"><span id="InvitorAddEP"></span></font></div>
					</td>
				</tr>
				<tr>
					<td colspan="2">
					<input type="hidden" id="act" name="act" value="add" />
					<input name="submit" type="button" class="button_off" onMouseOver="this.className='button_on'"
					onMouseOut="this.className='button_off'" onclick="submitonce_invite_code(this); " value="获取邀请码" ID="Submit1" />
						</td>
				</tr>
			</table>
		</form>
		<!--{else if(Get("option")=="2")}-->
		<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left;"
			width="100%" border="0" cellspacing="0" cellpadding="0" id="CanUseCode">
			<tr id="user_nav">
				<td class="green">邀请码</td>
				<td class="green">申请日期</td>
				<td class="green">过期日期</td>
				<td class="green">操作</td>
				<td class="green">服务</td>
			</tr>
			<!--{foreach(System.Data.DataRow dr in InviteCode.GetCode(conn,user.UserID).Rows)}-->
			<tr>
				<td><input id="<%=dr["code"].ToString()%>" value="<%=dr["code"].ToString()%>" readonly="true"></td>
				<td><%=dr["InviteDate"].ToString()%></td>
				<td><%=dr["EndDate"].ToString()%></td>
				<td><a  onclick="oCopy(document.getElementById('<%=dr["code"].ToString()%>'))" style="cursor:hand">复制</a>&nbsp;&nbsp;|&nbsp;&nbsp;<span id="<%=dr["code"].ToString()+"2"%>"><a id="<%=dr["code"].ToString()+"1"%>" onclick="MarkSend('<%=dr["code"].ToString()%>')" style="cursor:hand">标记为已发送</a></span></td>
				<td><a title="发送至邮箱" id="sendemail"href="send_email.aspx?code=<%=dr["code"].ToString()%>" target="_blank" >发送至邮箱</a></td>
			</tr>
			<!--{endforeach}-->
		</table>
		<!--{else if(Get("option")=="3")}-->
		<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; "
			width="100%" border="0" cellspacing="0" cellpadding="0" id="UsedCode">
			<tr id="user_nav">
				<td class="green">邀请码</td>
				<td class="green">注册者</td>
				<td class="green">申请日期</td>
			</tr>
			<!--{foreach(System.Data.DataRow dr1 in InviteCode.GetUsedCode(conn,user.UserID).Rows)}-->
			<tr>
				<td><%=dr1["code"].ToString()%></td>
				<td><a target="_parent" href="user_info.aspx?userid=<%=dr1["reguserid"].ToString()%>"><%=dr1["Regusername"].ToString()%></a></td>
				<td><%=dr1["InviteDate"].ToString()%></td>
			</tr>
			<!--{endforeach}-->
		</table>
		<!--{else if(Get("option")=="4")}-->
		<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; "
			width="100%" border="0" cellspacing="0" cellpadding="0" id="InvalidCode">
			<tr id="user_nav">
				<td class="green">邀请码</td>
				<td class="green">申请日期</td>
			</tr>
			<!--{foreach(System.Data.DataRow dr2 in InviteCode.GetInvalidCode(conn,user.UserID).Rows)}-->
			<tr>
				<td><%=dr2["code"].ToString()%></td>
				<td><%=dr2["InviteDate"].ToString()%></td>
			</tr>
			<!--{endforeach}-->
		</table>
		<!--{else if(Get("option")=="5")}-->
		<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left;"
			width="100%" border="0" cellspacing="0" cellpadding="0" id="SendCode">
			<tr id="user_nav">
				<td class="green">邀请码</td>
				<td class="green">申请日期</td>
			</tr>
			<!--{foreach(System.Data.DataRow dr3 in InviteCode.GetSendCode(conn,user.UserID).Rows)}-->
			<tr>
				<td><%=dr3["code"].ToString()%></td>
				<td><%=dr3["InviteDate"].ToString()%></td>
			</tr>
			<!--{endforeach}-->
		</table>
		<!--{endif}-->
		<div id="options" name="optioin"></div>
	</body>
	<div style="clear:both"></div>
</HTML>
