<!--#include file="../inc/conn.asp" -->

<% 
 '===========================================================================================
	'软件名称：126 cms 视频影视管理系统
	'程序版权：126电影               '咨询QQ：479025
	'开发作者：magicblack(479025)    '官方网站：http://www.126oo.com/
	'Copyright (C) 2009 - ... 126oo.com  All Rights Reserved.
	'郑重声明:
	'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
	'    2、任何个人或组织不得以盈利为目的发布,修改,本软件及其他副本上一切关于版权的信息；
	'    3、126电影保留此软件的法律追究权利；
'==========================================================================================
%>

<%
dim action
action = SafeData("R","action",0)

select case action

case "login"
	call login
case "loginsubmit"
	call loginsubmit
case "logout"
	call logout
case "reg"
	call reg
case "regsave"
	call regsave
case "userinfoedit"
    call userinfoedit
case "userinfoeditsave"
    call userinfoeditsave
case "checkuser"
	response.clear : WriteEnd checkuser
case "playrecords"
	call playrecords
case "Popularize"
	call Popularize
case "earnpoints"
    call earnpoints
case else 
	call main
end select


Function checkuser
	on error resume next
	dim username :	username=SafeData("R","reg_username",0)
	
	Dim rs : Set rs = Database.GetRecordDetail("Tbl_User","U_Name='" & username &"'") 
	if rs.eof then checkuser=  "ok" else checkuser=  "no"
	if err then checkuser=  "err"
	Database.C(rs)
end Function

sub logout
	if app_loginmemory = 1 then
		session("loginverifycode") = ""
		session("username")= ""
		session("logincheck") = ""
	else
		response.cookies("loginverifycode")=""
		response.cookies("username")=""
		response.cookies("logincheck") = ""
	end if
	alerturl "成功退出","?action=login"
end sub


Function checklogin
	checklogin = false
	if app_loginmemory = 1 then
		if not md5(session("loginverifycode")&session("username")&session("userid"))<>session("logincheck") then
			checklogin = true
		end if
	else
		if not  md5(request.cookies("loginverifycode")&request.cookies("username")&request.cookies("userid"))<>request.cookies("logincheck") then
			checklogin = true
		end if
	end if
end Function

sub Popularize
	if not CacheOBJ.chkcache("LyLastDelDate") then
		CacheOBJ.setCache "LyLastDelDate",Date()
	end if
	CacheOBJ.setCache "LyLastDelDate","2009-4-23"
	
	dim userid : userid = SafeData("RQ","userid",0)
	dim Ip,Ly
	Ip = getip()
	Ly=Request.ServerVariables("Http_REFERER")
	
	Dim rs : Set rs = Database.GetRecordDetail("Tbl_User","U_ID=" & userid &"") 
	if not rs.eof then
		dim curnow : curnow = DateTime(now(),2)
		dim sql,rsUV,timelikestr
		timelikestr = "%"
		
		Sql="Select * From Tbl_User_Visit where UV_UserID = " &userid&" and UV_IP ='"&IP&"' and UV_Time like '"&timelikestr&curnow&timelikestr&"'"
		
		set rsUV = Database.GetRecordBySql(sql)
		if rsUV.eof or rsUV.bof then
		
		DataBase.AddRecord "Tbl_User_Visit",Array("UV_UserID:"&userid, "UV_IP:"&Ip,"UV_LY:"&Ly,"UV_Time:"&now())
		DataBase.UpdateRecord "Tbl_User","U_ID = "& userid ,Array("U_PopularizeNum:U_PopularizeNum+1","U_Points:U_Points+1")
		
		
		If DateDiff("d",CacheOBJ.getCache("LyLastDelDate"),Date())<>0 Then
		 Sql="Delete From Tbl_User_Visit where  DateDiff(d,UV_Time,'"&curnow&"') >= 1"
		 Database.dbConn.ExeCute Sql
		 CacheOBJ.setCache "LyLastDelDate",Date()
		End If
		
		end if
	end if
	response.Redirect "../index.asp"
end sub


sub loginsubmit
	dim username,password,loginverifycode,sourceurl
	username = SafeData("RF","username",0)
	password = SafeData("RF","password",0)
	sourceurl = SafeData("RF","sourceurl",0)
	if isN(sourceurl) then sourceurl = "?action=login"
	
	loginverifycode = SafeData("RF","loginverifycode",0)
    password = md5(password)

	if loginverifycode ="" then
		alert "请返回输入确认码。返回后请刷新登陆页面后重新输入正确的信息。"
	end if
	
	Dim rs : Set rs = Database.GetRecordDetail("Tbl_User",array("U_Name:" & username &"","U_PassWord:"&password&""))  
    if rs.eof then 
		alert "用户名或密码不正确!"
	else
		if getData(rs("U_status")) = "0" then 
			Database.C(rs)
			alert "该用户已经被锁定，请联系管理员!"
		else
			dim result : result= DataBase.UpdateRecord("Tbl_User","U_ID = "& rs("u_id") ,Array("U_LoginTime:"&now(),"U_LoginNum:U_LoginNum+1"))    
			if app_loginmemory = 1 then
				session("loginverifycode")=loginverifycode
				session("userid")= rs("u_id")
				session("username")=username
				session("logincheck")= md5(loginverifycode&getData(rs("U_Name"))&rs("u_id"))
			else
				response.cookies("loginverifycode")=loginverifycode
				response.cookies("loginverifycode").Expires=now+1/24
				response.cookies("userid")=rs("u_id")
				response.cookies("userid").Expires=now+1/24
				response.cookies("username")=username
				response.cookies("username").Expires=now+1/24
				response.cookies("logincheck")= md5(loginverifycode&getData(rs("U_Name"))&rs("u_id"))
				response.cookies("logincheck").Expires=now+1/24
				Database.C(rs)
			end if
			alerturl "登陆成功!",sourceurl
		end if
	end if

end sub


sub regsave
	if checkuser <> "ok" then Alert "用户名已存在!" : WriteEnd ""
	dim username,password1,password2,qq,email
	username = SafeData("RF","reg_username",0)
	password1 = SafeData("RF","reg_password1",0)
	password2 = SafeData("RF","reg_password2",0)
	qq= SafeData("RF","reg_qq",0)
	email = SafeData("RF","reg_email",0)
	
	if password1<>password2 then Alert "两次密码不同" : WriteEnd ""
	
	if getStrLen(username)>50 then username=getStrByLen(img,50)
	if getStrLen(password1)>50 then password1=getStrByLen(pwd1,50)
	if getStrLen(email)>50 then email=getStrByLen(email,50)
	if getStrLen(qq)>15 then qq=getStrByLen(qq,15)
	password1 = md5(password1)
	
	Dim result : result = DataBase.AddRecord("Tbl_User",Array("U_Name:"&username, "U_PassWord:"&password1,"U_QQ:"&qq,"U_Email:"&email,"U_RegDate:"&now(),"U_Status:1"))   

If result<>0 Then  
    AlertUrl "注册成功,正在转向首页登陆！","../"
else
	 Alert "注册失败,请联系管理员！"
End If
	
end sub

sub userinfoeditsave
	dim U_ID,U_Name,password1,password2,qq,email
 if app_loginmemory = 1 then 
 	U_ID = session("userid")
	U_Name= session("username")
 else 
 	U_ID = request.Cookies("userid")
	U_Name= request.Cookies("username")
 end if
 
  if isN(U_ID) or isN(U_Name) then  call logout

	password1 = SafeData("RF","password1",0)
	password2 = SafeData("RF","password2",0)
	qq= SafeData("RF","qq",0)
	email = SafeData("RF","email",0)

	if getStrLen(email)>50 then email=getStrByLen(email,50)
	if getStrLen(qq)>15 then qq=getStrByLen(qq,15)
	
	Dim result 
	if password1 <> "" then
		if password1<>password2 then Alert "两次密码不同" : WriteEnd ""
		if getStrLen(password1)>50 then password1=getStrByLen(password1,50)
		password1 = md5(password1)
		result = DataBase.UpdateRecord("Tbl_User","U_ID = "& U_ID ,Array("U_QQ:"&qq, "U_Email:"&email,"U_Password:"&password1))  
	else 
		result = DataBase.UpdateRecord("Tbl_User","U_ID = "& U_ID ,Array("U_QQ:"&qq, "U_Email:"&email))    
	end if

If result<>0 Then  
    AlertUrl "修改成功！","?action=userinfoedit"
else
	 Alert "修改失败,请联系管理员！"
End If

end sub

sub reg
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户管理中心 - 126电影程序CMS</title>
<META content="MSHTML 6.00.3790.4275" name="GENERATOR">
<link href="user.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/ajax.js"></script>
<script type="text/javascript" src="user.js"></script>
</HEAD>
<body>
<DIV id=bar>
 <% call login %>
</DIV>
<DIV class=logo>
<A href="../" target=_blank><IMG src="images/logo.gif"></A>
</DIV>
<DIV class=p-nav>
<DIV style="TEXT-ALIGN: right; MARGIN: 2px 0px; WIDTH: 800px; FLOAT: right">
	<IMG src="images/banner.gif" width=774 height=61>	
</DIV>
</DIV>
<div class="wrap-index">
<DIV id=main>
<form action="index.asp?action=regsave" method="post" id="formUser" name="formUser" onSubmit="return register();">
		<div class="box noline">
			<h2>注册新会员</h2>
			<div class="form_detail">
				<p>
					<label>用户名：</label>
					<input tabindex="1"  type="text" name="reg_username" id="reg_username" class="ipt_tx" style="width:285px;"  maxlength="60" onBlur="checkUser()" /> <span class="red"><span class="require-field">*</span></span>
					<span class="info">6-16个字符(字母、数字)，不分大小写</span>
					<span id="username_notice" class="error" ></span>
				</p>

				<p>
					<label>密码：</label>
					<input tabindex="2"  type="password" name="reg_password1" id="reg_password1" class="ipt_tx" style="width:285px;"  maxlength="32"/> <span class="red">*</span>
					<span id="password_msg" class="error"></span>
				</p>
				<p>
					<label>确认密码：</label>
					<input tabindex="2" type="password" name="reg_password2" id="reg_password2" class="ipt_tx" style="width:285px;" maxlength="32"/> <span class="red"><span class="require-field">*</span></span>
					<span class="info">6-16个字符，支持大小写字母、数字和符号</span>
				</p>
			    <p>
					<label>QQ：</label>
					<input tabindex="3"  type="text" name="reg_qq" id="reg_qq" class="ipt_tx" style="width:285px;"  maxlength="20" />
				</p>
				<p>
					<label>电子邮件：</label>
					<input tabindex="4" type="text" name="reg_email" id="reg_email"  class="ipt_tx" style="width:285px;" maxlength="60" /> <span class="red"><span class="require-field">*</span></span>
					<span class="info">当您收到新的消息，我们会通过邮件通知您</span>
				</p>
				
				<p class="split"></p>
				<p>
					<button tabindex="17" name="Submit" id="Submit" type="submit"  class="btn blyellow">确认注册</button>
				</p>
			</div>
		</div>
		</form>
	</div>
<DIV id=footer></DIV>
</Div>
</body>
</HTML>
<%
end sub


sub login
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户管理中心 - 126电影程序CMS</title>
<META content="MSHTML 6.00.3790.4275" name="GENERATOR">
<link href="user.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/ajax.js"></script>
<script type="text/javascript" src="user.js"></script>
</head>
<body>
<DIV id="bar">
 <%if not checklogin then 
  dim loginverifycode : loginverifycode= getrnd
  dim sourceurl : sourceurl = SafeData("R","url",0)
  
  if app_loginmemory = 1 then 
  	session("loginverifycode") = loginverifycode
  else 
  	response.cookies("loginverifycode") = loginverifycode
  end if
 %>
<div class="p-nav">
<ul>
	<li>
  <form action="index.asp?action=loginsubmit" id="LOGINFORM" name="LOGINFORM" method="post" action="javascript:signIn()">
    <label for="username">会员:</label>
    <input id="username" name="username"  type="text" size="15" value="" />
    <label for="password">密码:</label>
    <input id="password" name="password"  type="password" size="15" />
	<label for="password">验证码:</label>
    <input id="loginverifycode" name="loginverifycode"  type="text" size="4" value="<%=loginverifycode%>"/>
    <input id="sourceurl" name="sourceurl"  type="hidden" value="<%=sourceurl%>"/>
  </li>
	<li>
        <input type="submit" class="login-btn" value="登录" />
        <input type="reset" class="login-btn" value="重置" />
      </li>
      <li>
        <a href="?action=reg" target="_blank">&gt;&gt;注册新会员</a>
      </li>
</ul>
  </form>
