⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 author_index.asp

📁 功能介绍: 一、会员功能模块 1、站内短信发布(设计中) 2、书架收藏夹 3、发表评论(功能不完善) 4、申请作家(与添书员整合) 5、申请添书员(与作家整合) 6、申请更新员
💻 ASP
字号:
<%
author_ID=session("author_ID")
author_name=session("author_name")
If author_name="" or author_ID="" or IsNull(WordID) Then
	Response.Write ("<script>alert(' CnEndWeb(终点)提醒: \n\n 可能您还没有登陆或者登陆超时 ');location.href='author_log.asp?info=log';</script>")
	Response.End
End If
set rs=server.createobject("adodb.recordset")
sql="select * from [author] where author_ID="&author_ID&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	Response.Write ("<script>alert(' CnEndWeb(终点)提醒: \n\n 用户不存在。');history.back();</script>")
	Response.end
End If
If rs("author_addpost")=0 Then
	Response.Write ("<script>alert(' CnEndWeb(终点)提醒: \n\n 您的驻站申请尚未被管理员通过 \n\n 请先联系本站站长或管理员通过您的申请 ');location.href='author_log.asp?info=log';</script>")
	Response.End
End If
If rs("author_lock")=1 Then
	Response.Write ("<script>alert(' CnEndWeb(终点)提醒: \n\n 您的驻站权限被锁定不能发表新作 \n\n 请先联系本站站长或管理员帮您解锁 ');location.href='author_log.asp?info=log';</script>")
	Response.End
End If
rs.close
set rs=nothing

info=request.querystring("info")
if info="" then
info="index"
end if
Select Case info
	Case "index"
		Call index()
	Case "profile"
		Call profile()
	Case "admin"
		Call admin()
	Case "pm"
		Call pm()
end select 
%> <%Sub index()%> <%set rs=server.createobject("adodb.recordset")
sql="select * from [author] where author_ID="&author_ID&""
rs.open sql,conn,1,1
%><table cellspacing="1" cellpadding="4" width="100%" bgcolor="#ffffff" border="0">
	<tr bgcolor="#588fc7">
		<td colspan="4" class="head"><font color="#FFFFFF">欢迎 <%=author_name%> 来到作家控制台</font></td>
	</tr>
	<tr bgcolor="#ffffff">
		<td colspan="4">在这里你可以查看你所发表的作品,修改登陆密码及修改你的个人资料.</td>
	</tr>
	<tr bgcolor="#588fc7">
		<td colspan="4" class="head"><font color="#FFFFFF">资料与统计</font></td>
	</tr>
	<tr bgcolor="#ffffff">
		<td width="25%">你的注册Email:</td>
		<td width="25%"><%=rs("author_Email")%></td>
		<td width="25%">你的注册ID号:</td>
		<td width="25%"><%=rs("author_id")%></td>
	</tr>
	<tr bgcolor="#dfefff">
		<td width="25%">你的注册 QQ号:</td>
		<td width="25%"><%=rs("author_QQ")%></td>
		<td width="25%">你的注册ICQ号:</td>
		<td width="25%"><%=rs("author_ICQ")%></td>
	</tr>
	<tr bgcolor="#ffffff">
		<td>你注册的日期:</td>
		<td><%=rs("author_ADDDate")%></td>
		<td>最后登陆日期:</td>
		<td><%=rs("author_logDate")%></td>
	</tr>
	<tr bgcolor="#dfefff">
		<td>你发表的作品数:</td>
		<td><%=rs("author_bookji")%></td>
		<td>你现在的权限:</td>
		<td></td>
	</tr>