</div>
 <%
 else
 dim userid,username,userpoints
 if app_loginmemory = 1 then 
 	userid = session("userid")
	username= session("username")
 else 
 	userid = request.Cookies("userid")
	username= request.Cookies("username")
 end if
 if isN(userid) or isN(username) then  call logout
 dim rs : Set rs = Database.GetRecordDetail("Tbl_User",array("U_Name:" & username &"","U_ID:"&userid&""))  
 userpoints = rs("U_Points")
 Database.C(rs)
 %>
<DIV class=p-nav>
<UL>
<LI><%=username%>，欢迎您回来！ </LI>
<LI>账户等级：计点 </LI>
<LI>账户积分：<%=userpoints%> </LI>
<LI>| <A href="?action=main" target="_blank">进入用户中心</A> | <A href="?action=logout">退出</A> </LI>
</UL>
</DIV>
 <%end if%>
</div>

<%

end sub

sub main

call head
%>

<%
dim U_ID,U_Name,U_QQ,U_Email,U_RegDate,U_Status,U_Points,U_LoginTime,U_LoginNum,U_IP,U_PopularizeNum

 if app_loginmemory = 1 then 
 	U_ID = session("userid")
	U_Name= session("username")
 else 
 	U_ID = request.Cookies("userid")
	U_Name= request.Cookies("username")
 end if
 
if isN(U_ID) or isN(U_Name) then  call logout
 dim rs : Set rs = Database.GetRecordDetail("Tbl_User",array("U_Name:" & U_Name &"","U_ID:"&U_ID&""))  
 U_QQ = getData(rs("U_QQ"))
 U_Email = getData(rs("U_Email"))
 U_RegDate = getData(rs("U_RegDate"))
 U_Status = getData(rs("U_Status"))
 U_Points = getData(rs("U_Points"))
 U_LoginTime = getData(rs("U_LoginTime"))
 U_LoginNum = getData(rs("U_LoginNum"))
 U_PopularizeNum = getData(rs("U_PopularizeNum"))
 U_IP = getip()
 Database.C(rs)
%>

<TABLE border=0 cellPadding=0 cellSpacing=0 width=760 valign=top align=center>
	<tr>
		<td height="30" align=left style="border-bottom: #999966 1px solid;">&nbsp;&nbsp;欢迎 <font color="#CC0000"><%=U_Name%></font> 登录会员区
		</td>
	</tr>
	<tr>
		<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#F4F4F4">
  <tr>
    <td width="18%" height="32" align="center" bgcolor="#FFFFFF">帐号：</td>
    <td width="25%" align="left" bgcolor="#FFFFFF">&nbsp;<%=U_Name%></td>
    <td width="24%" align="center" bgcolor="#FFFFFF">注册时间：</td>
    <td width="33%" align="left" bgcolor="#FFFFFF">&nbsp;<%=U_RegDate%></td>
    </tr>
  <tr>
    <td width="18%" height="32" align="center" bgcolor="#FFFFFF">等级：</td>
    <td width="25%" align="left" bgcolor="#FFFFFF">&nbsp;<font color="#FF0000">观众</font></td>
    <td width="24%" align="center" bgcolor="#FFFFFF">最后登录：</td>
    <td align="left" bgcolor="#FFFFFF">&nbsp;<%=U_LoginTime%></td>
    </tr>
  <tr>
    <td width="18%" height="32" align="center" bgcolor="#FFFFFF">Qicq：</td>
    <td width="25%" align="left" bgcolor="#FFFFFF">&nbsp;<%=U_QQ%></td>
    <td width="24%" align="center" bgcolor="#FFFFFF">当 前 IP：</td>
    <td align="left" bgcolor="#FFFFFF">&nbsp;<%=U_IP%></td>
    </tr>
  <tr>
    <td width="18%" height="32" align="center" bgcolor="#FFFFFF">积分：</td>
    <td width="25%" align="left" bgcolor="#FFFFFF">&nbsp;<%=U_Points%> 点</td>
    <td width="24%" align="center" bgcolor="#FFFFFF">登陆次数：</td>
    <td align="left" bgcolor="#FFFFFF">&nbsp;<%=U_LoginNum%></td>
    </tr>
  <tr>
    <td width="18%" height="32" align="center" bgcolor="#FFFFFF">邮箱：</td>
    <td width="25%" align="left" bgcolor="#FFFFFF">&nbsp;<%=U_Email%></td>
    <td width="24%" align="center" bgcolor="#FFFFFF">推广次数：</td>
    <td align="left" bgcolor="#FFFFFF">&nbsp;总推广 <font color="#FF0000"><%=U_PopularizeNum%></font> 次</td>
    </tr>
  
  <tr bgcolor="#FFFFFF">
    <td width="18%" height="28" align="center" bgcolor="#FFFFFF"><font color="#FF0000">您的推广链接：</font></td>
    <td colspan="3" align="left" bgcolor="#FFFFFF">&nbsp;<input name="page_url"  value="http://<%=app_siteurl%>/user/?action=Popularize&userid=<%=U_ID%>" size="40" style="border: 1 solid #000000">&nbsp;<input type="button" name="Button" class="button1" value="点击复制您的推广连接" onClick="document.getElementById('page_url').select();document.getElementById('page_url').createTextRange().execCommand('Copy');alert('复制成功');"></td>
    </tr>
	<tr bgcolor="#FFFFFF">
    <td width="18%" height="28" align="center" bgcolor="#FFFFFF"></td>
    <td colspan="3" align="left" bgcolor="#FFFFFF">&nbsp;通过这个推广地址点击进入本站您将自动加一点积分，赶快推广吧！</td>
    </tr>
</table>
</td></tr></table>
</DIV>
<%
call foot
end sub

sub userinfoedit
dim U_ID,U_Name,U_QQ,U_Email,U_RegDate,U_Status,U_Points,U_LoginTime,U_LoginNum,U_IP
 if app_loginmemory = 1 then 
 	U_ID = session("userid")
	U_Name= session("username")
 else 
 	U_ID = request.Cookies("userid")
	U_Name= request.Cookies("username")
 end if
 
if isN(U_ID) or isN(U_Name) then  call logout
 dim rs : Set rs = Database.GetRecordDetail("Tbl_User",array("U_Name:" & U_Name &"","U_ID:"&U_ID&""))  
 U_QQ = getData(rs("U_QQ"))
 U_Email = getData(rs("U_Email"))
 U_RegDate = getData(rs("U_RegDate"))
 U_Status = getData(rs("U_Status"))
 U_Points = getData(rs("U_Points"))
 U_LoginTime = getData(rs("U_LoginTime"))
 U_LoginNum = getData(rs("U_LoginNum"))
 U_IP = getip()
 Database.C(rs)

call head
%>

<form action="index.asp?action=userinfoeditsave" method="post" id="formUser" name="formUser">
		<div class="box noline">
			<h2>会员信息修改</h2>
			<div class="form_detail">
				<p>
					<label>用户名：</label>
					<input tabindex="1"  type="text" name="username" id="username" class="ipt_tx" style="width:285px;"  maxlength="60" readonly="true" value="<%=U_Name%>"/> <span class="red"><span class="require-field">*</span></span>
				</p>

				<p>
					<label>密码：</label>
					<input tabindex="2"  type="password" name="password1" id="password1" class="ipt_tx" style="width:285px;"  maxlength="32"/> <span class="red">*</span>
					<span id="password_msg" class="error">不修改密码请留空</span>
				</p>
				<p>
					<label>确认密码：</label>
					<input tabindex="2" type="password" name="password2" id="password2" class="ipt_tx" style="width:285px;" maxlength="32"/> <span class="red"><span class="require-field">*</span></span>
					<span class="info">6-16个字符，支持大小写字母、数字和符号</span>
				</p>
			    <p>
					<label>QQ：</label>
					<input tabindex="3"  type="text" name="qq" id="qq" class="ipt_tx" style="width:285px;"  maxlength="20" value="<%=U_qq%>" />
				</p>
				<p>
					<label>电子邮件：</label>
					<input tabindex="4" type="text" name="email" id="email"  class="ipt_tx" style="width:285px;" maxlength="60" value="<%=U_Email%>"/> <span class="red"><span class="require-field">*</span></span>
					<span class="info"></span>
				</p>
				
				<p class="split"></p>
				<p>
					<button tabindex="17" name="Submit" id="Submit" type="submit"  class="btn blyellow">确认修改</button>
				</p>
			</div>
		</div>
		</form>
<%
call foot
end sub

sub playrecords
dim U_ID,U_PlayRecords
 if app_loginmemory = 1 then 
 	U_ID = session("userid")
 else 
 	U_ID = request.Cookies("userid")
 end if
 
if isN(U_ID) then  call logout
 dim rs : Set rs = Database.GetRecordDetail("Tbl_User",array("U_ID:"&U_ID&""))  
 U_PlayRecords = getData(rs("U_PlayRecords"))
 Database.C(rs)
call head
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=760 valign=top align=center>
	<tr>
		<td height="30" align=left style="border-bottom: #999966 1px solid;">&nbsp;&nbsp; <font color="#CC0000">我的(100条)收费影片观看记录</font> 
		</td>
	</tr>
	<tr>
	<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#F4F4F4">
  <tr>
    <td width="18%" height="32" align="center" bgcolor="#FFFFFF">影片名称：</td>
    <td width="25%" align="left" bgcolor="#FFFFFF">&nbsp;影片地址</td>
    <td width="24%" align="center" bgcolor="#FFFFFF">消费积分：</td>
    </tr>
	<%
		if isN(U_PlayRecords) then
			%>
            <tr><td align="center" colspan="3">暂无收费影片观看记录</td></tr>
            <%
		else
		dim strlen : strlen=0 
		strlen=len(U_PlayRecords) 
		
		U_PlayRecords=left(U_PlayRecords,(strlen-1))
		U_PlayRecords=right(U_PlayRecords,(strlen-2))
				
		dim sql : sql = "select top 100 d_id,d_name,d_type,D_Stint from Tbl_Datas where d_id in ("&U_PlayRecords&") order by d_addtime desc"
		set rs = Database.GetRecordBySQL(sql)
		 do while not rs.eof
	%>
    <tr>
    <td bgcolor="#FFFFFF"><%=getData(rs("d_name"))%></td>
    <td bgcolor="#FFFFFF"> <a href="<%=getViewLink(getData(rs("d_type")),getData(rs("d_id")))%>">浏览</a> </td>
    <td bgcolor="#FFFFFF"><%=getData(rs("D_Stint"))%></td>
    </tr>
    <%
    rs.movenext
	loop
	end if
	%>
</table>
</td></tr></table>
<%
call foot
end sub

sub earnpoints
dim U_ID,U_PlayRecords
 if app_loginmemory = 1 then 
 	U_ID = session("userid")
 else 
 	U_ID = request.Cookies("userid")
 end if
 
if isN(U_ID) then  call logout

call head
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#F4F4F4">
  <tr bgcolor="#FFFFFF">
    <td width="18%" height="28" align="center" bgcolor="#FFFFFF"><font color="#FF0000">您的推广链接：</font></td>
    <td align="left" bgcolor="#FFFFFF">&nbsp;<input name="page_url"  value="http://<%=app_siteurl%>/user/?action=Popularize&userid=<%=U_ID%>" size="60" style="border: 1 solid #000000">&nbsp;<input type="button" name="Button" class="button1" value="点击复制您的推广连接" onClick="document.getElementById('page_url').select();document.getElementById('page_url').createTextRange().execCommand('Copy');alert('复制成功');"></td>
    </tr>
	<tr bgcolor="#FFFFFF">
    <td width="18%" height="28" align="center" bgcolor="#FFFFFF"></td>
    <td  align="left" bgcolor="#FFFFFF">&nbsp;通过这个推广地址点击进入本站您将自动加一点积分，赶快推广吧！</td>
    </tr>
</table>
<%
call foot
end sub

sub head
%>
 <% call login %>
<DIV class=logo>
<A href="../" target=_blank><IMG src="images/logo.gif"></A>
</DIV>
<DIV class=p-nav>
<DIV style="TEXT-ALIGN: right; MARGIN: 2px 0px; WIDTH: 800px; FLOAT: right">
	<IMG src="images/banner.gif" width=774 height=61>	
</DIV>
</DIV>

<DIV id=main>
<div class="left">
			<h2>用户中心</h2>
  <ul>
    <li><a href="?action=main">欢迎页</a></li>
    <li><a href="?action=userinfoedit">用户信息</a></li>
	<li><a href="?action=playrecords">点播记录</a></li>
	<li><a href="?action=earnpoints">赚取积分</a></li>
    <li><a href="?action=logout">退出</a></li>
  </ul>
</div>
<div class="right">
<%
end sub

sub foot
%>
</DIV>
<DIV id=footer></DIV>
</body>
</HTML>
<%
end sub
%>