</table>
<%rs.close
set rs=nothing
end sub%>
<!-------------------------------------------------------------------------------------->
<%Sub profile()%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from [author] where author_ID="&author_ID&""
rs.open sql,conn,1,1
%><table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" border="0">
	<form action="author_save.asp?info=profile" method="post" name="author_info">
	<tr>
		<td>
		<table cellspacing="1" cellpadding="4" width="100%" border="0">
			<tr>
				<td bgcolor="#588fc7" colspan="2" class="head">
				<font color="#FFFFFF"><b>修改密码</b></font></td>
			</tr>
			<tr bgcolor="#ffffff">
				<td valign="top" align="right">旧密码:</td>
				<td valign="top" width="80%">
				<input type="password" maxlength="50" size="45" value name="oldpassword">如需要修改密码或修改资料,请填写旧密码以供确认身份. 
				</td>
			</tr>
			<tr bgcolor="#dfefff">
				<td valign="top" align="right">新密码:</td>
				<td valign="top">
				<input type="password" maxlength="50" size="45" value name="newpassword1">如不需要更改密码,此处请留空 
				</td>
			</tr>
			<tr bgcolor="#dfefff">
				<td valign="top" align="right">确认新密码:</td>
				<td valign="top">
				<input type="password" maxlength="50" size="45" value name="newpassword2">如不需要更改密码,此处请留空 
				</td>
			</tr>
		</table>
		<table border="0"  cellspacing="1" cellpadding="4" width="100%" valign="top">
			<tr bgcolor="#588fc7">
				<td colspan="3" class="head">
				<font color="#FFFFFF"><b>修改资料</b></font></td>
			</tr>
			<tr bgcolor="#dfefff">
				<td align="left" width="50" rowspan="18" valign="top"><br>
				<img id="myPhoto" src="authorface/10001.gif"></td>
				<td width="15%" align="right" valign="top">	驻站作家登陆名:</td>
				<td align="left">
				<font color="red">*</font>
				<input type="text" name="author_UserName" disabled value="<%=rs("author_UserName")%>" size="30">&nbsp; 
				不允许修改 </td>
			</tr>
			<tr>
				<td align="right" valign="top">
				作者笔名:</td>
				<td align="left">
				<font color="red">*</font>
				<input type="text" name="author_name" disabled value="<%=rs("author_Name")%>" size="30">&nbsp; 
				不可以修改</td>
			</tr>
			<tr bgcolor="#dfefff">
				<td align="right" valign="top">
				性别:</td>
				<td align="left">
				<font color="red">*</font> <select name="author_sex">
				<option value="男" <%if rs("author_sex")="男" then response.write("selected") end if%>>
				男</option>
				<option value="女" <%if rs("author_sex")="女" then response.write("selected") end if%>>
				女</option>
				</select></td>
			</tr>
			<tr>
				<td align="right" valign="top">
				EMAIL:</td>
				<td align="left">
				<font color="red">*</font>
				<input type="text" name="author_Email" value="<%=rs("author_Email")%>" maxlength="100" size="50">
				<font color="blue">&nbsp;本项为不公开项</font></td>
			</tr>
			<tr bgcolor="#dfefff">
				<td align="right" valign="top">
				我的头像:</td>
				<td align="left" valign="top">
				<font color="red">*</font>
				<select name="author_face" onchange="javascript:myPhoto.src='authorface/'+(this.value)+'.gif';">
				<% dim i
				 			 for i = 10001 to 10460%>
				<option value="<%=i%>" <%if rs("author_face")=i then response.write(" selected") end if%>>
				face<%=i-10000%></option>
				<%next%></select> <a href="javascript:openface()">查看所有头像</a></td>
			</tr>
			<tr>
				<td align="right" valign="top">
				个人简介:</td>
				<td align="left">
				<font color="red">*</font>
				<textarea name="author_resume" rows="7" cols="80"><%=rs("author_resume")%></textarea>
				
&nbsp;请少于300字并不要使用HTML代码</td>
			</tr>
			<tr bgcolor="#dfefff">
				<td align="right" valign="top">
				网络寻呼号码:</td>
				<td align="left" valign="top">
				<input type="text" name="author_ICQ" value="<%=rs("author_ICQ")%>" onfocus="this.select()" maxlength="15" size="15">&nbsp;&nbsp;
				<input type="text" name="author_QQ" onfocus="this.select()" value="<%=rs("author_QQ")%>" maxlength="15" size="15">&nbsp;
				<font color="blue">&nbsp;本项为不公开项</font></td>
			</tr>
			<tr>
				<td align="center" style="border-top: #999966 1px solid;" colspan="2">
				
				</td>
			</tr>
		</table>
		</td>
	</tr>
			<tr>
				<td align="center" height="30" bgcolor="#588fc7" colspan="4" class="head">
				<input type="submit" value=" 修改 资料 "> </td>
			</tr>
	</form>
</table>
<%rs.close
set rs=nothing
end sub%>
<!-------------------------------------------------------------------------------------->
<%Sub admin()%>
<table cellspacing="1" cellpadding="4" width="100%" bgcolor="#ffffff" border="0">
	<tr bgcolor="#588fc7">
		<td colspan="4" class="head"><font color="#FFFFFF">管理专栏评论</font></td>
	</tr>
	<tr bgcolor="#ffffff">
		<td colspan="4">
		<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
			<tr align="center" bgcolor="#F7F7F7">
				<td width="60%" height="34" valign="middle" bgcolor="#F7F7F7">评论内容</td>
				<td width="10%" height="34" valign="middle" bgcolor="#F7F7F7">发表人</td>
				<td width="15%">置顶 精华</td>
				<td width="15%">清理 删除</td>
			</tr>
<%
Const MaxPerPage=20
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if                 

set rs=server.createobject("adodb.recordset")
sql="select * from Comment where type_ID="&author_id&" and Commenttype=2 order by CommentID desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
			<tr align="center" bgcolor="#F7F7F7">
				<td height="34" colspan="4" valign="middle" bgcolor="#F7F7F7">
				<span class="style1">暂无任何评论</span></td>
			</tr>
<%else
   Rs.PageSize=MaxPerPage
   Allpage=Rs.PageCount
   If Currentpage>Allpage Then Currentpage=1
   Num=Rs.RecordCount
   Rs.MoveFirst
   Rs.AbsolutePage=CurrentPage
   i=0
 Do While Not Rs.Eof%>
			<tr align="center" bgcolor="#F7F7F7">
				<td height="34" align="left" valign="middle" bgcolor="#F7F7F7"><%=rs("Content")%></td>
				<td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
				<%=rs("UserName")%></td>
				<td align="center">
				<input class="button" type="button" name="IsTop" value="<%if rs("IsTop")=0 then%>置顶<%else%>取消<%end if%>" onclick="javascript:window.open('author_pinglunSave.asp?id=<%=rs("CommentID")%>&amp;act=goTop','_self','')" style="width: 35; height: 20">&nbsp;
				<input class="button" type="button" name="IsGood" value="<%if rs("IsGood")=0 then%>精华<%else%>取消<%end if%>" onclick="javascript:window.open('author_pinglunSave.asp?id=<%=rs("CommentID")%>&amp;act=goGood','_self','')" style="width: 35; height: 20"></td>
				<td align="center">
				<a href="author_save.ASP?info=commentcll&id=<%=rs("CommentID")%>">清理</a>
				<a href="author_save.ASP?info=commentdel&id=<%=rs("CommentID")%>">删除</a></td>
			</tr>
			<%
      i=i+1
      If i>=MaxPerPage Then  Exit  Do
      Rs.MoveNext
   Loop
%>
<%End If
Rs.Close
Set  Rs=Nothing
%>
			<tr align="center" bgcolor="#F7F7F7">
				<td height="34" colspan="5" valign="middle" bgcolor="#F7F7F7"><%
Response.Write ShowPage("Author_index.asp?info=admin",CurrentPage,Num,MaxPerPage,True,True," 条纪录")
%>
</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
<%end sub%>
<!-------------------------------------------------------------------------------------->
<%Sub pm()%> <%end sub%><!-------------------------------------------------------------------------------------->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -